Re: [PATCH wireless-next v4 11/21] wifi: nl80211/cfg80211: define API to notify SMD Drain completion
From: Pooventhiran G
Date: Fri Nov 13 2026 - 14:18:22 EST
On 11/11/2026 12:31 am, Johannes Berg wrote:
> On Fri, 2026-11-06 at 13:28 +0530, Pooventhiran G wrote:
>>
>> +/**
>> + * cfg80211_notify_smd_drain_completion - notify userspace about downlink drain
>> + * early termination.
>> + * @wdev: wireless device corresponding to the AP MLD
>> + * @sta_addr: non-AP MLD address for which DL draining is being terminated
>> + *
>> + * Should be called under wiphy_lock.
>
> "Should" doesn't really work here (it's either must or not), but anyway,
> why, it's completely unnecessary?!
>
wdev/dev access in nl80211_notify_smd_drain_completion is not protected again
and it might race with a DELETE_INTERFACE. But I think instead of mandating
wiphy_lock here, would it be okay if I changed it to use the wiphy_work_queue
to post this event which provides safe access?
> johannes