[PATCH 1/2] nl80211: add support to enable/disable bss color collision detection

Lorenzo Bianconi lorenzo at kernel.org
Tue Jan 24 06:09:52 PST 2023


> Hi Lorenzo,
> 
> On 20/01/2023 16:55, Lorenzo Bianconi wrote:
> > I agree, I think we can ratelimit netlink messages sent by the kernel to
> > userspace (e.g. to hostapd), I would say every 500ms is ok.
> > I guess we can move cfg80211_obss_color_collision_notify() in a dedicated
> > delayed_work so we can grab wdev mutex (cfg80211_obss_color_collision_notify is
> > currently running in interrupt context).
> > To give an idea, what do you think about patch below? (please note it is just
> > compiled tested so far).
> 
> The patch does not work, the fix appears easy:
> > +void ieee80211_color_collision_detection_work(struct work_struct *work)
> > +{
> > +	struct delayed_work *delayed_work = to_delayed_work(work);
> > +	struct ieee80211_link_data *link =
> > +		container_of(delayed_work, struct ieee80211_link_data,
> > +			     dfs_cac_timer_work);
> 
> This should probably be color_collision_detect_work.

Yep, sorry. It is just a copy paste issue :)
I will share a new version.

Regards,
Lorenzo

> 
> > +	struct ieee80211_sub_if_data *sdata = link->sdata;
> > +
> > +	sdata_lock(sdata);
> 
> It crashed here, link is NULL.
> 
> > +	cfg80211_obss_color_collision_notify(sdata->dev, link->color_bitmap,
> > +					     GFP_KERNEL);
> > +	sdata_unlock(sdata);
> > +}
> Will test the fixed version later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/ath11k/attachments/20230124/bb774531/attachment.sig>


More information about the ath11k mailing list