aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorBhagavathi Perumal S <bperumal@codeaurora.org>2018-04-25 09:39:57 (GMT)
committerJouni Malinen <j@w1.fi>2018-05-04 17:31:23 (GMT)
commitd57e06170b887446ed2ddcc7e58bd4401bf568c2 (patch)
tree4aee997ed5a532ab425b70e70ede672bb11df65b /wpa_supplicant
parentf98fdc4e4bff95eb396a01c5c8e260b5a58155d0 (diff)
downloadhostap-d57e06170b887446ed2ddcc7e58bd4401bf568c2.zip
hostap-d57e06170b887446ed2ddcc7e58bd4401bf568c2.tar.gz
hostap-d57e06170b887446ed2ddcc7e58bd4401bf568c2.tar.bz2
wpa_supplicant: Make channel switch event available for non-AP builds
This allows user to get channel switch indication in station mode even if wpa_supplicant is built without CONFIG_AP=y. Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 02dfedd..1fd5116 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -4230,6 +4230,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
ap_rx_from_unknown_sta(wpa_s, data->rx_from_unknown.addr,
data->rx_from_unknown.wds);
break;
+#endif /* CONFIG_AP */
case EVENT_CH_SWITCH:
if (!data || !wpa_s->current_ssid)
break;
@@ -4246,6 +4247,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
wpa_s->assoc_freq = data->ch_switch.freq;
wpa_s->current_ssid->frequency = data->ch_switch.freq;
+#ifdef CONFIG_AP
if (wpa_s->current_ssid->mode == WPAS_MODE_AP ||
wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO ||
wpa_s->current_ssid->mode ==
@@ -4257,9 +4259,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->ch_switch.cf1,
data->ch_switch.cf2);
}
+#endif /* CONFIG_AP */
wpas_p2p_update_channel_list(wpa_s, WPAS_P2P_CHANNEL_UPDATE_CS);
break;
+#ifdef CONFIG_AP
#ifdef NEED_AP_MLME
case EVENT_DFS_RADAR_DETECTED:
if (data)