mac80211: fix station rate table updates on assoc
authorFelix Fietkau <nbd@nbd.name>
Mon, 1 Feb 2021 08:33:24 +0000 (09:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Feb 2021 08:29:16 +0000 (09:29 +0100)
commit2ca1ddc32b884b814c4e9fc45bc524ccd9bd168b
treed3e524e2040e117d3495e2982ca528fa1ec574b7
parent8ccf963c6227ff1feb2db6b1bdcb5243f7f38067
mac80211: fix station rate table updates on assoc

commit 18fe0fae61252b5ae6e26553e2676b5fac555951 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/driver-ops.c
net/mac80211/rate.c