mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-09 16:18:33 +00:00
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>
This commit is contained in:
parent
5d8eac3ad9
commit
dd5ee59bb0
2 changed files with 7 additions and 11 deletions
|
@ -320,27 +320,24 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||||
struct ieee80211_vif *vif)
|
struct ieee80211_vif *vif)
|
||||||
{
|
{
|
||||||
struct ath_node *an;
|
struct ath_node *an;
|
||||||
u8 density;
|
|
||||||
an = (struct ath_node *)sta->drv_priv;
|
an = (struct ath_node *)sta->drv_priv;
|
||||||
|
|
||||||
an->sc = sc;
|
an->sc = sc;
|
||||||
an->sta = sta;
|
an->sta = sta;
|
||||||
an->vif = vif;
|
an->vif = vif;
|
||||||
|
|
||||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
|
|
||||||
ath_tx_node_init(sc, an);
|
ath_tx_node_init(sc, an);
|
||||||
|
|
||||||
|
if (sta->ht_cap.ht_supported) {
|
||||||
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
||||||
sta->ht_cap.ampdu_factor);
|
sta->ht_cap.ampdu_factor);
|
||||||
density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density);
|
an->mpdudensity = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density);
|
||||||
an->mpdudensity = density;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
|
static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
|
||||||
{
|
{
|
||||||
struct ath_node *an = (struct ath_node *)sta->drv_priv;
|
struct ath_node *an = (struct ath_node *)sta->drv_priv;
|
||||||
|
|
||||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
|
|
||||||
ath_tx_node_cleanup(sc, an);
|
ath_tx_node_cleanup(sc, an);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1233,7 +1233,7 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||||
* in HT IBSS when a beacon with HT-info is received after the station
|
* in HT IBSS when a beacon with HT-info is received after the station
|
||||||
* has already been added.
|
* has already been added.
|
||||||
*/
|
*/
|
||||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
|
if (sta->ht_cap.ht_supported) {
|
||||||
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
||||||
sta->ht_cap.ampdu_factor);
|
sta->ht_cap.ampdu_factor);
|
||||||
density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density);
|
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,
|
||||||
struct ath_buf *bf;
|
struct ath_buf *bf;
|
||||||
u8 tidno;
|
u8 tidno;
|
||||||
|
|
||||||
if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && txctl->an &&
|
if (txctl->an && ieee80211_is_data_qos(hdr->frame_control)) {
|
||||||
ieee80211_is_data_qos(hdr->frame_control)) {
|
|
||||||
tidno = ieee80211_get_qos_ctl(hdr)[0] &
|
tidno = ieee80211_get_qos_ctl(hdr)[0] &
|
||||||
IEEE80211_QOS_CTL_TID_MASK;
|
IEEE80211_QOS_CTL_TID_MASK;
|
||||||
tid = ATH_AN_2_TID(txctl->an, tidno);
|
tid = ATH_AN_2_TID(txctl->an, tidno);
|
||||||
|
|
Loading…
Add table
Reference in a new issue