Search Linux Wireless

Re: [PATCH 7/7] cfg80211/mac80211: Add Country IE parsing/802.11d support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-11-05 at 11:24 -0800, Luis R. Rodriguez wrote:
> On Wed, Nov 5, 2008 at 10:10 AM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> wrote:
> > On Wed, 2008-11-05 at 08:57 -0800, Luis R. Rodriguez wrote:
> >
> >> >> +/*
> >> >> + * IEEE 802.11-2007 7.3.2.9 Country information element
> >> >> + *
> >> >> + * Minimum length is 8 octects, ie len must be evenly
> >> >> + * divisible by 2
> >> >> + */
> >> >
> >> > That seems odd, I thought there are triplets in there? That mean it
> >> > should be 2+N*3, no?
> >>
> >> Forgot the environment 'I', 'O' or ' '.
> >>
> >> alpha+environment (3) + n * 3
> >
> > But then it should be evenly divisible by three, not two, right?
> 
> Nope, the end of the IE requires a pad to make it divisible by 2.

Ah, that's weird, I suspect nobody cares and that's why your Broadcom
router has only 6 bytes.

> > And 8
> > doesn't make sense as a minimum length either then.
> 
> Agreed :) but that's exactly why I put those comments there.

right :)

> >> > When I suggested to use a checksum I was thinking of an easy way to
> >> > debounce. But a checksum is never perfect. Hence, the WARN_ON you added
> >> > might trigger despite the debounce checksum. Or we might fail to follow
> >> > changes.
> >>
> >> Let me know what you think about the alpha2 + BSSID thing above. I
> >> guess it should also consider the environment (I, O, ' ') in case the
> >> AP is reconfigured to be outdoor (without being moved). I don't think
> >> we should care about supporting these cases on the fly but we should
> >> ensure the change won't break things.
> >
> > Well I haven't checked in detail which things you care about in the IE
> > now, but shouldn't you check if those changed?
> 
> We only care about the channel triplet and that has:
> 
> a. Channel start
> b. Number of channels
> c. Power
> 
> But I think that if the alpha2+environment is the same that's enough
> for the STA to assume the BSSID has not changed the IE. At least with
> openwrt I need to bring down the interface of the AP to change 11d.
> I'd guess most home APs act the same way as in that they require a
> reboot or something. On some APs I use I use iwpriv to change it but I
> haven't checked to see internally what that will do while its on.
> 
> The checksum really only should be useful if a secondary device tries
> to associate to an AP and it gets a country IE. It needs a way to know
> if the IE is different than the one an already-present device is
> using. What I'm suggesting is that if these things are the same we can
> assume it doesn't change: BSSID+alpha2+environment.

Ok, checksums are nice to avoid having to memcmp large things, but
afaict we're talking about maybe 12 bytes, right? If so, why don't we
just keep a copy of the country IE and compare it fully every time?

The way I see it, driver/mac80211 calls cfg80211's
	regulatory_11d(wiphy, ie, ie_length)
function and that sorts out whether to do anything at all, ignore it
because it already knows etc. So regardless of what we do we can just do
it all in here and not bother anything elsewhere with checksums,
debouncing etc, and will be free to change it easily.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux