wifi: mac80211: keep mac80211 consistent on link activation failure
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 18 Apr 2024 09:52:21 +0000 (11:52 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Apr 2024 08:19:37 +0000 (10:19 +0200)
commitcc3ea42cfaac955b485d23507c6bac84fb21a7da
treeaf14e4fe0bc3abb139d9fb236d128684b1755c03
parent87f5500285fbd27eb36efbcd02ddcee1ad27ec91
wifi: mac80211: keep mac80211 consistent on link activation failure

In the unlikely event that link_use_channel fails while activating a
link, mac80211 would go into a bad state. Unfortunately, we cannot
completely avoid failures from drivers in this case.

However, what we can do is to just continue internally anyway and assume
the driver is going to trigger a recovery flow from its side. Doing that
means that we at least have a consistent state in mac80211 allowing such
a recovery flow to succeed.

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240418115219.1129e89f4b55.I6299678353e50e88b55c99b0bce15c64b52c2804@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ieee80211_i.h
net/mac80211/link.c