diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-03-27 00:38:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-28 14:25:36 -0400 |
commit | a4d6367fa77fb604ce62582e1c0998e0ed098927 (patch) | |
tree | cd1b053200767dedc6da1cf497bddcb9dec2b018 | |
parent | ca907a90735877ceff800d08f780f2f1b4388afa (diff) |
ath9k: Use HW HT capabilites properly
The commit "ath9k: Remove aggregation flags" changed how
nodes were being initialized. Use the HW HT cap bits
to initialize/de-initialize nodes, else we would be
accessing an uninitialized entry during a suspend/resume cycle,
resulting in a panic.
Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 38794850f00..215eb2536b1 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -640,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
640 | an->sta = sta; | 640 | an->sta = sta; |
641 | an->vif = vif; | 641 | an->vif = vif; |
642 | 642 | ||
643 | if (sta->ht_cap.ht_supported) { | 643 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { |
644 | ath_tx_node_init(sc, an); | 644 | ath_tx_node_init(sc, an); |
645 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | 645 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + |
646 | sta->ht_cap.ampdu_factor); | 646 | sta->ht_cap.ampdu_factor); |
@@ -659,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) | |||
659 | an->sta = NULL; | 659 | an->sta = NULL; |
660 | #endif | 660 | #endif |
661 | 661 | ||
662 | if (sta->ht_cap.ht_supported) | 662 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) |
663 | ath_tx_node_cleanup(sc, an); | 663 | ath_tx_node_cleanup(sc, an); |
664 | } | 664 | } |
665 | 665 | ||