Skip to contentSkip to conversation

iwconfig power timeout

DISCUSSION Kalle Valo 3 participants 6 messages Nov 8, 2008 – Nov 9, 2008

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

Hello,

I'm trying to set power save timeout for mac80211 with iwconfig, but I'm having problems with iwconfig on Nokia N810:

Nokia-N810-35-3:~# iwconfig wlan0 power timeout 500m
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "500m".
Nokia-N810-35-3:~# iwconfig wlan0 power timeout 3
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "3".
Nokia-N810-35-3:~# 

Looking at iwconfig sources the error means that either my syntax is wrong or iwconfig has a bug in the parser. I'm guessing the latter based on reading iwconfig(5). But before I will start investigating iwconfig's magic, has anyone else seen this?

I'm using wireless-tools 29~pre21-2.osso1 on my N810, but I see a similar error with wireless-tools 29-1.1 on my laptop running debian unstable.

Signature · 1 line
Kalle Valo
#1 lore raw
Quoted 13 lines · Kalle Valo

Hello,

I'm trying to set power save timeout for mac80211 with iwconfig, but I'm having problems with iwconfig on Nokia N810:

Nokia-N810-35-3:~# iwconfig wlan0 power timeout 500m
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "500m".
Nokia-N810-35-3:~# iwconfig wlan0 power timeout 3
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "3".
Nokia-N810-35-3:~# 
Quoted 4 lines

Looking at iwconfig sources the error means that either my syntax is wrong or iwconfig has a bug in the parser. I'm guessing the latter based on reading iwconfig(5). But before I will start investigating iwconfig's magic, has anyone else seen this?

Looks like mac80211 is rejecting that setting with -EINVAL, and that may well be true.

johannes

author
#2 lore raw
Quoted 14 lines · Johannes Berg
Quoted 13 lines · Kalle Valo

Hello,

I'm trying to set power save timeout for mac80211 with iwconfig, but I'm having problems with iwconfig on Nokia N810:

Nokia-N810-35-3:~# iwconfig wlan0 power timeout 500m
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "500m".
Nokia-N810-35-3:~# iwconfig wlan0 power timeout 3
Error for wireless request "Set Power Management" (8B2C) :
    invalid argument "3".
Nokia-N810-35-3:~# 
Quoted 7 lines
Quoted 4 lines

Looking at iwconfig sources the error means that either my syntax is wrong or iwconfig has a bug in the parser. I'm guessing the latter based on reading iwconfig(5). But before I will start investigating iwconfig's magic, has anyone else seen this?

Looks like mac80211 is rejecting that setting with -EINVAL, and that may well be true.

I don't think so. If mac80211 responds with -EINVAL the error would be something like this:

$ iwconfig wlan0 power 5m
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

So the error seems to happen happen during argument parsing. Oh yeah, and I even had a printk in mac80211 and it wasn't printed. I'm going to investigate this with gdb and try to understand how iwconfig really parses the arguments.

Signature · 1 line
Kalle Valo
#3 lore raw
Quoted 6 lines · Kalle Valo

I don't think so. If mac80211 responds with -EINVAL the error would be something like this:

$ iwconfig wlan0 power 5m
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

That looks like -EPERM. But then iwconfig always had messed up error handling.

Quoted 2 lines

So the error seems to happen happen during argument parsing. Oh yeah, and I even had a printk in mac80211 and it wasn't printed.

Ok I'm convinced then :)

Quoted 3 lines

I'm going
to investigate this with gdb and try to understand how iwconfig really parses the arguments.

Well there is source code too ;)

johannes

#4 lore raw
Quoted 15 lines · Johannes Berg
Quoted 6 lines · Kalle Valo

I don't think so. If mac80211 responds with -EINVAL the error would be something like this:

$ iwconfig wlan0 power 5m
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

That looks like -EPERM. But then iwconfig always had messed up error handling.

Quoted 2 lines

So the error seems to happen happen during argument parsing. Oh yeah, and I even had a printk in mac80211 and it wasn't printed.

Quoted 7 lines

Ok I'm convinced then :)

Quoted 3 lines

I'm going
to investigate this with gdb and try to understand how iwconfig really parses the arguments.

Well there is source code too ;)

There bugs in command parsing in v29 grab v30 beta where this bugs are fixed. Tomas

author
#5 lore raw
Quoted 8 lines · Tomas Winkler
Quoted 5 lines
Quoted 3 lines

I'm going
to investigate this with gdb and try to understand how iwconfig really parses the arguments.

Well there is source code too ;)

There bugs in command parsing in v29 grab v30 beta where this bugs are fixed.

Thanks, v30 beta indeed had a fix for this. It's working now for me.

Signature · 1 line
Kalle Valo