Netdev List
 help / color / mirror / Atom feed
* Re: wireless: recap of current issues (configuration)
From: John W. Linville @ 2006-01-16 23:02 UTC (permalink / raw)
  To: Alan Cox
  Cc: Samuel Ortiz, ext Stuffed Crust, Jeff Garzik, Johannes Berg,
	netdev, linux-kernel
In-Reply-To: <1137450281.15553.87.camel@localhost.localdomain>

On Mon, Jan 16, 2006 at 10:24:41PM +0000, Alan Cox wrote:

> I would expect equipment to honour the subset of configurations that
> meet BOTH the regulatory domain the system believes it exists within
> (which may change dynamically!) AND the AP advertisement.
> 
> If I have told my equipment to obey UK law I expect it to do so. If I
> hop on the train to France and forget to revise my configuration I'd
> prefer it also believed the APs

Yes, this is an excellent point.  I suppose this could result in
a non-functional configuration, but that is probably better than
conflicting w/ the local authorities... :-)

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Andy Gospodarek @ 2006-01-16 22:33 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Lee Revell, linux-kernel, netdev, davem
In-Reply-To: <9a8748490601161308g5f941c30o870042e6d9811c58@mail.gmail.com>

On 1/16/06, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> >
> Maybe if you described "your current problem" someone could suggest a
> solution...
>

Sure, I'd be glad to.  If I add up all the entries from the procfiles
(in /proc/net) on my system

packet = 1
netlink = 6
raw = 0
raw6 = 0
tcp = 5
tcp6 = 3
udp = 9
udp6 = 1
unix = 29

I find there are a total of 54 sockets open on my system.

Now this seems to differ from the value in /proc/net/sockstat:
# cat sockstat
sockets: used 59
TCP: inuse 5 orphan 0 tw 0 alloc 8 mem 1
UDP: inuse 9
RAW: inuse 0
FRAG: inuse 0 memory 0

So we are off by 5.  I added some code around the stat collection used
in sockstat to get more detailed info about those sockets and the
output is here.  The values are family[protocol family][socket
family].

family[1][1] = 17        (UNIX/LOCAL,STREAM)
family[1][2] = 12        (UNIX/LOCAL,DGRAM)
family[2][1] = 5         (INET,STREAM)
family[2][2] = 9         (INET,DGRAM)
family[2][3] = 2         (INET,RAW)
family[10][1] = 3        (INET6,STREAM)
family[10][2] = 1        (INET6,DGRAM)
family[10][3] = 3        (INET6,RAW)
family[16][2] = 6        (NETLINK/ROUTE,DGRAM)
family[17][10] = 1       (PACKET,PACKET)
Total = 59

All of these numbers match up with what we saw above, except the
INET/RAW and INET6/RAW sockets.  It seems they aren't being counted
correctly -- which accounts for the 5 missing sockets.  The
decrementing of these values is in sock_release() and seems to get
done correctly other times RAW sockets are created, but not for the 5
sockets in question.

Since the total socket usage seems out of place in that file -- and
quite possibly wrong, it seemed like a nice idea to get rid of it
(prior to understanding the reasoning behind keeping it).  Now it
seems the goal will be to fix the discrepancy between these files.

-andy

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Alan Cox @ 2006-01-16 22:24 UTC (permalink / raw)
  To: John W. Linville
  Cc: Samuel Ortiz, ext Stuffed Crust, Jeff Garzik, Johannes Berg,
	netdev, linux-kernel
In-Reply-To: <20060116190629.GB5529@tuxdriver.com>

On Llu, 2006-01-16 at 14:06 -0500, John W. Linville wrote:
> If regulators come down on someone, it seems like common sense
> that they would be more lenient on mobile stations complying with a
> misconfigured AP than they would be with a mobile station ignoring a
> properly configured AP?  I know expecting common sense from government
> regulators is optimistic, but still... :-)

I can't guess on the subject of US regulators but for the UK experience
in other communities (eg amateur radio), and public statements indicate
that their high priorities are interference with emergency services and
the like. 

Concerns of direct relevance are
- transmitting on unlicensed frequencies (and 802.11 channel allocations
are dependant on nation - even within the EU)
- power violation
- anything else causing interference to other legitimate users at a
radio level

I would expect equipment to honour the subset of configurations that
meet BOTH the regulatory domain the system believes it exists within
(which may change dynamically!) AND the AP advertisement.

If I have told my equipment to obey UK law I expect it to do so. If I
hop on the train to France and forget to revise my configuration I'd
prefer it also believed the APs

Alan

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Jesper Juhl @ 2006-01-16 21:08 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: Lee Revell, linux-kernel, netdev, davem
In-Reply-To: <bdfc5d6e0601161255w4e1a6ac5oaa6844a6e1bbd0aa@mail.gmail.com>

On 1/16/06, Andy Gospodarek <andy@greyhouse.net> wrote:

[could you *please* not top post? It's pretty annoying]

> Jesper,
>
> Thanks for the explanation.  Your reasoning makes sense.  I will

I'm glad you found it useful.

> consider other ways to solve my current problem and post a patch that
> doesn't "break userspace" if necessary.
>
Maybe if you described "your current problem" someone could suggest a
solution...

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 21:06 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: ext John W. Linville, Jeff Garzik, Johannes Berg, netdev,
	linux-kernel
In-Reply-To: <Pine.LNX.4.58.0601162210550.17348@irie>

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

On Mon, Jan 16, 2006 at 10:16:06PM +0200, Samuel Ortiz wrote:
> Well, I'd rather trust a governement regulated network than my neighbour's
> AP ;-) In fact, some phones set their 802.11 regulatory domain based on
> the information they received from a somehow government regulated network,
> e.g. a GSM one.

The asumption is that 802.11d information, like current "regdomain"
settings, is fixed and not user-configurable.  If the regdomain is
changeable by the user, that unit would not be approved for sale in that
particular locale.

(Now 802.11d doesn't specify what to do when you hear two conflicting 
 802.11d beacons.... there go those assumptions again..)

Stations respecting 802.11d rules are not allowed to transmit on any
supported frequency until they hear an AP on that frequency first.  

This essentially means that all scans are passive until we hear an AP,
and we can't transmit on any other (presumably still silent) frequencies
unless we hear an 802.11d beacon that says we can.

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

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

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 20:58 UTC (permalink / raw)
  To: Sam Leffler; +Cc: Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <43CBFE90.8070208@errno.com>

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

On Mon, Jan 16, 2006 at 12:14:08PM -0800, Sam Leffler wrote:
> Please read what I wrote again.  Station mode power save work involves 
> communicating with the ap and managing the hardware.  The first 
> interacts with bg scanning.  We haven't even talked about how to handle 
> sta mode power save.

I think we're arguing over semantics; what's important here is that the
STA tells the AP to buffer frames while we're performing a scan,
correct?
 
> If you wait until the end of the scan to return to the bss channel then 
> you potentially miss buffered mcast frames.  You can up the station's 
> listen interval but that only gets you so far.  As I said there are 
> tradeoffs in doing this.

An excellent point.  This is particularly relevant for APs that have a
DTIM interval of 1 -- if you're doing a passive scan, the dwell time on
that other channel (you need at least one beacon interval) could cause
you to miss bufferend MCAST frames.

In all fairness I don't think I've seen any implementations that handle
this cleanly.

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

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

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Andy Gospodarek @ 2006-01-16 20:55 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Lee Revell, linux-kernel, netdev, davem
In-Reply-To: <9a8748490601161235k2defec82sa51a17e4fc14b22f@mail.gmail.com>

Jesper,

Thanks for the explanation.  Your reasoning makes sense.  I will
consider other ways to solve my current problem and post a patch that
doesn't "break userspace" if necessary.

-andy



On 1/16/06, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> On 1/16/06, Andy Gospodarek <andy@greyhouse.net> wrote:
> > What userspace app will break because of this?
> >
> > On 1/16/06, Lee Revell <rlrevell@joe-job.com> wrote:
> > > On Mon, 2006-01-16 at 15:04 -0500, Andy Gospodarek wrote:
> > > > Printing the total number of sockets used in /proc/net/sockstat is out
> > > > of place in a file that is supposed to contain information related to
> > > > ipv4 sockets.  Removed output for total socket usage.
> > > >
> > >
> > > Um, you can't do that, it will break userspace.
> > >
>
> That's not the point. The point is you can't go around changing things
> exported to usersace - that has the potential to break apps.  Even if
> no app is known to the people on this list there may still be apps out
> there depending on it - and we don't break userspace without *very*
> good reasons, and even then it's announced for several months (years
> sometimes) in Documentation/feature-removal.txt and elsewhere.
>
> --
> Jesper Juhl <jesper.juhl@gmail.com>
> Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please      http://www.expita.com/nomime.html
>

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Jesper Juhl @ 2006-01-16 20:35 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: Lee Revell, linux-kernel, netdev, davem
In-Reply-To: <bdfc5d6e0601161225h53554b1ahde794af93af52bdf@mail.gmail.com>

On 1/16/06, Andy Gospodarek <andy@greyhouse.net> wrote:
> What userspace app will break because of this?
>
> On 1/16/06, Lee Revell <rlrevell@joe-job.com> wrote:
> > On Mon, 2006-01-16 at 15:04 -0500, Andy Gospodarek wrote:
> > > Printing the total number of sockets used in /proc/net/sockstat is out
> > > of place in a file that is supposed to contain information related to
> > > ipv4 sockets.  Removed output for total socket usage.
> > >
> >
> > Um, you can't do that, it will break userspace.
> >

That's not the point. The point is you can't go around changing things
exported to usersace - that has the potential to break apps.  Even if
no app is known to the people on this list there may still be apps out
there depending on it - and we don't break userspace without *very*
good reasons, and even then it's announced for several months (years
sometimes) in Documentation/feature-removal.txt and elsewhere.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Andy Gospodarek @ 2006-01-16 20:25 UTC (permalink / raw)
  To: Lee Revell; +Cc: linux-kernel, netdev, davem
In-Reply-To: <1137442446.19444.20.camel@mindpipe>

What userspace app will break because of this?

On 1/16/06, Lee Revell <rlrevell@joe-job.com> wrote:
> On Mon, 2006-01-16 at 15:04 -0500, Andy Gospodarek wrote:
> > Printing the total number of sockets used in /proc/net/sockstat is out
> > of place in a file that is supposed to contain information related to
> > ipv4 sockets.  Removed output for total socket usage.
> >
>
> Um, you can't do that, it will break userspace.
>
> Lee
>
>

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 20:16 UTC (permalink / raw)
  To: Sam Leffler
  Cc: Johannes Berg, Jiri Benc, netdev, linux-kernel, John W. Linville
In-Reply-To: <43CBDF32.50109@errno.com>

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

On Mon, Jan 16, 2006 at 10:00:18AM -0800, Sam Leffler wrote:
> Perhaps you haven't hit some of the more recent standards that place 
> more of a burden on the ap implementation?  Also some vendor-specific 
> protocol features suck up space for ap mode only and it is nice to be 
> able to include them only as needed.

While there is more work to be done on the AP side, and that code may
even be easily wrapped in an #ifdef, the majority of the complexity is
shared by both the station and the AP.  It's worth mentioning that the
802.11 specs do not generally differentiate between "APs vs non-APs" --
they're all "STAs" of equal capabilities.

This is at least true of 802.11d, 802.11e, 802.11i
(supplicant/authenticator notwithstanding), 802.11j, and 802.11k.  The
general difference is that the AP needs to be aware of the state of its
associated STAs, and perform different actions depending on configured
policy and the STAs' states, whereas the STAs generally do what the AP
tells them to do.

> There are several advantages to splitting up the code such as reduced 
> audit complexity and real space savings but I agree that it is an open 
> question whethere there's a big gain to modularizing the code by 
> operating mode.

I agree that there would be some space savings, but they'd be relatively
small, at least if the stack is designed to be generic.  This would make
the most difference for tiny/embedded systems -- but they'd want to use
#ifdefs to disable all AP code entirely, which includes all of the "if 
(ap_mode) { } else { }" clauses that would litter the whole codebase, 
regardless of modularity.  (then if we use function pointers... that's a 
*lot* of virtual functions..)

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

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

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Samuel Ortiz @ 2006-01-16 20:16 UTC (permalink / raw)
  To: ext John W. Linville
  Cc: ext Stuffed Crust, Jeff Garzik, Johannes Berg, netdev,
	linux-kernel
In-Reply-To: <20060116190629.GB5529@tuxdriver.com>

On Mon, 16 Jan 2006, ext John W. Linville wrote:

> On Mon, Jan 16, 2006 at 08:51:31PM +0200, Samuel Ortiz wrote:
> > On Mon, 16 Jan 2006, ext Stuffed Crust wrote:
> >
> > > On Sun, Jan 15, 2006 at 09:05:33PM +0200, Samuel Ortiz wrote:
> > > > Regarding 802.11d and regulatory domains, the stack should also be able to
> > > > stick to one regulatory domain if asked so by userspace, whatever the APs
> > > > around tell us.
> > >
> > > ...and in doing so, violate the local regulatory constraints.  :)
> > The other option is to conform to whatever the AP you associate with
> > advertises. In fact, this is how it should be done according to 802.11d.
> > Unfortunately, this doesn't ensure local regulatory constraints compliance
> > unless you expect each and every APs to do the Right Thing ;-)
>
> If regulators come down on someone, it seems like common sense
> that they would be more lenient on mobile stations complying with a
> misconfigured AP than they would be with a mobile station ignoring a
> properly configured AP?  I know expecting common sense from government
> regulators is optimistic, but still... :-)
Well, I'd rather trust a governement regulated network than my neighbour's
AP ;-) In fact, some phones set their 802.11 regulatory domain based on
the information they received from a somehow government regulated network,
e.g. a GSM one.

Cheers,
Samuel.

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Sam Leffler @ 2006-01-16 20:14 UTC (permalink / raw)
  To: pizza, Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116194013.GA12748@shaftnet.org>

Stuffed Crust wrote:
> On Mon, Jan 16, 2006 at 09:54:15AM -0800, Sam Leffler wrote:
>> The way you implement bg scanning is to notify the ap you are going into 
>> power save mode before you leave the channel (in sta mode).  Hence bg 
>> scanning and power save operation interact.
> 
> That is not "powersave operation" -- that is telling the AP we are going
> into powersave, but not actually going into powersave -- Actual
> powersave operation would need to be disabled if we go into a scan, as
> we need to have the rx path powered up and ready to hear anything out
> there for the full channel dwell time.

Please read what I wrote again.  Station mode power save work involves 
communicating with the ap and managing the hardware.  The first 
interacts with bg scanning.  We haven't even talked about how to handle 
sta mode power save.

> 
>> See above.  Doing bg scanning well is a balancing act and restoring 
>> hardware state is the least of your worries (hopefully); e.g. what's the 
>> right thing to do when you get a frame to transmit while off-channel 
>> scanning, how often should you return to the bss channel?
> 
> Disallow all other transmits (either by failing them altogether, or by 
> buffering them up, which I think is better) while performing the scan.

Not necessarily in my experience.

> 
> If we are (continually) scanning because we don't have an association, 
> then we shouldn't be allowing any traffic through the stack anyway.

If you do not have an association you are not doing bg scanning.

> 
> At the end of each scan pass, you return to the original channel, then 
> return "scan complete" to the stack/userspace.  at this point any 
> pending transmits can go out, and if another scan pass is desired, it 
> will happen then.

If you wait until the end of the scan to return to the bss channel then 
you potentially miss buffered mcast frames.  You can up the station's 
listen interval but that only gets you so far.  As I said there are 
tradeoffs in doing this.

> 
>> Er, you need to listen to at least beacons from other ap's if you're in 
>> 11g so you can detect overlapping bss and enable protection.  There are 
>> other ways to handle this but that's one.
> 
> If you can't hear the traffic, then it doesn't count for purposes of ER
> protection -- but that said, this only matters for AP operation, so APs
> shouldn't filter out anyone else's becacons.  STAs should respect the
> "use ER Protection" bit in the AP's beacon, so can filter out traffic 
> that doesn't match the configured BSSID.

Sorry I meant this was needed for ap operation.

> 
>>> Oh, I know.  I've burned out many brain cells trying to build 
>>> supportable solutions for our customers.   
>> I don't recall seeing well-developed scanning code in either of the 
>> proposed stacks.
> 
> I've only looked into the pre-2.6-merged HostAP stack, so I can't 
> comment on what's publically available.  I'll have a look at the GPL'ed 
> DeviceScape stack when I have more time.
> 
> Most of what I've going on about is derived from my experience from
> commercial 802.11 work I've done over the past few years.

Ditto.

	Sam

^ permalink raw reply

* Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Lee Revell @ 2006-01-16 20:14 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: linux-kernel, netdev, davem
In-Reply-To: <20060116200432.GB14060@gospo.rdu.redhat.com>

On Mon, 2006-01-16 at 15:04 -0500, Andy Gospodarek wrote:
> Printing the total number of sockets used in /proc/net/sockstat is out
> of place in a file that is supposed to contain information related to
> ipv4 sockets.  Removed output for total socket usage.
> 

Um, you can't do that, it will break userspace.

Lee

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Samuel Ortiz @ 2006-01-16 20:10 UTC (permalink / raw)
  To: ext Stuffed Crust
  Cc: Sam Leffler, Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116195008.GB12748@shaftnet.org>

On Mon, 16 Jan 2006, ext Stuffed Crust wrote:

> You may hear another beacon when the STA is awake, you may not.  BSSID
> filtering has nothing to do with 802.11 power save, but rather is
> intented to reduce the host load (interrupts, processing overhead) and
> thus the host power consumption.
I know that and I know a bit about 802.11 PS as well.
I was talking about host powersaving, not 802.11. Sorry for the confusion.

What I meant is that having an 802.11 stack capable of living with less
than a beacon every couple of beacon intervals would be nice as well.

Cheers,
Samuel.

^ permalink raw reply

* [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat
From: Andy Gospodarek @ 2006-01-16 20:04 UTC (permalink / raw)
  To: linux-kernel, netdev, davem

Printing the total number of sockets used in /proc/net/sockstat is out
of place in a file that is supposed to contain information related to
ipv4 sockets.  Removed output for total socket usage.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---

 proc.c |    1 -
 1 files changed, 1 deletion(-)


diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -60,7 +60,6 @@ static int fold_prot_inuse(struct proto 
  */
 static int sockstat_seq_show(struct seq_file *seq, void *v)
 {
-	socket_seq_show(seq);
 	seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n",
 		   fold_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count),
 		   tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated),

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 19:50 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: Sam Leffler, Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <Pine.LNX.4.58.0601162056261.17348@irie>

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

On Mon, Jan 16, 2006 at 09:07:52PM +0200, Samuel Ortiz wrote:
> That is true, thin MACs usually don't filter beacons on the same channel.
> But in some cases (mainly power saving), you really want to avoid
> receiving useless beacons and having the host woken up for each of them.
> You may even want to not receive all the useful ones (the ones coming from
> the AP you're joined with) if your softmac allows that.

BSSID filtering doesn't matter as far as 802.11 powersave is concerned
-- the power savings come from disabling the RF/BBP components.  In
other words, you can't receive or transmit traffic.

If you're respecting the AP's beacon interval/DTIM settings, you only 
wake up every couple of beacon intervals and listen for a beacon.  IF 
there's traffic waiting for you, then you wake up your transmitter, send 
out a PSPOLL (or NULL/PSEnd) frame, get your traffic, then go back to 
sleep again.  

You may hear another beacon when the STA is awake, you may not.  BSSID 
filtering has nothing to do with 802.11 power save, but rather is 
intented to reduce the host load (interrupts, processing overhead) and 
thus the host power consumption.

> This kind of beacon filtering is a big power saver, which is one of the
> most important requirement for some platforms (phones, PDA, etc...).

You need to be clear if you're talking about 802.11 powersave, versus 
"power savings stemming from reducing the load on the host system", 
which is where BSSID filtering is beneficial.

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

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

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 19:40 UTC (permalink / raw)
  To: Sam Leffler; +Cc: Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <43CBDDC7.9060504@errno.com>

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

On Mon, Jan 16, 2006 at 09:54:15AM -0800, Sam Leffler wrote:
> The way you implement bg scanning is to notify the ap you are going into 
> power save mode before you leave the channel (in sta mode).  Hence bg 
> scanning and power save operation interact.

That is not "powersave operation" -- that is telling the AP we are going
into powersave, but not actually going into powersave -- Actual
powersave operation would need to be disabled if we go into a scan, as
we need to have the rx path powered up and ready to hear anything out
there for the full channel dwell time.

> See above.  Doing bg scanning well is a balancing act and restoring 
> hardware state is the least of your worries (hopefully); e.g. what's the 
> right thing to do when you get a frame to transmit while off-channel 
> scanning, how often should you return to the bss channel?

Disallow all other transmits (either by failing them altogether, or by 
buffering them up, which I think is better) while performing the scan.

If we are (continually) scanning because we don't have an association, 
then we shouldn't be allowing any traffic through the stack anyway.

At the end of each scan pass, you return to the original channel, then 
return "scan complete" to the stack/userspace.  at this point any 
pending transmits can go out, and if another scan pass is desired, it 
will happen then.

> Er, you need to listen to at least beacons from other ap's if you're in 
> 11g so you can detect overlapping bss and enable protection.  There are 
> other ways to handle this but that's one.

If you can't hear the traffic, then it doesn't count for purposes of ER
protection -- but that said, this only matters for AP operation, so APs
shouldn't filter out anyone else's becacons.  STAs should respect the
"use ER Protection" bit in the AP's beacon, so can filter out traffic 
that doesn't match the configured BSSID.

> >Oh, I know.  I've burned out many brain cells trying to build 
> >supportable solutions for our customers.   
> 
> I don't recall seeing well-developed scanning code in either of the 
> proposed stacks.

I've only looked into the pre-2.6-merged HostAP stack, so I can't 
comment on what's publically available.  I'll have a look at the GPL'ed 
DeviceScape stack when I have more time.

Most of what I've going on about is derived from my experience from
commercial 802.11 work I've done over the past few years.

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

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

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Samuel Ortiz @ 2006-01-16 19:07 UTC (permalink / raw)
  To: ext Stuffed Crust
  Cc: Sam Leffler, Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116172817.GB8596@shaftnet.org>

On Mon, 16 Jan 2006, ext Stuffed Crust wrote:

> Background scanning, yes -- but there are all sorts of different
> thresholds and types of 'scanning' to be done, depending on how
> disruptive you are willing to be, and how capable the hardware is.  Most
> thin MACs don't filter out foreign BSSIDs on the same channel when
> you're joined, which makes some things a lot easier.
That is true, thin MACs usually don't filter beacons on the same channel.
But in some cases (mainly power saving), you really want to avoid
receiving useless beacons and having the host woken up for each of them.
You may even want to not receive all the useful ones (the ones coming from
the AP you're joined with) if your softmac allows that.
This kind of beacon filtering is a big power saver, which is one of the
most important requirement for some platforms (phones, PDA, etc...).

Cheers,
Samuel.

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: John W. Linville @ 2006-01-16 19:06 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: ext Stuffed Crust, Jeff Garzik, Johannes Berg, netdev,
	linux-kernel
In-Reply-To: <Pine.LNX.4.58.0601162020260.17348@irie>

On Mon, Jan 16, 2006 at 08:51:31PM +0200, Samuel Ortiz wrote:
> On Mon, 16 Jan 2006, ext Stuffed Crust wrote:
> 
> > On Sun, Jan 15, 2006 at 09:05:33PM +0200, Samuel Ortiz wrote:
> > > Regarding 802.11d and regulatory domains, the stack should also be able to
> > > stick to one regulatory domain if asked so by userspace, whatever the APs
> > > around tell us.
> >
> > ...and in doing so, violate the local regulatory constraints.  :)
> The other option is to conform to whatever the AP you associate with
> advertises. In fact, this is how it should be done according to 802.11d.
> Unfortunately, this doesn't ensure local regulatory constraints compliance
> unless you expect each and every APs to do the Right Thing ;-)

If regulators come down on someone, it seems like common sense
that they would be more lenient on mobile stations complying with a
misconfigured AP than they would be with a mobile station ignoring a
properly configured AP?  I know expecting common sense from government
regulators is optimistic, but still... :-)

