2010-01-27 14:17:54

by Joerg

[permalink] [raw]
Subject: mac80211: Open bug in current wireless-testing

Hello all,
some time ago I reported that it is currently impossible to change a manually selected data rate back to the automatic rate selection. This bug is still present and is easy to reproduce:

iwconfig wlan0 rate 54M
iwconfig wlan0 rate auto

I know that the wireless extensions are deprecated, but until iw supports manual rate selection, iwconfig is what I have to use.

--
Regards
Joerg

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


2010-01-28 14:00:27

by Kalle Valo

[permalink] [raw]
Subject: Re: mac80211: Open bug in current wireless-testing

"Luis R. Rodriguez" <[email protected]> writes:

> iwconfig wlan0 power off # disables power save

I'm going to add this to nl80211 "real soon now", latest next week.

> iwconfig wlan0 power 500m # enables dynamic power wave with 500ms idle
> timeout trigger

I have thinking and I think the timeout should be in debugfs, not in
nl80211. It's mostly for debugging anyway, I can't see how, for
example, wpa_supplicant would be able to use this. But I'll send a
separate email later about this.

--
Kalle Valo

2010-01-27 18:12:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: mac80211: Open bug in current wireless-testing

On Wed, Jan 27, 2010 at 6:17 AM, Joerg Pommnitz <[email protected]> wrote:
> Hello all,
> some time ago I reported that it is currently impossible to change a manually selected data rate back to the automatic rate selection. This bug is still present and is easy to reproduce:
>
> iwconfig wlan0 rate 54M
> iwconfig wlan0 rate auto
>
> I know that the wireless extensions are deprecated, but until iw supports manual rate selection, iwconfig is what I have to use.

Review the patch:

Author: Jouni Malinen <[email protected]>
Date: Tue Dec 29 12:59:45 2009 +0200

nl80211: New command for setting TX rate mask for rate control

Add a new NL80211_CMD_SET_TX_BITRATE_MASK command and related
attributes to provide support for setting TX rate mask for rate
control. This uses the existing cfg80211 set_bitrate_mask operation
that was previously used only with WEXT compat code (SIOCSIWRATE). The
nl80211 command allows more generic configuration of allowed rates as
a mask instead of fixed/max rate.

Signed-off-by: Jouni Malinen <[email protected]>
Acked-by: Johannes Berg <[email protected]>

I think that addresses this, not sure if we ever got the iw equivalent
patches to let userspace use this yet.

There are however three wext things which we still do need implement to nl80211:

iwconfig wlan0 txpower 17 # sets TX output power to 17 dBm
iwconfig wlan0 power off # disables power save
iwconfig wlan0 power 500m # enables dynamic power wave with 500ms idle
timeout trigger

I've stuffed this int our todo list [1], if you confirm that the above
patch does not yet address what you wish please add it to the todo
list.

http://wireless.kernel.org/en/developers/todo-list

Luis

2010-01-28 17:18:31

by Jouni Malinen

[permalink] [raw]
Subject: Re: mac80211: Open bug in current wireless-testing

On Thu, 2010-01-28 at 00:21 -0800, Joerg Pommnitz wrote:
> I found and read the patch in question. If I understand things correctly,
> this provides a way to set a mask that marks the data rates that are
> available for the RC algorithm to choose from. This could be translated
> into an iw command like this:
>
> iw dev wlan0 rates 54M,11M
>
> and then the current RC algorithm would be limited to choose either 54M or
> 11M as TX data rate. Is this correct?

Yes.

> Selecting a single fixed data rate would mean to only mark one data rate
> as available. I think this meats my requirements in this area. However,
> I still have another problem: We use Madwifi to multicast video streams.
>
> With Madwifi we have an iwpriv call that allows the selection of the multicast/broadcast data rate. We need something equivalent for mac80211
> before we can make the switch.

You can control the multicast/broadcast rates with basic rate set
configuration (in hostapd.conf). I think the current rate control
algorithms do not support dynamic rate selection for
multicast/broadcast, so they will end up picking the lowest rate from
the basic rate set. Anyway, if you include only a single rate in the
basic rate set, that rate will be used for multicast/broadcast frames.

- Jouni



2010-01-28 08:21:56

by Joerg

[permalink] [raw]
Subject: Re: mac80211: Open bug in current wireless-testing

Luis, Jouni,
I found and read the patch in question. If I understand things correctly,
this provides a way to set a mask that marks the data rates that are
available for the RC algorithm to choose from. This could be translated
into an iw command like this:

