On Thu, 10 Mar 2011 22:07:09 +0100 Tim van der Molen <tb...@xs4all.nl> wrote:
> I have the following ral(4): > > ral0 at pci0 dev 13 function 0 "Ralink RT2561S" rev 0x00: irq 5, address > 00:1d:7d:49:28:92 > ral0: MAC/BBP RT2561C, RF RT2527 > > After a commit from August 2010 (see > http://marc.info/?l=openbsd-cvs&m=128095139804862) the ral stopped > working: clients could not associate with it in hostap mode and it could > not detect other APs with "ifconfig scan". > > After a hint from damien@ I came up with the following diff which brings > back some of the code that was removed by the commit mentioned above. > > damien@ suggested I post the diff here. If you have an RT2561 or RT2661, > please test it. > > Regards, > Tim > Without the patch: after boot I type `ifconfig ral0 scan`, it outputs the list of detected APs. All subsequent `ifconfig` commands have no effect, including turning on 'monitor' and 'hostap'. Also, during or shortly after the second `ifconfig ral0 scan`, a kernel message appears saying "ral0: device timeout". With the patch: everything works as expected, including hostap mode. OpenBSD 4.9-current (GENERIC) #1: Sun Mar 13 01:07:58 EET 2011 r...@scenic.my.domain:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III ("GenuineIntel" 686-class) 862 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PSE36,MMX,FXSR,SSE real mem = 266891264 (254MB) avail mem = 252387328 (240MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 03/11/02, BIOS32 rev. 0 @ 0xfd880, SMBIOS rev. 2.31 @ 0xefda0 (77 entries) bios0: vendor FUJITSU SIEMENS // Phoenix Technologies Ltd. version "4.06 Rev. 1.10.1215" date 03/11/2002 bios0: FUJITSU SIEMENS SCENIC xS/SCOVERY xS apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown acpi at bios0 function 0x0 not configured pcibios0 at bios0: rev 2.1 @ 0xfd880/0x780 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf20/192 (10 entries) pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371FB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc0000/0xc000! 0xcc000/0x1000! 0xcd000/0x4000! cpu0 at mainbus0: (uniprocessor) pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82815 Host" rev 0x04 vga1 at pci0 dev 2 function 0 "Intel 82815 Video" rev 0x04 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0xf8000000, size 0x4000000 ppb0 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x05 pci1 at ppb0 bus 1 fxp0 at pci1 dev 8 function 0 "Intel 82562" rev 0x03, i82562: irq 15, address 00:30:05:17:e5:c6 inphy0 at fxp0 phy 1: i82562EM 10/100 PHY, rev. 0 sis0 at pci1 dev 9 function 0 "SiS 900 10/100BaseTX" rev 0x02: irq 11, address 00:06:4f:0e:94:ed ukphy0 at sis0 phy 0: Generic IEEE 802.3u media interface, rev. 0: OUI 0x000760, model 0x0000 ral0 at pci1 dev 11 function 0 "Ralink RT2561S" rev 0x00: irq 9, address 00:0e:2e:4e:77:f1 ral0: MAC/BBP RT2561C, RF RT2527 ichpcib0 at pci0 dev 31 function 0 "Intel 82801BA LPC" rev 0x05: 24-bit timer at 3579545Hz pciide0 at pci0 dev 31 function 1 "Intel 82801BA IDE" rev 0x05: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <SAMSUNG SP0802N> wd0: 16-sector PIO, LBA48, 76351MB, 156368016 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 pciide0: channel 1 ignored (disabled) uhci0 at pci0 dev 31 function 2 "Intel 82801BA USB" rev 0x05: irq 9 ichiic0 at pci0 dev 31 function 3 "Intel 82801BA SMBus" rev 0x05: irq 5 iic0 at ichiic0 spdmem0 at iic0 addr 0x55: 128MB SDRAM non-parity PC133CL2 spdmem1 at iic0 addr 0x56: 128MB SDRAM non-parity PC133CL3 uhci1 at pci0 dev 31 function 4 "Intel 82801BA USB" rev 0x05: irq 11 auich0 at pci0 dev 31 function 5 "Intel 82801BA AC97" rev 0x05: irq 5, ICH2 AC97 ac97: codec id 0x41445360 (Analog Devices AD1885) ac97: codec features headphone, Analog Devices Phat Stereo audio0 at auich0 isa0 at ichpcib0 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, using wsdisplay0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 biomask 7ffd netmask fffd ttymask ffff mtrr: Pentium Pro MTRR support vscsi0 at root scsibus0 at vscsi0: 256 targets softraid0 at root root on wd0a swap on wd0b dump on wd0b