aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-30 05:58:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:35 -0400
commitf5c38ef06e005705ef87b7a77752c183bacb94cc (patch)
tree3aa441c7278b5986ac2bd8842196b4a18e4b7989 /drivers
parentc6483cfe7147534719197c03a99848f49e004308 (diff)
ath9k: Fix bug in determining HT40 mode
This patch fixes a bug in checking for HT40 mode. The STA's mode can be determined from the cached HT capabilities, use that and remove the redundant variable 'rc_phy_mode'. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/rc.c6
-rw-r--r--drivers/net/wireless/ath9k/rc.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index a6933ccab483..a13668b9b6dc 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -1321,7 +1321,7 @@ static void ath_rc_tx_status(struct ath_softc *sc,
1321 * 40 to 20 => don't update */ 1321 * 40 to 20 => don't update */
1322 1322
1323 if ((flags & IEEE80211_TX_RC_40_MHZ_WIDTH) && 1323 if ((flags & IEEE80211_TX_RC_40_MHZ_WIDTH) &&
1324 (ath_rc_priv->rc_phy_mode != WLAN_RC_40_FLAG)) 1324 !(ath_rc_priv->ht_cap & WLAN_RC_40_FLAG))
1325 return; 1325 return;
1326 1326
1327 rix = ath_rc_get_rateindex(rate_table, &rates[i]); 1327 rix = ath_rc_get_rateindex(rate_table, &rates[i]);
@@ -1346,9 +1346,8 @@ static void ath_rc_tx_status(struct ath_softc *sc,
1346 1346
1347 /* If HT40 and we have switched mode from 40 to 20 => don't update */ 1347 /* If HT40 and we have switched mode from 40 to 20 => don't update */
1348 if ((flags & IEEE80211_TX_RC_40_MHZ_WIDTH) && 1348 if ((flags & IEEE80211_TX_RC_40_MHZ_WIDTH) &&
1349 (ath_rc_priv->rc_phy_mode != WLAN_RC_40_FLAG)) { 1349 !(ath_rc_priv->ht_cap & WLAN_RC_40_FLAG))
1350 return; 1350 return;
1351 }
1352 1351
1353 rix = ath_rc_get_rateindex(rate_table, &rates[i]); 1352 rix = ath_rc_get_rateindex(rate_table, &rates[i]);
1354 ath_rc_update_ht(sc, ath_rc_priv, tx_info_priv, rix, 1353 ath_rc_update_ht(sc, ath_rc_priv, tx_info_priv, rix,
@@ -1421,7 +1420,6 @@ static void ath_rc_init(struct ath_softc *sc,
1421 ath_rc_priv->valid_phy_rateidx[i][j] = 0; 1420 ath_rc_priv->valid_phy_rateidx[i][j] = 0;
1422 ath_rc_priv->valid_phy_ratecnt[i] = 0; 1421 ath_rc_priv->valid_phy_ratecnt[i] = 0;
1423 } 1422 }
1424 ath_rc_priv->rc_phy_mode = ath_rc_priv->ht_cap & WLAN_RC_40_FLAG;
1425 1423
1426 if (!rateset->rs_nrates) { 1424 if (!rateset->rs_nrates) {
1427 /* No working rate, just initialize valid rates */ 1425 /* No working rate, just initialize valid rates */
diff --git a/drivers/net/wireless/ath9k/rc.h b/drivers/net/wireless/ath9k/rc.h
index bdfd2052077c..e3abd76103fd 100644
--- a/drivers/net/wireless/ath9k/rc.h
+++ b/drivers/net/wireless/ath9k/rc.h
@@ -176,7 +176,6 @@ struct ath_rate_priv {
176 u8 ht_cap; 176 u8 ht_cap;
177 u8 valid_phy_ratecnt[WLAN_RC_PHY_MAX]; 177 u8 valid_phy_ratecnt[WLAN_RC_PHY_MAX];
178 u8 valid_phy_rateidx[WLAN_RC_PHY_MAX][RATE_TABLE_SIZE]; 178 u8 valid_phy_rateidx[WLAN_RC_PHY_MAX][RATE_TABLE_SIZE];
179 u8 rc_phy_mode;
180 u8 rate_max_phy; 179 u8 rate_max_phy;
181 u32 rssi_time; 180 u32 rssi_time;
182 u32 rssi_down_time; 181 u32 rssi_down_time;