Thread (1 message) 1 message, 1 author, 2024-11-11

Re: [PATCH v5 09/17] wifi: cc33xx: Add main.c

From: Kalle Valo <kvalo@kernel.org>
Date: 2024-11-11 11:39:03
Also in: linux-devicetree, linux-wireless, lkml

Johannes Berg [off-list ref] writes:
quoted
+static void cc33xx_rc_update_work(struct work_struct *work)
+{
+	struct cc33xx_vif *wlvif = container_of(work, struct cc33xx_vif,
+						rc_update_work);
+	struct cc33xx *cc = wlvif->cc;
+	struct ieee80211_vif *vif = cc33xx_wlvif_to_vif(wlvif);
+
+	mutex_lock(&cc->mutex);
Given the way the wiphy mutex now works, I'd strongly recommend not
having your own mutex any more - it's a huge simplification in a lot of
places, and there's very little downside since everything coming from
higher layers holds the wiphy mutex already (and almost certainly needs
to acquire your own mutex.)
I can recommend using wiphy_lock(), at least in ath12k it made the
locking so much simpler. The more wireless drivers start to use it the
better.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help