All of lore.kernel.org
 help / color / mirror / Atom feed
* ar9170 in AP mode
@ 2009-11-08 13:29 Jan Kiszka
  2009-11-08 13:38 ` Kalle Valo
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-11-08 13:29 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

Hi,

the ar9170 is not advertising its AP feature. However, hacking in the
bit allows me to run an AP on my D-Link DWA 160A with the sources of
yesterday's wireless-testing. Works mostly fine so far, just device
startup (firmware loading?) is sometimes a bit fragile, and rate control
seems to jump more than needed when the connection gets worse.

There was some telling the multicast transmission would not work, but I
just tested it and cannot confirm this. Did something change or does a
specific multicast scenario still fail? Otherwise I would like to see AP
mode enabled in the ar9170 so that it works without modifying kernel
sources. Would post a patch then.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-08 13:29 ar9170 in AP mode Jan Kiszka
@ 2009-11-08 13:38 ` Kalle Valo
  2009-11-08 13:47   ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2009-11-08 13:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: linux-wireless

Jan Kiszka <jan.kiszka@web.de> writes:

> the ar9170 is not advertising its AP feature. However, hacking in the
> bit allows me to run an AP on my D-Link DWA 160A with the sources of
> yesterday's wireless-testing. Works mostly fine so far, just device
> startup (firmware loading?) is sometimes a bit fragile, and rate control
> seems to jump more than needed when the connection gets worse.
>
> There was some telling the multicast transmission would not work, but I
> just tested it and cannot confirm this. Did something change or does a
> specific multicast scenario still fail? Otherwise I would like to see AP
> mode enabled in the ar9170 so that it works without modifying kernel
> sources. Would post a patch then.

Did you test with a client which had power save mode enabled? That's
the tricky part. 

IMHO AP mode should not be enabled until it's confirmed that power
save mode works properly.

-- 
Kalle Valo

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

* Re: ar9170 in AP mode
  2009-11-08 13:38 ` Kalle Valo
@ 2009-11-08 13:47   ` Jan Kiszka
  2009-11-08 14:01     ` Johannes Berg
  2009-11-09  8:16     ` Holger Schurig
  0 siblings, 2 replies; 13+ messages in thread
From: Jan Kiszka @ 2009-11-08 13:47 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

Kalle Valo wrote:
> Jan Kiszka <jan.kiszka@web.de> writes:
> 
>> the ar9170 is not advertising its AP feature. However, hacking in the
>> bit allows me to run an AP on my D-Link DWA 160A with the sources of
>> yesterday's wireless-testing. Works mostly fine so far, just device
>> startup (firmware loading?) is sometimes a bit fragile, and rate control
>> seems to jump more than needed when the connection gets worse.
>>
>> There was some telling the multicast transmission would not work, but I
>> just tested it and cannot confirm this. Did something change or does a
>> specific multicast scenario still fail? Otherwise I would like to see AP
>> mode enabled in the ar9170 so that it works without modifying kernel
>> sources. Would post a patch then.
> 
> Did you test with a client which had power save mode enabled? That's
> the tricky part. 

Probably not, ath5k on my notebook doesn't support it. Now looking for
some station that does.

> 
> IMHO AP mode should not be enabled until it's confirmed that power
> save mode works properly.

How common is the combination of powersaving and mcast in practice?
Given that quite a few useful scenarios are blocked right now (unless
you know what to patch), I would at least vote for a config option or a
module parameter. That gives a chance to warn the user about this
limitation without locking out people that are no hackers.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-08 13:47   ` Jan Kiszka
@ 2009-11-08 14:01     ` Johannes Berg
  2009-11-08 14:40       ` Jan Kiszka
  2009-11-09  8:16     ` Holger Schurig
  1 sibling, 1 reply; 13+ messages in thread
From: Johannes Berg @ 2009-11-08 14:01 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Kalle Valo, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

On Sun, 2009-11-08 at 14:47 +0100, Jan Kiszka wrote:

