aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorThomas Pedersen <c_tpeder@qca.qualcomm.com>2012-06-25 11:45:14 (GMT)
committerJouni Malinen <j@w1.fi>2012-06-25 11:45:14 (GMT)
commit1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf (patch)
tree9b8ebae95234d64e861736aec269b67abafa28e2 /wpa_supplicant/events.c
parente7381b8473e7fb43c0e13f45c1c61e64d64072c2 (diff)
downloadhostap-1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf.zip
hostap-1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf.tar.gz
hostap-1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf.tar.bz2
nl80211: Handle CH_SWITCH event
Some drivers may independently decide to switch channels. Handle this by updating the hostapd and wpa_supplicant AP and GO configuration. Signed-hostap: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e7dfa4e..19c8280 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2407,6 +2407,21 @@ 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;
+ case EVENT_CH_SWITCH:
+ if (!data)
+ break;
+ if (!wpa_s->ap_iface) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "AP: Ignore channel switch "
+ "event in non-AP mode");
+ break;
+ }
+
+#ifdef CONFIG_AP
+ wpas_ap_ch_switch(wpa_s, data->ch_switch.freq,
+ data->ch_switch.ht_enabled,
+ data->ch_switch.ch_offset);
+#endif /* CONFIG_AP */
+ break;
case EVENT_RX_MGMT: {
u16 fc, stype;
const struct ieee80211_mgmt *mgmt;