OpenWrt Forum Archive

Topic: ath9k

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have not tested yet the driver as I don't own an atheros 802.11n wifi card.  The driver compiles fine for x86.  For non x86 platforms the driver can only be compiled using gcc 3.4.6 as gcc-4.x has this issue.

(Last edited by acoul on 6 Aug 2008, 06:56)

here you may find a x86 firmware optimized for alix/wrap/soekris SBC boards. it contains  latest linux kernel with latest mac80211/ath9k drivers.  some debug flags are active so this is not for production use. I would like to thank nikpanGR from awmn for providing a pair of Unex DNMA-83 (Atheros 9160) 802.11n cards in order to conduct these tests.

(Last edited by acoul on 8 Aug 2008, 14:20)

here is a preliminary (not all patches/packages ported yet)  linux-2.6.27-rc2-git3 openwrt image for x86 testing with most of the debug options enabled. have not tested it yet as I am away from the lab.

(Last edited by acoul on 20 Aug 2008, 14:05)

tested and it works:

Linux version 2.6.27-rc2-git4 (alex@extreme) (gcc version 4.2.2) #3 Sun Aug 10 19:35:56 EEST 2008

you can get it here along with patches & .config for linux- kernel 2.6.27.  065-rootfs_split.patch is openwrt-linux-2.6.26.2 backport.

(Last edited by acoul on 11 Aug 2008, 11:08)

update

Chanelog wrote:

* linux-2.6.27-rc3
* latest mac80211/ath9k patches applied

I've made available the modified mac80211 package I use along with the additional ath9k patches. the later have to go under the target/linux/x86/patches directory.  still with the atheros 802.11n cards I have, I am unable to get an association.  I have also created a relative ticket on the wireless-testing mailing list.

(Last edited by acoul on 13 Aug 2008, 16:05)

apparently ad-hoc mode is broken on latest wireless-2.6 tree

ath9k is working fine with hostapd offering AP mode:

root@OpenWrt:/# hostapd -dd /etc/hostapd.conf
Configuration file: /etc/hostapd.conf
Opening raw packet socket for ifindex -1209973692
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
Failed to update rate sets in kernel module
RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x2
RATE[2] rate=55 flags=0x2
RATE[3] rate=110 flags=0x2
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Could not set passive scanning: Unknown error -1
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
Failed to set CTS protect in kernel driver
Failed to set Short Slot Time option in kernel driver
Could not set preamble for kernel driver
Using interface wlan0 with hwaddr 00:0b:6b:b0:21:fa and ssid 'awmn'
Failed to set CTS protect in kernel driver
Failed to set Short Slot Time option in kernel driver
Could not set preamble for kernel driver
wlan0: Setup of interface done.
MGMT (TX callback) ACK
Wireless event: cmd=0x8b04 len=12
wlan0     IEEE 802.11abgn  ESSID:"awmn"
          Mode:Master  Frequency:2.412 GHz  Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

mon.wlan0  IEEE 802.11abgn  Mode:Monitor  Frequency:2.412 GHz  Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
wlan0     IEEE 802.11abgn  ESSID:"awmn"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:0B:6B:B0:21:FA
          Bit Rate=1 Mb/s   Tx-Power=23 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality=50/100  Signal level:-63 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

I was only able to use 802.11g mode under hostapd, here are some iperf benchmarks:

root@OpenWrt:/# iperf -c 192.168.100.1 -u  -b 100m
------------------------------------------------------------
Client connecting to 192.168.100.1, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:   107 KByte (default)
------------------------------------------------------------
[  5] local 192.168.100.2 port 43263 connected with 192.168.100.1 port 5001
[  5]  0.0-10.0 sec  24.3 MBytes  20.3 Mbits/sec
[  5] Sent 17302 datagrams
[  5] Server Report:
[  5]  0.0-10.0 sec  24.3 MBytes  20.3 Mbits/sec  0.125 ms    0/17301 (0%)
[  5]  0.0-10.0 sec  1 datagrams received out-of-order

I can't get the ath9k driver for an atheros n wireless card to switch to Master mode on the standard linux kernel. Have you applied a special patch or make some tweaks to be in master mode ?

I know I'm not using OpenWrt but... it seems like a kernel issue so we are all on the same ground at this level smile

Here's what I get:

wrvs4400 ~ # /etc/init.d/hostapd start
 * Starting wlan0
 *   Configuring wireless network for wlan0
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.
 *   wlan0 does not support setting the mode to "master"
 *     wlan0 connected to ESSID "aphrodite2" at 00:00:00:00:00:00
 *     in managed mode on channel 6 (WEP disabled)
 *   Bringing up wlan0
 *     192.168.6.1/24                                                                                                   [ ok ]
 * Starting hostapd ...
Configuration file: /etc/hostapd/hostapd.conf
wlan0     IEEE 802.11bgn  ESSID:"aphrodite2"
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated
          Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Thanks !

The discussion might have continued from here.