HomeFreeBSD

LinuxKPI: 802.11: switch to wiphy_lock

Description

LinuxKPI: 802.11: switch to wiphy_lock

Replace the LKPI_80211_LHW_LOCK (lhw->sx) with the wiphy lock (which
is a Linux mutex, so also an sx lock). Apart from two places the
change was mostly mechanically.
Further remove the now recursive lock acquisitions.

This lays the ground for us to use more Linux(KPI) 802.11 internal
locking as well as more rcu equivalents, e.g., for the chanctx,
and live better to the synchronisation expectations of the drivers.
[I wish there would be more assertions in the drivers themselves,
especially in the mac80211 ops and the iteration callbacks.]

Sponsored by: The FreeBSD Foundation
PR: 280546
MFC after: 3 days
Tested by: Oleksandr Kryvulia (shuriku shurik.kiev.ua)
Tested by: Oleg Nauman (oleg.nauman gmail.com) [rtw88]
Differential Revision: https://reviews.freebsd.org/D49734

Details

Provenance
bzAuthored on Apr 8 2025, 6:41 PM
Differential Revision
D49734: LinuxKPI: 802.11: adjust locking and work on chanctx
Parents
rG231168c7e777: LinuxKPI: 802.11: adjust locking around lkpi_remove_chanctx()
Branches
Unknown
Tags
Unknown