OpenWrt Forum Archive

Topic: WLAN for Linksys WAG160Nv2

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

I got the ath9k wireless driver to work properly on my WAG160Nv2 Annex A router.

Quick instructions regarding the attached patch:

1. Checkout trunk from svn r25712.
2. Apply jal2 patches from  and .
3. Apply the patch from
4. Configure kernel with the ath9k driver and build.

I am currently not sure on whether this works for Annex B devices. Also, I am using fixed address for reading the calibration data - it should probably be taken from flash configuration.

Please provide feedback,

Micha

I did point 1,2,3,4 on a WAG160Nv2 annex A. However I still doesn't have a wireless interface.

I understand 4. as adding kernel modules>wireless drivers>kmod-ath9k. Is it right ?

The only reference I have about wireless on dmesg is:

wlan: trunk
wlan: mac acl policy registered

Can you detail point 4 ?

Thanks!

Pace

Can you post the entire dmesg output?

Linux version 2.6.35.11 (none@n0ne) (gcc version 4.5.2 (Linaro GCC 4.5-2011.02-0) ) #2 Wed Aug 10 10:28:18 CEST 2011
Detected Broadcom 0x6358 CPU revision a1
CPU frequency is 300 MHz
32MB of RAM installed
registering 40 GPIOs
board_bcm963xx: CFE version: 1.0.37-5.4
bootconsole [early0] enabled
CPU revision is: 0002a010 (Broadcom BCM6358)
board_bcm963xx: board name: 96358GW
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 802764c0, node_mem_map 81000000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
Memory: 29628k/32768k available (2086k kernel code, 3140k reserved, 372k data, 156k init, 0k highmem)
Hierarchical RCU implementation.
    RCU-based detection of stalled CPUs is disabled.
    Verbose stalled-CPUs detection is disabled.
