wifi: iwlwifi: mvm: cycle FW link on chanctx removal
authorJohannes Berg <johannes.berg@intel.com>
Sun, 22 Oct 2023 14:55:53 +0000 (17:55 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 10:49:30 +0000 (12:49 +0200)
commitf1b1dd518721768f7b29ed5c729af13b8a530653
tree1f6cc33860afa832cd52442fe148cb4384515387
parent0b67ab5d4f6d143dbad52864853e919e2e7c7ba7
wifi: iwlwifi: mvm: cycle FW link on chanctx removal

When the vif is in MLD mode, we'll get a vif links change from
non-zero to zero on disassociation, which removes all links in
the firmware and adds the 'deflink' the driver/mac80211 has.
This causes the firmware to clear some internal state.

However, in non-MLD mode, this doesn't happen, and causes some
state to be left around in firmware, which can particularly
cause trouble with the ref-BSSID in multi-BSSID, leading to an
assert later if immediately making a new multi-BSSID connection
with a different ref-BSSID.

Fix this by removing/re-adding the link in the non-MLD case
when the channel is removed from the vif. This way, all of the
state will get cleared out, even if we need the deflink, which
is more for software architecture purposes than otherwise.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231022173519.90c82837ba4d.I341fa30c480f7673b14b48a0e29a2241472c2e13@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c