# D-Link WDA-2320 wifi not working

## Big Jim Slade

Trying to get a D-Link WDA-2320 wifi card working using MadWifi and it's not connecting to my router.  Hoping someone here will have some ideas for me.  Here's some output to possibly help with a solution:

```
# iwconfig

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"hactar"

          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated

          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX   Security mode:open

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:1109  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

# iwlist scan

wifi0     Interface doesn't support scanning.

ath0      Interface doesn't support scanning : Invalid argument

```

And some dmesg parts:

```
...

ath_hal: module license 'Proprietary' taints kernel.

ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.2)

ath_rate_sample: 1.2 (0.9.2)

ath_pci: 0.9.4.5 (0.9.2)

ACPI: PCI Interrupt 0000:00:0c.0[A] -> GSI 17 (level, low) -> IRQ 16

wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

wifi0: H/W encryption support: WEP AES AES_CCM TKIP

wifi0: mac 7.9 phy 4.5 radio 5.6

wifi0: Use hw queue 1 for WME_AC_BE traffic

wifi0: Use hw queue 0 for WME_AC_BK traffic

wifi0: Use hw queue 2 for WME_AC_VI traffic

wifi0: Use hw queue 3 for WME_AC_VO traffic

wifi0: Use hw queue 8 for CAB traffic

wifi0: Use hw queue 9 for beacons

wifi0: Atheros 5212: mem=0xf9a00000, irq=16

...
```

Oh... and the lspci bit:

```
...

00:0c.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

...
```

I find it odd that I have a wifi0 AND ath0 device, but I've never used MadWifi before, only ndiswrapper and kernel drivers so maybe that's normal?  Also, this is 64-bit Gentoo and I've read the little wiki entry about the AR5212 country code issue, but I'm not getting any errors like that.

Anyway, thanks in advance for anything anyone can do to help me out here.  It will be very much appreciated.

----------

## no_hope

I don't think a card can associate if it's not able to scan, so you should address the iwlist problem first.

Did you remember to bring the interface up (ifconfig ath0 up) before scanning?

Perhaps http://madwifi.org/wiki/UserDocs/SimpleWEPClient and http://madwifi.org/wiki/UserDocs could be useful

----------

## Big Jim Slade

Alright, after I did an emerge -Davu world update of my system the wifi is working now.  Apparently something in there needed updating I guess?  Maybe baselayout or something... I don't know, but it works now.

Thanks for the reply.

On the other question, simply out of curiousity, does anybody know why there is a wifi0 AND an ath0?  ath0 is the device apparently, since that's what gets the IP, but wifi0 shows traffic... hmm... I'm going to go through the docs, maybe it's in there.

Thanks again.

----------

## no_hope

madwifi-ng supports multiple virtual interfaces on a single physical device. wifiX corresponds to physical network device, athX is used to access virtual 802.11 interfaces (you can have many of those). One of the reasons you need wifiX is to differentiate between physical devices. E.g. if you have two wireless cards, when you create a new virtual interface you need to be able to specify which physical device the virtual interface should belong to.

----------

