wifi: mac80211: set up/tear down client vif links properly
authorJohannes Berg <johannes.berg@intel.com>
Fri, 24 Jun 2022 08:57:41 +0000 (10:57 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:15 +0000 (11:43 +0200)
commitb2e8434f1829bb500f79b1adb80ffed2316811cf
tree841792c5012652e81cd60f5d6e158f59564365d9
parent94ddc3b5aa21c261be277eab8bc80f7520038a34
wifi: mac80211: set up/tear down client vif links properly

In station/client mode, the link data needs a bit more
initialization and destruction than just zero-init and
kfree() respectively, implement that.

This required some shuffling of the link data handling
in general, as we should set it up in setup and do the
teardown in teardown, otherwise we're asymmetric in
case of interface type changes.

Also stop using kfree_rcu(), we cannot guarantee that
nothing is scheduling things that live within the link
(e.g. the u.mgd.request_smps_work) until we're sure it
cannot be referenced anymore, therefore synchronize
instead. This isn't very efficient, but we can always
optimize it later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/mlme.c