Hi misc@,

I'm running 5.5-current from May 12 build (dmesg attached).
I noticed a regression in bwi(4) network device driver. I knew it
worked fine somewhere between 5.4-current built on January and
5.5-release, unfortunately I haven't enough informations to narrow the
timeframe.

BTW, here are the issues.

Network with bwi has become *slow*, slow as unusable. Every kind of
traffic is somehow slowed. Transmissions work but they take forever to
complete.

WIFI network is wpa encrypted; when using dhclient things seem to get
worse.

I enabled debugging on bwi0 and console got flooded with:

bwi0: received probe_resp from my:ap:lladdress rssi 54 mode 11g
bwi0: received probe_resp from my:ap:lladdress rssi 54 mode 11g
bwi0: received probe_resp from my:ap:lladdress rssi 55 mode 11g
bwi0: received probe_resp from not:my:ap:lladdress rssi 36 mode 11g
bwi0: received probe_resp from another:ap:but:not:mine rssi 34 mode 11g
bwi0: received probe_resp from yet:another:ap rssi 35 mode 11g
bwi0: received probe_resp from another:ap:but:not:mine rssi 35 mode 11g
bwi0: received probe_resp from another:ap:but:not:mine rssi 36 mode 11g
bwi0: received probe_resp from yet:another:ap rssi 37 mode 11g
bwi0: received probe_resp from yet:another:ap rssi 37 mode 11g
bwi0: received probe_resp from another:ap:but:not:mine rssi 36 mode 11g
bwi0: received probe_resp from yet:another:ap rssi 36 mode 11g
bwi0: received probe_resp from another:ap:but:not:mine rssi 35 mode 11g
bwi0: received action from my:ap:lladdress rssi 54 mode 11g
bwi0: received probe_resp from my:ap:lladdress rssi 54 mode 11g
bwi0: received probe_resp from my:ap:lladdress rssi 54 mode 11g
bwi0: received probe_resp from yet:another:ap rssi 35 mode 11g
[...]

My network card seems too busy managing beacons to actually route 
IP packets. 

After some minutes of "activity" (as trying to browse www.openbsd.org)
netsta -W bwi0 outputs the following:

ieee80211 on bwi0:
        0 input packets with bad version
        0 input packets too short
        0 input packets from wrong bssid
        1154 input packet duplicates discarded
        0 input packets with wrong direction
        10 input multicast echo packets discarded
        0 input packets from unassociated station discarded
        1 input encrypted packet without wep/wpa config discarded
        0 input unencrypted packets with wep/wpa config discarded
        39 input wep/wpa packets processing failed
        0 input packet decapsulations failed
        0 input management packets discarded
        0 input control packets discarded
        0 input packets with truncated rate set
        0 input packets with missing elements
        0 input packets with elements too big
        0 input packets with elements too small
        0 input packets with invalid channel
        66 input packets with mismatched channel
        0 node allocations failed
        0 input packets with mismatched ssid
        0 input packets with unsupported auth algorithm
        0 input authentications failed
        0 input associations from wrong bssid
        0 input associations without authentication
        0 input associations with mismatched capabilities
        0 input associations without matching rates
        0 input associations with bad rsn ie
        1 input deauthentication packet
        0 input disassociation packets
        0 input packets with unknown subtype
        0 input packets failed for lack of mbufs
        0 input decryptions failed on crc
        0 input ahdemo management packets discarded
        0 input packets with bad auth request
        17 input eapol-key packets
        0 input eapol-key packets with bad mic
        0 input eapol-key packets replayed
        0 input packets with bad tkip mic
        0 input tkip mic failure notifications
        0 input packets on unauthenticated port
        0 output packets failed for lack of mbufs
        0 output packets failed for no nodes
        0 output packets of unknown management type
        1 output packet on unauthenticated port
        2 active scans started
        0 passive scans started
        0 nodes timed out
        0 failures with no memory for crypto ctx
        0 ccmp decryption errors
        0 ccmp replayed frames 
        0 cmac icv errors
        0 cmac replayed frames
        10 tkip icv errors
        10 tkip replays

So I plugged in a spare ral-based USB dongle, enabled debug and looked
at console output:

