[RFC 1/6] mesh: Enable DFS on mesh hostapd interface

Benjamin Berg benjamin at sipsolutions.net
Mon Nov 28 07:38:38 PST 2016


Enable 80211h and 80211d if a DFS channel was selected and the country has
been configured. This is similar to wpa_supplicant AP mode.

Signed-off-by: Benjamin Berg <benjamin at sipsolutions.net>
---
 wpa_supplicant/mesh.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index d67d3b2..70069bf 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -210,6 +210,13 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
 		goto out_free;
 	ifmsh->mconf = mconf;
 
+	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];
+	}
+
 	/* need conf->hw_mode for supported rates. */
 	conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency, &conf->channel);
 	if (conf->hw_mode == NUM_HOSTAPD_MODES) {
-- 
2.10.2




More information about the Hostap mailing list