diff options
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 12 |
3 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index a8c050085648..4473278efc5e 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
| @@ -721,6 +721,7 @@ extern int ath9k_modparam_nohwcrypt; | |||
| 721 | extern int led_blink; | 721 | extern int led_blink; |
| 722 | extern bool is_ath9k_unloaded; | 722 | extern bool is_ath9k_unloaded; |
| 723 | 723 | ||
| 724 | u8 ath9k_parse_mpdudensity(u8 mpdudensity); | ||
| 724 | irqreturn_t ath_isr(int irq, void *dev); | 725 | irqreturn_t ath_isr(int irq, void *dev); |
| 725 | int ath9k_init_device(u16 devid, struct ath_softc *sc, | 726 | int ath9k_init_device(u16 devid, struct ath_softc *sc, |
| 726 | const struct ath_bus_ops *bus_ops); | 727 | const struct ath_bus_ops *bus_ops); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 85f9ab4fa26e..e2e69585d674 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include "ath9k.h" | 19 | #include "ath9k.h" |
| 20 | #include "btcoex.h" | 20 | #include "btcoex.h" |
| 21 | 21 | ||
| 22 | static u8 parse_mpdudensity(u8 mpdudensity) | 22 | u8 ath9k_parse_mpdudensity(u8 mpdudensity) |
| 23 | { | 23 | { |
| 24 | /* | 24 | /* |
| 25 | * 802.11n D2.0 defined values for "Minimum MPDU Start Spacing": | 25 | * 802.11n D2.0 defined values for "Minimum MPDU Start Spacing": |
| @@ -320,6 +320,7 @@ 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; | ||
| 323 | an = (struct ath_node *)sta->drv_priv; | 324 | an = (struct ath_node *)sta->drv_priv; |
| 324 | 325 | ||
| 325 | #ifdef CONFIG_ATH9K_DEBUGFS | 326 | #ifdef CONFIG_ATH9K_DEBUGFS |
| @@ -334,7 +335,8 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
| 334 | ath_tx_node_init(sc, an); | 335 | ath_tx_node_init(sc, an); |
| 335 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | 336 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + |
| 336 | sta->ht_cap.ampdu_factor); | 337 | sta->ht_cap.ampdu_factor); |
| 337 | an->mpdudensity = parse_mpdudensity(sta->ht_cap.ampdu_density); | 338 | density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); |
| 339 | an->mpdudensity = density; | ||
| 338 | } | 340 | } |
| 339 | } | 341 | } |
| 340 | 342 | ||
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index f777ddcd1172..2afc5e289df5 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1175,6 +1175,7 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
| 1175 | { | 1175 | { |
| 1176 | struct ath_atx_tid *txtid; | 1176 | struct ath_atx_tid *txtid; |
| 1177 | struct ath_node *an; | 1177 | struct ath_node *an; |
| 1178 | u8 density; | ||
| 1178 | 1179 | ||
| 1179 | an = (struct ath_node *)sta->drv_priv; | 1180 | an = (struct ath_node *)sta->drv_priv; |
| 1180 | txtid = ATH_AN_2_TID(an, tid); | 1181 | txtid = ATH_AN_2_TID(an, tid); |
| @@ -1182,6 +1183,17 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
| 1182 | if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE)) | 1183 | if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE)) |
| 1183 | return -EAGAIN; | 1184 | return -EAGAIN; |
| 1184 | 1185 | ||
| 1186 | /* update ampdu factor/density, they may have changed. This may happen | ||
| 1187 | * in HT IBSS when a beacon with HT-info is received after the station | ||
| 1188 | * has already been added. | ||
| 1189 | */ | ||
| 1190 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { | ||
| 1191 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | ||
| 1192 | sta->ht_cap.ampdu_factor); | ||
| 1193 | density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density); | ||
| 1194 | an->mpdudensity = density; | ||
| 1195 | } | ||
| 1196 | |||
| 1185 | txtid->state |= AGGR_ADDBA_PROGRESS; | 1197 | txtid->state |= AGGR_ADDBA_PROGRESS; |
| 1186 | txtid->paused = true; | 1198 | txtid->paused = true; |
| 1187 | *ssn = txtid->seq_start = txtid->seq_next; | 1199 | *ssn = txtid->seq_start = txtid->seq_next; |
