aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-08-02 07:29:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-02 13:48:14 -0400
commit00898a47269ae5e6dda04defad00234b96692d95 (patch)
tree96d5fb9e5c10bfe8e55c32072e7ee08342920330 /drivers/net/wireless/rt2x00
parent449f94eadc91d69fa044fa92ef45c02e86559e13 (diff)
rt2x00: fix usage of NULL queue
We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit 62fe778412b36791b7897cfa139342906fbbf07b "rt2x00: Fix stuck queue in tx failure case" . Cc: stable@kernel.org # 3.0+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 8efab3983528..4ccf23805973 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
113 * due to possible race conditions in mac80211. 113 * due to possible race conditions in mac80211.
114 */ 114 */
115 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) 115 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
116 goto exit_fail; 116 goto exit_free_skb;
117 117
118 /* 118 /*
119 * Use the ATIM queue if appropriate and present. 119 * Use the ATIM queue if appropriate and present.
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
127 ERROR(rt2x00dev, 127 ERROR(rt2x00dev,
128 "Attempt to send packet over invalid queue %d.\n" 128 "Attempt to send packet over invalid queue %d.\n"
129 "Please file bug report to %s.\n", qid, DRV_PROJECT); 129 "Please file bug report to %s.\n", qid, DRV_PROJECT);
130 goto exit_fail; 130 goto exit_free_skb;
131 } 131 }
132 132
133 /* 133 /*
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
159 159
160 exit_fail: 160 exit_fail:
161 rt2x00queue_pause_queue(queue); 161 rt2x00queue_pause_queue(queue);
162 exit_free_skb:
162 dev_kfree_skb_any(skb); 163 dev_kfree_skb_any(skb);
163} 164}
164EXPORT_SYMBOL_GPL(rt2x00mac_tx); 165EXPORT_SYMBOL_GPL(rt2x00mac_tx);