From 3d0ed7d763b54f22520be74c0c7354947082ef0c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 19 Jun 2021 12:16:49 +0200 Subject: [PATCH 1/2] mac80211: fix an issue with wds links on 802.11ax devices Signed-off-by: Felix Fietkau (cherry-picked from commit 89c9ccc3b241d8f07c22a1c271211322c4703f7b) --- ...iwlwifi-specific-workaround-that-bro.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/378-mac80211-remove-iwlwifi-specific-workaround-that-bro.patch diff --git a/package/kernel/mac80211/patches/subsys/378-mac80211-remove-iwlwifi-specific-workaround-that-bro.patch b/package/kernel/mac80211/patches/subsys/378-mac80211-remove-iwlwifi-specific-workaround-that-bro.patch new file mode 100644 index 0000000000..a5ad377e6f --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/378-mac80211-remove-iwlwifi-specific-workaround-that-bro.patch @@ -0,0 +1,51 @@ +From: Felix Fietkau +Date: Sat, 19 Jun 2021 12:10:14 +0200 +Subject: [PATCH] mac80211: remove iwlwifi specific workaround that broke sta + NDP tx + +Sending nulldata packets is important for sw AP link probing and detecting +4-address mode links. The checks that dropped these packets were apparently +added to work around an iwlwifi firmware bug with multi-TID aggregation. + +Fixes: 41cbb0f5a295 ("mac80211: add support for HE") +Cc: stable@vger.kernel.org +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +@@ -1085,6 +1085,9 @@ static int iwl_mvm_tx_mpdu(struct iwl_mv + if (WARN_ON_ONCE(mvmsta->sta_id == IWL_MVM_INVALID_STA)) + return -1; + ++ if (unlikely(ieee80211_is_any_nullfunc(fc)) && sta->he_cap.has_he) ++ return -1; ++ + if (unlikely(ieee80211_is_probe_resp(fc))) + iwl_mvm_probe_resp_set_noa(mvm, skb); + +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -1094,11 +1094,6 @@ void ieee80211_send_nullfunc(struct ieee + struct ieee80211_hdr_3addr *nullfunc; + struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; + +- /* Don't send NDPs when STA is connected HE */ +- if (sdata->vif.type == NL80211_IFTYPE_STATION && +- !(ifmgd->flags & IEEE80211_STA_DISABLE_HE)) +- return; +- + skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif, + !ieee80211_hw_check(&local->hw, DOESNT_SUPPORT_QOS_NDP)); + if (!skb) +@@ -1130,10 +1125,6 @@ static void ieee80211_send_4addr_nullfun + if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION)) + return; + +- /* Don't send NDPs when connected HE */ +- if (!(sdata->u.mgd.flags & IEEE80211_STA_DISABLE_HE)) +- return; +- + skb = dev_alloc_skb(local->hw.extra_tx_headroom + 30); + if (!skb) + return; From b2a3df91fa7e9a7f8b9216a99496ecc935f3e56d Mon Sep 17 00:00:00 2001 From: Perry Melange Date: Mon, 19 Apr 2021 11:17:10 +0200 Subject: [PATCH 2/2] qos-scripts: add ifbN device before setting the link up commit 50413e1ec83dedaea44558d5f37af5454156a46a replaced ifconfig with ip. In order to set a link state to up, the interface needs to be added first. Fixes: FS#3754 Signed-off-by: Perry Melange [Add Fixes tag] Signed-off-by: Baptiste Jonglez (cherry picked from commit 23c3bab9209f984692f8206c0d97758ee223a26f) --- package/network/config/qos-scripts/Makefile | 2 +- .../network/config/qos-scripts/files/usr/lib/qos/generate.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/config/qos-scripts/Makefile b/package/network/config/qos-scripts/Makefile index 7d282b2db5..d6e7df1467 100644 --- a/package/network/config/qos-scripts/Makefile +++ b/package/network/config/qos-scripts/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qos-scripts PKG_VERSION:=1.3.1 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh index 32f15581f8..62e7283633 100755 --- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh @@ -326,7 +326,8 @@ start_interface() { append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N" done append ${prefix}q "$(tcrules)" "$N" - export dev_${dir}="ip link set $dev up >&- 2>&- + export dev_${dir}="ip link add ${dev} type ifb >&- 2>&- +ip link set $dev up >&- 2>&- tc qdisc del dev $dev root >&- 2>&- tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0 tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit"