Move hostapd_csa_in_progress() to hostapd.c
authorIlan Peer <ilan.peer@intel.com>
Tue, 8 Sep 2015 09:46:18 +0000 (12:46 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 3 Oct 2015 17:19:06 +0000 (20:19 +0300)
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>
src/ap/dfs.c
src/ap/hostapd.c
src/ap/hostapd.h

index 715f19b..7273caa 100644 (file)
@@ -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)
 {
        struct hostapd_channel_data *channel;
index bf16e74..8036de4 100644 (file)
@@ -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
 
 static void free_beacon_data(struct beacon_data *beacon)
index ffc4533..024d25f 100644 (file)
@@ -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_set_state(struct hostapd_iface *iface, 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,
                           struct csa_settings *settings);
 void