On Wed, 2013-11-06 at 12:31 +0100, Johannes Berg wrote: > 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()? Right, this was part of my "Set CSA beacon" item, I should have been more explicit. > The driver might do some channel > preparations there, though I guess you can audit all the drivers (well, > one ...) :) Luckily, all the drivers that use this (well, one... :P) don't do anything funky with this call. ath9k only uses this call mark that there is an ongoing CSA, which is not needed in the immediate switch case. > 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. Right. I actually added this to the documentation, but I accidentally sent it as part of patch 1/2: > +++ b/include/net/mac80211.h > @@ -2676,11 +2676,13 @@ enum ieee80211_roc_type { > * @channel_switch_beacon: Starts a channel switch to a new channel. [...] > + * If the CSA count starts as zero or 1, this function will not be called, > + * since there won't be any time to beacon before the switch anyway. This change should be in patch 2/2 (actually these two patches should probably be squashed, I just kept them separate so that reviewing my v2 would be easier). I can elaborate more in the documentation if you think it's necessary. -- Cheers, Luca. ��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f