Skip to contentSkip to conversation

Country code or else hidden problem

ath9k-devel Darko 2 participants 2 messages Jan 26, 2009

lore
Share & tools
lore

Darko

author
#0 lore raw

???? Monday 26 January 2009 18:33:46 ?????????:

Quoted 46 lines · Darko
Quoted 12 lines

Hi,

I have bought an DWA 547 card recently, after first unsuccessful try with TP-link WN861N ?(same problem as
https://lists.ath9k.org/pipermail/ath9k-devel/2008-October/000450.html)
As client DWA 547 works ok ( didn't try 802.11n, have no such AP). As AP followed instructions from http://wireless.erley.org/git.html
Kernel is 2.6.29-rc2-wl taken from git 24.01.2009
hostapd is 0.6.7
iw is 0.9.9
OS is slackware 12.2

Quoted 2 lines

so:
#modprobe ath9k debug=0x00000080

Thanks for trying with this.

Quoted 6 lines

#dmesg
...

[ 1019.585770] ath9k: 0.1
[ 1019.585872] ath9k 0000:02:0a.0: PCI INT A -> Link[LNKF] -> GSI 11
(level, low) -> IRQ 11
[ 1020.011640] ath9k: Country alpha2 being used: &A

This is fixed by the patch attached.

From: Luis R. Rodriguez <[email protected]>
Date: Mon, 26 Jan 2009 06:41:48 -0800
Subject: [PATCH] ath9k: fix debug print on regd

With debugging enabled and with ATH_DBG_REGULATORY selected we wouldn't get the full print out of one line, reason is we used "," instead of nothing to separate two lines.

---
?drivers/net/wireless/ath9k/regd.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

(quoted diff) +0 -0

b/drivers/net/wireless/ath9k/regd.c index 90f0c98..ec88f78 100644

drivers/net/wireless/ath9k/regd.c int ath9k_regd_init(struct ath_hal *ah) · line 453

Quoted 8 lines
drivers/net/wireless/ath9k/regd.c +1 -1
@@ -447,7 +447,7 @@ int ath9k_regd_init(struct ath_hal *ah)
 ??????}
 
 ??????DPRINTF(ah->ah_sc, ATH_DBG_REGULATORY,
-?????????????"Country alpha2 being used: %c%c\n",
+?????????????"Country alpha2 being used: %c%c\n"
 ??????????????"Regpair detected: 0x%0x\n",
 ??????????????ah->alpha2[0], ah->alpha2[1],
 ??????????????ah->regpair->regDmnEnum);

Thanks for fast answer. If everyone I work with act so fast I would be a rich and consequently you will be rich too :) (sorry for my English).

It works now. Two new lines in dmesg are:
[ ?620.728161] ath9k: Country alpha2 being used: AM [ ?620.728173] Regpair detected: 0x30

Little observation, more connected to hostapd than ath9k, but it can help someone. I don't know if it is specific to D-Link DWA 547, but it looks like general one. Hostapd can't start twice with same country set. It's
complaining: Failed to set country code
One solution is (in hostapd.conf country code is US):
#hostapd hostapd.conf
<Ctrl-C>
#iw reg set DE
#hostapd hostapd.conf

Darko

#1 lore raw

Darko, I fixed your second issue with a patch I posted this morning to linux-wireless. Check there. The issue is caused because -EALREADY is returned now to userspace if the regulatory domain is already set to the one just requested. It seemed like a good idea to propafate this to userspace at first but errors on success are just confusing so this is changed to return 0 now with the patch.

Luis

Quoted 81 lines · Darko

???? Monday 26 January 2009 18:33:46 ?????????:

Quoted 47 lines · Darko
Quoted 13 lines

Hi,

I have bought an DWA 547 card recently, after first unsuccessful try with
TP-link WN861N (same problem as
https://lists.ath9k.org/pipermail/ath9k-devel/2008-October/000450.html)
As client DWA 547 works ok ( didn't try 802.11n, have no such AP). As AP followed instructions from http://wireless.erley.org/git.html
Kernel is 2.6.29-rc2-wl taken from git 24.01.2009
hostapd is 0.6.7
iw is 0.9.9
OS is slackware 12.2

Quoted 2 lines

so:
#modprobe ath9k debug=0x00000080

Thanks for trying with this.

Quoted 6 lines

#dmesg
...

[ 1019.585770] ath9k: 0.1
[ 1019.585872] ath9k 0000:02:0a.0: PCI INT A -> Link[LNKF] -> GSI 11
(level, low) -> IRQ 11
[ 1020.011640] ath9k: Country alpha2 being used: &A

This is fixed by the patch attached.

From: Luis R. Rodriguez <[email protected]>
Date: Mon, 26 Jan 2009 06:41:48 -0800
Subject: [PATCH] ath9k: fix debug print on regd

With debugging enabled and with ATH_DBG_REGULATORY selected we wouldn't get the full print out of one line, reason is we used "," instead of nothing to separate two lines.

---
 drivers/net/wireless/ath9k/regd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/net/wireless/ath9k/regd.c index 90f0c98..ec88f78 100644

drivers/net/wireless/ath9k/regd.c int ath9k_regd_init(struct ath_hal *ah) · line 453

Quoted 8 lines
drivers/net/wireless/ath9k/regd.c +1 -1
@@ -447,7 +447,7 @@ int ath9k_regd_init(struct ath_hal *ah)
      }
 
      DPRINTF(ah->ah_sc, ATH_DBG_REGULATORY,
-             "Country alpha2 being used: %c%c\n",
+             "Country alpha2 being used: %c%c\n"
              "Regpair detected: 0x%0x\n",
              ah->alpha2[0], ah->alpha2[1],
              ah->regpair->regDmnEnum);

Thanks for fast answer. If everyone I work with act so fast I would be a rich
and consequently you will be rich too :) (sorry for my English).

It works now. Two new lines in dmesg are:

[  620.728161] ath9k: Country alpha2 being used: AM
[  620.728173] Regpair detected: 0x30

Little observation, more connected to hostapd than ath9k, but it can help someone. I don't know if it is specific to D-Link DWA 547, but it looks like general one. Hostapd can't start twice with same country set. It's
complaining: Failed to set country code
One solution is (in hostapd.conf country code is US):
#hostapd hostapd.conf
<Ctrl-C>
#iw reg set DE
#hostapd hostapd.conf

Darko
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Signature · 1 line
Sent from my mobile device