Kalle Valo <kvalo@xxxxxxxxxx> writes: > From: Kalle Valo <quic_kvalo@xxxxxxxxxxx> > > 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@xxxxxxxxxxx> [...] > @@ -6432,7 +6411,8 @@ static int ath12k_mac_vdev_create(struct ath12k *ar, struct ieee80211_vif *vif) > int i; > int ret, vdev_id; > > - lockdep_assert_held(&ar->conf_mutex); > + lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy); > + lockdep_assert_wiphy(hw->wiphy); The assert is twice, I'll fix that in v3. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches