aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2013-11-14 10:28:31 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-17 15:12:58 (GMT)
commitbf281c129f0e25066b94b732d61fa142f293c494 (patch)
treec412c81d890d75ac5b1e1718c1cc967ea1b9f6ee /wpa_supplicant/ap.c
parente44a384b68854abac54f67fb412cd45c63154d49 (diff)
downloadhostap-bf281c129f0e25066b94b732d61fa142f293c494.zip
hostap-bf281c129f0e25066b94b732d61fa142f293c494.tar.gz
hostap-bf281c129f0e25066b94b732d61fa142f293c494.tar.bz2
Add AP channel switch mechanism
Build CSA settings and call the driver to perform the switch. Construct Beacon, Probe Response, and (Re)Association Response frames both for CSA period and for the new channel. These frames are built based on the current configuration. Add CSA IE in Beacon and Probe Response frames. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 6887469..ef18dbd 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -1058,6 +1058,20 @@ int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s)
}
+int ap_switch_channel(struct wpa_supplicant *wpa_s,
+ struct csa_settings *settings)
+{
+#ifdef NEED_AP_MLME
+ if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
+ return -1;
+
+ return hostapd_switch_channel(wpa_s->ap_iface->bss[0], settings);
+#else /* NEED_AP_MLME */
+ return -1;
+#endif /* NEED_AP_MLME */
+}
+
+
void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
int offset)
{