aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-08-16 10:05:14 +0200
committerFelix Fietkau <nbd@nbd.name>2021-11-23 18:30:04 +0100
commit4a70b93f2d0bd325740ed3a197ca78118cdf7279 (patch)
tree101ea30f317a9d9ebfbf2f71cc4dcb05b43a1a69
parentcdb867b73ac66301679de62c12fd974ef5cc0f63 (diff)
downloadupstream-4a70b93f2d0bd325740ed3a197ca78118cdf7279.tar.gz
upstream-4a70b93f2d0bd325740ed3a197ca78118cdf7279.tar.bz2
upstream-4a70b93f2d0bd325740ed3a197ca78118cdf7279.zip
mac80211: fix HT40 mode for 6G band
The channel offset used for VHT segment calculation was missing for HT Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit a0d81ba0d5e9d055c55b5e478cb913c217122317)
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index c4f843e5bb..07e0758c4f 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -148,6 +148,9 @@ mac80211_hostapd_setup_base() {
[ "$noscan" -gt 0 ] && hostapd_noscan=1
[ "$tx_burst" = 0 ] && tx_burst=
+ chan_ofs=0
+ [ "$band" = "6g" ] && chan_ofs=1
+
ieee80211n=1
ht_capab=
case "$htmode" in
@@ -155,7 +158,7 @@ mac80211_hostapd_setup_base() {
HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160)
case "$hwmode" in
a)
- case "$(( ($channel / 4) % 2 ))" in
+ case "$(( (($channel / 4) + $chan_ofs) % 2 ))" in
1) ht_capab="[HT40+]";;
0) ht_capab="[HT40-]";;
esac
@@ -224,8 +227,6 @@ mac80211_hostapd_setup_base() {
enable_ac=0
vht_oper_chwidth=0
vht_center_seg0=
- chan_ofs=0
- [ "$band" = "6g" ] && chan_ofs=1
idx="$channel"
case "$htmode" in