mac80211: set hostapd op_class for 6 GHz
authorFelix Fietkau <nbd@nbd.name>
Mon, 24 May 2021 16:45:57 +0000 (18:45 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 23 Nov 2021 17:30:04 +0000 (18:30 +0100)
This is needed to disambiguate it from 5 GHz channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit c8bcdd561909034a14cbfd785e13848cbd5f5e50)

package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

index cd442ce9288441c60b86849b65541274178e40a8..f8e7a2a37fbc6296e14190de22d5654efbdc1b4d 100644 (file)
@@ -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