]> asedeno.scripts.mit.edu Git - linux.git/commit
mac80211: use STA info in rate_control_send_low()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 29 May 2019 12:25:35 +0000 (15:25 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Jun 2019 12:17:37 +0000 (14:17 +0200)
commitbd718fc11d5b184701e7fd8302033e31a3a03ba8
tree83fb561f5c39948a26c101642cdbb62e1683ce79
parent1e87fec9fa52a6f7c223998d6bfbd3464eb37e31
mac80211: use STA info in rate_control_send_low()

Even if we have a station, we currently call rate_control_send_low()
with the NULL station unless further rate control (driver, minstrel)
has been initialized.

Change this so we can use more information about the station to use
a better rate. For example, when we associate with an AP, we will
now use the lowest rate it advertised as supported (that we can)
rather than the lowest mandatory rate. This aligns our behaviour
with most other 802.11 implementations.

To make this possible, we need to also ensure that we have non-zero
rates at all times, so in case we really have *nothing* pre-fill
the supp_rates bitmap with the very lowest mandatory bitmap (11b
and 11a on 2.4 and 5 GHz respectively).

Additionally, hostapd appears to be giving us an empty supported
rates bitmap (it can and should do better, since the STA must have
supported for at least the basic rates in the BSS), so ignore any
such bitmaps that would actually zero out the supp_rates, and in
that case just keep the pre-filled mandatory rates.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/mlme.c
net/mac80211/rate.c
net/mac80211/sta_info.c