Of course when we are the AP, the ability to adjust these parameters
could be very important.  No?

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Samuel Ortiz @ 2006-01-16 18:51 UTC (permalink / raw)
  To: ext Stuffed Crust; +Cc: Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116170951.GA8596@shaftnet.org>

On Mon, 16 Jan 2006, ext Stuffed Crust wrote:

> On Sun, Jan 15, 2006 at 09:05:33PM +0200, Samuel Ortiz wrote:
> > Regarding 802.11d and regulatory domains, the stack should also be able to
> > stick to one regulatory domain if asked so by userspace, whatever the APs
> > around tell us.
>
> ...and in doing so, violate the local regulatory constraints.  :)
The other option is to conform to whatever the AP you associate with
advertises. In fact, this is how it should be done according to 802.11d.
Unfortunately, this doesn't ensure local regulatory constraints compliance
unless you expect each and every APs to do the Right Thing ;-)


> Allowing
> the user to change the regulatory domain at will.. is a rather fuzzy
> legal area, to say the least.
IMHO, strictly sticking to 802.11d is also somehow legally fuzzy as you're
as legal as the network you're joining.

Cheers,
Samuel.

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Dan Williams @ 2006-01-16 18:39 UTC (permalink / raw)
  To: Stuffed Crust
  Cc: Sam Leffler, Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116172817.GB8596@shaftnet.org>

On Mon, 2006-01-16 at 12:28 -0500, Stuffed Crust wrote:
> Scans should be specified as "non-distruptive" so the hardware driver
> has to twiddle whatever bits are necessary to return the hardware to the
> same state that it was in before the scan kicked in.  Beyond that, the
> scanning smarts are all in the 802.11 stack.  The driver should be as
> dumb as possible.  :)

This is quite important... from a user perspective, it might be 2, 5, or
15 seconds before the card can actually scan all channels.
Unfortunately, background (passive) scanning by definition can't find
all access points, so you're going to need to do active scanning.
However, that active scanning should be controlled by userspace, not the
driver.  Only userspace knows what policies the user him/herself has set
on powersaving mode.

> Background scanning, yes -- but there are all sorts of different
> thresholds and types of 'scanning' to be done, depending on how
> disruptive you are willing to be, and how capable the hardware is.  Most
> thin MACs don't filter out foreign BSSIDs on the same channel when
> you're joined, which makes some things a lot easier.

Scanning has the tradeoff of updated network list vs. saving power +
network disruption.  The user, or programs delegated by the user, need
to make that choice, not the stack or the driver.

-------------

Furthermore, and this is also extremely important, user apps need to
know when the scan is done.  From my look at drivers, _all_ cards know
when the hardware is in scanning states, and when its done.  What many
don't do is communicate that information to userspace via wireless
events.  The userspace app that requested scanning is then stuck
busy-waiting for the SIOCGIWSCAN to return success, which just sucks.
Much better if all drivers had the wireless event so that the userspace
app could just fire off the scan with SIOCSIWSCAN, and parse the results
when the event comes back rather than spinning.

In the netlink world, this would of course be done by multicasting the
"Scan Done" message to all interested clients, which would be just as
good.

Dan

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Sam Leffler @ 2006-01-16 18:00 UTC (permalink / raw)
  To: Stuffed Crust
  Cc: Johannes Berg, Jiri Benc, netdev, linux-kernel, John W. Linville
In-Reply-To: <20060116173325.GC8596@shaftnet.org>

Stuffed Crust wrote:
> On Mon, Jan 16, 2006 at 03:55:55PM +0100, Johannes Berg wrote:
> 
>>I really don't see why a plain STA mode card should be required to carry
>>around all the code required for AP operation -- handling associations
>>of clients, powersave management wrt. buffering, ... Sure, fragmentation
> 
> 
> From the perspective of the hardware driver, there is little AP or 
> STA-specific code, especially when IBSS is thrown in.  Thick MACs 
> excepted, there's little more than "frame tx/rx, and hardware control 
> twiddling".  
> 
> The AP/STA smarts happen in the 802.11 stack.  And, speaking from 
> experience, it is very hard to separate them cleanly, at least not 
> without incurring even more overall complexity and bloat.
> 
> It's far simpler to build them intertwined, then add a bunch of #ifdefs 
> if you want to disable AP or STA mode individually to save space.

Perhaps you haven't hit some of the more recent standards that place 
more of a burden on the ap implementation?  Also some vendor-specific 
protocol features suck up space for ap mode only and it is nice to be 
able to include them only as needed.

There are several advantages to splitting up the code such as reduced 
audit complexity and real space savings but I agree that it is an open 
question whethere there's a big gain to modularizing the code by 
operating mode.

	Sam

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Sam Leffler @ 2006-01-16 17:54 UTC (permalink / raw)
  To: Stuffed Crust; +Cc: Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <20060116172817.GB8596@shaftnet.org>

Stuffed Crust wrote:
> On Sun, Jan 15, 2006 at 11:53:55AM -0800, Sam Leffler wrote:
> 
>>The above is a great synopsis but there is more.  For example to support 
>>roaming (and sometimes for ap operation) you want to do background 
>>scanning; this ties in to power save mode if operating as a station. 
> 
> 
> Opportunistic roaming is one of those things that has many knobs to 
> twiddle, and depends a lot on the needs of the users. 
> 
> But we're not actually in powersave mode -- the 802.11 stack can spit
> out the NULL frames to tell the AP to buffer traffic for us. This is 
> trivial to do.

The way you implement bg scanning is to notify the ap you are going into 
power save mode before you leave the channel (in sta mode).  Hence bg 
scanning and power save operation interact.

> 
> Scans should be specified as "non-distruptive" so the hardware driver
> has to twiddle whatever bits are necessary to return the hardware to the
> same state that it was in before the scan kicked in.  Beyond that, the
> scanning smarts are all in the 802.11 stack.  The driver should be as
> dumb as possible.  :)

See above.  Doing bg scanning well is a balancing act and restoring 
hardware state is the least of your worries (hopefully); e.g. what's the 
right thing to do when you get a frame to transmit while off-channel 
scanning, how often should you return to the bss channel?

> 
> Background scanning, yes -- but there are all sorts of different
> thresholds and types of 'scanning' to be done, depending on how
> disruptive you are willing to be, and how capable the hardware is.  Most
> thin MACs don't filter out foreign BSSIDs on the same channel when
> you're joined, which makes some things a lot easier.

Er, you need to listen to at least beacons from other ap's if you're in 
11g so you can detect overlapping bss and enable protection.  There are 
other ways to handle this but that's one.

