]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: mac80211: handle HW restart during ROC
authorJohannes Berg <johannes.berg@intel.com>
Thu, 23 May 2024 10:03:52 +0000 (12:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 May 2024 08:38:53 +0000 (10:38 +0200)
commit6322e0e75a01d30b914fa87470ad00d8db844f72
tree6db8c123ae2c5ee600e99e3a8b4b7642d935bc55
parenta0ca76e5b7d550fcd74753d5fdaaf23f1a9bfdb4
wifi: mac80211: handle HW restart during ROC

If we have a HW restart in the middle of a ROC period,
then there are two cases:
 - if it's a software ROC, we really don't need to do
   anything, since the ROC work will still be queued
   and will run later, albeit with the interruption
   due to the restart;
 - if it's a hardware ROC, then it may have begun or
   not, if it did begin already we can only remove it
   and tell userspace about that.

In both cases, this fixes the warning that would appear
in ieee80211_start_next_roc() in this case.

In the case of some drivers such as iwlwifi, the part of
restarting is never going to happen since the driver will
cancel the ROC, but flushing the work to ensure nothing
is pending here will also result in no longer being able
to trigger the warning in this case.

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240523120352.f1924b5411ea.Ifc02a45a5ce23868dc7e428bad8d0e6996dd10f4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/offchannel.c
net/mac80211/util.c