Country Code woes with D-Link DWL-AG530

Wesley Griffin wgriffin at fraktured.net
Thu Sep 6 20:05:39 PDT 2007


I have purchased a D-Link DWL-AG530 PCI NIC for my gateway and am
attempting to get it working with RELENG_6_2 but am having problems
and could use some help please.

First, I'm using 6.2-RELEASE-p7. Relevant (I've attached the full
/var/run/dmesg.boot) dmesg output:

ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
ath0: <Atheros 5212> mem 0xfeab0000-0xfeabffff irq 9 at device 12.0 on pci2
ath0: unable to collect channel list from hal; regdomain likely 19
country code 0
ath0: Ethernet address: 00:1b:11:bb:da:09
ath0: mac 10.5 phy 6.1 radio 6.3

Following some leads via google and marc, I used this page:
<http://www.gentoo-wiki.com/HARDWARE_ar5212> and this page:
<http://lists.freebsd.org/pipermail/freebsd-mobile/2005-October/007243.html>
to patch if_ath.c to 'return 0' at line 4736:
-----
   if (!ath_hal_init_channels(ah, chans, IEEE80211_CHAN_MAX, &nchan,
       NULL, 0, NULL,
       cc, HAL_MODE_ALL, outdoor, xchanmode)) {
       u_int32_t rd;

       ath_hal_getregdomain(ah, &rd);
       if_printf(ifp, "unable to collect channel list from hal; "
           "regdomain likely %u country code %u\n", rd, cc);
       free(chans, M_TEMP);
/* wgriffin
       return EINVAL;
*/
       return 0;
-----

I then ran ar5k (which I believe I found in the madwifi sources) like thus:

sudo ./ar5k 0xfeab0000 0x10

but I get the following output:
-----
Current value 0x0013 will change to 0x0010
Retrying eeprom write!
Retrying eeprom write!
[snip lots of this message]
EEPROM write failed
Write & read don't match 0x0010 != 0x0013
-----

and am now unsure as to what to try next. I've been pouring over the
madwifi pages and google results, but cannot find anything else
related. Any help would be greatly appreciated.

Thanks,
Wes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmesg.boot
Type: application/octet-stream
Size: 27012 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20070907/0dbfd977/dmesg-0001.obj


More information about the freebsd-net mailing list