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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 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


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux