All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] Country code or else hidden problem
@ 2009-01-26 17:02 Darko
  2009-01-26 17:33 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Darko @ 2009-01-26 17:02 UTC (permalink / raw)
  To: ath9k-devel

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

so:  
#modprobe ath9k debug=0x00000080 
#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
[ 1020.018633] wmaster0 (ath9k): not using net_device_ops yet
[ 1020.021951] phy1: Selected rate control algorithm 'ath9k_rate_control'
[ 1020.023474] wlan0 (ath9k): not using net_device_ops yet
[ 1020.028931] cfg80211: Calling CRDA for country: AM
[ 1020.030698] Registered led device: ath9k-phy1:radio
[ 1020.030754] Registered led device: ath9k-phy1:assoc
[ 1020.030802] Registered led device: ath9k-phy1:tx
[ 1020.030852] Registered led device: ath9k-phy1:rx
[ 1020.030878] phy1: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81: 
mem=0xc8900000, irq=11
[ 1020.049744] cfg80211: Current regulatory domain intersected: 
[ 1020.049756]  (start_freq - end_freq @ bandwidth), (max_antenna_gain, 
max_eirp)
[ 1020.049765]  (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1020.049773]  (5170000 KHz - 5250000 KHz @ 20000 KHz), (N/A, 1700 mBm)
[ 1020.049780]  (5250000 KHz - 5330000 KHz @ 20000 KHz), (N/A, 1800 mBm)
[ 1020.187638] ADDRCONF(NETDEV_UP): wlan0: link is not ready

Reported country code is sometimes like here &A, sometimes ?A (c with acute), 
sometimes  ?A (e with acute).

hostapd.conf:
interface=wlan0
driver=nl80211
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
hw_mode=g
channel=11

#hostapd -dd /etc/hostapd.conf  
Configuration file: /etc/hostapd.conf
Opening raw packet socket for ifindex -1082141532
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
Failed to set country code
wlan0: Unable to setup interface.

and in dmesg get an extra line:
[ 1603.342272] mon.wlan0 (ath9k): not using net_device_ops yet

#iw --debug reg set US
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 36
    .nlmsg_type = 2 <ERROR>
    .nlmsg_flags = 0 <>
    .nlmsg_seq = 1232985260
    .nlmsg_pid = 1413
  [ERRORMSG] 20 octets
    .error = -11 "Resource temporarily unavailable"
  [ORIGINAL MESSAGE] 16 octets
    .nlmsg_len = 16
    .nlmsg_type = 17 <0x11>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1232985260
    .nlmsg_pid = 1413
---------------------------  END NETLINK MESSAGE   ---------------------------
command failed: Resource temporarily unavailable (-11)

Please help,
Darko

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

* [ath9k-devel] Country code or else hidden problem
  2009-01-26 17:02 [ath9k-devel] Country code or else hidden problem Darko
@ 2009-01-26 17:33 ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-01-26 17:33 UTC (permalink / raw)
  To: ath9k-devel

On Mon, Jan 26, 2009 at 09:02:06AM -0800, Darko wrote:
> 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
> 
> so:
> #modprobe ath9k debug=0x00000080

Thanks for trying with this.

> #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 <lrodriguez@atheros.com>
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.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath9k/regd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath9k/regd.c b/drivers/net/wireless/ath9k/regd.c
index 90f0c98..ec88f78 100644
--- a/drivers/net/wireless/ath9k/regd.c
+++ b/drivers/net/wireless/ath9k/regd.c
@@ -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);
-- 
1.5.6.4

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

* [ath9k-devel] Country code or else hidden problem
@ 2009-01-26 19:54 Darko
  2009-01-26 21:53 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Darko @ 2009-01-26 19:54 UTC (permalink / raw)
  To: ath9k-devel

???? Monday 26 January 2009 18:33:46 ?????????:
> On Mon, Jan 26, 2009 at 09:02:06AM -0800, Darko wrote:
> > 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
> >
> > so:
> > #modprobe ath9k debug=0x00000080
>
> Thanks for trying with this.
>
> > #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 <lrodriguez@atheros.com>
> 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.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> ?drivers/net/wireless/ath9k/regd.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath9k/regd.c
> b/drivers/net/wireless/ath9k/regd.c index 90f0c98..ec88f78 100644
> --- a/drivers/net/wireless/ath9k/regd.c
> +++ b/drivers/net/wireless/ath9k/regd.c
> @@ -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

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

* [ath9k-devel] Country code or else hidden problem
  2009-01-26 19:54 Darko
@ 2009-01-26 21:53 ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-01-26 21:53 UTC (permalink / raw)
  To: ath9k-devel

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

On 1/26/09, Darko <darko@veze.net> wrote:
> ???? Monday 26 January 2009 18:33:46 ?????????:
>> On Mon, Jan 26, 2009 at 09:02:06AM -0800, Darko wrote:
>> > 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
>> >
>> > so:
>> > #modprobe ath9k debug=0x00000080
>>
>> Thanks for trying with this.
>>
>> > #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 <lrodriguez@atheros.com>
>> 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.
>>
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>> ---
>>  drivers/net/wireless/ath9k/regd.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath9k/regd.c
>> b/drivers/net/wireless/ath9k/regd.c index 90f0c98..ec88f78 100644
>> --- a/drivers/net/wireless/ath9k/regd.c
>> +++ b/drivers/net/wireless/ath9k/regd.c
>> @@ -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
>

-- 
Sent from my mobile device

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

end of thread, other threads:[~2009-01-26 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 17:02 [ath9k-devel] Country code or else hidden problem Darko
2009-01-26 17:33 ` Luis R. Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2009-01-26 19:54 Darko
2009-01-26 21:53 ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.