hostapd: Add AP DFS support
Add DFS structures/events handlers, CAC handling, and radar detection. By default, after radar is detected or the channel became unavailable, a random channel will be chosen. This patches are based on the original work by Boris Presman and Victor Goldenshtein. Most of the DFS code is moved to a new dfs.c/dfs.h files. Cc: Boris Presman <boris.presman@ti.com> Cc: Victor Goldenshtein <victorg@ti.com> Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
dfe6ce4eeb
commit
e76da50529
10 changed files with 423 additions and 10 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "ap_config.h"
|
||||
#include "p2p_hostapd.h"
|
||||
#include "gas_serv.h"
|
||||
#include "dfs.h"
|
||||
|
||||
|
||||
static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason);
|
||||
|
@ -931,6 +932,9 @@ static int setup_interface(struct hostapd_iface *iface)
|
|||
"be completed in a callback");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (iface->conf->ieee80211h)
|
||||
wpa_printf(MSG_DEBUG, "DFS support is enabled");
|
||||
}
|
||||
return hostapd_setup_interface_complete(iface, 0);
|
||||
}
|
||||
|
@ -950,12 +954,23 @@ int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err)
|
|||
|
||||
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
||||
if (hapd->iconf->channel) {
|
||||
#ifdef NEED_AP_MLME
|
||||
int res;
|
||||
#endif /* NEED_AP_MLME */
|
||||
|
||||
iface->freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel);
|
||||
wpa_printf(MSG_DEBUG, "Mode: %s Channel: %d "
|
||||
"Frequency: %d MHz",
|
||||
hostapd_hw_mode_txt(hapd->iconf->hw_mode),
|
||||
hapd->iconf->channel, iface->freq);
|
||||
|
||||
#ifdef NEED_AP_MLME
|
||||
/* Check DFS */
|
||||
res = hostapd_handle_dfs(hapd);
|
||||
if (res <= 0)
|
||||
return res;
|
||||
#endif /* NEED_AP_MLME */
|
||||
|
||||
if (hostapd_set_freq(hapd, hapd->iconf->hw_mode, iface->freq,
|
||||
hapd->iconf->channel,
|
||||
hapd->iconf->ieee80211n,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue