Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luciano Coelho <coelho@ti.com>
To: Johannes Berg <johannes@sipsolutions.net>, Daniel Drake <dsd@laptop.org>
Cc: Pavel Roskin <proski@gnu.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Making sense of cfg80211_scan_request.n_ssids
Date: Tue, 09 Aug 2011 12:36:00 +0300	[thread overview]
Message-ID: <1312882560.2407.139.camel@cumari> (raw)
In-Reply-To: <1312792639.4372.7.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-08 at 10:37 +0200, Johannes Berg wrote: 
> On Tue, 2011-08-02 at 18:10 -0400, Pavel Roskin wrote:
> 
> > > Both of those commands result in libertas being called with
> > > cfg80211_scan_request with n_ssids=1 and the "test" SSID present in
> > > cfg80211_scan_request.ssids[0], as expected.
> > >
> > >
> > >    iwlist eth0 scan
> > >    iw dev eth0 scan
> > >
> > > Both of those commands result in libertas being called with
> > > cfg80211_scan_request with n_ssids=1 and a zero-length SSID present in
> > > cfg80211_scan_request.ssids[0].
> > > Is this a bug? I would expect it to be passed n_ssids=0 in this case.
> > 
> > I believe n_ssids is the number of probe requests to be sent per 
> > channel.  It scanning for all SSIDs, one probe request is sent.  It is 
> > only for passive scanning that we don't need any probes.
> 
> Yeah. "iw dev eth0 scan passive" will cause n_ssids to be 0.

I think the question was slightly different.  As I understand, Daniel
wants to know why the n_ssids is 1 even if no SSID is passed from user
space.

A zero-length SSID is a broadcast SSID.  So probe requests *will* be
sent, but with the broadcast SSID.  If you explicitly ask for a passive
scan (as Johannes mentioned), then n_ssids will be 0 which means that no
probe requests should be sent at all.

The n_ssids field is the number of *different* probe_reqs that will be
sent per channel.  Some drivers will send more than one probe_req with
the same SSID per channel (eg. wl12xx sends 2 probe_reqs per SSID on
each channel).


-- 
Cheers,
Luca.


  reply	other threads:[~2011-08-09  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 17:35 Making sense of cfg80211_scan_request.n_ssids Daniel Drake
2011-08-02 22:10 ` Pavel Roskin
2011-08-08  8:37   ` Johannes Berg
2011-08-09  9:36     ` Luciano Coelho [this message]
2011-08-09  9:40       ` Johannes Berg
2011-08-09  9:42         ` Luciano Coelho

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=1312882560.2407.139.camel@cumari \
    --to=coelho@ti.com \
    --cc=dsd@laptop.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=proski@gnu.org \
    /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