> > IMHO AP mode should not be enabled until it's confirmed that power
> > save mode works properly.

Agreed.

> How common is the combination of powersaving and mcast in practice?

Uh, it's nothing to do with the combination. If you don't support proper
mcast buffering, any powersaving client will be in big trouble due to
ARP/NDP etc.

Any device that supports powersaving is thus impacted. That ranges from
desktops and laptops down to your cellphone.

> Given that quite a few useful scenarios are blocked right now (unless
> you know what to patch), I would at least vote for a config option or a
> module parameter. That gives a chance to warn the user about this
> limitation without locking out people that are no hackers.

Given that we want to have everything support powersave on the client
side, I have to disagree -- supporting something that will be
troublesome for many clients will just make it look bad.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-08 14:01     ` Johannes Berg
@ 2009-11-08 14:40       ` Jan Kiszka
  2009-11-08 14:56         ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-11-08 14:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Kalle Valo, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]

Johannes Berg wrote:
> On Sun, 2009-11-08 at 14:47 +0100, Jan Kiszka wrote:
> 
>>> IMHO AP mode should not be enabled until it's confirmed that power
>>> save mode works properly.
> 
> Agreed.
> 
>> How common is the combination of powersaving and mcast in practice?
> 
> Uh, it's nothing to do with the combination. If you don't support proper
> mcast buffering, any powersaving client will be in big trouble due to
> ARP/NDP etc.
> 
> Any device that supports powersaving is thus impacted. That ranges from
> desktops and laptops down to your cellphone.

OK, confirmed with my cellphone: If I enable powersaving, it actually
has troubles replying on arp requests.

I kept it disabled as my previous AP setup (rt2500usb on a special
2.6.21 kernel) used to fail with powersaving as well. So the good news
is that one can perfectly run with such a setup for multiple years, and
I will continue to do so with ar9170 for now - but I also see your point.

> 
>> Given that quite a few useful scenarios are blocked right now (unless
>> you know what to patch), I would at least vote for a config option or a
>> module parameter. That gives a chance to warn the user about this
>> limitation without locking out people that are no hackers.
> 
> Given that we want to have everything support powersave on the client
> side, I have to disagree -- supporting something that will be
> troublesome for many clients will just make it look bad.

OK, carrying that patch locally will not kill me. Hmm, is there a way in
the 802.11 to tell a client to not apply powersaving in this cell - just
in case?

And what can be done to resolve this issue for real? Does the legacy
otus driver work fine in this regard? Or are we lacking more information
about the hardware?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-08 14:40       ` Jan Kiszka
@ 2009-11-08 14:56         ` Johannes Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2009-11-08 14:56 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Kalle Valo, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

On Sun, 2009-11-08 at 15:40 +0100, Jan Kiszka wrote:

> OK, confirmed with my cellphone: If I enable powersaving, it actually
> has troubles replying on arp requests.

Thing is that it just won't see the request.

> I kept it disabled as my previous AP setup (rt2500usb on a special
> 2.6.21 kernel) used to fail with powersaving as well. So the good news
> is that one can perfectly run with such a setup for multiple years, and
> I will continue to do so with ar9170 for now - but I also see your point.

Heh. Well most people don't know how to turn off PS on their cellphone,
and shouldn't have to either.

> OK, carrying that patch locally will not kill me. Hmm, is there a way in
> the 802.11 to tell a client to not apply powersaving in this cell - just
> in case?

No. PS client support is a feature that the standard requires from an
AP.

> And what can be done to resolve this issue for real? Does the legacy
> otus driver work fine in this regard? Or are we lacking more information
> about the hardware?

We just need to find a way to buffer multicast frames until after DTIM.
Given that we have the firmware sourcecode, it should be doable.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-08 13:47   ` Jan Kiszka
  2009-11-08 14:01     ` Johannes Berg
@ 2009-11-09  8:16     ` Holger Schurig
  2009-11-09  8:37       ` Kalle Valo
  1 sibling, 1 reply; 13+ messages in thread
