You needed to modify the patch more than that, like i said the code around it has changed and it needs to match the new way of doing things.
--- a/lib/netifd/wireless/mac80211.sh
+++ b/lib/netifd/wireless/mac80211.sh
@@ -69,6 +69,7 @@ drv_mac80211_init_device_config() {
short_gi_40 \
max_amsdu \
dsss_cck_40
+ config_add_string channel2
}
drv_mac80211_init_iface_config() {
@@ -137,7 +138,7 @@ mac80211_hostapd_setup_base() {
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
append base_cfg "acs_exclude_dfs=1" "$N"
- json_get_vars noscan ht_coex min_tx_power:0
+ json_get_vars noscan ht_coex min_tx_power:0 channel2
json_get_values ht_capab_list ht_capab tx_burst
json_get_values channel_list channels
@@ -158,7 +159,7 @@
ht_capab=
case "$htmode" in
VHT20|HT20|HE20) ;;
- HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160)
+ HT40*|VHT40|VHT80|VHT160|VHT80P80|HE40|HE80|HE160|HE80P80)
case "$hwmode" in
a)
case "$(( (($channel / 4) + $chan_ofs) % 2 ))" in
@@ -230,8 +231,10 @@
enable_ac=0
vht_oper_chwidth=0
vht_center_seg0=
+ vht_center_seg1=
idx="$channel"
+ idx2="$channel2"
case "$htmode" in
VHT20|HE20) enable_ac=1;;
VHT40|HE40)
@@ -253,6 +256,24 @@
vht_oper_chwidth=1
vht_center_seg0=$idx
;;
+ VHT80P80|HE80P80)
+ case "$(( (($channel / 4) + $chan_ofs) % 4 ))" in
+ 1) idx=$(($channel + 6));;
+ 2) idx=$(($channel + 2));;
+ 3) idx=$(($channel - 2));;
+ 0) idx=$(($channel - 6));;
+ esac
+ case "$(( (($channel2 / 4) + $chan_ofs) % 4 ))" in
+ 1) idx2=$(($channel2 + 6));;
+ 2) idx2=$(($channel2 + 2));;
+ 3) idx2=$(($channel2 - 2));;
+ 0) idx2=$(($channel2 - 6));;
+ esac
+ enable_ac=1
+ vht_oper_chwidth=3
+ vht_center_seg0=$idx
+ vht_center_seg1=$idx2
+ ;;
VHT160|HE160)
if [ "$band" = "6g" ]; then
case "$channel" in
@@ -321,6 +342,7 @@
append base_cfg "vht_oper_chwidth=$vht_oper_chwidth" "$N"
append base_cfg "vht_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
+ append base_cfg "vht_oper_centr_freq_seg1_idx=$vht_center_seg1" "$N"
cap_rx_stbc=$((($vht_cap >> 8) & 7))
[ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
@@ -429,6 +451,7 @@
[ "$hwmode" = "a" ] && {
append base_cfg "he_oper_chwidth=$vht_oper_chwidth" "$N"
append base_cfg "he_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
+ append base_cfg "he_oper_centr_freq_seg1_idx=$vht_center_seg1" "$N"
}
set_default he_bss_color 128
Try that, i've modified it to include HE80P80 as well. The patch is written to allow you to manually make the necessary changes to a running system. If you want to patch a build system apply it to package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
instead.
Note that i typed the patch out by hand rather than using a diff so it's likely got some whitespace/garbage that won't apply.