This page is the FAQ about Regdomain and Countrycode.
Which settings are determined by the regdomain/countrycode?
The countrycode and regdomain settings control the channels the card can operate on, as well as maximum transmission power, whether active scanning can be used, where and how ad-hoc mode can be used and also whether DFS support is required. What are regdomains and countrycodes?
The regdomain outlines regions of the world which share similar regulatory conditions. Countrycode allows a finer selection of one of the countries inside the given regdomain. Both settings are stored inside the EEPROM of your card, which will be used by default.
In addition to the “real” regdomains, there are so called “world wide roaming” pseudo regomain codes that seem to cover the union of ETSI and FCC requirements. This might bring some restrictions for you: ETSI requires stuff like DFS and TPC to be enabled, and disallows other features like active scanning in certain frequency ranges, which is not required by FCC. You’ll find them programmed into most IBM-made cards.
How can I change the regdomain or countrycode that Madwifi uses?
Whilst it isn’t possible to change the regdomain manually without messing with the EEPROM of your card (kids, don’t do this at home!), you can manually override the default countrycode (as long as it belongs to the regomain which is used by your card) without causing any harm. This can be done with the module parameter countrycode:
modprobe ath_pci countrycode=276
Country codes follow the numbering scheme defined in ISO 3166, which can be found here for example.
The values for regdomain don’t follow any ISO scheme, but are manufacturing codes introduced by Atheros. There is no publically available list of valid regdomain codes and their meaning, but since it isn’t possible to change/override the regdomain EEPROM settings this doesn’t matter anyway.
Why does Madwifi not determine the regdomain and countrycode from beacon packets, like the NDIS wrapped Atheros windows driver does?
Madwifi supports more modes than just station and ad-hoc. If a Madwifi driven card is being used in master mode (i.e. as an AP) then looking at beacon packets is clearly inappropriate, since they will have been produced by the madwifi driver itself.
Can an incorrect countrycode or regdomain lead to poor bit rates?
Not in principle.