linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Vivek Natarajan <vivek.natraj@gmail.com>,
	Vivek Natarajan <nataraja@qca.qualcomm.com>,
	"jouni@qca.qualcomm.com" <jouni@qca.qualcomm.com>,
	"kvalo@qca.qualcomm.com" <kvalo@qca.qualcomm.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/2] cfg80211: Support for automatic channel selection in AP mode
Date: Thu, 21 Jun 2012 08:21:12 +0200	[thread overview]
Message-ID: <4FE2BD58.60805@tieto.com> (raw)
In-Reply-To: <1340206900.4655.77.camel@jlt3.sipsolutions.net>

Johannes Berg wrote:
> On Wed, 2012-06-20 at 15:12 +0530, Vivek Natarajan wrote:
>
>>>> For P2P, the operating channel needs to be known before group negotiation starts.
>>>> This is true in case of P2P GO or client. It needs a separate p2p command from
>>>> wpa_cli to get the acs-based best channel information from the driver.
>>>
>>> So .. is there any reason to not do only the second, and then pass that
>>> channel back here instead?
>>
>> So, what you recommend is, for both AP and P2P GO modes, the logic
>> should be to request the driver for best channel, then the best
>> channel information event to be passed to userspace and then starting
>> the AP/GO mode of operation.
>
> That's what I'm thinking, yes.
>
>> The current ath6kl firmware has some limitation for getting this
>> channel information separately and hence not yet implemented this.
>> Moreover this needs to be a synchronous operation: to request and get
>> the event for best channel after a full cycle of channel assessment is
>> done.
>
> Right, but if you're working on this surely you can do without this
> particular patch for now?
>
> The reason I'm talking about this is the channel concurrency framework
> that Michal is working on, which would conflict somehow with this I
> think.

Hmm.. we should be able to deal with it. I have a couple of ideas:

  a) treat ACS AP as a non-fixed channel IBSS (i.e. reserve a single
     channel resource); once channel notifications comes in we'd drop
     the behaviour

  b) trust the driver it won't do anything funny (we already trust it
     with channel switch notification)


The a) requires more tricks to be done. Once we run out of channels to 
run on we need to either:

  1) reject it and leave it to userspace to handle (i.e. retry .start_ap
     without ACS)

  2) disable ACS implicitly and pick a channel ourselves (we'd need to
     do a synthetic channel switch notification to userspace)

  3) extend ACS to accept channel list, so we could implicitly reduce it
     to channels we're already on (probably involves some nice hackery)


The b) seems to have an issue. Consider the following scenario:

     [ no channels are used, max 1 channel concurrency, max 2 APs ]
  1. wlan0: .start_ap with ACS
     [ driver is starting ACS AP.. ]
  2. wlan1: .start_ap on channel 1
     [ the driver is probably locked right now
       as it needs to complete (1); even if it's not locked
       (1) probably can't be influenced by (2) anymore.
       once it completes (1) it might end up on channel 6 on wlan0.
       this means (2) fails kind of unexpectedly ]


-- 
Pozdrawiam / Best regards, Michal Kazior.

  reply	other threads:[~2012-06-21  6:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 11:00 [PATCH 1/2] cfg80211: Support for automatic channel selection in AP mode Vivek Natarajan
2012-06-18 11:00 ` [PATCH v2] wpa_supplicant: Add support for auto " Vivek Natarajan
2012-06-18 11:00 ` [PATCH 2/2] ath6kl: Enable auto channel selection for " Vivek Natarajan
2012-07-11 15:42   ` Kalle Valo
2012-06-20  8:55 ` [PATCH 1/2] cfg80211: Support for automatic channel selection in " Johannes Berg
2012-06-20  9:42   ` Vivek Natarajan
2012-06-20 15:41     ` Johannes Berg
2012-06-21  6:21       ` Michal Kazior [this message]
2012-06-21  8:26         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE2BD58.60805@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=johannes@sipsolutions.net \
    --cc=jouni@qca.qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nataraja@qca.qualcomm.com \
    --cc=vivek.natraj@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).