DWL-520 intermittent init failures

James Harper james.harper
Mon Dec 30 01:51:40 PST 2002


  hi all,

I'm using a dlink DWL-520 with some success. When it works, it appears 
to work fine. about 50% of the time though, it won't initialize 
correctly. I can see a wlan0 interface if i type 'ifconfig wlan0' but as 
far as anything else is concerned (iwconfig, ifconfig wlan0 up, etc) it 
just ain't there.

When it works, i get the following startup logs:
Dec 28 22:08:50 portal kernel: hostap_pci: 0.0.0 CVS (Jouni Malinen 
<jkmaline at cc.hut.fi>)
Dec 28 22:08:50 portal kernel: hostap_pci: Registered netdevice wlan0
Dec 28 22:08:50 portal kernel: prism2_hw_init()
Dec 28 22:08:50 portal kernel: prism2_hw_config: initialized in 17322 
iterations
Dec 28 22:08:50 portal kernel: wlan0: trying to read PDA from 0x007f0000: OK
Dec 28 22:08:50 portal kernel: wlan0: NIC: id=0x8013 v1.0.0
Dec 28 22:08:50 portal kernel: wlan0: PRI: id=0x15 v1.0.5
Dec 28 22:08:50 portal kernel: wlan0: STA: id=0x1f v1.3.4
Dec 28 22:08:50 portal kernel: wlan0: defaulting to host-based 
encryption as a workaround for firmware bug in Host AP mode WEP
Dec 28 22:08:50 portal kernel: wlan0: defaulting to bogus WDS frame as a 
workaround for firmware bug in Host AP mode WDS
Dec 28 22:08:50 portal kernel: wlan0: LinkStatus=2 (Disconnected)
Dec 28 22:08:50 portal kernel: wlan0: Intersil Prism2.5 PCI: 
mem=0xd9002000, irq=19
Dec 28 22:08:50 portal kernel: wlan0: prism2_open

When it fails i get something like one of the following:
Dec 29 10:22:49 portal kernel: prism2_hw_init()
Dec 29 10:22:49 portal kernel: wlan0: prism2_open
Dec 29 10:22:49 portal kernel: Module hostap_pci cannot be unloaded due 
to unsafe usage in drivers/net/wireless/hostap.c:688
Dec 29 10:22:49 portal kernel: prism2_hw_config: initialized in 22324 
iterations
Dec 29 10:22:49 portal kernel: wlan0: trying to read PDA from 0x007f0000: OK
Dec 29 10:22:49 portal kernel: wlan0: fid allocate, len=2364 - timeout
Dec 29 10:22:49 portal kernel: wlan0: Using shorter TX FID (1600 bytes)
Dec 29 10:22:49 portal kernel: wlan0: could not find matching txfid 
(0x01bb) for alloc event
Dec 29 10:22:49 portal kernel: wlan0: NIC: id=0x8013 v1.0.0
Dec 29 10:22:49 portal kernel: wlan0: PRI: id=0x15 v1.0.5
Dec 29 10:22:49 portal kernel: wlan0: STA: id=0x1f v1.3.4
Dec 29 10:22:49 portal kernel: wlan0: defaulting to host-based 
encryption as a workaround for firmware bug in Host AP mode WEP
Dec 29 10:22:49 portal kernel: wlan0: defaulting to bogus WDS frame as a 
workaround for firmware bug in Host AP mode WDS
Dec 29 10:22:49 portal kernel: wlan0: LinkStatus=2 (Disconnected)
Dec 29 10:22:49 portal kernel: wlan0: Intersil Prism2.5 PCI: 
mem=0xd9002000, irq=19
(I think that one might have actually worked - the first init failed but 
the second with the reduced size=1600 succeded)

Dec 29 11:02:05 portal kernel: prism2_hw_init()
Dec 29 11:02:05 portal kernel: wlan0: prism2_open
Dec 29 11:02:05 portal kernel: Module hostap_pci cannot be unloaded due 
to unsafe usage in drivers/net/wireless/hostap.c:688
Dec 29 11:02:05 portal kernel: prism2_hw_config: initialized in 17321 
iterations
Dec 29 11:02:05 portal kernel: wlan0: trying to read PDA from 0x007f0000: OK
Dec 29 11:02:05 portal kernel: wlan0: hfa384x_cmd: entry still in list? 
(entry=cfb2bd20, type=0, res=0)
Dec 29 11:02:05 portal kernel: wlan0: hfa384x_cmd: command was not 
completed (res=0, entry=cfb2bd20, type=0, cmd=0x0001, param0=0x0000)
Dec 29 11:02:05 portal kernel: wlan0: MAC port 0 enabling failed
Dec 29 11:02:05 portal kernel: wlan0: could not enable MAC port 
Dec 29 11:02:05 portal kernel: wlan0: prism2_close
Dec 29 11:02:05 portal kernel: wlan0: hfa384x_cmd: entry still in list? 
(entry=cf16f4a0, type=0, res=0)
Dec 29 11:02:05 portal kernel: wlan0: hfa384x_cmd: command was not 
completed (res=0, entry=cf16f4a0, type=0, cmd=0x0021, param0=0xfd0b)
Dec 29 11:02:05 portal kernel: wlan0: hfa384x_get_rid: CMDCODE_ACCESS 
failed (res=-110, rid=fd0b, len=8)
Dec 29 11:02:05 portal kernel: Could not get RID for component NIC
Dec 29 11:02:05 portal kernel: wlan0: PRI: id=0x15 v1.0.5
Dec 29 11:02:05 portal kernel: wlan0: STA: id=0x1f v1.3.4

I'm sure i've seen some other error messages in the init sequence but 
looking through my logs i can't seem to see them.

On poweron, if i pause at the GRUB boot menu (grub = 'GRand Unified 
Bootloader' for anyone who doesn't know) for a minute or so i seem to 
have more success, but even after a 60 second pause it has failed at 
least once.

from what i can deduce by looking at the code, one of the first things 
it does is try and read the 'NIC' value on the card. the code thinks the 
command has been accepted, but the card appears jammed, so the 
subsequent command to be executed gets confused.

my config is:
ABIT BP6
2 x Celeron 400 CPUs (running at 400 - never overclocked)
NVidia graphics adapter
various other adapters - i don't think they're important but if someone 
thinks they might be i'll get the info.
kernel version 2.5.53 (with hostap-linux-2.5.47.patch applied)
hostap installed in kernel tree (didn't work otherwise - 2.5.x has 
really changed the way modules work)
CONFIG_HOSTAP=m
# CONFIG_HOSTAP_HOSTAPD is not set
CONFIG_HOSTAP_FIRMWARE=y
# CONFIG_HOSTAP_PLX is not set
CONFIG_HOSTAP_PCI=m
CONFIG_NET_WIRELESS=y

It definitely appears to be a timing issue at boot. I just tried 
rebooting with 'maxcpus=1' but it still failed sometimes. Using 'nosmp' 
my machine won't boot at all so i can't easily test a 'proper' 
uniprocessor kernel (although i can compile one if anyone feels it will 
help). The failure definitely lies in the part of the code that runs 
before interrupts are enabled on the card though...

I have also tried turning off HOSTAP_FIRMWARE with no success.

can anyone help/offer any suggestions?

thanks

James






More information about the Hostap mailing list