summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorStephen Douthit <stephen.douthit@gmail.com>2023-02-13 23:40:24 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-09-13 17:24:05 +0300
commit3e99b4d282195435a9271fb738c4b146a9d35a5a (patch)
tree04b78bced61fdd8907513e4abfcb2e44f41202f1 /net/mac80211/cfg.c
parent88717def36f7b19f12d6ad6644e73bf91cf86375 (diff)
downloadlinux-3e99b4d282195435a9271fb738c4b146a9d35a5a.tar.xz
wifi: mac80211: Sanity check tx bitrate if not provided by driver
If the driver doesn't fill NL80211_STA_INFO_TX_BITRATE in sta_set_sinfo() then as a fallback sta->deflink.tx_stats.last_rate is used. Unfortunately there's no guarantee that this has actually been set before it's used. Originally found when 'iw <dev> link' would always return a tx rate of 6Mbps regardless of actual link speed for the QCA9337 running firmware WLAN.TF.2.1-00021-QCARMSWP-1 in my netbook. Use the sanity check logic from ieee80211_fill_rx_status() and refactor that to use the new inline function. Signed-off-by: Stephen Douthit <stephen.douthit@gmail.com> Link: https://lore.kernel.org/r/20230213204024.3377-1-stephen.douthit@gmail.com [change to bool ..._rate_valid() instead of int ..._rate_invalid()] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
0 files changed, 0 insertions, 0 deletions