005-mesh-reflect-country-setting-to-mesh-configuration.patch 1.3 KB

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