ndis wrapper around dwl-520 rev E

lreid at a.cs.okstate.edu lreid at a.cs.okstate.edu
Wed Oct 27 08:11:09 PDT 2004

Hello everybody,

I'm starting fresh with FreeBSD 5 after my 4_STABLE system's disk ate
itself, and I've been fighting with wireless adapters for a little
while. I'm wondering if anyone can help me make some sense of this

The machine has inside it a DLink DWL-520 card. It's a revision E, so it
is not supported by wi (although wi will try to init and fail). Now that
I am running FreeBSD 5.3, I've decided to give the ndisulator a shot. I
had a hunch that having both ndis and wi vying for control of the device
would be a badthing, so I recompiled my kernel _without_ device wi.

I used the WinXP inf and sys files on the DLink install CD to make the
ndis_driver_info.h. (note: the inf file gave me grief until I read
somewhere that it needed a newline at the bottom to work correctly) I
compiled if_ndis.ko and kldload'ed it. pciconf -l shows:

agp0 at pci0:0:0:  class=0x060000 card=0x80231043 chip=0x06911106 rev=0x02
pcib1 at pci0:1:0: class=0x060400 card=0x00000080 chip=0x85981106 rev=0x00
isab0 at pci0:4:0: class=0x060100 card=0x80231043 chip=0x06861106 rev=0x22
atapci0 at pci0:4:1:       class=0x01018a card=0x00000000 chip=0x05711106
rev=0x10 hdr=0x00
uhci0 at pci0:4:2: class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x10
uhci1 at pci0:4:3: class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x10
hostb0 at pci0:4:4:        class=0x060000 card=0x00000000 chip=0x30571106
rev=0x30 hdr=0x00
ndis0 at pci0:10:0:        class=0x028000 card=0x37001186 chip=0x38731260
rev=0x01 hdr=0x00
rl0 at pci0:11:0:  class=0x020000 card=0x813910ec chip=0x813910ec rev=0x10
rl1 at pci0:12:0:  class=0x020000 card=0x813910ec chip=0x813910ec rev=0x10
ahc0 at pci0:13:0: class=0x010000 card=0x38699004 chip=0x38609004 rev=0x03
drm0 at pci1:0:0:  class=0x030000 card=0x001a1002 chip=0x51441002 rev=0x00

The ndis driver seems to have initialized on pci0:10:0, but no ndis
adapter shows in ifconfig -a. Troubled by this, I moved the driver
object into /boot/kernel and added load_if_ndis="YES" to loader.conf,
and rebooted. Maybe dmesg would tell me something important. It did:

ndis0: <D-Link Air DWL-520 Wireless PCI Adapter(rev.E)> mem
0xd7000000-0xd7000fff irq 5 at device 10.0 on pci0
can't re-use a leaf (BusType)!
ndis0: NDIS API version: 5.1
ndis0: NDIS ERROR: c0001394 (unknown error)
ndis0: init handler failed
device_attach: ndis0 attach returned 6

So that's where I am. I don't know what to make of this dmesg output.
Can anyone offer some insight?


More information about the freebsd-questions mailing list