[PATCH 11/26] ap: move hostapd_csa_in_progress to hostapd.c

Ilan Peer ilan.peer
Tue Sep 8 02:46:18 PDT 2015


Move hostapd_csa_in_progress() to hostapd.{h,c} so it can be used
for other contexts other than dfs.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/ap/dfs.c     | 10 ----------
 src/ap/hostapd.c | 10 ++++++++++
 src/ap/hostapd.h |  3 +++
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 715f19b..7273caa 100644
--- a/src/ap/dfs.c
+++ b/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)
 {
 	struct hostapd_channel_data *channel;
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index d366673..f563aaf 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2634,6 +2634,16 @@ 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)
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index ffc4533..246f851 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -496,4 +496,7 @@ void fst_hostapd_fill_iface_obj(struct hostapd_data *hapd,
 				struct fst_wpa_obj *iface_obj);
 #endif /* CONFIG_FST */
 
+
+int hostapd_csa_in_progress(struct hostapd_iface *iface);
+
 #endif /* HOSTAPD_H */
-- 
1.9.1




More information about the Hostap mailing list