From: Holger Schurig @ 2009-11-09  8:16 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Kalle Valo, linux-wireless

> How common is the combination of powersaving and mcast in practice?
> Given that quite a few useful scenarios are blocked right now (unless
> you know what to patch), I would at least vote for a config option or a
> module parameter. That gives a chance to warn the user about this
> limitation without locking out people that are no hackers.

In my case (hand-help devices) it's very common. Without power-save,
the battery would be drained so fast it wouldn't be usable. And with
power-save and an AP that can't handle this, you'd get weird errors.

So, I personally prefer to have "Do an AP right" or "Don't do it at
all". But please no general enablement.


But, for example, having some CONFIG_AR9K_AP_MODE depending on
CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
this would scara away distros, so that they don't turn this on for
there standard kernel :-)

--
http://www.holgerschurig.de

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

* Re: ar9170 in AP mode
  2009-11-09  8:16     ` Holger Schurig
@ 2009-11-09  8:37       ` Kalle Valo
  2009-11-09 14:14         ` John W. Linville
  2009-11-09 18:52         ` Jeffrey Baker
  0 siblings, 2 replies; 13+ messages in thread
From: Kalle Valo @ 2009-11-09  8:37 UTC (permalink / raw)
  To: Holger Schurig; +Cc: Jan Kiszka, linux-wireless

Holger Schurig <holgerschurig@googlemail.com> writes:

>> How common is the combination of powersaving and mcast in practice?
>> Given that quite a few useful scenarios are blocked right now (unless
>> you know what to patch), I would at least vote for a config option or a
>> module parameter. That gives a chance to warn the user about this
>> limitation without locking out people that are no hackers.
>
> In my case (hand-help devices) it's very common. Without power-save,
> the battery would be drained so fast it wouldn't be usable.

Yes, just to give a concrete example of n810 wlan idle case
(associated, but no data transfered):

ps off  7 hours
ps on   7 days

Huge difference.

> And with power-save and an AP that can't handle this, you'd get
> weird errors.

Exactly. These kinds of errors are very difficult for the users to
understand.

> So, I personally prefer to have "Do an AP right" or "Don't do it at
> all". But please no general enablement.
>
> But, for example, having some CONFIG_AR9K_AP_MODE depending on
> CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
> this would scara away distros, so that they don't turn this on for
> there standard kernel :-)

I think EXPERIMENTAL is not enough, I would prefer that the user needs
to patch the driver to enable it. Or if that's not good enough, then
maybe depend on BROKEN.

-- 
Kalle Valo

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

* Re: ar9170 in AP mode
  2009-11-09  8:37       ` Kalle Valo
@ 2009-11-09 14:14         ` John W. Linville
  2009-11-09 21:09           ` Jan Kiszka
  2009-11-09 18:52         ` Jeffrey Baker
  1 sibling, 1 reply; 13+ messages in thread
From: John W. Linville @ 2009-11-09 14:14 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Holger Schurig, Jan Kiszka, linux-wireless

On Mon, Nov 09, 2009 at 10:37:36AM +0200, Kalle Valo wrote:
> Holger Schurig <holgerschurig@googlemail.com> writes:

> > So, I personally prefer to have "Do an AP right" or "Don't do it at
> > all". But please no general enablement.
> >
> > But, for example, having some CONFIG_AR9K_AP_MODE depending on
> > CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
> > this would scara away distros, so that they don't turn this on for
> > there standard kernel :-)
> 
> I think EXPERIMENTAL is not enough, I would prefer that the user needs
> to patch the driver to enable it. Or if that's not good enough, then
> maybe depend on BROKEN.

Here we go again... :-)

So I definitely agree that it should be off by default.  I also agree
that it should be difficult to turn it on accidentally.  We don't
need any extra wierd bug reports.

