OpenWrt Forum Archive

Topic: Ath9k and 5Ghz

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

Hi!

I'have build trunk version of Kamikaze with mac80211 from 2010-01-11 for Atheros7100 (router station).
I have equipped it with Atheros 9220 based abgn card
here's my wireless config:

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'channel' '36'
        option 'macaddr' 'xx:xx:xx:xx:xx:xx'
        option 'hwmode' '11na'
        option 'disabled' '0'
        option 'country' 'PL'
        list 'ht_capab' 'HT40+'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'w0'
        option 'ssid' 'OpenWrtDEADBEEF'
        option 'encryption' 'none'
        option 'mode' 'ap'

The radio interface is not created after reboot

wifi returns this message:

'wifi0' is disabled

Configuration file: /var/run/hostapd-wlan0.conf
Could not set channel for kernel driver
wlan0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
enable_mac80211(radio0): Failed to set up wpa for interface wlan0
'wifi0' is disabled

iw list shows this:

Wiphy phy0
        Band 1:
                HT capabilities: 0x104e
                        * 20/40 MHz operation
                        * SM PS disabled
                        * 40 MHz shor GI
                        * max A-MSDU len 3839
                        * DSSS/CCK 40 MHz
                HT A-MPDU factor: 0x0003 (65535 bytes)
                HT A-MPDU density: 0x0006 (8 usec)
                HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
                HT TX/RX MCS rate indexes supported:
                        MCS index 0
                        MCS index 1
                        MCS index 2
                        MCS index 3
                        MCS index 4
                        MCS index 5
                        MCS index 6
                        MCS index 7
                        MCS index 8
                        MCS index 9
                        MCS index 10
                        MCS index 11
                        MCS index 12
                        MCS index 13
                        MCS index 14
                        MCS index 15
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
                        * 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
                        * 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        Band 2:
                HT capabilities: 0x104e
                        * 20/40 MHz operation
                        * SM PS disabled
                        * 40 MHz short GI
                        * max A-MSDU len 3839
                        * DSSS/CCK 40 MHz
                HT A-MPDU factor: 0x0003 (65535 bytes)
                HT A-MPDU density: 0x0006 (8 usec)
                HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
                HT TX/RX MCS rate indexes supported:
                        MCS index 0
                        MCS index 1
                        MCS index 2
                        MCS index 3
                        MCS index 4
                        MCS index 5
                        MCS index 6
                        MCS index 7
                        MCS index 8
                        MCS index 9
                        MCS index 10
                        MCS index 11
                        MCS index 12
                        MCS index 13
                        MCS index 14
                        MCS index 15
                Frequencies:
                        * 5180 MHz [36] (20.0 dBm) (passive scanning, no IBSS)
                        * 5200 MHz [40] (20.0 dBm) (passive scanning, no IBSS)
                        * 5220 MHz [44] (20.0 dBm) (passive scanning, no IBSS)
                        * 5240 MHz [48] (20.0 dBm) (passive scanning, no IBSS)
                        * 5260 MHz [52] (disabled)
                        * 5280 MHz [56] (disabled)
                        * 5300 MHz [60] (disabled)
                        * 5320 MHz [64] (disabled)
                        * 5500 MHz [100] (disabled)
                        * 5520 MHz [104] (disabled)
                        * 5540 MHz [108] (disabled)
                        * 5560 MHz [112] (disabled)
                        * 5580 MHz [116] (disabled)
                        * 5600 MHz [120] (disabled)
                        * 5620 MHz [124] (disabled)
                        * 5640 MHz [128] (disabled)
                        * 5660 MHz [132] (disabled)
                        * 5680 MHz [136] (disabled)
                        * 5700 MHz [140] (disabled)
                        * 5745 MHz [149] (20.0 dBm) (passive scanning, no IBSS)
                        * 5765 MHz [153] (20.0 dBm) (passive scanning, no IBSS)
                        * 5785 MHz [157] (20.0 dBm) (passive scanning, no IBSS)
                        * 5805 MHz [161] (20.0 dBm) (passive scanning, no IBSS)
                        * 5825 MHz [165] (20.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 4
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * new_beacon
                 * new_station
                 * new_mpath
                 * set_mesh_params
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * Unknown command (55)
                 * set_wiphy_netns
                 * connect
                 * disconnect

As I see, 5GHz frequencies are listed as disabled or passive scanning and this Unknown command (55) which was not listed on mac80211 2009-12-05 when used on same hardware. Moreover older driver was able to bring up 80211a network, but not 80211na network (both in ap mode) and also ad-hoc worked fine on 5Ghz.

Am I doing sth wrong here or in configuration or maybe driver are faulty?

Thanks in advice for any suggestions.

Hi!!

I'm working on the same problem. I realy need help with it.

Isn't AR9220 2.4 GHZ only? I tought you needed AR9223 to get 5 GHz. I was planning to get one of those cards from ebay when the driver become stable enough. Maybe you have one of those 2 chips cards (AR9220+AR9223)? You are talking about a radio0 interface. Do you also have a radio1?

I think this is a regdomain problem. What regdomain do you have in your dmesg readout?

zorxd: I have successfully connected two RouterStation in Ad-hoc mode on 5GHz, I have created 802.11a network and enabled station in 5GHz, moreover iwconfig reads this card as abgn

tanguy15: This was my first thought. I have tested it with PL (Poland), US (United States) and empty regdomains. Those setting were printed during boot, so i seems that driver receives them. Tested on several channels (36, 40, 56). Driver always refuses to work properly in 5GHz mode. Tomorrow I can post dmesg output.

(Last edited by BizarroSephiroth on 13 Jan 2010, 19:07)

Very interested in your adhoc results. Can you comment on speeds you obtained since HT speeds are not available in adhoc yet. Any information on commands you used to setup adhoc would be great also, bounce them off what I have been working with. Also, do you hide the SSID? I couldn't seem to get something like addemo working since I really don't need beacon's or anything special. I run specific channels.

As far as I remember I've just changed mode to adhoc on both radios as one and only interface and fixed channel. There was no special voodoo stuff. I will update this post with configuration tomorrow.
The transfer rate was about 22Mbits (measured with iptraf) for 2.4GHz and slightly faster on 5GHz. Tomorrow I'll be able to post more accurate values.

Ok, sounds good, just stinks I'm getting about the same with G using aftermarket mini pci card's/madwifi/adhoc/5ghz. I guess the benefit's might come in the forum of range, correct power settings, and faster speed once N speed is allowed in adhoc mode, if that's even possible. I'm actually curious how Atheros turbo G performs in the 5ghz range on adhoc, never see anyone commenting about that and info on turbo mode is next to none.

Just noticed your using the 2010 compat wireless. I tried that the other day and the card would not come up at all, showed all kind's of error messages. I'll rebuild today and post the exact details. Just wondering, with the 2.6.28 kernel being removed from trunk that doesn't mean newer compat wireless will not work does it?

Ok, heres the promised adhoc config dump

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'channel' '5'
        option 'macaddr' 'xx:xx:xx:xx:xx:xx'
        option 'hwmode' '11ng'
        option 'disabled' '0'
        list 'ht_capab' 'HT40-'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'ahlan'
        option 'mode' 'adhoc'
        option 'ssid' 'OpenWrt'
        option 'encryption' 'none'
        option 'ifname' 'wlan0'
        option 'bssid' 'de:ad:be:ef:ff:ff'

Today I was able to turn 802.11na ap on OpenWRT with drivers from 2009-12-05 and worked fine, up to 50Mbit/s on HT40- on 40 channel, but when I attached another 9220 card and enabled 2.4 on it speed went down to max 2Mbit/s on both cards, after another reboot wifi died. I managed to revive it by disconnecting second card from device. Disabling it in config didn't help.

Now lets back to current drivers. I have compiled today current trunk version with all mac802.11 patches provided by OpenWrt and still no luck. Driver refuses to enable radio.

wifi command output:

root@OpenWrt:/# wifi

device wlan0 left promiscuous mode
br-lan: port 1(wlan0) entering disabled state

device wlan0 entered promiscuous mode
br-lan: port 1(wlan0) entering disabled statenf

br-lan: port 1(wlan0) entering forwarding state
Could not set channel for kernel driver
wlan0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
br-lan: port 1(wlan0) entering disabled state
br-lan: port 1(wlan0) entering forwarding state
enable_mac80211(radio0): Failed to set up wpa for interface wlan0
br-lan: port 1(wlan0) entering disabled state

As I can see, driver claims that radio device doesn't support 40 channel.

Boot output:

CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7161 rev 2, CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 board=UBNT-RS board=Ubiquiti AR71xx-based board ethaddr=00.15.6d.c1.21.34
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=0007e372
Readback ErrCtl register=0007e372
NR_IRQS:56
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 61900k/65536k available (1940k kernel code, 3560k reserved, 426k data, 140k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
Mount-cache hash table entries: 512
net_namespace: 528 bytes
NET: Registered protocol family 16
MIPS: machine is Ubiquiti RouterStation
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
pci 0000:00:12.0: PME# supported from D0 D3hot
pci 0000:00:12.0: PME# disabled
PCI: mapping irq 49 to pin1@0000:00:12.0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Jan  7 2010 14:45:10 Installing.
msgmni has been set to 121
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: mx25l128 (16384 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0xfe0000
Searching for RedBoot partition table in spi0.0 at offset 0xff0000
5 RedBoot partitions found on MTD device spi0.0
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000030000 : "RedBoot"
0x000000030000-0x000000100000 : "kernel"
0x000000100000-0x000000ff0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "spi0.0"
0x000000ff0000-0x000000fff000 : "FIS directory"
0x000000fff000-0x000001000000 : "RedBoot config"
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: MTD device is not NAND it's type 3
VFS: Mounted root (jffs2 filesystem) readonly on device 31:2.
Freeing unused kernel memory: 140k freed
Please be patient, while OpenWrt loads ...
- preinit -
Registered led device: ubnt:green:rf
Press CTRL-C for failsafe
gpio-buttons driver version 0.1.1
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
Button Hotplug driver version 0.3.1
- init -

Please press Enter to activate this console. eth1: link up (100Mbps/Full duplex)
device eth1 entered promiscuous mode
br-lan: port 1(eth1) entering forwarding state
cfg80211: Calling CRDA to update world regulatory domain
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
eth0: link up (100Mbps/Full duplex)
PCI: Enabling device 0000:00:12.0 (0000 -> 0002)
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=49
PPP generic driver version 2.4.2
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP MPPE Compression module registered
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
Driver 'sd' needs updating - please use bus_type methods
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ar71xx-ehci ar71xx-ehci: Atheros AR71xx built-in EHCI controller
ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ath_hal: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 2009-05-08 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, XR)
ath_pci: trunk
wlan: trunk
wlan: mac acl policy registered
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ar71xx-ohci ar71xx-ohci: Atheros AR71xx built-in OHCI controller
ar71xx-ohci ar71xx-ohci: new USB bus registered, assigned bus number 2
ar71xx-ohci ar71xx-ohci: irq 14, io mem 0x1c000000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
br-lan: port 1(eth1) entering disabled state
device eth1 left promiscuous mode
br-lan: port 1(eth1) entering disabled state
cfg80211: Calling CRDA for country: PL
device wlan0 entered promiscuous mode
br-lan: port 1(wlan0) entering disabled state
br-lan: port 1(wlan0) entering forwarding state
br-lan: port 1(wlan0) entering disabled state
br-lan: port 1(wlan0) entering forwarding state
br-lan: port 1(wlan0) entering disabled state
Nov 20 00:01:12 pluto[1267]: Starting Pluto (Openswan Version 2.6.23; Vendor ID OEm@kgSFEH@\177) pid:1267
VWkbr-lan entered promiscuous mode

So for the moment, I'm going back to December 5 drivers and try to investigate usage of more than one 802.11n ath9k cards on single device.

I tried r19147 because there are  a lots of ath9k-changes. I ran into a similar problem, that I couldn't enable the wifi.
It seems like you need the crda package installed if you enable "Force Atheros drivers to repect user's regdomain settings" after that and setting the country in /etc/conf/wireless it is working for me. And I get 120Mbits/sec with my R52n-card (at 11n 5GHz MCS 15 300Mbits/sec).

I have another card in my router for 11g. if I use the ath5k driver I have all kinds of problem; routing or bridging? don't work on both the ath5k-card and the ath9k. Now, I use ath9k for the r52n and madwifi for the 2,4GHz 11g card, and both are working. 
So I guess the problem with multiple cards isn't ath9k specific but atheros- (ath5k and ath9k) or mac80211-specific.

Kinda off topic alittle, but with people saying they are using the latest trunk with ath9k on ar71xx, what kernel are people using? Everything was going fine with a 2.6.28 kernel using compat-wireless from december, but with the recent removal of the .28 kernel from trunk I find that this new "unoffical" combat-wireless is no longer working. Basically as it boots up ton's of ath9k and mac80211 "unreconized" commads or something like that fill the screen as it's booting and of course the card is never seen. Just wondering if I should wait it out till an offical compat-wireless makes it back into trunk or if from here forward you have to use a new kernel for it to even work. Just scratching my head since i've been keeping up all along with my older kernel build and then all of a sudden it comes to a grinding halt.

I'm using r19147 with kernel 2.6.30.10 on a routerstation pro (ar71xx).
But I have to correct my last post, the ath9k driver is ignoring my regdomain setting. It seems like it is using the settings for my country (AT) (dmesg output) but it doesn't. so now I'm stucked with the us regdomain setting, and can only use 5170000 KHz - 5250000 KHz with 17dBm. If I try to use other 11a channels I get an error. It's okay for me at the moment, but it's not really working as it should.

You cannot set a regdomain which is less restrictive than the one which is hard coded in your EPROM. The only thing you can do is to set a more restrictive regdomain than the EPROM one.

tanguy15 wrote:

You cannot set a regdomain which is less restrictive than the one which is hard coded in your EPROM. The only thing you can do is to set a more restrictive regdomain than the EPROM one.

ok, I checked it again, and the problem was, that I had unchecked "Force Atheros driver to respect user's regdomain setting". I enabled this option and I was able to run 20dBm at channel 40 again.
I guess the restriction you refered to, applies only to madwifi and the closed binary hal from atheros, but with ath5k and ath9k, you just need to enable this switch to ignore the eeprom regdomain.

And I think I figured out why I can only use 2,4 GHz and at 5GHz the channels 36-48 with ath9k:
according to the ath9-devel mailinglist there is no dfs, radardection and other neat 802.11h stuff implemented in ath9k and mac80211 at the moment. But  for the other 11a frequenzies I would need radar detection (at least in Austria). So I guess it doesn't work, because using this channels with ath9k would be illegal at the moment.

genesis ops wrote:

Kinda off topic alittle, but with people saying they are using the latest trunk with ath9k on ar71xx, what kernel are people using? Everything was going fine with a 2.6.28 kernel using compat-wireless from december, but with the recent removal of the .28 kernel from trunk I find that this new "unoffical" combat-wireless is no longer working. Basically as it boots up ton's of ath9k and mac80211 "unreconized" commads or something like that fill the screen as it's booting and of course the card is never seen. Just wondering if I should wait it out till an offical compat-wireless makes it back into trunk or if from here forward you have to use a new kernel for it to even work. Just scratching my head since i've been keeping up all along with my older kernel build and then all of a sudden it comes to a grinding halt.

I'm currently running r19121 on my RS Pro, and I went with the 2.6.31-11 kernel (instead of the current default which is 2.6.30-10).  I compiled the kmod-ath9k, mac80211 and hostapd that were in the trunk (i.e. no special versions).

Hi
eleon, where is that option? (Force Atheros driver to respect user's regdomain setting)

skysky wrote:

Hi
eleon, where is that option? (Force Atheros driver to respect user's regdomain setting)

you can select it when you compile the ath9k or ath5k driver. you will find it  under
Kernel Modules -> Wireless Drivers -> kmod-ath - "Force...."

Note that the ath9k devices in general are not calibrated for frequencies outside the regulatory domain in the eeprom. Thus, using channels outside the regulatory domain means likely that the TX side is out of spec. This can cause disturbances to other traffic, possibly outside the ISM band.

As you can see from the "WNDR3700 exploration" thread (https://forum.openwrt.org/viewtopic.php … 11&p=4), this issue is confusing probably most people using an ath9k based device.

My question is, why is "Force Atheros driver to respect user's regdomain setting" not enabled by default? Perhaps this is a stupid question, but when would you not want that option?

Alittle off topic, but does anyone know for sure if trying to set power at lower levels is supported in ath9k 5ghz using the R52N or in 2.4ghz with the R2N. Bascially does setting option txpower actually do anything? I tried to set it and it showed 20dbm instead of 27dbm when running iwconfig, but I have no idea if that is actually accurate. Just trying to fine tune 5ghz and 2.4ghz.

Thanks

I am running into the same issues with others on this thread in getting 5ghz working properly on a ar5416.  It's frustrating because I've had really good luck building OpenWrt.

I had no luck at all with madwifi, btw.

There is lots of information in many threads.  This is what I have gathered so far.  I am requesting that anybody who can please make corrections:

Ensure that you have crda.

Reconfigure /etc/config/wireless.  Here is mine:

config 'wifi-device' 'radio0'
    option 'type' 'mac80211'
    option 'macaddr' '00:23:6c:bf:a0:01'
    list 'ht_capab' 'HT40-'
    list 'ht_capab' 'HT40+'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'country' 'US'
    option 'hwmode' 'n'
    option 'channel' '44'
    option 'maxassoc' ''
    option 'distance' ''
    option 'diversity' ''
    option 'txantenna' ''
    option 'rxantenna' ''
    option 'disabled' '0'
    option 'antenna' ''

config 'wifi-iface'
    option 'device' 'radio0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'XXXX'
    option 'bssid' ''
    option 'encryption' 'psk2'
    option 'server' ''
    option 'port' ''
    option 'hidden' '0'
    option 'isolate' '0'
    option 'txpower' ''
    option 'bgscan' '0'
    option 'frag' ''
    option 'rts' ''
    option 'wds' '0'
    option 'key' 'XXXXXXX'

    option 'key1' ''
    option 'key2' ''
    option 'key3' ''
    option 'key4' ''
    option '80211h' ''
    option 'compression' ''
    option 'bursting' ''
    option 'ff' ''
    option 'wmm' ''
    option 'xr' ''
    option 'ar' ''
    option 'turbo' ''
    option 'macpolicy' 'no

A few things that are not obvious; at was looking for an option to set to 802.11n 5ghz mode. At first I didn't realize that this was accomplished strictly by channel to a 5ghz channel (this is obvious in retrospect).

Here is the output of iw list:

Wiphy phy0
    Band 1:
        Capabilities: 0x104e
            HT20/HT40
            SM Power Save disabled
            RX HT40 SGI
            No RX STBC
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 8 usec (0x06)
        HT TX/RX MCS rate indexes supported: 0-15
        Frequencies:
            * 2412 MHz [1] (20.0 dBm)
            * 2417 MHz [2] (20.0 dBm)
            * 2422 MHz [3] (20.0 dBm)
            * 2427 MHz [4] (20.0 dBm)
            * 2432 MHz [5] (20.0 dBm)
            * 2437 MHz [6] (20.0 dBm)
            * 2442 MHz [7] (20.0 dBm)
            * 2447 MHz [8] (20.0 dBm)
            * 2452 MHz [9] (20.0 dBm)
            * 2457 MHz [10] (20.0 dBm)
            * 2462 MHz [11] (20.0 dBm)
            * 2467 MHz [12] (disabled)
            * 2472 MHz [13] (disabled)
            * 2484 MHz [14] (disabled)
        Bitrates (non-HT):
            * 1.0 Mbps
            * 2.0 Mbps (short preamble supported)
            * 5.5 Mbps (short preamble supported)
            * 11.0 Mbps (short preamble supported)
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
    Band 2:
        Capabilities: 0x104e
            HT20/HT40
            SM Power Save disabled
            RX HT40 SGI
            No RX STBC
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 8 usec (0x06)
        HT TX/RX MCS rate indexes supported: 0-15
        Frequencies:
            * 5180 MHz [36] (17.0 dBm)
            * 5200 MHz [40] (17.0 dBm)
            * 5220 MHz [44] (17.0 dBm)
            * 5240 MHz [48] (17.0 dBm)
            * 5260 MHz [52] (20.0 dBm) (radar detection)
            * 5280 MHz [56] (20.0 dBm) (radar detection)
            * 5300 MHz [60] (20.0 dBm) (radar detection)
            * 5320 MHz [64] (20.0 dBm) (radar detection)
            * 5500 MHz [100] (20.0 dBm) (radar detection)
            * 5520 MHz [104] (20.0 dBm) (radar detection)
            * 5540 MHz [108] (20.0 dBm) (radar detection)
            * 5560 MHz [112] (20.0 dBm) (radar detection)
            * 5580 MHz [116] (20.0 dBm) (radar detection)
            * 5600 MHz [120] (disabled)
            * 5620 MHz [124] (disabled)
            * 5640 MHz [128] (disabled)
            * 5660 MHz [132] (20.0 dBm) (radar detection)
            * 5680 MHz [136] (20.0 dBm) (radar detection)
            * 5700 MHz [140] (20.0 dBm) (radar detection)
            * 5745 MHz [149] (20.0 dBm)
            * 5765 MHz [153] (20.0 dBm)
            * 5785 MHz [157] (20.0 dBm)
            * 5805 MHz [161] (20.0 dBm)
            * 5825 MHz [165] (20.0 dBm)
        Bitrates (non-HT):
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
    max # scan SSIDs: 4
    Coverage class: 1 (up to 450m)
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * mesh point
    Supported commands:
         * new_interface
         * set_interface
         * new_key
         * new_beacon
         * new_station
         * new_mpath
         * set_mesh_params
         * set_bss
         * authenticate
         * associate
         * deauthenticate
         * disassociate
         * join_ibss
         * (null)
         * (null)
         * set_wiphy_netns
         * connect
         * disconnect

Looks pretty good.  Here is the output of iwconfig:

wlan0     IEEE 802.11abgn  Mode:Master  Frequency:5.22 GHz  Tx-Power=17 dBm   
          RTS thr:off   Fragment thr:off
          Power Management:off
         
mon.wlan0  IEEE 802.11abgn  Mode:Monitor  Frequency:5.22 GHz  Tx-Power=17 dBm   
          RTS thr:off   Fragment thr:off
          Power Management:off

Also looks pretty good.  Except that none of my devices can see my SSID.  They can in 2.4ghz mode.

One time I got my Macbook Pro to see the AP in 5ghz mode, but it couldn't connect.

So I'm stuck.  Am I missing something?  Has anyone had success using an Atheros radio for 802.11n in 5ghz mode?  How did you do it?

Thanks

rabinnh:

change your option 'hwmode' 'n' to option 'hwmode' 'na'

Thanks, but actually, I think I have it working.  Unless you insist, I won't tell you what incredibly stupid thing I did wrong ;-)

Now my problem is that I cannot get dhcp-fwd configured correctly . ..

I wish I had an example.

Just curious,

list 'ht_capab' 'HT40-'
list 'ht_capab' 'HT40+

Should it have both those in there at the same time? I'm not sure how Luci or whatever generates setups nowadays. I've just been doing it manually and depending on what channel I'm on is what I put for the HT40+- setting.