Skip to contentSkip to conversation

Overriding driver regdomain settings?

ath9k-devel Jost-Philip Matysik 3 participants 3 messages Jun 25, 2012 – Jul 1, 2012 Atheros ath generic utilities

lore
Share & tools
lore
#0 lore raw

Hello List!

I am using the following USB wifi device:
ID 0846:9018 NetGear, Inc. WNDA3200 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]

This uses the ath9k_htc driver.

Unfortunately a lot of channels I would like to use (and am allowed to use in my country) are disabled, because the card defaults to the wrong regulatory domain setting.

I have tried using a modified wireless-regdb and CRDA. This works great with other cards, but the WNDA3200 ignores my regdb and continues to use the wrong channels.

According to syslog, the card applies the "world" regulatory domain (which will not let me use channels 100-146, and then ignores the kernel's request to change to a different domain, because it has its own system:

[ 3632.815645]cfg80211: Ignoring regulatory request Set by core since the driver uses
its own custom regulatory domain 
[ 3632.819324] ieee80211 phy5: Atheros AR9280 Rev:2
[ 3632.819905] Registered led device: ath9k_htc-phy5
[ 3632.819913] usb2-3: ath9k_htc: USB layer initialized

Is there any way to disable/change/override/modify this to get the additional channels enabled?

If such a feature exists, is there documentation available about it somewhere?

My preferred solution would be to tell the driver to use the kernel's CRDA, so I would keep all modifications in a central place...

Thanks!

Regards,
Jost-Philip Matysik

#1 lore raw

2012/6/25 Jost-Philip Matysik <[email protected]>:

Quoted 35 lines

Hello List!

I am using the following USB wifi device:
ID 0846:9018 NetGear, Inc. WNDA3200 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]

This uses the ath9k_htc driver.

Unfortunately a lot of channels I would like to use (and am allowed to use in my country) are disabled, because the card defaults to the wrong regulatory domain setting.

I have tried using a modified wireless-regdb and CRDA. This works great with other cards, but the WNDA3200 ignores my regdb and continues to use the wrong channels.

According to syslog, the card applies the "world" regulatory domain (which will not let me use channels 100-146, and then ignores the kernel's request to change to a different domain, because it has its own system:

[ 3632.815645]cfg80211: Ignoring regulatory request Set by core since the driver uses
its own custom regulatory domain
[ 3632.819324] ieee80211 phy5: Atheros AR9280 Rev:2
[ 3632.819905] Registered led device: ath9k_htc-phy5
[ 3632.819913] usb2-3: ath9k_htc: USB layer initialized

Is there any way to disable/change/override/modify this to get the additional channels enabled?

If such a feature exists, is there documentation available about it somewhere?

My preferred solution would be to tell the driver to use the kernel's CRDA, so I would keep all modifications in a central place...

Quoted 8 lines

Thanks!

Regards,
Jost-Philip Matysik
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Hello.

I had similar problems when the regulatory settings (using crda) collided with the regdomain of my Atheros cards.
In my point of view this is unnecessary, as the card isn't always operated where it was build or bought. Setting the allowed channels via crda should be enough.
Hopefully the openwrt guys think the same way, so I found the following patch at:
https://dev.openwrt.org/browser/trunk/package/mac80211/patches/404-ath_regd_optional.patch?rev=23539

drivers/net/wireless/ath/regd.c +16 -0
@@ -194,6 +194,10 @@ ath_reg_apply_beaconing_flags(struct wip
        u32 bandwidth = 0;
        int r;
 
+#ifdef ATH_USER_REGD
+       return;
+#endif
+
        for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 
                if (!wiphy->bands[band])
@@ -253,6 +257,10 @@ ath_reg_apply_active_scan_flags(struct w
        u32 bandwidth = 0;
        int r;
 
+#ifdef ATH_USER_REGD
+       return;
+#endif
+
        sband = wiphy->bands[IEEE80211_BAND_2GHZ];
        if (!sband)
                return;
@@ -302,6 +310,10 @@ static void ath_reg_apply_radar_flags(st
        struct ieee80211_channel *ch;
        unsigned int i;
 
+#ifdef ATH_USER_REGD
+       return;
+#endif
+
        if (!wiphy->bands[IEEE80211_BAND_5GHZ])
                return;
 
@@ -469,6 +481,10 @@ ath_regd_init_wiphy(struct ath_regulator
 {
        const struct ieee80211_regdomain *regd;
 
+#ifdef ATH_USER_REGD
+       return 0;
+#endif
+
        wiphy->reg_notifier = reg_notifier;
        wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
 

You still need to define ATH_USER_REGD, either quick and dirty in the source code, or like the openwrt kernel does, create a Kconfig entry so you can enable it from menuconfig.

#2 lore raw

On 28 June 2012 07:14, Kai Scharwies <[email protected]> wrote:
.

Quoted 6 lines

I had similar problems when the regulatory settings (using crda) collided with the regdomain of my Atheros cards.
In my point of view this is unnecessary, as the card isn't always operated where it was build or bought. Setting the allowed channels via crda should be enough.

Hi,

There's a specific reason why CRDA interprets the regulatory domain hint in this manner. Please check the archives for the reasoning.

Adrian