a5ad377e6fb1f585864de84ff4c2c3809ba68636
[openwrt/staging/linusw.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sat, 19 Jun 2021 12:10:14 +0200
3 Subject: [PATCH] mac80211: remove iwlwifi specific workaround that broke sta
4 NDP tx
5
6 Sending nulldata packets is important for sw AP link probing and detecting
7 4-address mode links. The checks that dropped these packets were apparently
8 added to work around an iwlwifi firmware bug with multi-TID aggregation.
9
10 Fixes: 41cbb0f5a295 ("mac80211: add support for HE")
11 Cc: stable@vger.kernel.org
12 Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 ---
14
15 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
16 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
17 @@ -1085,6 +1085,9 @@ static int iwl_mvm_tx_mpdu(struct iwl_mv
18 if (WARN_ON_ONCE(mvmsta->sta_id == IWL_MVM_INVALID_STA))
19 return -1;
20
21 + if (unlikely(ieee80211_is_any_nullfunc(fc)) && sta->he_cap.has_he)
22 + return -1;
23 +
24 if (unlikely(ieee80211_is_probe_resp(fc)))
25 iwl_mvm_probe_resp_set_noa(mvm, skb);
26
27 --- a/net/mac80211/mlme.c
28 +++ b/net/mac80211/mlme.c
29 @@ -1094,11 +1094,6 @@ void ieee80211_send_nullfunc(struct ieee
30 struct ieee80211_hdr_3addr *nullfunc;
31 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
32
33 - /* Don't send NDPs when STA is connected HE */
34 - if (sdata->vif.type == NL80211_IFTYPE_STATION &&
35 - !(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
36 - return;
37 -
38 skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif,
39 !ieee80211_hw_check(&local->hw, DOESNT_SUPPORT_QOS_NDP));
40 if (!skb)
41 @@ -1130,10 +1125,6 @@ static void ieee80211_send_4addr_nullfun
42 if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION))
43 return;
44
45 - /* Don't send NDPs when connected HE */
46 - if (!(sdata->u.mgd.flags & IEEE80211_STA_DISABLE_HE))
47 - return;
48 -
49 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 30);
50 if (!skb)
51 return;