diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-11-14 15:33:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-11-15 14:29:30 -0500 |
commit | b4089d6d8e71a7293e2192025dfa507a04f661c4 (patch) | |
tree | edb7f9a85811f1b2950c103aed5c10583e329c4c /drivers | |
parent | 6fcbe538be43e360dc286da532f5add2fe7f46d8 (diff) |
rt2x00: fix a crash bug in the HT descriptor handling fix
Commit "rt2x00: fix HT TX descriptor settings regression"
assumes that the control parameter to rt2x00mac_tx is always non-NULL.
There is an internal call in rt2x00lib_bc_buffer_iter where NULL is
passed. Fix the resulting crash by adding an initialized dummy on-stack
ieee80211_tx_control struct.
Cc: stable@vger.kernel.org # 3.7+
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 080b1fcae5fa..9dd92a700442 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -181,6 +181,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work) | |||
181 | static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, | 181 | static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, |
182 | struct ieee80211_vif *vif) | 182 | struct ieee80211_vif *vif) |
183 | { | 183 | { |
184 | struct ieee80211_tx_control control = {}; | ||
184 | struct rt2x00_dev *rt2x00dev = data; | 185 | struct rt2x00_dev *rt2x00dev = data; |
185 | struct sk_buff *skb; | 186 | struct sk_buff *skb; |
186 | 187 | ||
@@ -195,7 +196,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, | |||
195 | */ | 196 | */ |
196 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | 197 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
197 | while (skb) { | 198 | while (skb) { |
198 | rt2x00mac_tx(rt2x00dev->hw, NULL, skb); | 199 | rt2x00mac_tx(rt2x00dev->hw, &control, skb); |
199 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | 200 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
200 | } | 201 | } |
201 | } | 202 | } |