1 From: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
2 Date: Wed, 10 Feb 2016 16:08:17 +0100
3 Subject: [PATCH] mac80211: fix wiphy supported_band access
5 Fix wiphy supported_band access in tx radiotap parsing. In particular,
6 info->band is always set to 0 (IEEE80211_BAND_2GHZ) since it has not
7 assigned yet. This cause a kernel crash on 5GHz only devices.
8 Move ieee80211_parse_tx_radiotap() after info->band assignment
10 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
13 --- a/net/mac80211/tx.c
14 +++ b/net/mac80211/tx.c
15 @@ -1890,10 +1890,6 @@ netdev_tx_t ieee80211_monitor_start_xmit
16 info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
17 IEEE80211_TX_CTL_INJECTED;
19 - /* process and remove the injection radiotap header */
20 - if (!ieee80211_parse_tx_radiotap(local, skb))
26 @@ -1955,6 +1951,10 @@ netdev_tx_t ieee80211_monitor_start_xmit
29 info->band = chandef->chan->band;
30 + /* process and remove the injection radiotap header */
31 + if (!ieee80211_parse_tx_radiotap(local, skb))
34 ieee80211_xmit(sdata, NULL, skb);