NR_IRQS:128
Calibrating delay loop... 299.00 BogoMIPS (lpj=598016)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:01.0: reg 10: [mem 0x00000000-0x0000ffff]
pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x3000ffff]
pci 0000:00:01.0: BAR 0: set to [mem 0x30000000-0x3000ffff] (PCI address [0x30000000-0x3000ffff]
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
PCI: CLS 0 bytes, default 32
audit: initializing netlink socket (disabled)
type=2000 audit(0.212:1): initialized
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
gpiodev: gpio device registered with major 254
bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0100 (irq = 10) is a bcm63xx_uart
console [ttyS0] enabled, bootconsole disabled
bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
CFI mfr 0x000000c2
CFI id  0x000022a8
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE pid area: hardware id YPX
bcm963xx_flash: CFE boot tag found with version 6 and board type 96358GW
bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
bcm963xx_flash: Partition 1 is kernel offset 10100 and length dff00
bcm963xx_flash: Partition 2 is rootfs offset f0000 and length 2f0000
bcm963xx_flash: Partition 3 is ath_data offset 3e0000 and length 10000
bcm963xx_flash: Partition 4 is nvram offset 3f0000 and length 10000
bcm963xx_flash: Partition 5 is linux offset 10000 and length 3d0000
bcm963xx_flash: Spare partition is 2a0000 offset and length 140000
Creating 6 MTD partitions on "bcm963xx":
0x000000000000-0x000000010000 : "CFE"
0x000000010100-0x0000000f0000 : "kernel"
mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
0x0000000f0000-0x0000003e0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=290000, len=150000
0x000000290000-0x0000003e0000 : "rootfs_data"
0x0000003e0000-0x0000003f0000 : "ath_data"
0x0000003f0000-0x000000400000 : "nvram"
0x000000010000-0x0000003e0000 : "linux"
bcm63xx_wdt started, timer margin: 30 sec
Registered led device: power:green
Registered led device: power:red
Registered led device: adsl
Registered led device: internet:green
Registered led device: internet:red
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>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 156k freed
eth0: link forced UP - 100/full - flow control off/off
roboswitch: Probing device eth0: found a 5325! It's a 5350.
There is already a switch registered on the device 'eth0'
input: gpio-buttons as /devices/platform/gpio-buttons.0/input/input0
Button Hotplug driver version 0.4.1
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
eth0: link forced UP - 100/full - flow control off/off
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering forwarding state
Compat-wireless backport release: compat-wireless-2011-01-31-4-g86702b3
Backport based on wireless-testing.git master-2011-02-07
cfg80211: Calling CRDA to update world regulatory domain
There is already a switch registered on the device 'eth0'
PPP generic driver version 2.4.2
cfg80211: World regulatory domain updated:
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (465 buckets, 1860 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

smichak wrote:

Can you post the entire dmesg output?

dmesg has been copied in a previous message.

can you paste your .config file please ?

pace303 wrote:
smichak wrote:

Can you post the entire dmesg output?

dmesg has been copied in a previous message.

can you paste your .config file please ?

Sorry for the late response, I have been on a vacation.

From your dmesg output it seems like you're building the firmware with ath5k instead of ath9k. Also, note that you should see the printk's that were added in the patch (such as
"pci-ath9k-fixup: Device vendor 0x%04x, id 0x%04x\n") in the dmesg output (this is currently not the case).


My .config file: http://dl.dropbox.com/u/9357916/openwrt-config



Micha

Sorry for the late response, I have been on a vacation.

From your dmesg output it seems like you're building the firmware with ath5k instead of ath9k. Also, note that you should see the printk's that were added in the patch (such as
"pci-ath9k-fixup: Device vendor 0x%04x, id 0x%04x\n") in the dmesg output (this is currently not the case).


My .config file: http://dl.dropbox.com/u/9357916/openwrt-config



Micha

Hi Micha,

sorry as well for the late answer.

The problem came from the make which downloads many sources for building the toolchain. Some files weren't available anymore from the Makefile, thus, I had to download them manually.

Once the correct toolchain compiled, everything is working perfectly. My recommendation is to do:

make V=99

to be sure to detect any error from the Makefile downloading scripts.

regards,

pace303

Hi, I'm trying to add support for a new bcm6358 board. It's a Huawei hg556a.

It has exactly the same onboard wlan chip like the WAG160Nv2: Atheros AR9223 802.11b/g/n.
My work is almost done except the wireless support. The board has the same problem with the ath_data partition.

I think I've located the ath_data partition between offsets: 0x00EFF000-0x00EFE000. I'm not sure of it. This is the backup of my flash:
http://files.myopera.com/danitool/linux … up.bin.zip

And this is the extracted data at those offsets:
http://files.myopera.com/danitool/linux … h_data.zip

Also with the OEM firmware the bootlog at early startup shows this about the ath wlan:

Board id is set HW556, ucHardwareType 0

fInfo.flash_wlanparam_start_blk = 119
fInfo.flash_wlanparam_number_blk = 1
fInfo.flash_wlanparam_length = 0x2000
fInfo.flash_wlanparam_blk_offset = 0x1e000

What I want to know if I'm in the correct way. Could you post your ath_data partition and whole flash backup to compare with mine?. Then I will try those patches fort the eeprom data partition to see if it works.

It would be nice bcm6358 with ath9k onboard chips get supported by openwrt.

(Last edited by danitool on 16 Dec 2011, 14:23)

Exciting?
I also have a hg556a||Waiting for good news???

I want to know  the ttl settings,and Baud Rate

hope11 wrote:

Exciting!
I also have a hg556a||Waiting for good news!!!

I want to know  the ttl settings,and Baud Rate

155200 baud
8 databits
1 stopbit
no parity
no handsake

http://wiki.openwrt.org/inbox/huawei.hg556a#serial

I try to do it  as your method, but failure;

this website can't upload pictures, so i sent mail to you;

I hope you can help me,please.


your mail:danitool@jabberes.org
my   mail: linhao@cncoslight.com


[danitool@jabberes.org can‘t send mail...........]

(Last edited by hope11 on 20 Dec 2011, 03:46)

danitool wrote:
hope11 wrote:

Exciting!
I also have a hg556a||Waiting for good news!!!

I want to know  the ttl settings,and Baud Rate

155200 baud
8 databits
1 stopbit
no parity
no handsake

http://wiki.openwrt.org/inbox/huawei.hg556a#serial

155200 baud dose it is ‘115200’ ?

smichak wrote:

I got the ath9k wireless driver to work properly on my WAG160Nv2 Annex A router.

Quick instructions regarding the attached patch:

1. Checkout trunk from svn r25712.
2. Apply jal2 patches from  and .
3. Apply the patch from
4. Configure kernel with the ath9k driver and build.

I am currently not sure on whether this works for Annex B devices. Also, I am using fixed address for reading the calibration data - it should probably be taken from flash configuration.

Please provide feedback,

Micha

Hi there, Micha (if you still around ... big_smile). I'm new to OpenWRT but i'm pretty interest with the efforts that you have successfully made the WAG160Nv2's ath9k working on the OpenWRT.

(1) Can you provide the modded WAG160Nv2 ANNEX A firmware for me to test? And anything else i need to pay attention before modding the firmware?
(2) OR is there any simple and clear methods i can kick-start with (since your 1st posted instructions was missing apart)?

Thanks in advance.

Regards,
Cain

The discussion might have continued from here.