wifi-ax: fix mac80211 crash when dealing with AP vlans

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2023-05-16 19:45:44 +00:00
committed by John Crispin
parent c3ab147246
commit acc3d67cff

View File

@@ -0,0 +1,12 @@
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3978,7 +3978,8 @@ void __ieee80211_subif_start_xmit(struct
ap_sdata = sdata;
if (ap_sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED &&
- !is_multicast_ether_addr(skb->data)) {
+ !is_multicast_ether_addr(skb->data) &&
+ (sta || ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD))) {
if (sta)
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
ieee80211_8023_xmit(sdata, dev, sta, key, skb);