]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Use correct rate in HT and legacy mixed environment
authorMasashi Honma <masashi.honma@gmail.com>
Wed, 15 Feb 2017 10:07:01 +0000 (19:07 +0900)
committerJouni Malinen <j@w1.fi>
Sun, 19 Feb 2017 14:01:17 +0000 (16:01 +0200)
Let mesh STA A be a STA which has config disable_ht=1.
Let mesh STA B be a STA which has config disable_ht=0.
The mesh STA A and B was connected.

Previously, the mesh STA A sent frame with HT rate even though its HT
was disabled. This commit fixes the issue by checking the local BSS HT
configuration.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
src/ap/ieee802_11_ht.c
wpa_supplicant/mesh_mpm.c

index 5eb1060a296578352976254824488a3ca0f86a62..146e4471269f6a8f8787b4374b41efbcd66eb6db 100644 (file)
@@ -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;
index 1a0fd5f47eef93c09615208b9cef41b6db6a7c42..f15204496d9759686a3273394b8c39dde548c3ef 100644 (file)
@@ -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));