Move hostapd_csa_in_progress() to hostapd.c
Move hostapd_csa_in_progress() to hostapd.{h,c} so it can be used for contexts other than DFS. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
23dcb302eb
commit
4e0ab656d2
3 changed files with 12 additions and 10 deletions
10
src/ap/dfs.c
10
src/ap/dfs.c
|
@ -817,16 +817,6 @@ static int hostapd_dfs_start_channel_switch_cac(struct hostapd_iface *iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int hostapd_csa_in_progress(struct hostapd_iface *iface)
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
for (i = 0; i < iface->num_bss; i++)
|
|
||||||
if (iface->bss[i]->csa_in_progress)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
|
static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
|
||||||
{
|
{
|
||||||
struct hostapd_channel_data *channel;
|
struct hostapd_channel_data *channel;
|
||||||
|
|
|
@ -2634,6 +2634,17 @@ void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int hostapd_csa_in_progress(struct hostapd_iface *iface)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
for (i = 0; i < iface->num_bss; i++)
|
||||||
|
if (iface->bss[i]->csa_in_progress)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
|
|
||||||
static void free_beacon_data(struct beacon_data *beacon)
|
static void free_beacon_data(struct beacon_data *beacon)
|
||||||
|
|
|
@ -454,6 +454,7 @@ int hostapd_remove_iface(struct hapd_interfaces *ifaces, char *buf);
|
||||||
void hostapd_channel_list_updated(struct hostapd_iface *iface, int initiator);
|
void hostapd_channel_list_updated(struct hostapd_iface *iface, int initiator);
|
||||||
void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s);
|
void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s);
|
||||||
const char * hostapd_state_text(enum hostapd_iface_state s);
|
const char * hostapd_state_text(enum hostapd_iface_state s);
|
||||||
|
int hostapd_csa_in_progress(struct hostapd_iface *iface);
|
||||||
int hostapd_switch_channel(struct hostapd_data *hapd,
|
int hostapd_switch_channel(struct hostapd_data *hapd,
|
||||||
struct csa_settings *settings);
|
struct csa_settings *settings);
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Reference in a new issue