linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mac80211 regulatory domain confusion
@ 2007-06-02 21:10 Daniel Drake
  2007-06-04 22:43 ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Drake @ 2007-06-02 21:10 UTC (permalink / raw)
  To: linux-wireless

One of the items preventing us moving zd1211rw to mac80211 is the lack
of regulatory domain support in zd1211rw-mac80211.

In the softmac driver, we read the regulatory domain code out of the
EEPROM, and look it up in a driver-supplied "allowed channels" table,
and base future decisions from that.

The current mac80211 port appears to allow all channels everywhere.

I've seen the patch titled "d80211: Allow drivers to configure default
regulatory domain". This is a confusing - if the driver sets the
IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, then
ieee80211_init_client is not called?

If ieee80211_init_client is all about applying a default regulatory
domain to some internal structures, perhaps it should be renamed. If
it's about, say, initializing a wireless client device, perhaps the
check for default regdomain logic should be moved into that function.

Even after reading the discussion following that patch, I'm confused as
to what the driver should be doing and what the stack should be doing.
The ZD1211 hardware is capable of communicating on all channels, but the
software is what enforces the regdomain restrictions.

James Ketrenos wrote:
> "regdomains" are not static maps; they evolve over time as
> governments change their regulations.  The channels and features
> supported by hardware is static based on what the device was
> certified for.

So, this suggests that zd1211rw should be reading the EEPROM, looking up 
allowable channels, and formulating the ieee80211_hw_mode structures 
based on the results.

If we do that, should we also be setting the 
IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag? From the description of 
the flag, it sounds like we should:

/* Channels are already configured to the default regulatory domain
  * specified in the device's EEPROM */

We would then bypass various logic in ieee80211_unmask_channel(), but it 
seems to me that the logic there should be being applied regardless of 
whether the driver suggested a regdomain or not. That function is also 
confusing in that it refers to "the firmware" -- whose firmware?

Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-04 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-02 21:10 mac80211 regulatory domain confusion Daniel Drake
2007-06-04 22:43 ` Luis R. Rodriguez
2007-06-04 23:08   ` Michael Wu

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).