aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-03-05 14:20:03 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-05 15:25:13 (GMT)
commit6e9023ea499ea9a89b0e858c85e32b455d57264c (patch)
tree443006428a3352e0bb678df3957fecff623a2e91 /wpa_supplicant/ap.c
parent02e42ab75b3b5e971794bf23768d4c8226c432ff (diff)
downloadhostap-6e9023ea499ea9a89b0e858c85e32b455d57264c.zip
hostap-6e9023ea499ea9a89b0e858c85e32b455d57264c.tar.gz
hostap-6e9023ea499ea9a89b0e858c85e32b455d57264c.tar.bz2
DFS: Allow wpa_supplicant AP mode to use non-offloaded DFS
This extends the hostapd-like setup of DFS-in-userspace for wpa_supplicant AP mode operations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 5950207..ea5b2b4 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -166,6 +166,13 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
+ if (ieee80211_is_dfs(ssid->frequency) && wpa_s->conf->country[0]) {
+ conf->ieee80211h = 1;
+ conf->ieee80211d = 1;
+ conf->country[0] = wpa_s->conf->country[0];
+ conf->country[1] = wpa_s->conf->country[1];
+ }
+
#ifdef CONFIG_P2P
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211G &&
(ssid->mode == WPAS_MODE_P2P_GO ||
@@ -567,6 +574,9 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
else
params.uapsd = -1;
+ if (ieee80211_is_dfs(params.freq.freq))
+ params.freq.freq = 0; /* set channel after CAC */
+
if (wpa_drv_associate(wpa_s, &params) < 0) {
wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality");
return -1;