OTOH, I think we can all acknowledge that many people have reasonable
use cases with their fleet of equipment.  I wonder if a sysctl would
be enough of a deterrent?  They are fairly simple to turn-on, but
you do have to know about them to do so...

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: ar9170 in AP mode
  2009-11-09  8:37       ` Kalle Valo
  2009-11-09 14:14         ` John W. Linville
@ 2009-11-09 18:52         ` Jeffrey Baker
  2009-11-09 19:49           ` Luis R. Rodriguez
  1 sibling, 1 reply; 13+ messages in thread
From: Jeffrey Baker @ 2009-11-09 18:52 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Mon, Nov 9, 2009 at 12:37 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> Holger Schurig <holgerschurig@googlemail.com> writes:
>
>>> How common is the combination of powersaving and mcast in practice?
>>> Given that quite a few useful scenarios are blocked right now (unless
>>> you know what to patch), I would at least vote for a config option or a
>>> module parameter. That gives a chance to warn the user about this
>>> limitation without locking out people that are no hackers.
>>
>> In my case (hand-help devices) it's very common. Without power-save,
>> the battery would be drained so fast it wouldn't be usable.
>
> Yes, just to give a concrete example of n810 wlan idle case
> (associated, but no data transfered):
>
> ps off  7 hours
> ps on   7 days
>
> Huge difference.
>
>> And with power-save and an AP that can't handle this, you'd get
>> weird errors.
>
> Exactly. These kinds of errors are very difficult for the users to
> understand.
>
>> So, I personally prefer to have "Do an AP right" or "Don't do it at
>> all". But please no general enablement.
>>
>> But, for example, having some CONFIG_AR9K_AP_MODE depending on
>> CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
>> this would scara away distros, so that they don't turn this on for
>> there standard kernel :-)
>
> I think EXPERIMENTAL is not enough, I would prefer that the user needs
> to patch the driver to enable it. Or if that's not good enough, then
> maybe depend on BROKEN.

Is this broken on all ar9k or just the 9170?

-jwb

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

* Re: ar9170 in AP mode
  2009-11-09 18:52         ` Jeffrey Baker
@ 2009-11-09 19:49           ` Luis R. Rodriguez
  0 siblings, 0 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2009-11-09 19:49 UTC (permalink / raw)
  To: Jeffrey Baker; +Cc: Kalle Valo, linux-wireless

On Mon, Nov 9, 2009 at 10:52 AM, Jeffrey Baker <jwbaker@gmail.com> wrote:
> On Mon, Nov 9, 2009 at 12:37 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
>> Holger Schurig <holgerschurig@googlemail.com> writes:
>>
>>>> How common is the combination of powersaving and mcast in practice?
>>>> Given that quite a few useful scenarios are blocked right now (unless
>>>> you know what to patch), I would at least vote for a config option or a
>>>> module parameter. That gives a chance to warn the user about this
>>>> limitation without locking out people that are no hackers.
>>>
>>> In my case (hand-help devices) it's very common. Without power-save,
>>> the battery would be drained so fast it wouldn't be usable.
>>
>> Yes, just to give a concrete example of n810 wlan idle case
>> (associated, but no data transfered):
>>
>> ps off  7 hours
>> ps on   7 days
>>
>> Huge difference.
>>
>>> And with power-save and an AP that can't handle this, you'd get
>>> weird errors.
>>
>> Exactly. These kinds of errors are very difficult for the users to
>> understand.
>>
>>> So, I personally prefer to have "Do an AP right" or "Don't do it at
>>> all". But please no general enablement.
>>>
>>> But, for example, having some CONFIG_AR9K_AP_MODE depending on
>>> CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
>>> this would scara away distros, so that they don't turn this on for
>>> there standard kernel :-)
>>
>> I think EXPERIMENTAL is not enough, I would prefer that the user needs
>> to patch the driver to enable it. Or if that's not good enough, then
>> maybe depend on BROKEN.
>
> Is this broken on all ar9k or just the 9170?

Just ar9170.

  Luis

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

