blob: 68935df50adc9a8aa34aa52e646a95ee1631fcbc [file] [log] [blame]
developer60cad402022-06-08 22:17:14 +08001diff --git a/src/ap/dfs.c b/src/ap/dfs.c
2index 55b7188..6af0ef2 100644
3--- a/src/ap/dfs.c
4+++ b/src/ap/dfs.c
5@@ -1048,7 +1048,7 @@ static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
6 }
7
8
9-static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
10+static int hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
11 {
12 int sec = 0;
13 enum dfs_channel_type channel_type = DFS_NO_CAC_YET;
14@@ -1084,7 +1084,7 @@ static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
15 oper_centr_freq_seg1_idx, true)) {
16 wpa_printf(MSG_ERROR, "DFS failed to start CAC offchannel");
17 iface->radar_background.channel = -1;
18- return;
19+ return -1;
20 }
21
22 iface->radar_background.channel = channel->chan;
23@@ -1096,6 +1096,8 @@ static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
24 wpa_printf(MSG_ERROR,
25 "%s: setting background chain to chan %d (%d MHz)",
26 __func__, channel->chan, channel->freq);
27+
28+ return 0;
29 }
30
31
32@@ -1320,8 +1322,7 @@ hostapd_dfs_background_start_channel_switch(struct hostapd_iface *iface,
33 * Just select a new random channel according to the
34 * regulations for monitoring.
35 */
36- hostpad_dfs_update_background_chain(iface);
37- return 0;
38+ return hostpad_dfs_update_background_chain(iface);
39 }
40
41 /*
42--
432.29.2
44