hi guys,
I'have configured a laptop with Centos 6.3 as an AP with hostapd.
The kernel is compiled from vanilla 3.6.3, no taints.
iw is compiled from source (version 3.7).
hostapd is compiled from source (version 1.0).
The AP wifi card is an embedded AR2425 (I think mini pci-e).

Playing with network scripts I found a strange behavior of my wlan0.
If I bring up the system and through the network scripts I end up with
a wlan0 with power_save mode off then I'm able to associate to the AP.
If through the network scripts I end up with a wlan with power_save
mode on then I'm unable to associate to the AP.
This sounds right. AFAIK the AP should never use power_save so
I just have to make sure this is off.

What I found strange is that with iw or iwconfig I can't change the
power_save mode. Once modprobed the ath5k module the power_save
is on by default. If I put the wlan in ibss and brink up a link with ip
the power_save stay on. If I put the wlan0 in managed and bring up a
link with ip then the power_save switch to off. Once off I didn't find
a way to change it to on again.
As iw and iwconfig always report error on change:
command failed: Operation not supported (-95)
I suppose the NIC does not support power_save but then:
shouldn't the NIC come up with power_save disabled by default?
And in case the value reported from iw after modprobe is wrong
I think there is something not ok since the status reported actually
make difference to hostapd.

I post here a script and it's output to make thinks a little clearer:
# cat verifica.sh
#!/bin/bash

linkdown() {
   echo ip link set wlan0 down
   ip link set wlan0 down
   echo
}

rmath5k() {
   echo modprobe -r ath5k
   modprobe -r ath5k
   echo
}

insath5k() {
   echo modprobe ath5k
   modprobe ath5k
   echo
}

checkpm() {
   echo iw dev wlan0 get power_save
   iw dev wlan0 get power_save
   echo
}

info() {
   echo iw dev wlan0 info
   iw dev wlan0 info
   echo
}

ibss() {
   echo iw dev wlan0 set type ibss
   iw dev wlan0 set type ibss
   echo
}

linkup() {
   echo ip link set wlan0 up
   ip link set wlan0 up
   echo
}

managed() {
   echo iw dev wlan0 set type managed
   iw dev wlan0 set type managed
   echo
}


linkdown
rmath5k
insath5k
info
ibss
linkup
checkpm
linkdown
managed
linkup
checkpm
linkdown
ibss
linkup
checkpm
[root@pack ~]#
[root@pack ~]#
[root@pack ~]# ./verifica.sh
ip link set wlan0 down

modprobe -r ath5k

modprobe ath5k

iw dev wlan0 info
Interface wlan0
        ifindex 33
        wdev 0x1
        addr 00:15:af:4e:ae:15
        type managed
        wiphy 0
        channel 1 (2412 MHz) NO HT

iw dev wlan0 set type ibss

ip link set wlan0 up

iw dev wlan0 get power_save
Power save: on

ip link set wlan0 down

iw dev wlan0 set type managed

ip link set wlan0 up

iw dev wlan0 get power_save
Power save: off

ip link set wlan0 down

iw dev wlan0 set type ibss

ip link set wlan0 up

iw dev wlan0 get power_save
Power save: off
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to