patch-2.4.2 linux/drivers/net/irda/toshoboe.c
Next file: linux/drivers/net/irda/w83977af_ir.c
Previous file: linux/drivers/net/irda/smc-ircc.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Tue Feb 13 13:15:05 2001
- Orig file:
v2.4.1/linux/drivers/net/irda/toshoboe.c
- Orig date:
Thu Jan 4 12:50:12 2001
diff -u --recursive --new-file v2.4.1/linux/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c
@@ -62,7 +62,7 @@
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/delay.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/rtnetlink.h>
@@ -263,7 +263,7 @@
toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
{
struct toshoboe_cb *self;
- __u32 speed;
+ __s32 speed;
int mtt, len;
self = (struct toshoboe_cb *) dev->priv;
@@ -272,10 +272,12 @@
);
/* 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) {
toshoboe_setbaud(self, 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)