mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
hostapd: DFS/CSA check if CSA in progress
Check if CSA is already in progress, before triggering a new channel switch. Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
b19ef32bf9
commit
25592b236b
10
src/ap/dfs.c
10
src/ap/dfs.c
@ -680,14 +680,18 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
|
|||||||
struct hostapd_data *hapd = iface->bss[0];
|
struct hostapd_data *hapd = iface->bss[0];
|
||||||
int err = 1;
|
int err = 1;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "%s called (CAC active: %s)", __func__,
|
wpa_printf(MSG_DEBUG, "%s called (CAC active: %s, CSA active: %s)",
|
||||||
iface->cac_started ? "yes" : "no");
|
__func__, iface->cac_started ? "yes" : "no",
|
||||||
|
iface->csa_in_progress ? "yes" : "no");
|
||||||
|
|
||||||
|
/* Check if CSA in progress */
|
||||||
|
if (iface->csa_in_progress)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Check if active CAC */
|
/* Check if active CAC */
|
||||||
if (iface->cac_started)
|
if (iface->cac_started)
|
||||||
return hostapd_dfs_start_channel_switch_cac(iface);
|
return hostapd_dfs_start_channel_switch_cac(iface);
|
||||||
|
|
||||||
|
|
||||||
/* Perform channel switch/CSA */
|
/* Perform channel switch/CSA */
|
||||||
channel = dfs_get_valid_channel(iface, &secondary_channel,
|
channel = dfs_get_valid_channel(iface, &secondary_channel,
|
||||||
&vht_oper_centr_freq_seg0_idx,
|
&vht_oper_centr_freq_seg0_idx,
|
||||||
|
Loading…
Reference in New Issue
Block a user