it performed the active scan, then it associated to my ap...
...and nothing more than group rekeying. Action beacons sometimes.

netstat -W looks normal.

Suggestions to further debug this? bwi used to work well, unfortunately
I can't really say when this problem arose.
Thanks,
f.

>> hostname.bwi0 <<
nwid mynet
wpakey mykey
dhcp

>> dmesg and pcidump follow <<

OpenBSD 5.5-current (GENERIC.MP) #126: Mon May 12 22:40:04 MDT 2014
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1994850304 (1902MB)
avail mem = 1933045760 (1843MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0420 (37 entries)
bios0: vendor Dell Inc. version "2.6.2" date 09/28/2006
bios0: Dell Inc. Inspiron 1501
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA SSDT APIC MCFG SLIC
acpi0: wakeup devices PB2_(S4) PB3_(S4) PB5_(S4) PB6_(S4) OHC1(S0) OHC2(S0) 
OHC3(S0) OHC4(S0) OHC5(S0) EHCI(S0) P2P_(S5) MODM(S3) SLPB(S4) LID_(S3)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Turion(tm) 64 X2 Mobile Technology TL-58, 1900.34 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Turion(tm) 64 X2 Mobile Technology TL-58, 1900.07 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-9
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PB2_)
acpiprt2 at acpi0: bus -1 (PB3_)
acpiprt3 at acpi0: bus 2 (PB5_)
acpiprt4 at acpi0: bus 5 (PB6_)
acpiprt5 at acpi0: bus 8 (P2P_)
acpiprt6 at acpi0: bus 1 (AGP_)
acpiec0 at acpi0
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpitz0 at acpi0: critical temperature is 110 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID_
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "DELLUY6287" serial 50266 type LION oem "SONY"
acpivideo0 at acpi0: VGA_
cpu0: PowerNow! K8 1900 MHz: speeds: 1900 1800 1600 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "ATI RS480 Host" rev 0x10
ppb0 at pci0 dev 1 function 0 "ATI RS480 PCIE" rev 0x00
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 5 function 0 "ATI Radeon XPRESS 200M" rev 0x00
drm0 at radeondrm0
radeondrm0: apic 2 int 17
ppb1 at pci0 dev 5 function 0 "ATI RS480 PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 6 function 0 "ATI RX480 PCIE" rev 0x00: msi
pci3 at ppb2 bus 5
bwi0 at pci3 dev 0 function 0 "Broadcom BCM4311" rev 0x01: apic 2 int 18, 
address 00:1d:d9:5f:a3:48
ahci0 at pci0 dev 18 function 0 "ATI SB600 SATA" rev 0x00: apic 2 int 22, AHCI 
1.1
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD1200BEVS-7, 01.0> SCSI3 0/direct 
fixed naa.50014ee200a695bd
sd0: 114473MB, 512 bytes/sector, 234441648 sectors
ohci0 at pci0 dev 19 function 0 "ATI SB600 USB" rev 0x00: apic 2 int 16, 
version 1.0, legacy support
ohci1 at pci0 dev 19 function 1 "ATI SB600 USB" rev 0x00: apic 2 int 17, 
version 1.0, legacy support
ohci2 at pci0 dev 19 function 2 "ATI SB600 USB" rev 0x00: apic 2 int 18, 
version 1.0, legacy support
ohci3 at pci0 dev 19 function 3 "ATI SB600 USB" rev 0x00: apic 2 int 17, 
version 1.0, legacy support
ohci4 at pci0 dev 19 function 4 "ATI SB600 USB" rev 0x00: apic 2 int 18, 
version 1.0, legacy support
ehci0 at pci0 dev 19 function 5 "ATI SB600 USB2" rev 0x00: apic 2 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x14: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
piixpm0: exec: op 1, addr 0x55, cmdlen 1, len 0, flags 0x08: timeout, status 
0x9<BUSY,BUSERR>
pciide0 at pci0 dev 20 function 1 "ATI SB600 IDE" rev 0x00: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus2 at atapiscsi0: 2 targets
cd0 at scsibus2 targ 0 lun 0: <HL-DT-ST, DVD+-RW GSA-T11N, A103> ATAPI 5/cdrom 
removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
azalia0 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x00: apic 2 int 16
azalia0: codecs: Conexant/0x2bfa, Sigmatel STAC9200, using Sigmatel STAC9200
audio0 at azalia0
pcib0 at pci0 dev 20 function 3 "ATI SB600 ISA" rev 0x00
ppb3 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x00
pci4 at ppb3 bus 8
bce0 at pci4 dev 0 function 0 "Broadcom BCM4401B1" rev 0x02: apic 2 int 21, 
address 00:1c:23:ac:e6:c4
bmtphy0 at bce0 phy 1: BCM4401 10/100baseTX PHY, rev. 0
sdhc0 at pci4 dev 1 function 0 "Ricoh 5C822 SD/MMC" rev 0x19: apic 2 int 20
sdmmc0 at sdhc0
"Ricoh 5C843 MMC" rev 0x01 at pci4 dev 1 function 1 not configured
pchb1 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb2 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00: core rev 
BH-G1
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci2: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci3: USB revision 1.0
uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb5 at ohci4: USB revision 1.0
uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 6.3
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
run0 at uhub0 port 3 "Ralink 802.11 n WLAN" rev 2.00/1.01 addr 2
run0: MAC/BBP RT2860 (rev 0x0101), RF RT2820 (MIMO 2T2R), address 
00:c0:02:9c:27:70
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd1 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 107520MB, 512 bytes/sector, 220202363 sectors
root on sd1a (9a3061e159bc06ef.a) swap on sd1b dump on sd1b
drm: initializing kernel modesetting (RS480 0x1002:0x5975 0x1028:0x01F5).
radeondrm0: VRAM: 128M 0x0000000078000000 - 0x000000007FFFFFFF (128M used)
radeondrm0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF
drm: PCIE GART of 512M enabled (table at 0x0000000005429000).
error: [drm:pid0:r100_ring_test] *ERROR* radeon: ring test failed 
(scratch(0x15E4)=0xCAFEDEAD)
error: [drm:pid0:r100_cp_init] *ERROR* radeon: cp isn't working (-22).
error: [drm:pid0:rs400_startup] *ERROR* failed initializing CP (-22).
error: [drm:pid0:rs400_init] *ERROR* Disabling GPU acceleration
error: [drm:pid0:r100_cp_fini] *ERROR* Wait for CP idle timeout, shutting down 
CP.
error: [drm:pid0:r100_cp_disable] *ERROR* Failed to wait GUI idle while 
programming pipes. Bad things might happen.
drm: radeon: cp finalized
drm: Panel ID String: LPL                     
drm: Panel Size 1280x800
composite sync not supported
radeondrm0: 1280x800
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
composite sync not supported
composite sync not supported
[tons of bwi0 related debug strings stripped]

Domain /dev/pci0:
 0:0:0: ATI RS480 Host
 0:1:0: ATI RS480 PCIE
 0:5:0: ATI RS480 PCIE
 0:6:0: ATI RX480 PCIE
 0:18:0: ATI SB600 SATA
 0:19:0: ATI SB600 USB
 0:19:1: ATI SB600 USB
 0:19:2: ATI SB600 USB
 0:19:3: ATI SB600 USB
 0:19:4: ATI SB600 USB
 0:19:5: ATI SB600 USB2
 0:20:0: ATI SBx00 SMBus
 0:20:1: ATI SB600 IDE
 0:20:2: ATI SBx00 HD Audio
 0:20:3: ATI SB600 ISA
 0:20:4: ATI SB600 PCI
 0:24:0: AMD AMD64 0Fh HyperTransport
 0:24:1: AMD AMD64 0Fh Address Map
 0:24:2: AMD AMD64 0Fh DRAM Cfg
 0:24:3: AMD AMD64 0Fh Misc Cfg
 1:5:0: ATI Radeon XPRESS 200M
 5:0:0: Broadcom BCM4311
 8:0:0: Broadcom BCM4401B1
 8:1:0: Ricoh 5C822 SD/MMC
 8:1:1: Ricoh 5C843 MMC
-- 
f.

Reply via email to