Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0dd4980 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

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: default avatarSujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3a0593ef
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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;

	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);