[RFC,2/5] DFS: rename and export hostapd_config_dfs_chan_available helper
diff mbox series

Message ID 20200128150940.17018-3-sergey.matyukevich.os@quantenna.com
State Accepted
Headers show
Series
  • hostapd: DFS channels in chan_switch command ane event
Related show

Commit Message

Sergey Matyukevich Jan. 28, 2020, 3:09 p.m. UTC
Rename DFS helper hostapd_config_dfs_chan_available to
hostapd_is_dfs_chan_available. Enable access to this
helper function from other hostapd components.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
---
 src/ap/dfs.c | 4 ++--
 src/ap/dfs.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index f70ecc946..f5c6722b4 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -773,7 +773,7 @@  int hostapd_handle_dfs(struct hostapd_iface *iface)
 }
 
 
-static int hostapd_config_dfs_chan_available(struct hostapd_iface *iface)
+int hostapd_is_dfs_chan_available(struct hostapd_iface *iface)
 {
 	int n_chans, n_chans1, start_chan_idx, start_chan_idx1;
 
@@ -821,7 +821,7 @@  int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
 			 * another radio.
 			 */
 			if (iface->state != HAPD_IFACE_ENABLED &&
-			    hostapd_config_dfs_chan_available(iface)) {
+			    hostapd_is_dfs_chan_available(iface)) {
 				hostapd_setup_interface_complete(iface, 0);
 				iface->cac_started = 0;
 			}
diff --git a/src/ap/dfs.h b/src/ap/dfs.h
index f0fa6f688..b73c4ece1 100644
--- a/src/ap/dfs.h
+++ b/src/ap/dfs.h
@@ -25,6 +25,7 @@  int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
 			     int ht_enabled,
 			     int chan_offset, int chan_width, int cf1, int cf2);
 int hostapd_is_dfs_required(struct hostapd_iface *iface);
+int hostapd_is_dfs_chan_available(struct hostapd_iface *iface);
 int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
 			  int ht_enabled, int chan_offset, int chan_width,
 			  int cf1, int cf2);