AP: Fix checking if DFS is required
Sometimes function hostapd_is_dfs_required() returns -1 which indicates that it was not possible to check if DFS was required. This happens for channels from the 2.4 GHz band where DFS checking should not happen. This can be fixed by returning DFS-not-required for mode different from IEEE80211A and when DFS support is not available (ieee80211h not set). Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
This commit is contained in:
parent
d41cc8ccf6
commit
8a0f3bf613
1 changed files with 3 additions and 2 deletions
|
@ -916,8 +916,9 @@ int hostapd_is_dfs_required(struct hostapd_iface *iface)
|
||||||
{
|
{
|
||||||
int n_chans, start_chan_idx;
|
int n_chans, start_chan_idx;
|
||||||
|
|
||||||
if (!iface->current_mode)
|
if (!iface->conf->ieee80211h || !iface->current_mode ||
|
||||||
return -1;
|
iface->current_mode->mode != HOSTAPD_MODE_IEEE80211A)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Get start (first) channel for current configuration */
|
/* Get start (first) channel for current configuration */
|
||||||
start_chan_idx = dfs_get_start_chan_idx(iface);
|
start_chan_idx = dfs_get_start_chan_idx(iface);
|
||||||
|
|
Loading…
Reference in a new issue