On Tue, May 25, 2010 at 12:26:08PM -0700, Luca Niccoli wrote:
> On 25 May 2010 20:42, Luis R. Rodriguez <[email protected]> wrote:
> 
> > The passive scanning flag is used to help with cards who are
> > built to world roam. Part of the world roaming compromise is
> > to not restrict you from some channels completely but instead
> > to let you sit idly and passivly scanning, that is not issuing
> > probe requests. If the STA then picks up a beacon from an AP
> > then it knows that country does allow the STA to operate.
> > It then can lift its passive scan flag and let you send probe
> > requests too. If you did not have a no-ibss flag it would
> > then let you use a beaconing mode of operation after it lifted
> > the passive scanning flag.
> 
> >> ath9k-related Kernel Logs:
> >> [    7.008816] ath: EEPROM regdomain: 0x6a
> >> [    7.008822] ath: EEPROM indicates we should expect a direct regpair map
> >> [    7.008830] ath: Country alpha2 being used: 00
> >> [    7.008835] ath: Regpair used: 0x6a
> >
> > And this is why, your card was programmed to world roam. See:
> >
> 
> It was my understanding that the regulatory domain embedded in the
> card firmware

The card has no firmware, it has an EEPROM and the regulatory
domain is programmed onto the EEPROM.

> was used only to disable some channels completely, on
> the basis of the fact that the radio/antenna hardware could have been
> untested on those.

The regulatory domain is chosen by the OEM and programmed by the ODM.
If the device is targetted for one specific region it will have one
regulatory domain, the country for which it is destined. Often times
though some OEMs prefer to sell a device to a few regions and so a
custom world regulatory domain is invented. Technically you can use
a global world regulatory domain but that is very restrictive so there
are some custom Atheros ones. These are not part of CRDA since they
are static and then are just kept part of the driver.

The custom world regulatory domains are documented here:

http://wireless.kernel.org/en/users/Drivers/ath

> I don't understand (from a compliance point of view) why it can force
> some channels to passive scanning: since this is purely a matter of
> which nation the card is operating in, shouldn't it be managed only by
> CRDA?

CRDA is a helper for compliance, the driver however can decide it knows
better due to some customizations or enhancements. cfg80211 itself supports
world roaming, which is the default, when a card does not know what
country it is in or what country the card was programmed for. Upon
initialization then the card first does complete restrictive world
roaming (the intersection of all regulatory domain). Then, the card
might know better in case it has an EEPROM and inform cfg80211 of this,
CRDA would be used if the card was using a country regulatory domain.
If the card was using a custom regulatory domain from a vendor it can
pass this to cfg80211 as well, which is what ath9k does for the 12
world regulatory domains it supports. The user can be more compliant
too, and inform cfg80211 that although the card believes it can world
roam, or is a card for 'JP' that it is in fact in the 'US', for example.
The user input then is just used to help compliance further.

Now, passive scanning is a world roaming feature. So for example the
interesection of all regulatory domains gives us 5 GHz disabled
completely. A compromise is to use passive scanning so that if a
card detects beacons from an AP it can then actively scan. It
will also then know it too can become start as an AP / IBSS / Mesh.
The exception for this is for DFS channels because DFS master support
is required for modes of operation that beacon (AP, IBSS, Mesh).

So your other option is to just keep all the 5 GHz channels disabled
completely. Consider passive scanning is an innovative way to help with
cards targetted for customers or businesses which want devices which
can work in different regulatory domains at the same time. With the
complexity of regulatory rules globally without passive scanning you'd
just have many channels always disabled.

  Luis
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to