summaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /net/irda
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irda_device.c4
-rw-r--r--net/irda/irlan/irlan_client.c2
-rw-r--r--net/irda/irlan/irlan_common.c11
-rw-r--r--net/irda/irlan/irlan_eth.c23
4 files changed, 12 insertions, 28 deletions
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index d1d89b1e4..94345259d 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -426,12 +426,8 @@ int irda_device_setup(struct net_device *dev)
memset(dev->broadcast, 0xff, 4);
dev->mtu = 2048;
- dev->tbusy = 1;
-
dev_init_buffers(dev);
-
dev->flags = IFF_NOARP;
-
return 0;
}
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
index 355bae955..7e17cfe8b 100644
--- a/net/irda/irlan/irlan_client.c
+++ b/net/irda/irlan/irlan_client.c
@@ -126,7 +126,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
* is up, that means that the "user" really wants to connect. If not
* we notify the user about the possibility of an IrLAN connection
*/
- if (self->dev.start) {
+ if (netif_running(&self->dev)) {
/* Open TSAPs */
irlan_client_open_ctrl_tsap(self);
irlan_open_data_tsap(self);
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 9d276e0a1..a9c2cb90f 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -120,7 +120,7 @@ void irlan_watchdog_timer_expired(void *data)
ASSERT(self->magic == IRLAN_MAGIC, return;);
/* Check if device still configured */
- if (self->dev.start) {
+ if (netif_running(&self->dev)) {
IRDA_DEBUG(0, __FUNCTION__
"(), notifying irmanager to stop irlan!\n");
mgr_event.event = EVENT_IRLAN_STOP;
@@ -363,7 +363,7 @@ void irlan_close(struct irlan_cb *self)
ASSERT(self->magic == IRLAN_MAGIC, return;);
/* Check if device is still configured */
- if (self->dev.start) {
+ if (netif_running(&self->dev)) {
IRDA_DEBUG(0, __FUNCTION__
"(), Device still configured, closing later!\n");
@@ -420,7 +420,7 @@ void irlan_connect_indication(void *instance, void *sap, struct qos_info *qos,
irlan_open_unicast_addr(self);
}
/* Ready to transfer Ethernet frames (at last) */
- self->dev.tbusy = 0;
+ netif_start_queue(&self->dev);
}
void irlan_connect_confirm(void *instance, void *sap, struct qos_info *qos,
@@ -454,8 +454,7 @@ void irlan_connect_confirm(void *instance, void *sap, struct qos_info *qos,
irlan_set_multicast_filter(self, TRUE);
/* Ready to transfer Ethernet frames */
- self->dev.tbusy = 0;
-
+ netif_start_queue(&self->dev);
irlan_eth_send_gratuitous_arp(&self->dev);
}
@@ -1196,7 +1195,7 @@ static int irlan_proc_read(char *buf, char **start, off_t offset, int len)
buf+len);
len += sprintf(buf+len, "tx busy: %s\n",
- self->dev.tbusy ? "TRUE" : "FALSE");
+ netif_queue_stopped(&self->dev) ? "TRUE" : "FALSE");
len += sprintf(buf+len, "\n");
}
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index c2037ad74..5ee81ec03 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -62,8 +62,6 @@ int irlan_eth_init(struct net_device *dev)
dev->get_stats = irlan_eth_get_stats;
dev->set_multicast_list = irlan_eth_set_multicast_list;
- dev->tbusy = 1;
-
ether_setup(dev);
/*
@@ -124,9 +122,7 @@ int irlan_eth_open(struct net_device *dev)
ASSERT(self != NULL, return -1;);
/* Ready to play! */
-/* dev->tbusy = 0; */ /* Wait until data link is ready */
- dev->interrupt = 0;
- dev->start = 1;
+/* netif_start_queue(dev) */ /* Wait until data link is ready */
self->notify_irmanager = TRUE;
@@ -153,9 +149,8 @@ int irlan_eth_close(struct net_device *dev)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
/* Stop device */
- dev->tbusy = 1;
- dev->start = 0;
-
+ netif_stop_queue(dev);
+
irlan_mod_dec_use_count();
irlan_close_data_channel(self);
@@ -192,10 +187,6 @@ int irlan_eth_xmit(struct sk_buff *skb, struct net_device *dev)
ASSERT(self != NULL, return 0;);
ASSERT(self->magic == IRLAN_MAGIC, return 0;);
- /* Check if IrTTP can accept more frames */
- if (dev->tbusy)
- return -EBUSY;
-
/* skb headroom large enough to contain all IrDA-headers? */
if ((skb_headroom(skb) < self->max_header_size) || (skb_shared(skb))) {
struct sk_buff *new_skb =
@@ -279,7 +270,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
* Function irlan_eth_flow (status)
*
* Do flow control between IP/Ethernet and IrLAN/IrTTP. This is done by
- * controlling the dev->tbusy variable.
+ * controlling the queue stop/start.
*/
void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
{
@@ -297,15 +288,13 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
switch (flow) {
case FLOW_STOP:
- dev->tbusy = 1;
+ netif_stop_queue(dev);
break;
case FLOW_START:
default:
/* Tell upper layers that its time to transmit frames again */
- dev->tbusy = 0;
-
/* Schedule network layer */
- mark_bh(NET_BH);
+ netif_start_queue(dev);
break;
}
}