]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k_htc: Fix disconnect issue in HT40 mode.
authorVivek Natarajan <vnatarajan@atheros.com>
Thu, 12 Aug 2010 08:53:28 +0000 (14:23 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:16 +0000 (13:36 -0700)
commit 71ba186c123630ddab17667ec9ecf7e2ef211295 upstream.

Some APs advertise that they may be HT40 capable in the capabilites
but the current operating channel configuration may be only HT20.
This causes disconnection as ath9k_htc sets WLAN_RC_40_FLAG despite
the AP operating in HT20 mode.
Hence set this flag only if the current channel configuration
is HT40 enabled.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 9d371c18eb41c2da10e88daf2033259b6ad1657f..5f3c47d186d081ac6086b8ec9fb454484e8a00c5 100644 (file)
@@ -370,7 +370,8 @@ static int ath9k_htc_init_rate(struct ath9k_htc_priv *priv,
                priv->tgt_rate.rates.ht_rates.rs_nrates = j;
 
                caps = WLAN_RC_HT_FLAG;
-               if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+               if ((sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+                   (conf_is_ht40(&priv->hw->conf)))
                        caps |= WLAN_RC_40_FLAG;
                if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
                        caps |= WLAN_RC_SGI_FLAG;