patch-2.4.2 linux/drivers/net/irda/irport.c
Next file: linux/drivers/net/irda/irtty.c
Previous file: linux/drivers/net/ioc3-eth.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Tue Feb 13 13:15:05 2001
- Orig file:
v2.4.1/linux/drivers/net/irda/irport.c
- Orig date:
Sun Nov 12 20:43:07 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/net/irda/irport.c linux/drivers/net/irda/irport.c
@@ -41,7 +41,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/ioport.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/serial_reg.h>
@@ -616,7 +616,7 @@
struct irport_cb *self;
unsigned long flags;
int iobase;
- __u32 speed;
+ __s32 speed;
ASSERT(dev != NULL, return 0;);
@@ -628,12 +628,14 @@
netif_stop_queue(dev);
/* Check if we need to change the speed */
- if ((speed = irda_get_speed(skb)) != self->io.speed) {
+ speed = irda_get_next_speed(skb);
+ if ((speed != self->io.speed) && (speed != -1)) {
/* Check for empty frame */
if (!skb->len) {
irda_task_execute(self, __irport_change_speed,
irport_change_speed_complete,
NULL, (void *) speed);
+ dev_kfree_skb(skb);
return 0;
} else
self->new_speed = speed;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)