patch-2.3.44 linux/drivers/net/irda/w83977af_ir.c

Next file: linux/drivers/net/lance.c
Previous file: linux/drivers/net/irda/toshoboe.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.43/linux/drivers/net/irda/w83977af_ir.c linux/drivers/net/irda/w83977af_ir.c
@@ -475,8 +475,8 @@
 	outb(UFR_EN_FIFO, iobase+UFR); /* First we must enable FIFO */
 	outb(0xa7, iobase+UFR);
 
-	self->netdev->tbusy = 0;
-	
+	netif_wake_queue(self->netdev);
+		
 	/* Enable some interrupts so we can receive frames */
 	switch_bank(iobase, SET0);
 	if (speed > PIO_MAX_SPEED) {
@@ -511,9 +511,8 @@
 		   (int) skb->len);
 	
 	/* Lock transmit buffer */
-	if (irda_lock((void *) &dev->tbusy) == FALSE)
-		return -EBUSY;
-
+	netif_stop_queue(dev);
+	
 	/* Check if we need to change the speed */
 	if ((speed = irda_get_speed(skb)) != self->io.speed)
 		self->new_speed = speed;
@@ -715,11 +714,9 @@
 	}
 
 	/* Unlock tx_buff and request another frame */
-	self->netdev->tbusy = 0; /* Unlock */
-	
 	/* Tell the network layer, that we want more frames */
-	mark_bh(NET_BH);
-
+	netif_wake_queue(self->netdev);
+	
 	/* Restore set */
 	outb(set, iobase+SSR);
 }
@@ -991,12 +988,10 @@
 			outb(AUDR_SFEND, iobase+AUDR);
 			outb(set, iobase+SSR); 
 
-			self->netdev->tbusy = 0; /* Unlock */
 			self->stats.tx_packets++;
 
-			/* Schedule network layer */
-		        mark_bh(NET_BH);	
-
+			/* Feed me more packets */
+			netif_wake_queue(self->netdev);
 			new_icr |= ICR_ETBREI;
 		}
 	}
@@ -1124,8 +1119,6 @@
 	}
 	self = (struct w83977af_ir *) dev->priv;
 
-	dev->interrupt = 1;
-
 	iobase = self->io.fir_base;
 
 	/* Save current bank */
@@ -1148,7 +1141,6 @@
 	outb(icr, iobase+ICR);    /* Restore (new) interrupts */
 	outb(set, iobase+SSR);    /* Restore bank register */
 
-	self->netdev->interrupt = 0;
 }
 
 /*
@@ -1250,10 +1242,8 @@
 	outb(set, iobase+SSR);
 
 	/* Ready to play! */
-	dev->tbusy = 0;
-	dev->interrupt = 0;
-	dev->start = 1;
-
+	netif_start_queue(dev);
+	
 	/* 
 	 * Open new IrLAP layer instance, now that everything should be
 	 * initialized properly 
@@ -1288,9 +1278,8 @@
 	iobase = self->io.fir_base;
 
 	/* Stop device */
-	dev->tbusy = 1;
-	dev->start = 0;
-
+	netif_stop_queue(dev);
+	
 	/* Stop and remove instance of IrLAP */
 	if (self->irlap)
 		irlap_close(self->irlap);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)