aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-07-05 09:11:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:30:06 -0400
commit9a613195123ab2c2400004c7aaee4d25f3b8ae52 (patch)
tree4250c4fc2b84b6e2043614eac7c0781f0b3feb1d /drivers/net/wireless
parent49292d56352a6ab90d04c3448dd8b6106dfef2d6 (diff)
rt2x00: Fix NULL pointer error in adhoc/master mode
As soon as an interface is enabled, and that interface is in adhoc or master mode, the device will start raising beacondone interrupts. But before the first interrupt is raised, mac80211 will probably not have send any beacons to the device yet, which results in a NULL pointer error when the skb is being freed. Note that the "raise beacondone interrupts without a beacon" is also a bug, and will be addressed later. The more important bug however is preventing the NULL pointer failt itself, since there might be other conditions that could trigger it as well. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 3ddce538ef4a..ecf57f8f34b2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -108,6 +108,9 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
108 108
109void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) 109void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
110{ 110{
111 if (!skb)
112 return;
113
111 rt2x00queue_unmap_skb(rt2x00dev, skb); 114 rt2x00queue_unmap_skb(rt2x00dev, skb);
112 dev_kfree_skb_any(skb); 115 dev_kfree_skb_any(skb);
113} 116}