[PATCH] mesh: Use correct rate in 11n and legacy mixed environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let mesh STA A is a STA which has config disable_ht=1.
Let mesh STA B is a STA which has config disable_ht=0.
The mesh STA A and B was connected.

Previouly, the mesh STA A sent frame with 11n rate even though its HT
was disabled. This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx>
---
 src/ap/ieee802_11_ht.c    | 4 ++--
 wpa_supplicant/mesh_mpm.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 5eb1060..146e447 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -340,8 +340,8 @@ u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
 	 * that did not specify a valid WMM IE in the (Re)Association Request
 	 * frame.
 	 */
-	if (!ht_capab ||
-	    !(sta->flags & WLAN_STA_WMM) || hapd->conf->disable_11n) {
+	if (!ht_capab || !(sta->flags & WLAN_STA_WMM) ||
+	    !hapd->iconf->ieee80211n || hapd->conf->disable_11n) {
 		sta->flags &= ~WLAN_STA_HT;
 		os_free(sta->ht_capabilities);
 		sta->ht_capabilities = NULL;
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 1a0fd5f..f152044 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -684,7 +684,8 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
 
 	oper = (struct ieee80211_ht_operation *) elems->ht_operation;
 	if (oper &&
-	    !(oper->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH)) {
+	    !(oper->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH) &&
+	    sta->ht_capabilities) {
 		wpa_msg(wpa_s, MSG_DEBUG, MACSTR
 			" does not support 40 MHz bandwidth",
 			MAC2STR(sta->addr));
-- 
2.7.4


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux