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

Nicolas Cavallari nicolas.cavallari at green-communications.fr
Tue Jan 24 03:13:42 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.

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



More information about the ath11k mailing list