2012-08-23 16:19:23

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Mohammed,
Thanks very much for the response.

Yes I get "Operation not supported":

# iwconfig wlan0 modu 11b
Error for wireless request "Set Modulation" (8B2F) :
SET failed on device wlan0 ; Operation not supported.

...so what does this mean; what are my options here? In view of
the fact that the capability of changing modes (from 'g' to 'b'
...etc.) is an essential requirement, am I using the wrong driver
...is there a different driver that supports this chip? Or is it that
there's no driver that supports this chip so that I would have to put
this functionality into ath9k myself if I want it?

Thanks again for the help.

-Patrick

>
>Hi,
>
>On Thu, Aug 23, 2012 at 2:26 AM, Patrick Connolly <[email protected]> wrote:
>> Hello,
>> I'm new to ath9k and in need of some basic/rudimentary help.
>> I'm working with an Access Point that uses the ath9k/mac80211
>> driver combination to talk to an Atheros AR9285. The firmware is
>> OpenWrt.
>>
>> What is the best command line tool to use to get the driver to
>> switch the chip's mode between 'b', 'g', or 'bg' (mixed) mode? The
>> OpenWrt Tools we're currently using ("uci" "wifi") are not talking to
>> the driver at all and when we switch settings (between b,g,bg), the
>> beacons go out advertising the same rates regardless of the mode.
>
>i don't think ath9k supports this
>regarding commands
>
> iwconfig eth0 modu 11g
> iwconfig eth0 modu CCK OFDMa
> iwconfig eth0 modu auto


2012-08-27 13:50:33

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

So can anybody comment on whether kernel 2.6.32 is recent enough to
support "iw" version 0.9.22 ?

Thank you,
Patrick Connolly




On Fri, Aug 24, 2012 at 10:16 PM, Patrick Connolly <[email protected]> wrote:
> The kernel is 2.6.32
> -Patrick
>
> On Fri, Aug 24, 2012 at 4:54 PM, Larry Finger <[email protected]> wrote:
>> On 08/24/2012 06:38 PM, Patrick Connolly wrote:
>>>
>>> Okay so I built "iw" version 0.9.22 successfully (after much grief).
>>> The help page shows that "set bitrates" is now supported:
>>>
>>> dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in
>>> Mbps>*]
>>>
>>>
>>> but when I try to use it I get:
>>>
>>> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
>>> command failed: Operation not supported (-95)
>>>
>>> ...so what does this mean? Is it "iw" or the driver that lacks the
>>> support?
>>
>>
>> I would think that your kernel is too old. What version are you running?
>>
>> Larry
>>
>>

2012-08-28 23:48:40

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Okay so using a compat-wireless build of 3.2.5-1, I get the command to
succeed (ie: no more error message) but when I look at the advertised
rates using "iwlist scanning" it certainly looks like the command does
not take effect.

COMMAND USED:
# iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11

RESULT OF "iwlist scanning":
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s

These Bit Rates are the same as they were before the "iw set
bitrates" command. I haven't actually captured the packets in
wireshark yet; I assume the output of "iwlist" is reliable enough.

Can anyone comment on what is wrong? Why don't the advertised rates change?

-Patrick


On Mon, Aug 27, 2012 at 7:54 AM, Larry Finger <[email protected]> wrote:
> On 08/27/2012 08:50 AM, Patrick Connolly wrote:
>>
>> So can anybody comment on whether kernel 2.6.32 is recent enough to
>> support "iw" version 0.9.22 ?
>
>
> It is not; however, you can build compat-wireless for that kernel and get
> code that will.
>
> Larry
>
>



