I bought a Dlink dwl-ag530 card, and i'm having the next problem with it:
[ 35.053339] wlan: 0.8.4.2 (0.9.3.2)
[ 35.079877] ath_pci: 0.9.4.5 (0.9.3.2)
[ 35.079932] ACPI: PCI Interrupt 0000:05:01.0[A] -> GSI 22 (level, low) -> IRQ 22[ 35.710361] wifi%d: unable to collect channel list from HAL; regdomain likely 19 country code 0
The madwifi wiki sais: This card has a broken country code, which must be set for the card to work, not a trivial process.
Steps to patch the regdomain from unknown (18) to FCC (16) for a D-Link DWL-AG530 so it works
with current madwifi drivers:
1. Download the ar5k source code, per Paul Shupak:
http://sourceforge.net/mailarchive/message.php?msg_id=8966525and save as 'ar5k.c'
2. Compile it with:
gcc ar5k.c -o ar5k
3. Download the patch per Michael Gernoth:http://sourceforge.net/mailarchive/message.php?
msg_id=9000820and save as 'madwifi-patch.diff'
4. Patch the madwifi driver file 'ath/if_ath.c' with:
patch -p0 < madwifi-patch.diff
5. Find its memory address:
Make sure ath_pci is loaded: modprobe ath_pci
0000:00:0a.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg
NIC (rev 01)
System Inc: Unknown device 3a14
Flags: bus master, medium devsel, latency 168, IRQ 169
Memory at ec100000 (32bit,
size=64K Capabilities: 44 Power
Management version 2
The memory address is on the second-last line of that section.
1. Find the regdomain for your use; see Paul Shupak's mail; 0x10 (16) is FCC.
2. Run the ar5k utility:
./ar5k 0xec100000 0x10
(where 0xec100000 is the memory address as reported by lspci and 0x10 is the hex value for your
It should print out that it has changed from 18 to 16, or whatever.
1. unload/reload the module and everything should now work fine. You don't need to unpatch
the atheros modules, but equally you don't need to repatch it in the future.
Note: When I cut and paste the ar5k source code, I get a typo near the end of the program; it
reads ...don"t match..., should read ...don't match... Fix and recompile.
Note: If you ever want to undo this change, just run ar5k 0xec100000 0x12 (or whatever the originalvalue was (0x12 == 18)).