diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-26 13:47:00 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-27 17:22:39 +0200 |
commit | da328f28659512419dd295a2c14419923734fa3e (patch) | |
tree | 797a68c4c259c9101ed01fe99e608e9efc9cdcf4 /package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch | |
parent | 86c0a569f41c848a7f2eac5b37f5f564c265c5ce (diff) | |
download | upstream-da328f28659512419dd295a2c14419923734fa3e.tar.gz upstream-da328f28659512419dd295a2c14419923734fa3e.tar.bz2 upstream-da328f28659512419dd295a2c14419923734fa3e.zip |
hostapd: backport mesh/ibss HT20/HT40 related fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch')
-rw-r--r-- | package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch b/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch new file mode 100644 index 0000000000..243922002a --- /dev/null +++ b/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch @@ -0,0 +1,61 @@ +From: Masashi Honma <masashi.honma@gmail.com> +Date: Tue, 26 Jul 2016 11:45:40 +0900 +Subject: [PATCH] mesh: Set correct secondary channel offset if HT40 is + disabled + +Previously, secondary channel offset could be non zero even though +disable_ht40=1. This patch fixes it. + +Signed-off-by: Masashi Honma <masashi.honma@gmail.com> +--- + +--- a/wpa_supplicant/wpa_supplicant.c ++++ b/wpa_supplicant/wpa_supplicant.c +@@ -1901,20 +1901,27 @@ void ibss_mesh_setup_freq(struct wpa_sup + break; + } + } ++#ifdef CONFIG_HT_OVERRIDES ++ if (ssid->disable_ht40) ++ ht40 = 0; ++#endif /* CONFIG_HT_OVERRIDES */ + +- /* Find secondary channel */ +- for (i = 0; i < mode->num_channels; i++) { +- sec_chan = &mode->channels[i]; +- if (sec_chan->chan == channel + ht40 * 4) +- break; +- sec_chan = NULL; +- } +- if (!sec_chan) +- return; ++ if (ht40) { ++ /* Find secondary channel */ ++ for (i = 0; i < mode->num_channels; i++) { ++ sec_chan = &mode->channels[i]; ++ if (sec_chan->chan == channel + ht40 * 4) ++ break; ++ sec_chan = NULL; ++ } ++ if (!sec_chan) ++ return; + +- /* Check secondary channel flags */ +- if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR)) +- return; ++ /* Check secondary channel flags */ ++ if (sec_chan->flag & ++ (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR)) ++ return; ++ } + + freq->channel = pri_chan->chan; + +@@ -1930,6 +1937,7 @@ void ibss_mesh_setup_freq(struct wpa_sup + freq->sec_channel_offset = 1; + break; + default: ++ freq->sec_channel_offset = 0; + break; + } + |