[openwrt/openwrt] mac80211: set hostapd op_class for 6 GHz

LEDE Commits lede-commits at lists.infradead.org
Wed May 26 03:05:36 PDT 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c8bcdd561909034a14cbfd785e13848cbd5f5e50

commit c8bcdd561909034a14cbfd785e13848cbd5f5e50
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon May 24 18:45:57 2021 +0200

    mac80211: set hostapd op_class for 6 GHz
    
    This is needed to disambiguate it from 5 GHz channels
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index fca7c1c1d6..8771f12d2f 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -227,6 +227,14 @@ mac80211_hostapd_setup_base() {
 			vht_center_seg0=$idx
 		;;
 	esac
+	[ "$band" = "6g" ] && {
+		op_class=
+		case "$htmode" in
+			HE20) op_class=131;;
+			HE*) op_class=$((132 + $vht_oper_chwidth))
+		esac
+		[ -n "$op_class" ] && append base_cfg "op_class=$op_class" "$N"
+	}
 	[ "$hwmode" = "a" ] || enable_ac=0
 
 	if [ "$enable_ac" != "0" ]; then



More information about the lede-commits mailing list