HomeFreeBSD

LinuxKPI: 802.11: adjust locking

Description

LinuxKPI: 802.11: adjust locking

Split up the lhw lock and the scan lock. The latter is a mtx
while the former changes from mtx to sx as mac80211 downcalls may
sleep (and the ic lock is not usable in that case either and a larger
project to fix).
This will also enforce some lookups under lock (mostly scan) as well
as general protection for more compat code and avoid a possible
deadlock with one of the upcoming callbacks from driver into the
compat code.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 8ac540d3b8bf9746216c4687b4629296357cf146)

Details

Provenance
bzAuthored on Mar 31 2023, 7:52 PM
Parents
rGc513977ca883: LinuxKPI: 802.11: remove extra spaces
Branches
Unknown
Tags
Unknown