diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-10-10 12:03:31 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-10-10 12:03:43 +0300 |
commit | dfd2d876b3fda1790bc0239ba4c6967e25d16e91 (patch) | |
tree | 45c2ec4b25afdf7b521dec642f6b75112bb401a3 /net/mac80211/tx.c | |
parent | a790cc3a4fad75048295571a350b95b87e022a5a (diff) | |
parent | 10d5ea5a436da8d60cdb5845f454d595accdbce0 (diff) | |
download | linux-dfd2d876b3fda1790bc0239ba4c6967e25d16e91.tar.xz |
Merge remote-tracking branch 'wireless/main' into wireless-next
Pull in wireless/main content since some new code would
otherwise conflict with it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index d9e7a2ed5d2c..e137355bea67 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2319,6 +2319,10 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, u16 len_rthdr; int hdrlen; + sdata = IEEE80211_DEV_TO_SUB_IF(dev); + if (unlikely(!ieee80211_sdata_running(sdata))) + goto fail; + memset(info, 0, sizeof(*info)); info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_INJECTED; @@ -2378,8 +2382,6 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, * This is necessary, for example, for old hostapd versions that * don't use nl80211-based management TX/RX. */ - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - list_for_each_entry_rcu(tmp_sdata, &local->interfaces, list) { if (!ieee80211_sdata_running(tmp_sdata)) continue; @@ -4169,7 +4171,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, struct sk_buff *next; int len = skb->len; - if (unlikely(skb->len < ETH_HLEN)) { + if (unlikely(!ieee80211_sdata_running(sdata) || skb->len < ETH_HLEN)) { kfree_skb(skb); return; } @@ -4566,7 +4568,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb, struct ieee80211_key *key; struct sta_info *sta; - if (unlikely(skb->len < ETH_HLEN)) { + if (unlikely(!ieee80211_sdata_running(sdata) || skb->len < ETH_HLEN)) { kfree_skb(skb); return NETDEV_TX_OK; } |