aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2017-01-27 04:43:19 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-29 16:04:21 (GMT)
commitadc6a5d81a895ded4f86216e8307eefcb7f3dfde (patch)
tree1c774da62f907a995c0461dab7f2b47eee662bc2 /wpa_supplicant/mesh_mpm.c
parent9eb5757a86f7160e7bc926275c7f269dd269ed44 (diff)
downloadhostap-adc6a5d81a895ded4f86216e8307eefcb7f3dfde.zip
hostap-adc6a5d81a895ded4f86216e8307eefcb7f3dfde.tar.gz
hostap-adc6a5d81a895ded4f86216e8307eefcb7f3dfde.tar.bz2
mesh: Check remote peer HT Operation element
The remote mesh STA which had configuration disable_ht40=1 could have HT Capabilities element which includes Supported Channel Width Set = 1 (both 20 MHz and 40 MHz operation is supported) even though it had HT Operation element which includes STA Channel Width = 0 (20 MHz channel width only). Previously, local peer recognized such a remote peer as 40 MHz band width enabled STA because local peer only checked HT Capabilities element. This could cause disconnection between disable_ht40=1 mesh STA and disable_ht40=0 mesh STA. They could establish a mesh BSS but could not ping with ath9k_htc device. This commit fixes the issue by refering HT Operation element. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 6c3fa14..1a0fd5f 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -11,6 +11,7 @@
#include "utils/common.h"
#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
+#include "common/hw_features_common.h"
#include "ap/hostapd.h"
#include "ap/sta_info.h"
#include "ap/ieee802_11.h"
@@ -646,6 +647,9 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
struct mesh_conf *conf = wpa_s->ifmsh->mconf;
struct hostapd_data *data = wpa_s->ifmsh->bss[0];
struct sta_info *sta;
+#ifdef CONFIG_IEEE80211N
+ struct ieee80211_ht_operation *oper;
+#endif /* CONFIG_IEEE80211N */
int ret;
if (elems->mesh_config_len >= 7 &&
@@ -677,6 +681,16 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_IEEE80211N
copy_sta_ht_capab(data, sta, elems->ht_capabilities);
+
+ oper = (struct ieee80211_ht_operation *) elems->ht_operation;
+ if (oper &&
+ !(oper->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH)) {
+ wpa_msg(wpa_s, MSG_DEBUG, MACSTR
+ " does not support 40 MHz bandwidth",
+ MAC2STR(sta->addr));
+ set_disable_ht40(sta->ht_capabilities, 1);
+ }
+
update_ht_state(data, sta);
#endif /* CONFIG_IEEE80211N */