diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-02-04 05:08:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-11 15:34:56 -0500 |
commit | dd5ee59bb005df38ca3ee00bc6ac349dc3370e4f (patch) | |
tree | c3523bb4a3ff031601ed32ea83b415fc76f8f39f | |
parent | 5d8eac3ad982ee32e3dee56626ba3d1fc577fcbc (diff) |
ath9k: Fix ATH9K_HW_CAP_HT usage
There are a few places where the station's HT capabilities
should be checked instead of ATH9K_HW_CAP_HT, which is a global
feature for the driver. Fix this.
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 | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 5 |
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5432f1247e2e..6e66f9c6782b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -320,28 +320,25 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
320 | struct ieee80211_vif *vif) | 320 | struct ieee80211_vif *vif) |
321 | { | 321 | { |
322 | struct ath_node *an; | 322 | struct ath_node *an; |
323 | u8 density; | ||
324 | an = (struct ath_node *)sta->drv_priv; | 323 | an = (struct ath_node *)sta->drv_priv; |
325 | 324 | ||
326 | an->sc = sc; | 325 | an->sc = sc; |
327 | an->sta = sta; | 326 | an->sta = sta; |
328 | an->vif = vif; | 327 | an->vif = vif; |
329 | 328 | ||
330 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { | 329 | ath_tx_node_init(sc, an); |
331 | ath_tx_node_init(sc, an); | 330 | |
331 | if (sta->ht_cap.ht_supported) { | ||
332 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | 332 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + |
333 | sta->ht_cap.ampdu_factor); | 333 | sta->ht_cap.ampdu_factor); |
334 | density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); | 334 | an->mpdudensity = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); |
335 | an->mpdudensity = density; | ||
336 | } | 335 | } |
337 | } | 336 | } |
338 | 337 | ||
339 | static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) | 338 | static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) |
340 | { | 339 | { |
341 | struct ath_node *an = (struct ath_node *)sta->drv_priv; | 340 | struct ath_node *an = (struct ath_node *)sta->drv_priv; |
342 | 341 | ath_tx_node_cleanup(sc, an); | |
343 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) | ||
344 | ath_tx_node_cleanup(sc, an); | ||
345 | } | 342 | } |
346 | 343 | ||
347 | void ath9k_tasklet(unsigned long data) | 344 | void ath9k_tasklet(unsigned long data) |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index feacaafee959..89a64411b82e 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1233,7 +1233,7 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
1233 | * in HT IBSS when a beacon with HT-info is received after the station | 1233 | * in HT IBSS when a beacon with HT-info is received after the station |
1234 | * has already been added. | 1234 | * has already been added. |
1235 | */ | 1235 | */ |
1236 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { | 1236 | if (sta->ht_cap.ht_supported) { |
1237 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | 1237 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + |
1238 | sta->ht_cap.ampdu_factor); | 1238 | sta->ht_cap.ampdu_factor); |
1239 | density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); | 1239 | density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); |
@@ -1904,8 +1904,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb, | |||
1904 | struct ath_buf *bf; | 1904 | struct ath_buf *bf; |
1905 | u8 tidno; | 1905 | u8 tidno; |
1906 | 1906 | ||
1907 | if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && txctl->an && | 1907 | if (txctl->an && ieee80211_is_data_qos(hdr->frame_control)) { |
1908 | ieee80211_is_data_qos(hdr->frame_control)) { | ||
1909 | tidno = ieee80211_get_qos_ctl(hdr)[0] & | 1908 | tidno = ieee80211_get_qos_ctl(hdr)[0] & |
1910 | IEEE80211_QOS_CTL_TID_MASK; | 1909 | IEEE80211_QOS_CTL_TID_MASK; |
1911 | tid = ATH_AN_2_TID(txctl->an, tidno); | 1910 | tid = ATH_AN_2_TID(txctl->an, tidno); |