1 From: Masashi Honma <masashi.honma@gmail.com>
2 Date: Tue, 26 Jul 2016 11:45:40 +0900
3 Subject: [PATCH] mesh: Set correct secondary channel offset if HT40 is
6 Previously, secondary channel offset could be non zero even though
7 disable_ht40=1. This patch fixes it.
9 Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
12 --- a/wpa_supplicant/wpa_supplicant.c
13 +++ b/wpa_supplicant/wpa_supplicant.c
14 @@ -1901,20 +1901,27 @@ void ibss_mesh_setup_freq(struct wpa_sup
18 +#ifdef CONFIG_HT_OVERRIDES
19 + if (ssid->disable_ht40)
21 +#endif /* CONFIG_HT_OVERRIDES */
23 - /* Find secondary channel */
24 - for (i = 0; i < mode->num_channels; i++) {
25 - sec_chan = &mode->channels[i];
26 - if (sec_chan->chan == channel + ht40 * 4)
33 + /* Find secondary channel */
34 + for (i = 0; i < mode->num_channels; i++) {
35 + sec_chan = &mode->channels[i];
36 + if (sec_chan->chan == channel + ht40 * 4)
43 - /* Check secondary channel flags */
44 - if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
46 + /* Check secondary channel flags */
47 + if (sec_chan->flag &
48 + (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
52 freq->channel = pri_chan->chan;
54 @@ -1930,6 +1937,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
55 freq->sec_channel_offset = 1;
58 + freq->sec_channel_offset = 0;