iw dev wlan0 rates 54M,11M

and then the current RC algorithm would be limited to choose either 54M or
11M as TX data rate. Is this correct?

Selecting a single fixed data rate would mean to only mark one data rate
as available. I think this meats my requirements in this area. However,
I still have another problem: We use Madwifi to multicast video streams.

With Madwifi we have an iwpriv call that allows the selection of the multicast/broadcast data rate. We need something equivalent for mac80211
before we can make the switch.

--
Regards
Joerg


--- Luis R. Rodriguez <[email protected]> wrote:

> Von: Luis R. Rodriguez <[email protected]>
> Betreff: Re: mac80211: Open bug in current wireless-testing
> An: "Joerg Pommnitz" <[email protected]>
> CC: [email protected], "Jouni.Malinen" <[email protected]>
> Datum: Mittwoch, 27. Januar 2010, 19:12
> On Wed, Jan 27, 2010 at 6:17 AM,
> Joerg Pommnitz <[email protected]>
> wrote:
> > Hello all,
> > some time ago I reported that it is currently
> impossible to change a manually selected data rate back to
> the automatic rate selection. This bug is still present and
> is easy to reproduce:
> >
> > iwconfig wlan0 rate 54M
> > iwconfig wlan0 rate auto
> >
> > I know that the wireless extensions are deprecated,
> but until iw supports manual rate selection, iwconfig is
> what I have to use.
>
> Review the patch:
>
> Author: Jouni Malinen <[email protected]>
> Date:???Tue Dec 29 12:59:45 2009 +0200
>
> ? ? nl80211: New command for setting TX rate mask
> for rate control
>
> ? ? Add a new NL80211_CMD_SET_TX_BITRATE_MASK
> command and related
> ? ? attributes to provide support for setting TX
> rate mask for rate
> ? ? control. This uses the existing cfg80211
> set_bitrate_mask operation
> ? ? that was previously used only with WEXT
> compat code (SIOCSIWRATE). The
> ? ? nl80211 command allows more generic
> configuration of allowed rates as
> ? ? a mask instead of fixed/max rate.
>
> ? ? Signed-off-by: Jouni Malinen <[email protected]>
> ? ? Acked-by: Johannes Berg <[email protected]>
>
> I think that addresses this, not sure if we ever got the iw
> equivalent
> patches to let userspace use this yet.
>
> There are however three wext things which we still do need
> implement to nl80211:
>
> iwconfig wlan0 txpower 17 # sets TX output power to 17 dBm
> iwconfig wlan0 power off # disables power save
> iwconfig wlan0 power 500m # enables dynamic power wave with
> 500ms idle
> timeout trigger
>
> I've stuffed this int our todo list [1], if you confirm
> that the above
> patch does not yet address what you wish please add it to
> the todo
> list.
>
> http://wireless.kernel.org/en/developers/todo-list
>
> ? Luis
>

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

2010-01-29 08:08:00

by Joerg

[permalink] [raw]
Subject: Re: mac80211: Open bug in current wireless-testing

--- Jouni Malinen <[email protected]> wrote:
>
> You can control the multicast/broadcast rates with basic
> rate set
> configuration (in hostapd.conf). I think the current rate
> control
> algorithms do not support dynamic rate selection for
> multicast/broadcast, so they will end up picking the lowest
> rate from
> the basic rate set. Anyway, if you include only a single
> rate in the
> basic rate set, that rate will be used for
> multicast/broadcast frames.
>
> - Jouni

This does not help me. I'm in an IBSS network.

And no, how would a RC algorithm dynamically select a broadcast rate.
Broadcast frames are not acknowledged, so there is no feedback that could
be used to optimize throughput.

Regards
Joerg

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

2010-01-27 14:45:37

by John W. Linville

[permalink] [raw]
Subject: [PATCH] cfg80211: fix wext-compat for setting rate to 'auto'

Signed-off-by: John W. Linville <[email protected]>
---
Haven't had a chance to test yet, but I suspect this fixes the issue...?

net/wireless/wext-compat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 966d2f0..b17eeae 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -1214,7 +1214,7 @@ int cfg80211_wext_siwrate(struct net_device *dev,

memset(&mask, 0, sizeof(mask));
fixed = 0;
- maxrate = 0;
+ maxrate = (u32)-1;

if (rate->value < 0) {
/* nothing */
--
1.6.2.5