mac80211: handle lack of sband->bitrates in rates
authorThomas Pedersen <thomas@adapt-ip.com>
Mon, 5 Oct 2020 16:45:21 +0000 (09:45 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Oct 2020 08:33:54 +0000 (10:33 +0200)
commit8b783d104e7f40684333d2ec155fac39219beb2f
tree6f93689c0dd1ef485d8d68126dabd9be0787e6be
parent9faebeb2d80065926dfbc09cb73b1bb7779a89cd
mac80211: handle lack of sband->bitrates in rates

Even though a driver or mac80211 shouldn't produce a
legacy bitrate if sband->bitrates doesn't exist, don't
crash if that is the case either.

This fixes a kernel panic if station dump is run before
last_rate can be updated with a data frame when
sband->bitrates is missing (eg. in S1G bands).

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20201005164522.18069-1-thomas@adapt-ip.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/sta_info.c