mac80211: Fix TKIP/WEP HT capability handling
authorSujith <Sujith.Manoharan@atheros.com>
Mon, 2 Mar 2009 07:58:31 +0000 (13:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Mar 2009 19:39:37 +0000 (14:39 -0500)
There is no need to parse the AP's HT capabilities if
the STA uses TKIP/WEP cipher. This allows the rate control
module to choose the correct(legacy) rate table.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index 7f238589b6ff5b664f836538f53f66595438b1ee..52d876e3eabeda6f7e08404e22d918a079e1ffc5 100644 (file)
@@ -1307,7 +1307,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
        else
                sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
 
-       if (elems.ht_cap_elem)
+       /* If TKIP/WEP is used, no need to parse AP's HT capabilities */
+       if (elems.ht_cap_elem && !(ifmgd->flags & IEEE80211_STA_TKIP_WEP_USED))
                ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
                                elems.ht_cap_elem, &sta->sta.ht_cap);