diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2011-04-20 01:31:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-25 14:50:14 -0400 |
commit | f0dd49803b0c0f3a002f073ec1a82cac5795af2d (patch) | |
tree | 69d7f430cef63ed9e16b9fc1fd01d72ebae330d4 /drivers/net/wireless/ath | |
parent | 3a0593efd191c7eb13c79179c4c5ddbc519b2510 (diff) |
ath9k_htc: Fix max A-MPDU size handling
Set the maximum ampdu size of a station correctly
in the target by using the ampdu_factor.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index a6402681d58d..fbc238a0b203 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -467,6 +467,7 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, | |||
467 | struct ath9k_htc_sta *ista; | 467 | struct ath9k_htc_sta *ista; |
468 | int ret, sta_idx; | 468 | int ret, sta_idx; |
469 | u8 cmd_rsp; | 469 | u8 cmd_rsp; |
470 | u16 maxampdu; | ||
470 | 471 | ||
471 | if (priv->nstations >= ATH9K_HTC_MAX_STA) | 472 | if (priv->nstations >= ATH9K_HTC_MAX_STA) |
472 | return -ENOBUFS; | 473 | return -ENOBUFS; |
@@ -490,7 +491,15 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, | |||
490 | 491 | ||
491 | tsta.sta_index = sta_idx; | 492 | tsta.sta_index = sta_idx; |
492 | tsta.vif_index = avp->index; | 493 | tsta.vif_index = avp->index; |
493 | tsta.maxampdu = cpu_to_be16(0xffff); | 494 | |
495 | if (!sta) { | ||
496 | tsta.maxampdu = cpu_to_be16(0xffff); | ||
497 | } else { | ||
498 | maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | ||
499 | sta->ht_cap.ampdu_factor); | ||
500 | tsta.maxampdu = cpu_to_be16(maxampdu); | ||
501 | } | ||
502 | |||
494 | if (sta && sta->ht_cap.ht_supported) | 503 | if (sta && sta->ht_cap.ht_supported) |
495 | tsta.flags = cpu_to_be16(ATH_HTC_STA_HT); | 504 | tsta.flags = cpu_to_be16(ATH_HTC_STA_HT); |
496 | 505 | ||