mac80211: fix station rate table updates on assoc
authorFelix Fietkau <nbd@nbd.name>
Mon, 1 Feb 2021 08:33:24 +0000 (09:33 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 1 Feb 2021 14:07:09 +0000 (15:07 +0100)
commit18fe0fae61252b5ae6e26553e2676b5fac555951
treea4327a2a623414b1da9820b5100ea18ab245d07d
parenteb4e8fac00d1e01ada5e57c05d24739156086677
mac80211: fix station rate table updates on assoc

If the driver uses .sta_add, station entries are only uploaded after the sta
is in assoc state. Fix early station rate table updates by deferring them
until the sta has been uploaded.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20210201083324.3134-1-nbd@nbd.name
[use rcu_access_pointer() instead since we won't dereference here]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/driver-ops.c
net/mac80211/rate.c