From: Andy Green <andy@warmcat.com>
To: James Ketrenos <jketreno@linux.intel.com>
Cc: Michael Wu <flamingice@sourmilk.net>,
"John W. Linville" <linville@tuxdriver.com>,
Jiri Benc <jbenc@suse.cz>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 09/13] mac80211: remove hw_scan callback
Date: Fri, 27 Apr 2007 08:44:08 +0100 [thread overview]
Message-ID: <4631A9C8.5040003@warmcat.com> (raw)
In-Reply-To: <46317888.9040909@linux.intel.com>
James Ketrenos wrote:
>> Sure there is. Smaller firmware means firmware that's less likely to
>> malfunction, which seems to be an issue.
>
> I haven't seen that as an issue; I've seen bugs in the driver that are
> misconfiguring the hardware or with the driver/stack trying to
> reconfigure things while a hardware scan is already occurring.
It seems that by definition this class of bugs would disappear if what
we should perhaps call "firmware scan" went away.
>> I don't see what you're saying about added complexity on the driver side.
>
> Right now the scanning in mac80211 is slow. I haven't really dug into
> it to see if it will transition from passive to active if it detects RF
> activity on an otherwise passive channel, etc. but I have seen that if
> we turn on hw scanning we can get results back in a few seconds vs. 10
> or more.
> The more passive channels you add (most of 802.11a) the slower the
> scanning gets.
Well just a datapoint on that (zd1211rw, presumably mac80211 scanned)
$ time iwlist mon0 scan
...
real 0m0.857s
user 0m0.001s
sys 0m0.004s
$
(I saw your other post also)
>> Eliminating the hw_scan callback reduces driver complexity.
>
> If done right, the stack would set up the list of channels to scan,
> whether to scan the channel active or passive, and the template for the
> probe request to use.
I think one can reasonably say that's a lot of stuff to support what is
a vendor-specific feature that only optimizes what can already be done.
> In order to do it all as fast as possible on the host you need access to
> all channel activity during the scan, especially on passive channels.
> If traffic is detected a probe request can be sent and then that channel
> can be given up on faster if it had to sit around for an arbitrary
> amount of time (110ms perhaps to ensure you catch beacons being
> transmitted at the vendor default interval of 100ms) Or if there is no
> traffic at all for some interval you could assume nothing is on that
> channel. Every 10 channels that's a full second you have to sit around...
>
> Unless there is a mechanism to quickly and easily toggle between filter
> and don't filter, you'll end up turning off hw/uCode filtering of
> packets all the time.
Maybe a simpler, more granular way to come at that is in the firmware to
allow selection of "beacon only" filtering, or maybe a count of valid
CRC packets that got filtered so you can assess if you should look
closer at that channel.
> Which means the hardware would be set to full promiscuous mode and every
> packet Rx'd would get tossed to the host to then either process or
> discard--which keeps the host CPU awake (which isn't good on laptops or
> anywhere else folks care about power consumption) And scanning is one
> of those things that happens more frequently when you are not plugged in
> and are moving around the home, school, office, etc.
Well a major thing for power saving is the duty cycle of the thing you
try to optimize. If scans take up 0.1% of the usage of the device even
(dubious), then making the system consume zero power during the scan
will make an extremely hard to measure difference. I don't think it
will be accepted by the Guardians Of The Code here to run the stack
always in hardware promisc as part of its standard operation, so have no
fear about that ;-)
> Not without an impact to power use. When 802.11n and 802.11e gets added
> to the mix, I'm not sure if it can realistically be eliminated through a
> host implementation without impacting performance.
I don't know anything about these new standards, but if they support the
powersave mode at the AP then Michael's fake powersave method (while we
tune the radio elsewhere for a while) would presumably handle it.
> Latency on getting scan results (especially as more passive channels are
> added) and platform power utilization while mobile.
>
>>> In the short term, I would rather we leave hw_scan in the code and
>>> have the
>>> users that currently rely on hw_scan just have to manually configure
>>> the AP
>>> selection until such time as the in-kernel-AP-selection-policy code
>>> works
>>> with hw offloaded scan.
>>>
>> What incentive does that give to fix the code?
>
> I want userspace to be able to fully configure the set of channels and
> parameters to pass to the hardware. But overhauling scan component to
> better support hardware scanning will likely take time.
Ultimately if it is possible to leverage the fake powersave mode to
allow monitor mode virtual interfaces to run on different frequencies on
the same hardware, then it will be possible to throw out the whole
concept of scanning from the stack. I just took a look at iwlist and
surely the combination of the code in there and the code in the stack to
package the results would be made radically simpler removing the stack
code entirely and bringing up a monitor mode virtual interface and
moving it around channels from usermode, filtering on beacon packets
using the pcap BPF stuff, and injecting probes if you want. The device
need only be in hardware promisc during the scan action.
For result latency, at the moment the monolithic scan is atomic, you sit
there with nothing and get your results all at once. With a usermode
driven scan, you will get results as you scan a channel, improving the
perception of latency.
>> Leaving broken things in for the sake of out-of-tree drivers does not
>> appeal to me.
>
> Nor to me--and we plan on getting iwlwifi in-tree. We also plan on
> using hw_scan. Keeping it in the stack for now helps me out. Removing
> it will make my life harder.
It seems it won't make your life that much harder, mac80211-based
scanning appears to work for you already, and we talk about 2 seconds
instead of 1 for results now and again.
-Andy
next prev parent reply other threads:[~2007-04-27 7:44 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-23 18:48 [PATCH 01/13] mac80211: Add radiotap support Michael Wu
2007-04-23 18:48 ` [PATCH 02/13] sync with radiotap header in wireless-2.6 Michael Wu
2007-04-23 18:48 ` [PATCH 03/13] mac80211: fix virtual interface related locking Michael Wu
2007-04-23 20:41 ` Jiri Benc
2007-04-23 20:55 ` Michael Wu
2007-04-23 22:20 ` Michael Wu
2007-04-23 20:58 ` Andy Green
2007-04-23 21:21 ` Michael Wu
2007-04-24 18:09 ` Andy Green
2007-04-24 18:24 ` Michael Wu
2007-04-24 18:59 ` John W. Linville
2007-04-25 12:09 ` Johannes Berg
2007-04-23 18:48 ` [PATCH 05/13] mac80211: remove statistics callback for master device Michael Wu
2007-04-23 18:48 ` [PATCH 04/13] mac80211: disable tasklets on close Michael Wu
2007-04-23 20:53 ` Jiri Benc
2007-04-23 18:48 ` [PATCH 07/13] mac80211: fix configuration concurrency issues in ieee80211_sta.c Michael Wu
2007-04-24 16:19 ` Johannes Berg
2007-04-23 18:48 ` [PATCH 06/13] mac80211: avoid flush_scheduled_work Michael Wu
2007-04-23 18:48 ` [PATCH 09/13] mac80211: remove hw_scan callback Michael Wu
2007-04-24 16:20 ` Johannes Berg
2007-04-26 12:48 ` Michael Wu
2007-04-25 5:03 ` James Ketrenos
2007-04-25 18:16 ` John W. Linville
2007-04-25 20:34 ` Michael Wu
2007-04-26 21:57 ` James Ketrenos
2007-04-27 0:23 ` Michael Wu
2007-04-27 4:14 ` James Ketrenos
2007-04-27 7:44 ` Andy Green [this message]
2007-04-27 8:06 ` James Ketrenos
2007-04-27 8:54 ` Andy Green
2007-04-27 9:00 ` Jiri Benc
2007-04-27 15:32 ` Michael Wu
2007-04-29 11:55 ` Guy Cohen
2007-04-27 6:54 ` James Ketrenos
2007-04-27 14:27 ` Michael Wu
2007-05-08 17:08 ` Michael Wu
2007-04-27 14:28 ` Dan Williams
2007-04-27 14:42 ` Jiri Benc
2007-04-27 14:56 ` Dan Williams
2007-04-27 15:16 ` Andy Green
2007-04-27 15:22 ` Johannes Berg
2007-04-27 17:17 ` James Ketrenos
2007-04-27 17:49 ` Dan Williams
2007-04-27 18:09 ` Dan Williams
2007-04-27 18:52 ` Andy Green
2007-04-27 15:20 ` Jiri Benc
2007-04-27 15:30 ` Andy Green
2007-04-27 15:36 ` Jiri Benc
2007-04-27 15:52 ` Andy Green
2007-04-27 17:44 ` James Ketrenos
2007-04-27 17:02 ` James Ketrenos
2007-04-27 18:10 ` Jiri Benc
2007-04-27 19:42 ` Dan Williams
2007-04-27 19:47 ` Jiri Benc
2007-04-27 19:52 ` John W. Linville
2007-04-26 3:03 ` James Ketrenos
2007-04-27 20:47 ` James Ketrenos
2007-04-28 13:25 ` Jiri Benc
2007-04-23 18:48 ` [PATCH 08/13] mac80211: misc cleanups in ieee80211_sta.c Michael Wu
2007-04-23 18:48 ` [PATCH 12/13] mac80211: prevent master device from going up without ieee80211 qdisc Michael Wu
2007-04-23 18:48 ` [PATCH 11/13] mac80211: fix issues in " Michael Wu
2007-04-23 18:48 ` [PATCH 10/13] mac80211: set bssid to broadcast before scan Michael Wu
2007-04-24 16:24 ` Johannes Berg
2007-04-27 17:40 ` Jiri Benc
2007-04-27 19:49 ` Michael Wu
2007-04-27 21:18 ` Michael Wu
2007-04-27 21:29 ` Michael Wu
2007-04-23 18:48 ` [PATCH 13/13] mac80211: stop all virtual interfaces when master device goes down Michael Wu
2007-04-23 20:58 ` Jiri Benc
2007-04-24 16:16 ` [PATCH 01/13] mac80211: Add radiotap support Johannes Berg
2007-04-28 13:18 ` Jiri Benc
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=4631A9C8.5040003@warmcat.com \
--to=andy@warmcat.com \
--cc=flamingice@sourmilk.net \
--cc=jbenc@suse.cz \
--cc=jketreno@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.