Skip to content

Commit

Permalink
ath9k_htc: Fix max A-MPDU size handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Apr 25, 2011
1 parent 3a0593e commit f0dd498
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/net/wireless/ath/ath9k/htc_drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,
struct ath9k_htc_sta *ista;
int ret, sta_idx;
u8 cmd_rsp;
u16 maxampdu;

if (priv->nstations >= ATH9K_HTC_MAX_STA)
return -ENOBUFS;
Expand All @@ -490,7 +491,15 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,

tsta.sta_index = sta_idx;
tsta.vif_index = avp->index;
tsta.maxampdu = cpu_to_be16(0xffff);

if (!sta) {
tsta.maxampdu = cpu_to_be16(0xffff);
} else {
maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
sta->ht_cap.ampdu_factor);
tsta.maxampdu = cpu_to_be16(maxampdu);
}

if (sta && sta->ht_cap.ht_supported)
tsta.flags = cpu_to_be16(ATH_HTC_STA_HT);

Expand Down

0 comments on commit f0dd498

Please sign in to comment.