// new add by Late Lee if (!oper40 && iface->conf->force_40mhz) { wpa_printf(MSG_INFO, "But will force to 40MHz due to force_40mhz."); oper40 = 1; } iface->secondary_ch = iface->conf->secondary_channel; if (!oper40) { wpa_printf(MSG_INFO, "20/40 MHz operation not permitted on " "channel pri=%d sec=%d based on overlapping BSSes", iface->conf->channel, iface->conf->channel + iface->conf->secondary_channel * 4); iface->conf->secondary_channel = 0; if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) { /* * TODO: Could consider scheduling another scan to check * if channel width can be changed if no coex reports * are received from associating stations. */ } }
5、
ieee802_11_ht.c文件hostapd_2040_coex_action函数添加:
1 2 3 4 5 6 7 8 9
if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) return;
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) return;
// new add by Late Lee if (iface->conf->force_40mhz) return;