Search Linux Wireless

Re: [PATCHv3 4/5] mac80211: add channel switch command and beacon callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 July 2013 12:27, Simon Wunderlich
<simon.wunderlich@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Jul 09, 2013 at 09:17:41AM +0200, Michal Kazior wrote:
>> I'm wondering if it's a huge hassle to support drivers that depend on
>> channel context API? Perhaps local->open_count could be used instead
>> of local->use_chantx and chanctx->refcount?
>
> Actually I'm not using any chanctx drivers, and as long as I can't test
> I prefer to keep things disabled. :)

Understandable :) I'm not able to test it now either.

Hmm.. Just as an idea: mac80211_hwsim uses chanctx so it could be
modified to support CSA to test this case.


> local->open_count seems doable though,
> it should be the same if there is only one channel context. I can change
> that ... If you think it is safe I can enable support, nothing will happen
> anyway as long as the driver don't set the "CSA supported" wiphy flag ...

I looked at the code and I think local->open_count won't cut it. It
will fail with AP_VLAN interfaces present (and this isn't a problem
with your current approach). Monitor interfaces are counted in
local->monitors, but AP_VLAN aren't counted at all. mac80211 doesn't
really keep track of the number of interfaces it has reported to a
driver nor the number of software interfaces (that aren't reported to
the driver) unless I missed something.

Another idea is to verify there's exactly 1 chanctx present and it's
refcount is also 1.

CSA + chanctx is just a nice to have. If you're short on resources
it's fine the way it is I think.


>> It seems there's nothing preventing from multiple calls to channel
>> switch callback. Is this expected? Can this work if CSA is invoked
>> while other CSA is still in progress?
>
> This should not happen as long as there is only one interface
> doing a channel switch. If this is properly checked (need to fix
> the point you mentioned above) that should be safe, I think?

Yes it's okay as long as userspace doesn't do something stupid (i.e.
call channel switch more than once quickly). Whether this is a concern
is not for me to decide though.


Pozdrawiam / Best regards,
Michał Kazior.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux