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

Simon Wunderlich
2013-11-06T11:47:52Z

Hey Luca,

> With a CSA count of 0, we won't transmit any CSA beacons, because the
> switch will happen before the next TBTT. To avoid extra work and
> potential confusion in the drivers, complete the CSA immediately,
> instead of waiting for the driver to call ieee80211_csa_finish().
>
> To keep things simpler, we also switch immediately when the CSA count
> is 1, while in theory we should delay the switch until just before the
> next TBTT.
>
> Additionally, move the ieee80211_csa_finish() function to cfg.c,
> where it makes more sense (and since we call it from cfg.c now).
>
> Cc: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
> ---
> Simon, I think with this we won't need any changes in ath9k, right?

I think you still need to change ieee80211_ibss_process_chanswitch() which
also calls ieee80211_ibss_csa_beacon() and drv_channel_switch_beacon().

Also, I don't think that this is sufficient for IBSS mode - changing immediately
without sending any action frame will just split the IBSS network. Action
frames are currently set in ieee80211_ibss_csa_beacon() as well, with this
change we should probably move that to another position.

Even if we don't allow count <=1 from userspace as Johannes suggested, we
still have to fix the CSA handling from other STAs in IBSS.

Cheers,
Simon