Skip to content

Commit

Permalink
mac80211: fix honouring rate flags in low-rate transmit
Browse files Browse the repository at this point in the history
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 2103dec
("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: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Andrei Otcheretianski authored and Johannes Berg committed Oct 15, 2013
1 parent d86aa4f commit 1431fcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/mac80211/rate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1431fcb

Please sign in to comment.