mac80211: fix wiphy supported_band access
[platform/kernel/linux-rpi.git] / net / mac80211 / tx.c
index 7bb67fa..3a7475f 100644 (file)
@@ -1892,10 +1892,6 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
        info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
                      IEEE80211_TX_CTL_INJECTED;
 
-       /* process and remove the injection radiotap header */
-       if (!ieee80211_parse_tx_radiotap(local, skb))
-               goto fail;
-
        rcu_read_lock();
 
        /*
@@ -1957,6 +1953,11 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
                goto fail_rcu;
 
        info->band = chandef->chan->band;
+
+       /* process and remove the injection radiotap header */
+       if (!ieee80211_parse_tx_radiotap(local, skb))
+               goto fail_rcu;
+
        ieee80211_xmit(sdata, NULL, skb);
        rcu_read_unlock();