wifi: cfg80211: add a work abstraction with special semantics
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Jun 2023 12:49:25 +0000 (14:49 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 7 Jun 2023 17:53:15 +0000 (19:53 +0200)
commita3ee4dc84c4e9d14cb34dad095fd678127aca5b6
treecf1d940f044dc42d34036dc61c05fcc1d7aa0505
parent4d45145ba6e2e1c0eba4ebda7d6273319191f4e8
wifi: cfg80211: add a work abstraction with special semantics

Add a work abstraction at the cfg80211 level that will always
hold the wiphy_lock() for any work executed and therefore also
can be canceled safely (without waiting) while holding that.
This improves on what we do now as with the new wiphy works we
don't have to worry about locking while cancelling them safely.

Also, don't let such works run while the device is suspended,
since they'll likely need to interact with the device. Flush
them before suspend though.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/core.c
net/wireless/core.h
net/wireless/sysfs.c