diff options
author | Kalle Valo <quic_kvalo@quicinc.com> | 2024-10-07 19:59:29 +0300 |
---|---|---|
committer | Jeff Johnson <quic_jjohnson@quicinc.com> | 2024-10-11 07:21:54 -0700 |
commit | b8c67509b91ec23fcacbb99d40c960ab479e1299 (patch) | |
tree | 8ce891604ca712eb3c390de3b0be1bee93180661 /drivers/net/wireless/ath/ath12k/core.h | |
parent | 58550cdda961dedad8ed08c5abf8367d5c020fb6 (diff) |
wifi: ath12k: switch to using wiphy_lock() and remove ar->conf_mutex
Switch from using driver specific ar->conf_mutex to wiphy->mtx. The benefits are:
* one lock less and simplified locking
* possibility to use wiphy_work_queue() without other locks
Most of the mac80211 ops are called within wiphy_lock(), most notable exception
being tx op. This can be checked with lockdep_assert_wiphy() from
net/mac80211/driver-ops.[ch] and I veried that by manually going through all
the ops in ath12k_ops which had lockdep_assert_wiphy().
The conversion was simple:
* All conf_mutex lock() and unlock() calls which
already were called under wiphy_lock() I replaced with
lockdep_assert_wiphy().
* The rest of conf_mutex calls I replaced with wiphy_lock() and wiphy_unlock().
* All lockdep_asset_held(conf_mutex) calls I replaced with
lockdep_assert_wiphy().
One exception was in ath12k_core_post_reconfigure_recovery() where the wiphy
lock needs to be taken before hw_mutex to avoid a lockdep warning.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241007165932.78081-4-kvalo@kernel.org
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/core.h')
-rw-r--r-- | drivers/net/wireless/ath/ath12k/core.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 5163b5b07376..ebfc1e370acc 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -562,10 +562,7 @@ struct ath12k { u32 num_stations; u32 max_num_stations; bool monitor_present; - /* To synchronize concurrent synchronous mac80211 callback operations, - * concurrent debugfs configuration and concurrent FW statistics events. - */ - struct mutex conf_mutex; + /* protects the radio specific data like debug stats, ppdu_stats_info stats, * vdev_stop_status info, scan data, ath12k_sta info, ath12k_vif info, * channel context data, survey info, test mode data. |