a372230d0735b8d873893fc3205f16da17591057
[openwrt/openwrt.git] /
1 From dbe9afab3b2dceb35d478ac43dfcf8fdc5e23a22 Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Tue, 29 May 2018 14:39:09 -0700
4 Subject: [PATCH 05/18] mesh: reflect country setting to mesh configuration
5
6 wpa_supplicant configuration has country parameter that is
7 supposed to be used in AP mode to indicate supporting 802.11h
8 and 802.11d. Reflect this configuration to Mesh also since Mesh
9 is required to support 802.11h and 802.11d to use DFS channels.
10
11 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
12 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
13 [daniel@makrotopia.org: adapted to changed ieee80211_is_dfs prototype]
14 ---
15 wpa_supplicant/mesh.c | 9 +++++++++
16 1 file changed, 9 insertions(+)
17
18 --- a/wpa_supplicant/mesh.c
19 +++ b/wpa_supplicant/mesh.c
20 @@ -255,6 +255,15 @@ static int wpa_supplicant_mesh_init(stru
21 bss->conf->start_disabled = 1;
22 bss->conf->mesh = MESH_ENABLED;
23 bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
24 +
25 + if (ieee80211_is_dfs(ssid->frequency, wpa_s->hw.modes,
26 + wpa_s->hw.num_modes) && wpa_s->conf->country[0]) {
27 + conf->ieee80211h = 1;
28 + conf->ieee80211d = 1;
29 + conf->country[0] = wpa_s->conf->country[0];
30 + conf->country[1] = wpa_s->conf->country[1];
31 + }
32 +
33 bss->iconf = conf;
34 ifmsh->conf = conf;
35