DFS offload: Skip user space processing for CAC operations
If DFS is offloaded to the driver, hostapd should not be performing these operations. Send the relevant control interface events to provide information to upper layer software that may use such events to track DFS/CAC state. This makes the offloaded DFS implementation more consistent with the DFS-in-hostapd behavior. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
192ad3d730
commit
5de81d7a7a
1 changed files with 25 additions and 8 deletions
23
src/ap/dfs.c
23
src/ap/dfs.c
|
@ -748,12 +748,20 @@ int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
/* Complete iface/ap configuration */
|
/* Complete iface/ap configuration */
|
||||||
|
if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD) {
|
||||||
|
/* Complete AP configuration for the first bring up. */
|
||||||
|
if (iface->state != HAPD_IFACE_ENABLED)
|
||||||
|
hostapd_setup_interface_complete(iface, 0);
|
||||||
|
else
|
||||||
|
iface->cac_started = 0;
|
||||||
|
} else {
|
||||||
set_dfs_state(iface, freq, ht_enabled, chan_offset,
|
set_dfs_state(iface, freq, ht_enabled, chan_offset,
|
||||||
chan_width, cf1, cf2,
|
chan_width, cf1, cf2,
|
||||||
HOSTAPD_CHAN_DFS_AVAILABLE);
|
HOSTAPD_CHAN_DFS_AVAILABLE);
|
||||||
iface->cac_started = 0;
|
iface->cac_started = 0;
|
||||||
hostapd_setup_interface_complete(iface, 0);
|
hostapd_setup_interface_complete(iface, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -934,13 +942,17 @@ int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq,
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (!iface->conf->ieee80211h)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_RADAR_DETECTED
|
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_RADAR_DETECTED
|
||||||
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
|
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
|
||||||
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
|
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
|
||||||
|
|
||||||
|
/* Proceed only if DFS is not offloaded to the driver */
|
||||||
|
if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!iface->conf->ieee80211h)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* mark radar frequency as invalid */
|
/* mark radar frequency as invalid */
|
||||||
set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width,
|
set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width,
|
||||||
cf1, cf2, HOSTAPD_CHAN_DFS_UNAVAILABLE);
|
cf1, cf2, HOSTAPD_CHAN_DFS_UNAVAILABLE);
|
||||||
|
@ -964,6 +976,11 @@ int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
|
||||||
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_NOP_FINISHED
|
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_NOP_FINISHED
|
||||||
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
|
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
|
||||||
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
|
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
|
||||||
|
|
||||||
|
/* Proceed only if DFS is not offloaded to the driver */
|
||||||
|
if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* TODO add correct implementation here */
|
/* TODO add correct implementation here */
|
||||||
set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width,
|
set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width,
|
||||||
cf1, cf2, HOSTAPD_CHAN_DFS_USABLE);
|
cf1, cf2, HOSTAPD_CHAN_DFS_USABLE);
|
||||||
|
|
Loading…
Reference in a new issue