]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:21 +0000 (10:08 +0100)
commit858c56fa3741f6f3203848e126ea12080413f596
tree7df143042da64cc82052a448fa98d6b675a98386
parent148c3d23858dd6a089ed6f2f60498ad43e65ead0
mac80211: handle lack of sband->bitrates in rates

[ Upstream commit 8b783d104e7f40684333d2ec155fac39219beb2f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/cfg.c
net/mac80211/sta_info.c