ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] Overriding driver regdomain settings?
@ 2012-06-25 10:52 Jost-Philip Matysik
  2012-06-28 14:14 ` Kai Scharwies
  0 siblings, 1 reply; 3+ messages in thread
From: Jost-Philip Matysik @ 2012-06-25 10:52 UTC (permalink / raw)
  To: ath9k-devel

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

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

* [ath9k-devel] Overriding driver regdomain settings?
  2012-06-25 10:52 [ath9k-devel] Overriding driver regdomain settings? Jost-Philip Matysik
@ 2012-06-28 14:14 ` Kai Scharwies
  2012-07-01 19:57   ` Adrian Chadd
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Scharwies @ 2012-06-28 14:14 UTC (permalink / raw)
  To: ath9k-devel

2012/6/25 Jost-Philip Matysik <matysik@tuhh.de>:
> 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
> _______________________________________________
> 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

--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -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.

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

* [ath9k-devel] Overriding driver regdomain settings?
  2012-06-28 14:14 ` Kai Scharwies
@ 2012-07-01 19:57   ` Adrian Chadd
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Chadd @ 2012-07-01 19:57 UTC (permalink / raw)
  To: ath9k-devel

On 28 June 2012 07:14, Kai Scharwies <kai@scharwies.de> wrote:
.
>
> 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

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

end of thread, other threads:[~2012-07-01 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 10:52 [ath9k-devel] Overriding driver regdomain settings? Jost-Philip Matysik
2012-06-28 14:14 ` Kai Scharwies
2012-07-01 19:57   ` Adrian Chadd

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