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

From: Kalle Valo <[email-masked]>
Date: Mon, 11 Nov 2024 13:38:59 +0200

Johannes Berg <[email-masked]> writes:

>> +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