]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: reject/clear user rate mask if not usable
authorJohannes Berg <johannes.berg@intel.com>
Wed, 8 Mar 2017 10:12:10 +0000 (11:12 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 8 Mar 2017 13:20:01 +0000 (14:20 +0100)
commit332a72adb21f381cd4438e5535811f71edfdf092
tree749391b6ba269af098d9ee4810b1dc24abf86d4a
parentd53997e863b8bda73fa5cfc8633ecae24b1789e6
mac80211: reject/clear user rate mask if not usable

If the user rate mask results in no (basic) rates being usable,
clear it. Also, if we're already operating when it's set, reject
it instead.

Technically, selecting basic rates as the criterion is a bit too
restrictive, but calculating the usable rates over all stations
(e.g. in AP mode) is harder, and all stations must support the
basic rates. Similarly, in client mode, the basic rates will be
used anyway for control frames.

This fixes the "no supported rates (...) in rate_mask ..." warning
that occurs on TX when you've selected a rate mask that's not
compatible with the connection (e.g. an AP that enables only the
rates 36, 48, 54 and you've selected only 6, 9, 12.)

Reported-by: Kirtika Ruchandani <kirtika@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/mlme.c
net/mac80211/rate.c
net/mac80211/rate.h