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

Commit 1431fcb7 authored by Andrei Otcheretianski's avatar Andrei Otcheretianski Committed by Johannes Berg
Browse files

mac80211: fix honouring rate flags in low-rate transmit



Transmissions with the IEEE80211_TX_CTL_NO_CCK_RATE flag set
(which can come from userspace) were no longer guaranteed to
be transmitted with allowed rates since commit 2103dec1
("mac80211: select and adjust bitrates according to channel
mode") due to a missing rate_flags check in that commit. The
commit also introduced the need to check the 5/10 MHz flags
but accidentally didn't. Fix it by adding the missing check.

Signed-off-by: default avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d86aa4f8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -247,6 +247,9 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,

	info->control.rates[0].idx = 0;
	for (i = 0; i < sband->n_bitrates; i++) {
		if ((rate_flags & sband->bitrates[i].flags) != rate_flags)
			continue;

		if (!rate_supported(sta, sband->band, i))
			continue;