>> On Fri, Aug 24, 2012 at 4:54 PM, Larry Finger <[email protected]> wrote:
>>> On 08/24/2012 06:38 PM, Patrick Connolly wrote:
>>>>
>>>> Okay so I built "iw" version 0.9.22 successfully (after much grief).
>>>> The help page shows that "set bitrates" is now supported:
>>>>
>>>> dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in
>>>> Mbps>*]
>>>>
>>>>
>>>> but when I try to use it I get:
>>>>
>>>> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
>>>> command failed: Operation not supported (-95)
>>>>
>>>> ...so what does this mean? Is it "iw" or the driver that lacks the
>>>> support?
>>>
>>>
>>> I would think that your kernel is too old. What version are you running?
>>>
>>> Larry
>>>
>>>

2012-08-29 07:43:48

by G.W. Haywood

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Hi there,

On Tue, 28 Aug 2012, Patrick Connolly wrote:

> ... Rates are the same as they were before the "iw set bitrates"
> command. ... Can anyone comment on what is wrong?

I'm not using the same set of software that you're using, but I'm
interested in this because of a quite different problem that I'm
working on as time permits. There may be some overlap.

These threads partly describe what I'm looking at:

https://dev.openwrt.org/ticket/7552
http://www.mail-archive.com/[email protected]/msg14450.html

As you can see the workaround for my immediate problem is alleged to
be setting the bitrates using iw, but I could not confirm that in tests.
In fact in later testing I came across problems apparently with iw itself:

root@Jubilee-wrt54gs-3:~# iw reg set GB
Segmentation fault

and I have now stopped using iw on these boxes because it crashes them
so often.

This is OpenWRT trunk on Linksys WRT54GSv1.1

Maybe just another data point.

--

73,
Ged.

2012-08-23 17:07:53

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Larry,
Thanks for the response. It appears that "set bitrates" is not
possible with my version of iw (0.9.19) - I get a big long help screen
when I try that command:

"iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11"
...the options printed out for "set" are:

phy <phyname> set distance <distance>
phy <phyname> set coverage <coverage class>
phy <phyname> set netns <pid>
phy <phyname> set rts <rts threshold|off>
phy <phyname> set frag <fragmentation threshold|off>
dev <devname> set channel <channel> [HT20|HT40+|HT40-]
phy <phyname> set channel <channel> [HT20|HT40+|HT40-]
dev <devname> set freq <freq> [HT20|HT40+|HT40-]
phy <phyname> set freq <freq> [HT20|HT40+|HT40-]
phy <phyname> set name <new name>
dev <devname> set type <type>
dev <devname> set meshid <meshid>
dev <devname> set monitor <flag>*
dev <devname> set mesh_param <param> <value>

...also there's the issue of "basic rates" and "supported rates" I
would need the supported rates appropriate for the mode (such as 'b')
to show in the beacon also.

Thanks again for the response.

-Patrick


On Thu, Aug 23, 2012 at 9:31 AM, Larry Finger <[email protected]> wrote:
> On 08/23/2012 11:19 AM, Patrick Connolly wrote:
>>
>> Mohammed,
>> Thanks very much for the response.
>>
>> Yes I get "Operation not supported":
>>
>> # iwconfig wlan0 modu 11b
>> Error for wireless request "Set Modulation" (8B2F) :
>> SET failed on device wlan0 ; Operation not supported.
>>
>> ...so what does this mean; what are my options here? In view of
>> the fact that the capability of changing modes (from 'g' to 'b'
>> ...etc.) is an essential requirement, am I using the wrong driver
>> ...is there a different driver that supports this chip? Or is it that
>> there's no driver that supports this chip so that I would have to put
>> this functionality into ath9k myself if I want it?
>
>
> Adding that functionality should not be necessary. The simple command
>
> iw dev $WIFIDEV set bitrates legacy-2.4 1 2 5.5 11
>
> will restrict the device to 802.11b rates, which I think is what you want.
> This command does not involve the device driver, but sets the appropriate
> parameters in mac80211.
>
> Larry
>
>

2012-08-23 16:31:08

by Larry Finger

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

On 08/23/2012 11:19 AM, Patrick Connolly wrote:
> Mohammed,
> Thanks very much for the response.
>
> Yes I get "Operation not supported":
>
> # iwconfig wlan0 modu 11b
> Error for wireless request "Set Modulation" (8B2F) :
> SET failed on device wlan0 ; Operation not supported.
>
> ...so what does this mean; what are my options here? In view of
> the fact that the capability of changing modes (from 'g' to 'b'
> ...etc.) is an essential requirement, am I using the wrong driver
> ...is there a different driver that supports this chip? Or is it that
> there's no driver that supports this chip so that I would have to put
> this functionality into ath9k myself if I want it?

Adding that functionality should not be necessary. The simple command

iw dev $WIFIDEV set bitrates legacy-2.4 1 2 5.5 11

will restrict the device to 802.11b rates, which I think is what you want. This
command does not involve the device driver, but sets the appropriate parameters
in mac80211.

Larry



2012-08-29 21:35:04

by Larry Finger

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

On 08/29/2012 04:09 PM, Patrick Connolly wrote:
> Can anyone comment on whether "iw set bitrates" should be fully
> functional using compat-wireless version 3.2.5-1 ?
> ( if not, what do I have to do to get this to work? )

The version of compat-wireless (3.2.5) is the version of the kernel that is
backported, and I don't think that is new enough.

If you use the version at
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2,
you should be OK.

Larry



2012-08-30 01:36:01

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Larry,
Thanks for responding...
I tried both the compat-wireless-3.5.1-1-snpc you recommended
and even compat-wireless-3.5.1-1-sn but the "iw set bitrates" command
still doesn't change the advertised bit rates on the beacons.

What do we make of this? Do you (or anyone) have any idea
what's going on? Are we sure that this driver really works with the
AR9285 chip ...ie has at least one person verified it to be working
and/or is it working in at least one product? Is there a
recommended way to debug or trace this such as with printk's in the
beacon.c file (or similar) or higher up?

-Patrick


On Wed, Aug 29, 2012 at 2:34 PM, Larry Finger <[email protected]> wrote:
>
> On 08/29/2012 04:09 PM, Patrick Connolly wrote:
>>
>> Can anyone comment on whether "iw set bitrates" should be fully
>> functional using compat-wireless version 3.2.5-1 ?
>> ( if not, what do I have to do to get this to work? )
>
>
> The version of compat-wireless (3.2.5) is the version of the kernel that is backported, and I don't think that is new enough.
>
> If you use the version at
> http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2, you should be OK.
>
> Larry
>
>

2012-08-27 14:54:33

by Larry Finger

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

On 08/27/2012 08:50 AM, Patrick Connolly wrote:
> So can anybody comment on whether kernel 2.6.32 is recent enough to
> support "iw" version 0.9.22 ?

It is not; however, you can build compat-wireless for that kernel and get code
that will.

Larry



2012-08-29 21:09:15

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Can anyone comment on whether "iw set bitrates" should be fully
functional using compat-wireless version 3.2.5-1 ?
( if not, what do I have to do to get this to work? )

-Patrick

On Tue, Aug 28, 2012 at 4:48 PM, Patrick Connolly
<[email protected]> wrote:
> Okay so using a compat-wireless build of 3.2.5-1, I get the command to
> succeed (ie: no more error message) but when I look at the advertised
> rates using "iwlist scanning" it certainly looks like the command does
> not take effect.
>
> COMMAND USED:
> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
>
> RESULT OF "iwlist scanning":
> Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
> 9 Mb/s; 12 Mb/s; 18 Mb/s
> Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
>
> These Bit Rates are the same as they were before the "iw set
> bitrates" command. I haven't actually captured the packets in
> wireshark yet; I assume the output of "iwlist" is reliable enough.
>
> Can anyone comment on what is wrong? Why don't the advertised rates change?
>
> -Patrick
>
>
> On Mon, Aug 27, 2012 at 7:54 AM, Larry Finger <[email protected]> wrote:
>> On 08/27/2012 08:50 AM, Patrick Connolly wrote:
>>>
>>> So can anybody comment on whether kernel 2.6.32 is recent enough to
>>> support "iw" version 0.9.22 ?
>>
>>
>> It is not; however, you can build compat-wireless for that kernel and get
>> code that will.
>>
>> Larry
>>
>>
>
>
>
>>> On Fri, Aug 24, 2012 at 4:54 PM, Larry Finger <[email protected]> wrote:
>>>> On 08/24/2012 06:38 PM, Patrick Connolly wrote:
>>>>>
>>>>> Okay so I built "iw" version 0.9.22 successfully (after much grief).
>>>>> The help page shows that "set bitrates" is now supported:
>>>>>
>>>>> dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in
>>>>> Mbps>*]
>>>>>
>>>>>
>>>>> but when I try to use it I get:
>>>>>
>>>>> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
>>>>> command failed: Operation not supported (-95)
>>>>>
>>>>> ...so what does this mean? Is it "iw" or the driver that lacks the
>>>>> support?
>>>>
>>>>
>>>> I would think that your kernel is too old. What version are you running?
>>>>
>>>> Larry
>>>>
>>>>

2012-08-24 23:38:52

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

Okay so I built "iw" version 0.9.22 successfully (after much grief).
The help page shows that "set bitrates" is now supported:

dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]


but when I try to use it I get:

# iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
command failed: Operation not supported (-95)

...so what does this mean? Is it "iw" or the driver that lacks the support?

-Patrick



On Thu, Aug 23, 2012 at 10:19 AM, Larry Finger
<[email protected]> wrote:
> On 08/23/2012 12:07 PM, Patrick Connolly wrote:
>>
>> Larry,
>> Thanks for the response. It appears that "set bitrates" is not
>> possible with my version of iw (0.9.19) - I get a big long help screen
>> when I try that command:
>>
>> "iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11"
>> ...the options printed out for "set" are:
>
>
> You need to upgrade iw. I have 0.9.22, which has the set bitrates option.
>
> Once the rates are locked by mac80211, the beacons should only advertise
> 802.11b rates. (I have not tested that statement.)
>
> Larry
>

2012-08-24 23:54:35

by Larry Finger

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

On 08/24/2012 06:38 PM, Patrick Connolly wrote:
> Okay so I built "iw" version 0.9.22 successfully (after much grief).
> The help page shows that "set bitrates" is now supported:
>
> dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>
>
> but when I try to use it I get:
>
> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
> command failed: Operation not supported (-95)
>
> ...so what does this mean? Is it "iw" or the driver that lacks the support?

I would think that your kernel is too old. What version are you running?

Larry



2012-08-25 05:16:29

by Patrick Connolly

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

The kernel is 2.6.32
-Patrick

On Fri, Aug 24, 2012 at 4:54 PM, Larry Finger <[email protected]> wrote:
> On 08/24/2012 06:38 PM, Patrick Connolly wrote:
>>
>> Okay so I built "iw" version 0.9.22 successfully (after much grief).
>> The help page shows that "set bitrates" is now supported:
>>
>> dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in
>> Mbps>*]
>>
>>
>> but when I try to use it I get:
>>
>> # iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11
>> command failed: Operation not supported (-95)
>>
>> ...so what does this mean? Is it "iw" or the driver that lacks the
>> support?
>
>
> I would think that your kernel is too old. What version are you running?
>
> Larry
>
>

2012-08-23 17:19:11

by Larry Finger

[permalink] [raw]
Subject: Re: Question about ath9k/mac80211 Driver

On 08/23/2012 12:07 PM, Patrick Connolly wrote:
> Larry,
> Thanks for the response. It appears that "set bitrates" is not
> possible with my version of iw (0.9.19) - I get a big long help screen
> when I try that command:
>
> "iw dev wlan0 set bitrates legacy-2.4 1 2 5.5 11"
> ...the options printed out for "set" are:

You need to upgrade iw. I have 0.9.22, which has the set bitrates option.

Once the rates are locked by mac80211, the beacons should only advertise 802.11b
rates. (I have not tested that statement.)

Larry