2009-12-10 12:10:16

by Joerg

[permalink] [raw]
Subject: Switching channel in IBSS network doesn't work in ath9k

Hello all,
I'm using the attached patch to form an IBSS network between two ath9k nodes:

IFACE=wlan0
FREQ=5200
ADDR=$1
iw dev "$IFACE" ibss leave
ip link set "$IFACE" down
ip addr flush dev "$IFACE"
iw dev "$IFACE" set type ibss
ip addr add "$ADDR"/24 dev "$IFACE"
ip link set "$IFACE" up
iw dev "$IFACE" ibss join athtest "$FREQ" fixed-freq 02:02:6F:23:12:0A

This works fine the first time. If I change the FREQ value to something else, e.g. 2462 (channel 11), the nodes don't see each other. Removing and reinserting the ath9k module solves this.
Interestingly iwconfig still shows the old frequency even if iw returned successfully.

Am I doing something wrong or is there a bug somewhere?

BTW: if you try the script, it expects an IP address as argument, e.g. "bash ibss.sh 172.16.5.1"

Thanks in advance
Joerg

P.S.: Is there a way to get an overview of the current interface configuration with iw? What is the equivalent of "iwconfig wlan0"?

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com


2009-12-12 09:40:21

by Joerg

[permalink] [raw]
Subject: AW: Switching channel in IBSS network doesn't work in ath9k

The iw feature was a side note. What about the channel switch? Can you
reproduce this? Is this supposed to work?

--
Regards
Joerg




----- Urspr?ngliche Mail ----
> Von: Luis R. Rodriguez <[email protected]>
> An: Holger Schurig <[email protected]>
> CC: Joerg Pommnitz <[email protected]>; [email protected]; [email protected]
> Gesendet: Freitag, den 11. Dezember 2009, 17:41:48 Uhr
> Betreff: Re: Switching channel in IBSS network doesn't work in ath9k
>
> On Fri, Dec 11, 2009 at 8:39 AM, Holger Schurig
> wrote:
> >> Actually I think a simple 'iw link' to do this for all interfaces
> >> would be good. I just haven't gotten around to it. I should be
> >> possible without upstream changes I believe.
> >
> > Do you think that "iw link" should also show then info when the device is in
> > monitor mode (e.g. return the flags) or in IBSS mode? And probably also
> > reporting parts of the survey data, e.g. noise floor?
> >
> > That would be the equivalent of a "give me the greatest amount of info
> > quickly" :-)
>
> I do but johill is the maintainer, see what he thinks :)
>
> Luis


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

2009-12-11 16:42:02

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Switching channel in IBSS network doesn't work in ath9k

On Fri, Dec 11, 2009 at 8:39 AM, Holger Schurig
<[email protected]> wrote:
>> Actually I think a simple 'iw link' to do this for all interfaces
>> would be good. I just haven't gotten around to it. I should be
>> possible without upstream changes I believe.
>
> Do you think that "iw link" should also show then info when the device is in
> monitor mode (e.g. return the flags) or in IBSS mode?  And probably also
> reporting parts of the survey data, e.g. noise floor?
>
> That would be the equivalent of a "give me the greatest amount of info
> quickly" :-)

I do but johill is the maintainer, see what he thinks :)

Luis

2009-12-10 17:14:16

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Switching channel in IBSS network doesn't work in ath9k

On Thu, Dec 10, 2009 at 9:46 AM, Holger Schurig
<[email protected]> wrote:
>> P.S.: Is there a way to get an overview of the current interface
>>  configuration with iw? What is the equivalent of "iwconfig wlan0"?
>
> There's none. Currently, iw iw written almost like a direct representation
> of cfg80211 commands. For things like "iw link", the code has added a bit of
> magic, so that this actually sends two cfg80211 command. But in general,
> it's a 1:1 relation.
>
> So, you'd need to write some "give me greatest amount of info" command newly
> for iw.

Actually I think a simple 'iw link' to do this for all interfaces
would be good. I just haven't gotten around to it. I should be
possible without upstream changes I believe.

Luis

2009-12-10 16:47:12

by Holger Schurig

[permalink] [raw]
Subject: Re: Switching channel in IBSS network doesn't work in ath9k

> P.S.: Is there a way to get an overview of the current interface
> configuration with iw? What is the equivalent of "iwconfig wlan0"?

There's none. Currently, iw iw written almost like a direct representation
of cfg80211 commands. For things like "iw link", the code has added a bit of
magic, so that this actually sends two cfg80211 command. But in general,
it's a 1:1 relation.

So, you'd need to write some "give me greatest amount of info" command newly
for iw.

--
http://www.holgerschurig.de

2009-12-11 15:40:27

by Holger Schurig

[permalink] [raw]
Subject: Re: Switching channel in IBSS network doesn't work in ath9k

> Actually I think a simple 'iw link' to do this for all interfaces
> would be good. I just haven't gotten around to it. I should be
> possible without upstream changes I believe.

Do you think that "iw link" should also show then info when the device is in
monitor mode (e.g. return the flags) or in IBSS mode? And probably also
reporting parts of the survey data, e.g. noise floor?

That would be the equivalent of a "give me the greatest amount of info
quickly" :-)

--
http://www.holgerschurig.de