diff --git a/feeds/ipq807x_v5.4/hostapd/patches/s00-006-fix-dfs-csa-invalid-opclass.patch b/feeds/ipq807x_v5.4/hostapd/patches/s00-006-fix-dfs-csa-invalid-opclass.patch new file mode 100644 index 000000000..b4a99313d --- /dev/null +++ b/feeds/ipq807x_v5.4/hostapd/patches/s00-006-fix-dfs-csa-invalid-opclass.patch @@ -0,0 +1,25 @@ +Index: hostapd-2021-02-20-59e9794c/src/ap/hostapd.c +=================================================================== +--- hostapd-2021-02-20-59e9794c.orig/src/ap/hostapd.c ++++ hostapd-2021-02-20-59e9794c/src/ap/hostapd.c +@@ -3814,6 +3814,8 @@ hostapd_switch_channel_fallback(struct h + const struct hostapd_freq_params *freq_params) + { + int seg0_idx = 0, seg1_idx = 0, bw = CHANWIDTH_USE_HT; ++ u8 op_class; ++ u8 chan; + + wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes"); + +@@ -3846,6 +3848,11 @@ hostapd_switch_channel_fallback(struct h + iface->freq = freq_params->freq; + iface->conf->channel = freq_params->channel; + iface->conf->secondary_channel = freq_params->sec_channel_offset; ++ ieee80211_freq_to_channel_ext(freq_params->freq, freq_params->sec_channel_offset, bw, &op_class, &chan); ++ if (chan != freq_params->channel) ++ wpa_printf(MSG_ERROR, "Channel mismatch: %d -> %d", freq_params->channel, chan); ++ ++ iface->conf->op_class = op_class; + hostapd_set_oper_centr_freq_seg0_idx(iface->conf, seg0_idx); + hostapd_set_oper_centr_freq_seg1_idx(iface->conf, seg1_idx); + hostapd_set_oper_chwidth(iface->conf, bw); diff --git a/feeds/wifi-ax/hostapd/patches/x-0007-fix-dfs-csa-invalid-opclass.patch b/feeds/wifi-ax/hostapd/patches/x-0007-fix-dfs-csa-invalid-opclass.patch new file mode 100644 index 000000000..b4a99313d --- /dev/null +++ b/feeds/wifi-ax/hostapd/patches/x-0007-fix-dfs-csa-invalid-opclass.patch @@ -0,0 +1,25 @@ +Index: hostapd-2021-02-20-59e9794c/src/ap/hostapd.c +=================================================================== +--- hostapd-2021-02-20-59e9794c.orig/src/ap/hostapd.c ++++ hostapd-2021-02-20-59e9794c/src/ap/hostapd.c +@@ -3814,6 +3814,8 @@ hostapd_switch_channel_fallback(struct h + const struct hostapd_freq_params *freq_params) + { + int seg0_idx = 0, seg1_idx = 0, bw = CHANWIDTH_USE_HT; ++ u8 op_class; ++ u8 chan; + + wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes"); + +@@ -3846,6 +3848,11 @@ hostapd_switch_channel_fallback(struct h + iface->freq = freq_params->freq; + iface->conf->channel = freq_params->channel; + iface->conf->secondary_channel = freq_params->sec_channel_offset; ++ ieee80211_freq_to_channel_ext(freq_params->freq, freq_params->sec_channel_offset, bw, &op_class, &chan); ++ if (chan != freq_params->channel) ++ wpa_printf(MSG_ERROR, "Channel mismatch: %d -> %d", freq_params->channel, chan); ++ ++ iface->conf->op_class = op_class; + hostapd_set_oper_centr_freq_seg0_idx(iface->conf, seg0_idx); + hostapd_set_oper_centr_freq_seg1_idx(iface->conf, seg1_idx); + hostapd_set_oper_chwidth(iface->conf, bw);