> 
> 
>>Further you want to order your channel list to hit the most likely 
>>channels first in case you are scanning for a specific ap--e.g. so you 
>>can stop the foreground scan and start to associate.  
> 
> 
> With my scenarios, the driver performs the sweep in the order it was 
> given -- if the hardware supports it, naturally.

Channel ordering is useful no matter who specifies it.  If you offload 
the ordering to the upper layers then they need to be aware of the 
regdomain constraints.  Probably not a big deal but then you need to 
synchronize info between layers or export it.  And there's other 
regdomain-related info that may want to be considered such as max 
txpower.  I'm just saying if you want to do a good job there's lots of 
work here.

> 
> 
>>In terms of beacon miss processing some parts have a hardware beacon
>>miss interrupt based on missed consecutive beacons but others require
>>you to detect beacon miss in software.  Other times you need s/w bmiss
>>detection because you're doing something like build a repeater when
>>the station virtual device can't depend on the hardware to deliver a
>>bmiss interrupt.
> 
> 
> Of course.  The stack is going to need a set of timers regardless of the 
> hardware's capabilities, but having (sane) hardware beacon miss 
> detection capabilities makes it a bit more robust.
>  
> 
>>Scanning (and roaming) is really a big can 'o worms.
> 
> 
> Oh, I know.  I've burned out many brain cells trying to build 
> supportable solutions for our customers.   

I don't recall seeing well-developed scanning code in either of the 
proposed stacks.

	Sam

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 17:33 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Jiri Benc, netdev, linux-kernel, John W. Linville
In-Reply-To: <1137423355.2520.112.camel@localhost>

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

On Mon, Jan 16, 2006 at 03:55:55PM +0100, Johannes Berg wrote:
> I really don't see why a plain STA mode card should be required to carry
> around all the code required for AP operation -- handling associations
> of clients, powersave management wrt. buffering, ... Sure, fragmentation

From the perspective of the hardware driver, there is little AP or 
STA-specific code, especially when IBSS is thrown in.  Thick MACs 
excepted, there's little more than "frame tx/rx, and hardware control 
twiddling".  

The AP/STA smarts happen in the 802.11 stack.  And, speaking from 
experience, it is very hard to separate them cleanly, at least not 
without incurring even more overall complexity and bloat.

It's far simpler to build them intertwined, then add a bunch of #ifdefs 
if you want to disable AP or STA mode individually to save space.

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

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

^ permalink raw reply

* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-16 17:28 UTC (permalink / raw)
  To: Sam Leffler; +Cc: Jeff Garzik, Johannes Berg, netdev, linux-kernel
In-Reply-To: <43CAA853.8020409@errno.com>

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

On Sun, Jan 15, 2006 at 11:53:55AM -0800, Sam Leffler wrote:
> The above is a great synopsis but there is more.  For example to support 
> roaming (and sometimes for ap operation) you want to do background 
> scanning; this ties in to power save mode if operating as a station. 

Opportunistic roaming is one of those things that has many knobs to 
twiddle, and depends a lot on the needs of the users. 

But we're not actually in powersave mode -- the 802.11 stack can spit
out the NULL frames to tell the AP to buffer traffic for us. This is 
trivial to do.

Scans should be specified as "non-distruptive" so the hardware driver
has to twiddle whatever bits are necessary to return the hardware to the
same state that it was in before the scan kicked in.  Beyond that, the
scanning smarts are all in the 802.11 stack.  The driver should be as
dumb as possible.  :)

Background scanning, yes -- but there are all sorts of different
thresholds and types of 'scanning' to be done, depending on how
disruptive you are willing to be, and how capable the hardware is.  Most
thin MACs don't filter out foreign BSSIDs on the same channel when
you're joined, which makes some things a lot easier.

> Further you want to order your channel list to hit the most likely 
> channels first in case you are scanning for a specific ap--e.g. so you 
> can stop the foreground scan and start to associate.  

With my scenarios, the driver performs the sweep in the order it was 
given -- if the hardware supports it, naturally.

> In terms of beacon miss processing some parts have a hardware beacon
> miss interrupt based on missed consecutive beacons but others require
> you to detect beacon miss in software.  Other times you need s/w bmiss
> detection because you're doing something like build a repeater when
> the station virtual device can't depend on the hardware to deliver a
> bmiss interrupt.

Of course.  The stack is going to need a set of timers regardless of the 
hardware's capabilities, but having (sane) hardware beacon miss 
detection capabilities makes it a bit more robust.
 
> Scanning (and roaming) is really a big can 'o worms.

Oh, I know.  I've burned out many brain cells trying to build 
supportable solutions for our customers.   

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

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

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox