hostap/src/ap
Hu Wang c25b50306e hostapd: Reject 40 MHz channel config if regulatory rules do not allow it
When regulatory rules are configured not to support 40 MHz channels on
the 2.4 GHz band, hostapd_is_usable_chans() still allowed 40 MHz
channels (i.e., 1-9) to be used with ht_capab=[HT40+][HT40-].

Looking into hostapd_is_usable_chans():
1) Validate primary channel using hostapd_is_usable_chan()
2) Try to pick a default secondary channel if hostapd_is_usable_chan()
3) Try to pick a valid secondary channel if both HT40+/HT40- set, and
   further validate primary channel's allowed bandwidth mask.
4) Return channel not usable.

For example, for the 2.4 GHz channel 9 in Japan, its default secondary
channel is 13, which is valid per hostapd_is_usable_chan(), so step (2)
returns channel usable.

Add a more strict check to step (2) to clearly reject 40 MHz channel
configuration if regulatory rules do not allow the 40 MHz bandwidth,
which is similarly done in commit ce6d9ce15b ("hostapd: Add supported
channel bandwidth checking infrastructure").

Signed-off-by: Hu Wang <huw@codeaurora.org>
2021-06-02 00:06:20 +03:00
..
accounting.c Extra RADIUS request attributes from SQLite 2019-07-30 19:58:09 +03:00
accounting.h
acs.c Determine 6 GHz bandwidth in AP mode ACS using op_class parameter 2021-05-03 23:24:13 +03:00
acs.h ACS: Fix memory leak if interface is disabled during scan 2017-03-04 17:30:15 +02:00
airtime_policy.c Testing functionality for airtime policy 2021-03-20 12:03:01 +02:00
airtime_policy.h hostapd: Add airtime policy configuration support 2019-05-02 14:57:43 +03:00
ap_config.c AP: Add user configuration for TWT responder role 2021-06-01 00:17:03 +03:00
ap_config.h AP: Add user configuration for TWT responder role 2021-06-01 00:17:03 +03:00
ap_drv_ops.c hostapd: Fix dpp_listen in DPP responder scenario 2021-02-06 16:06:15 +02:00
ap_drv_ops.h Add REGISTER_FRAME hostapd control interface command for testing purposes 2021-03-23 00:42:06 +02:00
ap_list.c Remove CONFIG_IEEE80211N build option 2020-02-22 19:20:44 +02:00
ap_list.h
ap_mlme.c FILS: Do not clear PTK on FILS Auth/Assoc (AP) 2016-10-22 18:11:14 +03:00
ap_mlme.h
authsrv.c EAP server: Configurable maximum number of authentication message rounds 2019-09-01 17:19:35 +03:00
authsrv.h
beacon.c Fix UPDATE_BEACON processing when disabled 2021-04-21 23:23:54 +03:00
beacon.h PASN: Include RSNXE in the PASN negotiation 2021-01-26 23:09:36 +02:00
bss_load.c hostapd: Add average channel utilization in STATUS 2017-12-12 00:48:27 +02:00
bss_load.h
ctrl_iface_ap.c hostapd: Enable HE for channel switch commmand 2021-02-06 11:41:09 +02:00
ctrl_iface_ap.h DPP: Allow PMKSA cache entries to be added through hostapd ctrl_iface 2017-06-19 21:13:17 +03:00
dfs.c DFS: Allow switch to an available channel 2021-02-07 10:30:09 +02:00
dfs.h DFS: Add new hostapd_is_dfs_overlap() helper 2020-03-29 21:15:16 +03:00
dhcp_snoop.c BSD: Use struct ip rather than struct iphdr 2020-01-02 19:17:10 +02:00
dhcp_snoop.h
dpp_hostapd.c DPP2: Get DPP Relay Controller context based on hostapd callback context 2021-04-21 23:06:00 +03:00
dpp_hostapd.h DPP2: Controller support in hostapd 2020-08-25 15:53:08 +03:00
drv_callbacks.c Add helper functions for parsing RSNXE capabilities 2021-04-10 12:43:38 +03:00
eap_user_db.c Check snprintf result to avoid compiler warnings 2018-12-24 11:09:22 +02:00
eth_p_oui.c FT: Replace inter-AP protocol with use of OUI Extended Ethertype 2017-05-03 18:30:31 +03:00
eth_p_oui.h FT: Replace inter-AP protocol with use of OUI Extended Ethertype 2017-05-03 18:30:31 +03:00
fils_hlp.c BSD: Use struct ip rather than struct iphdr 2020-01-02 19:17:10 +02:00
fils_hlp.h FILS: DHCP relay for HLP requests 2017-02-01 18:17:39 +02:00
gas_query_ap.c DPP: Integration for hostapd 2017-06-19 21:13:17 +03:00
gas_query_ap.h DPP: Integration for hostapd 2017-06-19 21:13:17 +03:00
gas_serv.c DPP: Fix GAS fragmentation for DPP Config Response from hostapd 2020-10-06 23:34:41 +03:00
gas_serv.h DPP2: hostapd as TCP Relay 2019-04-22 21:08:59 +03:00
hostapd.c 6 GHz: Fix operating class in Supported Operating Classes element 2021-05-03 23:04:55 +03:00
hostapd.h Testing functionality for airtime policy 2021-03-20 12:03:01 +02:00
hs20.c AP: Check driver's capability to enable OCV when driver SME is used 2021-02-16 00:47:43 +02:00
hs20.h HS 2.0: Move Terms and Conditions Server URL generation from AP to AS 2018-06-21 20:50:54 +03:00
hw_features.c hostapd: Reject 40 MHz channel config if regulatory rules do not allow it 2021-06-02 00:06:20 +03:00
hw_features.h hostapd: Add HE 6 GHz band capability configuration 2021-02-08 00:09:45 +02:00
ieee802_1x.c AP: Support PASN with FILS key derivation 2021-01-25 20:28:33 +02:00
ieee802_1x.h EAPOL auth: Convert Boolean to C99 bool 2020-04-24 17:06:50 +03:00
ieee802_11.c Add helper functions for parsing RSNXE capabilities 2021-04-10 12:43:38 +03:00
ieee802_11.h HE: Process HE 6 GHz band capab from associating HE STA 2020-05-17 17:22:34 +03:00
ieee802_11_auth.c Fix possible memory leak of RADIUS data in handle_auth() 2019-12-29 23:43:55 +02:00
ieee802_11_auth.h Make hostapd_copy_psk_list() non-static 2019-12-29 23:34:01 +02:00
ieee802_11_he.c AP: Add user configuration for TWT responder role 2021-06-01 00:17:03 +03:00
ieee802_11_ht.c Fix a typo in a comment 2020-02-22 19:20:44 +02:00
ieee802_11_shared.c Allow AP mode extended capabilities to be overridden 2021-03-22 11:58:21 +02:00
ieee802_11_vht.c hostapd: Disable VHT/HE when WMM is not enabled 2021-05-03 17:27:22 +03:00
Makefile build: Make more library things common 2020-10-12 20:20:35 +03:00
mbo_ap.c MBO: Do not parse reason_detail in non_pref_chan attr (AP) 2016-09-25 17:31:26 +03:00
mbo_ap.h
ndisc_snoop.c Fix DHCP/NDISC snoop deinit followed by failing re-init 2017-03-04 11:42:15 +02:00
ndisc_snoop.h
neighbor_db.c hostapd: Add ability to disable HT/VHT/HE per BSS 2020-12-02 13:41:18 +02:00
neighbor_db.h hostapd: Support showing neighbor list through hostapd_cli 2019-12-26 17:59:03 +02:00
p2p_hostapd.c
p2p_hostapd.h
pmksa_cache_auth.c FILS: Fix PMKID derivation for OKC 2021-05-21 21:05:41 +03:00
pmksa_cache_auth.h OWE: PMKSA caching in AP mode 2017-10-09 12:12:54 +03:00
preauth_auth.c WPA auth: Convert Boolean to C99 bool 2020-04-24 17:06:50 +03:00
preauth_auth.h
rrm.c hostapd: Fix a typo in function name 2019-01-02 16:40:34 +02:00
rrm.h Report beacon request TX status as control interface event 2017-01-03 16:02:58 +02:00
sta_info.c AP: Support PASN with FILS key derivation 2021-01-25 20:28:33 +02:00
sta_info.h PASN: Derive KDK only when required 2021-04-10 11:55:55 +03:00
taxonomy.c Fix or supress various sparse warnings 2017-01-29 18:33:10 +02:00
taxonomy.h taxonomy: Store Probe Request frames in hostapd_sta_info 2016-09-22 00:45:24 +03:00
tkip_countermeasures.c hostapd: Add logging around Michael MIC related failures 2018-04-02 16:51:29 +03:00
tkip_countermeasures.h
utils.c Add a hostapd testing option for skipping association pruning 2020-03-28 20:39:19 +02:00
vlan.c
vlan.h
vlan_full.c vlan: Use new bridge ioctl() 2019-01-02 00:23:43 +02:00
vlan_ifconfig.c vlan: Move if_nametoindex() use out of vlan_init.c 2016-03-25 18:00:44 +02:00
vlan_init.c Make WEP functionality an optional build parameter 2020-02-29 17:45:25 +02:00
vlan_init.h
vlan_ioctl.c Use own header file for defining Linux VLAN kernel interface 2016-03-26 11:24:38 +02:00
vlan_util.c
vlan_util.h vlan: Move if_nametoindex() use out of vlan_init.c 2016-03-25 18:00:44 +02:00
wmm.c Fix wmm compile on fedora-17 (gcc 4.7.2) 2020-02-03 02:03:32 +02:00
wmm.h
wnm_ap.c Enable beacon protection only when driver indicates support 2021-02-16 00:47:43 +02:00
wnm_ap.h WNM: Collocated Interference Reporting 2018-10-30 14:07:51 +02:00
wpa_auth.c Add EAPOL-4WAY-HS-COMPLETED indication to AP 2021-05-11 21:13:56 +03:00
wpa_auth.h Add EAPOL_TX command to extend ext_eapol_frame_io possibilities 2021-05-11 21:13:56 +03:00
wpa_auth_ft.c Add helper functions for parsing RSNXE capabilities 2021-04-10 12:43:38 +03:00
wpa_auth_glue.c Add EAPOL_TX command to extend ext_eapol_frame_io possibilities 2021-05-11 21:13:56 +03:00
wpa_auth_glue.h
wpa_auth_i.h OCV: Work around for misbehaving STAs that indicate OCVC=1 without OCI 2020-10-08 18:46:38 +03:00
wpa_auth_ie.c FILS: Fix RSN info in FD frame for no-group-addressed 2021-02-28 11:27:42 +02:00
wpa_auth_ie.h Merge wpa_supplicant and hostapd EAPOL-Key KDE parsers 2019-10-18 13:02:27 +03:00
wpa_auth_kay.c MACsec: Convert Boolean to C99 bool 2020-04-24 17:06:50 +03:00
wpa_auth_kay.h macsec: Support IEEE 802.1X(EAP)/PSK MACsec Key Agreement in hostapd 2019-06-03 20:27:44 +03:00
wps_hostapd.c WPS: Reconfigure credentials on hostapd config reload 2021-02-06 17:15:31 +02:00
wps_hostapd.h
x_snoop.c
x_snoop.h