aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/hamradio/mkiss.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-15 15:59:19 -0800
committerDavid S. Miller <davem@davemloft.net>2008-02-15 15:59:19 -0800
commitb57dfbc4f7f8d394c5e96677d2b66ffca1b4e8a7 (patch)
tree4d37426789577fb1908fd5d052b3b30047800e7d /drivers/net/hamradio/mkiss.c
parent42fe95cae50bbea4c83b15962b853d6d3b14db37 (diff)
parente8ef7f295b9f02c1522da405ac545318174239d5 (diff)
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net/hamradio/mkiss.c')
-rw-r--r--drivers/net/hamradio/mkiss.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index cfcd15af501..30c9b3b0d13 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -289,7 +289,6 @@ static void ax_bump(struct mkiss *ax)
*ax->rbuff &= ~0x20;
}
}
- spin_unlock_bh(&ax->buflock);
count = ax->rcount;
@@ -297,17 +296,17 @@ static void ax_bump(struct mkiss *ax)
printk(KERN_ERR "mkiss: %s: memory squeeze, dropping packet.\n",
ax->dev->name);
ax->stats.rx_dropped++;
+ spin_unlock_bh(&ax->buflock);
return;
}
- spin_lock_bh(&ax->buflock);
memcpy(skb_put(skb,count), ax->rbuff, count);
- spin_unlock_bh(&ax->buflock);
skb->protocol = ax25_type_trans(skb, ax->dev);
netif_rx(skb);
ax->dev->last_rx = jiffies;
ax->stats.rx_packets++;
ax->stats.rx_bytes += count;
+ spin_unlock_bh(&ax->buflock);
}
static void kiss_unesc(struct mkiss *ax, unsigned char s)