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

Commit a3ebb4e1 authored by Krishna Chaitanya's avatar Krishna Chaitanya Committed by Johannes Berg
Browse files

mac80211: minstrel_ht: handle peers in dynamic SMPS



In case of Dynamic SMPS enable RTS/CTS for all rates.

Signed-off-by: default avatarChaitanya T K <chaitanya.mgit@gmail.com>
[change comment]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 932e628d
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -867,7 +867,13 @@ minstrel_ht_set_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
	else
	else
		idx = index % MCS_GROUP_RATES + (group->streams - 1) * 8;
		idx = index % MCS_GROUP_RATES + (group->streams - 1) * 8;


	if (offset > 0) {
	/* enable RTS/CTS if needed:
	 *  - if station is in dynamic SMPS (and streams > 1)
	 *  - for fallback rates, to increase chances of getting through
	 */
	if (offset > 0 &&
	    (mi->sta->smps_mode == IEEE80211_SMPS_DYNAMIC &&
	     group->streams > 1)) {
		ratetbl->rate[offset].count = ratetbl->rate[offset].count_rts;
		ratetbl->rate[offset].count = ratetbl->rate[offset].count_rts;
		flags |= IEEE80211_TX_RC_USE_RTS_CTS;
		flags |= IEEE80211_TX_RC_USE_RTS_CTS;
	}
	}