diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2016-02-19 06:18:01 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-02-24 03:04:38 -0500 |
commit | 109843b07aed8663a3c1fe9ef02c540b6ff203b4 (patch) | |
tree | 64337640a1304b2cb5ec96981498e7df41aa05d8 | |
parent | 2b67f944f88c29e71efdcfc4d0c21ab28fbf23ae (diff) |
mac80211: fix wiphy supported_band access
Fix wiphy supported_band access in tx radiotap parsing introduced
in commit 5ec3aed9ba4c ("mac80211: Parse legacy and HT rate in
injected frames"). In particular, info->band is always set to 0
(IEEE80211_BAND_2GHZ) since it has not assigned yet.
This cause a kernel crash on 5GHz only devices.
Move ieee80211_parse_tx_radiotap() after info->band assignment
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/tx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 7bb67fa9f4d2..3a7475ff1a41 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1892,10 +1892,6 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1892 | info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | | 1892 | info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | |
1893 | IEEE80211_TX_CTL_INJECTED; | 1893 | IEEE80211_TX_CTL_INJECTED; |
1894 | 1894 | ||
1895 | /* process and remove the injection radiotap header */ | ||
1896 | if (!ieee80211_parse_tx_radiotap(local, skb)) | ||
1897 | goto fail; | ||
1898 | |||
1899 | rcu_read_lock(); | 1895 | rcu_read_lock(); |
1900 | 1896 | ||
1901 | /* | 1897 | /* |
@@ -1957,6 +1953,11 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1957 | goto fail_rcu; | 1953 | goto fail_rcu; |
1958 | 1954 | ||
1959 | info->band = chandef->chan->band; | 1955 | info->band = chandef->chan->band; |
1956 | |||
1957 | /* process and remove the injection radiotap header */ | ||
1958 | if (!ieee80211_parse_tx_radiotap(local, skb)) | ||
1959 | goto fail_rcu; | ||
1960 | |||
1960 | ieee80211_xmit(sdata, NULL, skb); | 1961 | ieee80211_xmit(sdata, NULL, skb); |
1961 | rcu_read_unlock(); | 1962 | rcu_read_unlock(); |
1962 | 1963 | ||