032-mesh-implement-use-of-VHT20-config-in-mesh-mode.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From 24fc73b2470ff79cd8c92e029ca785c8e95a204c Mon Sep 17 00:00:00 2001
  2. From: Peter Oh <[email protected]>
  3. Date: Wed, 18 Apr 2018 14:14:19 -0700
  4. Subject: [PATCH 2/2] mesh: implement use of VHT20 config in mesh mode
  5. mesh in VHT mode is supposed to be able to use any bandwidth
  6. that 11ac supports, but we don't have a way to set VHT20
  7. although there are parameters that are supposed to be used.
  8. This patch along with the patch of
  9. "mesh: add VHT_CHANWIDTH_USE_HT to max_oper_chwidth" makes mesh
  10. available to use of any bandwidth using combination of
  11. existing parameters like below shown.
  12. VHT80:
  13. default
  14. do not set any parameters
  15. VHT40:
  16. max_oper_chwidth = 0
  17. VHT20:
  18. max_oper_chwidth=0
  19. disable_ht40=1
  20. HT40:
  21. disable_vht = 1
  22. HT20:
  23. disable_ht40 = 1
  24. disable HT:
  25. disable_ht = 1
  26. Signed-off-by: Peter Oh <[email protected]>
  27. ---
  28. wpa_supplicant/wpa_supplicant.c | 18 +++++++++++++-----
  29. 1 file changed, 13 insertions(+), 5 deletions(-)
  30. --- a/wpa_supplicant/wpa_supplicant.c
  31. +++ b/wpa_supplicant/wpa_supplicant.c
  32. @@ -2174,9 +2174,15 @@ void ibss_mesh_setup_freq(struct wpa_sup
  33. if (!dfs_enabled)
  34. return;
  35. + freq->channel = pri_chan->chan;
  36. +
  37. #ifdef CONFIG_HT_OVERRIDES
  38. - if (ssid->disable_ht40)
  39. - return;
  40. + if (ssid->disable_ht40) {
  41. + if (ssid->disable_vht)
  42. + return;
  43. + else
  44. + goto skip_ht40;
  45. + }
  46. #endif /* CONFIG_HT_OVERRIDES */
  47. /* Check/setup HT40+/HT40- */
  48. @@ -2204,8 +2210,6 @@ void ibss_mesh_setup_freq(struct wpa_sup
  49. if (!dfs_enabled)
  50. return;
  51. - freq->channel = pri_chan->chan;
  52. -
  53. if (ht40 == -1) {
  54. if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
  55. return;
  56. @@ -2249,6 +2253,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
  57. wpa_scan_results_free(scan_res);
  58. }
  59. +skip_ht40:
  60. wpa_printf(MSG_DEBUG,
  61. "IBSS/mesh: setup freq channel %d, sec_channel_offset %d",
  62. freq->channel, freq->sec_channel_offset);
  63. @@ -2344,7 +2349,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
  64. }
  65. } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
  66. chwidth = VHT_CHANWIDTH_USE_HT;
  67. - seg0 = vht80[j] + 2;
  68. + if (ssid->disable_ht40)
  69. + seg0 = 0;
  70. + else
  71. + seg0 = vht80[j] + 2;
  72. }
  73. if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,