hostapd: Configure spectrum management capability
Add configuration of Spectrum Management subfield in the Capability Information of Beacon, Probe Response, and Association Response frames. Spectrum Management bit is set when directly requested by new configuration option spectrum_mgmt_required=1 or when AP is running on DFS channels. In the future, also TPC shall require this bit to be set. Signed-hostap: Srinivasan <srinivasanb@posedge.com> Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com> Signed-hostap: Marek Puzyniak <marek.puzyniak@tieto.com>
This commit is contained in:
parent
e0392f825d
commit
3d7ad2f681
8 changed files with 98 additions and 3 deletions
20
src/ap/dfs.c
20
src/ap/dfs.c
|
@ -801,3 +801,23 @@ int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
|
|||
cf1, cf2, HOSTAPD_CHAN_DFS_USABLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int hostapd_is_dfs_required(struct hostapd_iface *iface)
|
||||
{
|
||||
int n_chans, start_chan_idx;
|
||||
|
||||
if (!iface->current_mode)
|
||||
return -1;
|
||||
|
||||
/* Get start (first) channel for current configuration */
|
||||
start_chan_idx = dfs_get_start_chan_idx(iface);
|
||||
if (start_chan_idx == -1)
|
||||
return -1;
|
||||
|
||||
/* Get number of used channels, depend on width */
|
||||
n_chans = dfs_get_used_n_chans(iface);
|
||||
|
||||
/* Check if any of configured channels require DFS */
|
||||
return dfs_check_chans_radar(iface, start_chan_idx, n_chans);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue