netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stuffed Crust <pizza@shaftnet.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: wireless: recap of current issues (configuration)
Date: Sun, 15 Jan 2006 10:20:34 -0500	[thread overview]
Message-ID: <20060115152034.GA1722@shaftnet.org> (raw)
In-Reply-To: <43C97605.9030907@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 5054 bytes --]

On Sat, Jan 14, 2006 at 05:07:01PM -0500, Jeff Garzik wrote:
> >This can be accomplished by passing a static table to the 
> >register_wiphy_device() call (or perhaps via a struct wiphy_dev 
> >parameter) or through a more explicit, dynamic interface like:
> >
> >  wiphy_register_supported_frequency(hw, 2412). 
> 
> For completely programmable hardware, the stack should interact with a 
> module like ieee80211_geo, to help ensure the hardware stays within 
> legal limits.

While there is much to debate about where to draw the functionality 
line, completely programmable hardware is the norm these days.

... and said code would be responsible for driving the scanning state
machines, and also for more esoteric functions like handling RADAR
traps, automatic channel switching, etc.

Handling scans is quite interesting -- I've seen hardware which requires 
manual channel changing (including full RF parameter specification), 
host timing for the channel dwell time, and manual probe request 
issuance.. and on the other end of the spectrum, a simple "issue scan" 
command that takes few, if any, parameters.

And unfortunately, many things in between.

This leads me to belive that the internal scan workflow should work
something like this:

 * Userspace app issues scan request (aka "refresh AP list")

 * Knowing the hardware frequency capabilities, the 802.11 stack applies 
   802.11d and regdomain rules to the available frequency set, and
   issues multiple internal "scan request" commands to the hardware 
   driver.  (eg "perform an initial passive sweep across the entire 
   2.4G band", "perform an active scan on frequencies 2412->2437 
   looking for ssid "HandTossed", "perform an active scan on 
   frequencies 5200-5400 looking for ssid "HandTossed", etc)

   (note that ideally, userspace apps/libs would be at least partially
    aware of 802.11d rules, but the kernel must do the RightThing if 
    told to "scan all available channels for any access points")
  
 * The hardware driver takes this scan request, and maps it into the 
   capabilities of the hardware:

   Hardware A: (very thin MAC)
    - Using library code, generates an appropriate probe request frame, 
      translates it into a format the hardware expects/needs, 
      and schedules it appropriately.
    - Loops through the frequency set specified, and for each:
	- Issues a channel change command
	- Immediately transmits the probe request (for active scans)
	- Dwells for an appropriate time
        - RX'ed beacon/probe response frames come down as regular 802.11 
          frames into the stack
        - Moves to the next channel

   Hardware B: (thinner MAC)
    - Using library code, generates an appropriate probe request frame, 
      and translate it into a format the hardware expects.
    - Program the probe request frame into the hardware as a probe 
      template.
    - Loops through the frequency set specified, and for each:
	- Issues a channel change command
        - Wait for a scan complete signal
        - RX'ed beacon/probe response frames come down as regular 802.11 
          frames into the stack
        - Moves to the next channel
    
   Hardware C: (thick MAC, ala prism2 or prism54)
     - Issues a hardware "scan request"
     - Waits for the hardware to signal "scan complete"
     - Requests hardware scan results
     - For each scan result, the hardware returns:
        - Translate result into an 802.11 probe response frame and
          pass down the regular RX path.

   So as you can see, I think the channel iteration, dwell, etc should 
   be performed by the hardware driver itself, as the variation at the 
   logical "tell the hardware perform a scan" step is so extreme.

 * Meanwhile, the 802.11 stack is receiving the beacons/probe responses 
   from the hardware via the regular rx path.  It diverts these (and 
   other 802.11 management/control) frames, decodes them, and then adds 
   them to the stack's internal list of available stations, updating any 
   internal states/counters as necessary.  (These frames could also be 
   echoed to a special netdev interface if desired)

   (stuff like detecting an AP going away depends on us noticing a lack 
    of beacons arriving, for example.  Most hardware does not 
    notify us of this event.  Likewise, we should expire other 
    APs from our list if they go away.. etc.  For AP operation we need 
    to maintain this STA list, period -- so why not use it across the 
    board?  But this is another discussion for another time..)

 * The 802.11 stack issues a MLME-Scan-Complete notification to 
   userspace.

 * Interested userspace apps see this event, then query the 
   scan results and presents them to the user in some pretty format, or 
   alternatively perform automatic roaming based on scan results.

 - Solomon
-- 
Solomon Peachy        				 ICQ: 1318344
Melbourne, FL 					 
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-01-15 15:20 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060113195723.GB16166@tuxdriver.com>
2006-01-13 21:26 ` wireless: recap of current issues (intro) John W. Linville
     [not found]   ` <20060113213011.GE16166@tuxdriver.com>
2006-01-13 22:19     ` wireless: recap of current issues (configuration) John W. Linville
2006-01-13 22:32       ` Johannes Berg
2006-01-14  1:17         ` Stuffed Crust
2006-01-14  9:28           ` Johannes Berg
2006-01-14 13:47             ` Krzysztof Halasa
2006-01-14 22:07           ` Jeff Garzik
2006-01-15 15:20             ` Stuffed Crust [this message]
2006-01-15 19:05               ` Samuel Ortiz
2006-01-16 17:09                 ` Stuffed Crust
2006-01-16 18:51                   ` Samuel Ortiz
2006-01-16 19:06                     ` John W. Linville
2006-01-16 20:16                       ` Samuel Ortiz
2006-01-16 21:06                         ` Stuffed Crust
2006-01-16 22:24                       ` Alan Cox
2006-01-16 23:02                         ` John W. Linville
2006-01-17 18:41                         ` Stuffed Crust
2006-01-17 18:54                           ` Kyle Moffett
2006-01-15 19:53               ` Sam Leffler
2006-01-16 17:28                 ` Stuffed Crust
2006-01-16 17:54                   ` Sam Leffler
2006-01-16 19:40                     ` Stuffed Crust
2006-01-16 20:14                       ` Sam Leffler
2006-01-16 20:58                         ` Stuffed Crust
2006-01-16 18:39                   ` Dan Williams
2006-01-16 19:07                   ` Samuel Ortiz
2006-01-16 19:50                     ` Stuffed Crust
2006-01-16 20:10                       ` Samuel Ortiz
2006-01-15 12:40         ` Stefan Rompf
2006-01-15 15:51           ` Johannes Berg
2006-01-15 17:53             ` Stefan Rompf
2006-01-15 20:08               ` Sam Leffler
2006-01-15 20:11                 ` Johannes Berg
2006-01-17 22:20                   ` Stefan Rompf
2006-01-15 19:39           ` Sam Leffler
2006-01-16  0:06             ` Mike Kershaw
2006-01-16 14:23         ` Jiri Benc
2006-01-16 14:55           ` Johannes Berg
2006-01-16 17:33             ` Stuffed Crust
2006-01-16 18:00               ` Sam Leffler
2006-01-16 20:16                 ` Stuffed Crust
2006-01-14  0:05       ` Krzysztof Halasa
2006-01-14 23:41       ` Dan Williams
2006-01-15 16:18         ` Stuffed Crust
2006-01-15  9:35       ` feyd
     [not found]   ` <20060113213126.GF16166@tuxdriver.com>
2006-01-13 22:20     ` wireless: recap of current issues (compatibility) John W. Linville
2006-01-13 22:33       ` Johannes Berg
2006-01-14 13:44         ` Krzysztof Halasa
     [not found]   ` <20060113213237.GH16166@tuxdriver.com>
2006-01-13 22:24     ` wireless: recap of current issues (other issues) John W. Linville
2006-01-13 22:35       ` Johannes Berg
2006-01-13 23:02         ` Johannes Berg
2006-01-14 22:09       ` Jeff Garzik
2006-01-15  0:54         ` John W. Linville
2006-01-15  1:51         ` David S. Miller
2006-01-15 11:23           ` Arnaldo Carvalho de Melo
2006-01-15 15:39         ` Stuffed Crust
2006-01-17 23:36           ` wireless: recap of current issues (other issues / fake ethernet) Stefan Rompf
2006-01-18 16:32             ` Stuffed Crust
     [not found]   ` <20060113213311.GI16166@tuxdriver.com>
2006-01-13 22:25     ` wireless: recap of current issues (actions) John W. Linville
2006-01-13 22:36       ` Johannes Berg
2006-01-14 22:11       ` Jeff Garzik
2006-01-15  0:56         ` John W. Linville
2006-01-16 14:44           ` Johannes Berg
     [not found]   ` <20060113213200.GG16166@tuxdriver.com>
2006-01-13 22:22     ` wireless: recap of current issues (stack) John W. Linville
2006-01-13 22:34       ` Johannes Berg
2006-01-13 23:03     ` Chase Venters
2006-01-14 10:46       ` Simon Kelley
2006-01-14 23:29         ` Dan Williams
2006-01-14 13:51       ` Michael Buesch
2006-01-17 17:38         ` Jean Tourrilhes
2006-01-14 14:13     ` Ulrich Kunitz
2006-01-15  4:42       ` Pete Zaitcev
2006-01-15 10:04         ` Ulrich Kunitz
     [not found] ` <43C80F9A.8020203@candelatech.com>
2006-01-13 22:49   ` wireless: recap of current issues Ben Greear

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=20060115152034.GA1722@shaftnet.org \
    --to=pizza@shaftnet.org \
    --cc=jgarzik@pobox.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).