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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
  31. index ca893f942..8429cfd43 100644
  32. --- a/wpa_supplicant/wpa_supplicant.c
  33. +++ b/wpa_supplicant/wpa_supplicant.c
  34. @@ -2132,9 +2132,15 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
  35. if (pri_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
  36. return;
  37. + freq->channel = pri_chan->chan;
  38. +
  39. #ifdef CONFIG_HT_OVERRIDES
  40. - if (ssid->disable_ht40)
  41. - return;
  42. + if (ssid->disable_ht40) {
  43. + if (ssid->disable_vht)
  44. + return;
  45. + else
  46. + goto skip_ht40;
  47. + }
  48. #endif /* CONFIG_HT_OVERRIDES */
  49. /* Check/setup HT40+/HT40- */
  50. @@ -2159,8 +2165,6 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
  51. if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
  52. return;
  53. - freq->channel = pri_chan->chan;
  54. -
  55. if (ht40 == -1) {
  56. if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
  57. return;
  58. @@ -2204,6 +2208,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
  59. wpa_scan_results_free(scan_res);
  60. }
  61. +skip_ht40:
  62. wpa_printf(MSG_DEBUG,
  63. "IBSS/mesh: setup freq channel %d, sec_channel_offset %d",
  64. freq->channel, freq->sec_channel_offset);
  65. @@ -2295,7 +2300,10 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
  66. }
  67. } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
  68. chwidth = VHT_CHANWIDTH_USE_HT;
  69. - seg0 = vht80[j] + 2;
  70. + if (ssid->disable_ht40)
  71. + seg0 = 0;
  72. + else
  73. + seg0 = vht80[j] + 2;
  74. }
  75. if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
  76. --
  77. 2.17.0