Re: [RFC v2 2/2] mac80211: only set CSA beacon when at least one beacon must be transmitted

Johannes Berg
2013-11-06T11:31:52Z

On Wed, 2013-11-06 at 11:28 +0000, Coelho, Luciano wrote:

> In terms of the order of calls, the difference is that in the past we
> had this:
>
> 1. Set CSA beacon;
> 2. When count reaches 1, the driver calls ieee80211_csa_finish();
> 3. We call drv_change_chanctx();
> 4. Set new channel beacon.
>
> (This continues to be the case with my patch when count > 1)
>
> With my patch, if count <= 1, we do this instead:
>
> 1. Call drv_change_chanctx();
> 2. Set new channel beacon.
>
> The main problem without my patch is that the driver shouldn't beacon
> with the CSA element when the count starts <= 1, so it won't have a
> chance to check if the count reached 1 to call ieee80211_csa_finish().

I think the other difference is that one calls
drv_channel_switch_beacon()? The driver might do some channel
preparations there, though I guess you can audit all the drivers (well,
one ...) :)

But that'd need some more documentation, otherwise I'd guess people
would start to rely on drv_channel_switch_beacon() and it would mostly
work - hence my question of whether it makes sense to refuse it at all
in the case of <=1.

johannes