* Re: ar9170 in AP mode
  2009-11-09 14:14         ` John W. Linville
@ 2009-11-09 21:09           ` Jan Kiszka
  2009-11-10 10:39             ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-11-09 21:09 UTC (permalink / raw)
  To: John W. Linville; +Cc: Kalle Valo, Holger Schurig, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

John W. Linville wrote:
> On Mon, Nov 09, 2009 at 10:37:36AM +0200, Kalle Valo wrote:
>> Holger Schurig <holgerschurig@googlemail.com> writes:
> 
>>> So, I personally prefer to have "Do an AP right" or "Don't do it at
>>> all". But please no general enablement.
>>>
>>> But, for example, having some CONFIG_AR9K_AP_MODE depending on
>>> CONFIG_EXPERIMENTAL and a bit fat warning would do for me. Hopefully
>>> this would scara away distros, so that they don't turn this on for
>>> there standard kernel :-)
>> I think EXPERIMENTAL is not enough, I would prefer that the user needs
>> to patch the driver to enable it. Or if that's not good enough, then
>> maybe depend on BROKEN.
> 
> Here we go again... :-)
> 
> So I definitely agree that it should be off by default.  I also agree
> that it should be difficult to turn it on accidentally.  We don't
> need any extra wierd bug reports.
> 
> OTOH, I think we can all acknowledge that many people have reasonable
> use cases with their fleet of equipment.  I wonder if a sysctl would
> be enough of a deterrent?  They are fairly simple to turn-on, but
> you do have to know about them to do so...

/me would be happy about such thing as a short-term workaround if a true
fix is more complicated. So far I'm lacking a feeling for the complexity
- low-level 802.11 is unexplored terrain for me.

Could someone briefly explain how the firmware is supposed to handle
this case? By scanning outgoing frames for multicast addresses? Should
the DTIM condition be detected and reported (via beacon) only by the
firmware, or would the driver be involved to some degree? If we handle
this transparently in the firmware, I guess that it would have to buffer
not only a single multicast frame, right? Do we have enough memory for
this on the chip?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: ar9170 in AP mode
  2009-11-09 21:09           ` Jan Kiszka
@ 2009-11-10 10:39             ` Johannes Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2009-11-10 10:39 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: John W. Linville, Kalle Valo, Holger Schurig, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

On Mon, 2009-11-09 at 22:09 +0100, Jan Kiszka wrote:

> Could someone briefly explain how the firmware is supposed to handle
> this case? By scanning outgoing frames for multicast addresses? Should
> the DTIM condition be detected and reported (via beacon) only by the
> firmware, or would the driver be involved to some degree? If we handle
> this transparently in the firmware, I guess that it would have to buffer
> not only a single multicast frame, right? Do we have enough memory for
> this on the chip?

The driver is always involved in some way, cf.
IEEE80211_TX_CTL_SEND_AFTER_DTIM and
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING in mac80211.h

As to what the right thing with ar9170 is -- I don't know. Maybe the
firmware could buffer a few frames, and the driver can push the
remaining frames down once the device tells it the beacon was sent. Or
maybe it's OK, although not perfect, if we simply send the frames once
the device says the beacon was sent... I've never understood how the QoS
implementation in this thing works, and that's kinda related.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2009-11-10 10:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-08 13:29 ar9170 in AP mode Jan Kiszka
2009-11-08 13:38 ` Kalle Valo
2009-11-08 13:47   ` Jan Kiszka
2009-11-08 14:01     ` Johannes Berg
2009-11-08 14:40       ` Jan Kiszka
2009-11-08 14:56         ` Johannes Berg
2009-11-09  8:16     ` Holger Schurig
2009-11-09  8:37       ` Kalle Valo
2009-11-09 14:14         ` John W. Linville
2009-11-09 21:09           ` Jan Kiszka
2009-11-10 10:39             ` Johannes Berg
2009-11-09 18:52         ` Jeffrey Baker
2009-11-09 19:49           ` 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.