On Thu, Mar 10, 2011 at 10:07:09PM +0100, Tim van der Molen 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.
I have the same card as you, and your patch fixes it.
Previously it would only obey the first ifconfig command after boot,
now it works normaly.
Thank you :)
OpenBSD 4.9-current (GENERIC) #18: Fri Mar 11 17:35:48 CET 2011
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 1071841280 (1022MB)
avail mem = 1029304320 (981MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0520 (61 entries)
bios0: vendor American Megatrends Inc. version "1004.002" date 08/03/2004
bios0: ASUSTeK Computer Inc. K8V-X
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP OEMB
acpi0: wakeup devices PCI0(S4) PS2K(S4) PS2M(S4) UAR1(S4) AC97(S4) USB1(S4)
USB2(S4) USB3(S4) USB4(S4) EHCI(S4) PWRB(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: PSS
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
cpu0 at mainbus0: (uniprocessor)
cpu0: AMD Athlon(tm) 64 Processor 2800+, 1802.57 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,MMX,FXSR,SSE,SSE2,NXE,MMXX,LONG,3DNOW2,3DNOW
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
cpu0: AMD errata 89, 97 present, BIOS upgrade may be required
cpu0: Cool'n'Quiet K8 1802 MHz: speeds: 1800 1000 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "VIA K8HTB Host" rev 0x01
agp at pchb0 not configured
ppb0 at pci0 dev 1 function 0 "VIA K8HTB AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce2 MX" rev 0xb2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
rl0 at pci0 dev 9 function 0 "Realtek 8139" rev 0x10: irq 11, address
00:08:a1:88:39:c2
rlphy0 at rl0 phy 0: RTL internal PHY
skc0 at pci0 dev 10 function 0 "Marvell Yukon 88E8001/8003/8010" rev 0x13,
Yukon Lite rev. A3 (0x7): irq 10
sk0 at skc0 port A: address 00:11:2f:b4:a4:31
eephy0 at sk0 phy 0: 88E1011 Gigabit PHY, rev. 5
ral0 at pci0 dev 11 function 0 "Ralink RT2561S" rev 0x00: irq 11, address
00:08:d3:28:16:ad
ral0: MAC/BBP RT2561C, RF RT2527
ral1 at pci0 dev 12 function 0 "Ralink RT2561S" rev 0x00: irq 10, address
00:08:d3:28:a5:21
ral1: MAC/BBP RT2561C, RF RT2527
emu0 at pci0 dev 13 function 0 "Creative Labs SoundBlaster Live" rev 0x07: irq
5
ac97: codec id 0x54524123 (TriTech Microelectronics TR28602)
audio0 at emu0
"Creative Labs PCI Gameport Joystick" rev 0x07 at pci0 dev 13 function 1 not
configured
ral2 at pci0 dev 14 function 0 "Ralink RT2561S" rev 0x00: irq 3, address
00:08:d3:28:d6:e4
ral2: MAC/BBP RT2561C, RF RT2527
pciide0 at pci0 dev 15 function 0 "VIA VT6420 SATA" rev 0x80: DMA
pciide0: using irq 10 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <WDC WD740GD-00FLA2>
wd0: 16-sector PIO, LBA48, 70911MB, 145226112 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
wd1 at pciide0 channel 1 drive 0: <WDC WD3200KS-00PFB0>
wd1: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 6
pciide1 at pci0 dev 15 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel
0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide1 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <PHILIPS, DVD8801, NW02> ATAPI 5/cdrom
removable
cd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide1: channel 1 disabled (no drives)
uhci0 at pci0 dev 16 function 0 "VIA VT83C572 USB" rev 0x81: irq 11
uhci1 at pci0 dev 16 function 1 "VIA VT83C572 USB" rev 0x81: irq 11
uhci2 at pci0 dev 16 function 2 "VIA VT83C572 USB" rev 0x81: irq 10
uhci3 at pci0 dev 16 function 3 "VIA VT83C572 USB" rev 0x81: irq 10
ehci0 at pci0 dev 16 function 4 "VIA VT6202 USB" rev 0x86: irq 5
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "VIA EHCI root hub" rev 2.00/1.00 addr 1
viapm0 at pci0 dev 17 function 0 "VIA VT8237 ISA" rev 0x00
iic0 at viapm0
iic0: addr 0x4a 00=3f 01=03 02=7f 03=07 05=30 06=c0 07=90 08=3f 09=03 0a=7f
0b=07 0d=30 0e=c0 0f=90 10=3f 11=03 12=7f 13=07 15=30 16=c0 17=90 18=3f 19=03
1a=7f 1b=07 1d=30 1e=c0 1f=90 20=3f 21=03 22=7f 23=07 25=30 26=c0 27=90 28=3f
29=03 2a=7f 2b=07 2d=30 2e=c0 2f=90 30=3f 31=03 32=7f 33=07 35=30 36=c0 37=90
38=3f 39=03 3a=7f 3b=07 3d=30 3e=c0 3f=90 40=3f 41=03 42=7f 43=07 45=30 46=c0
47=90 48=3f 49=03 4a=7f 4b=07 4d=30 4e=c0 4f=90 50=3f 51=03 52=7f 53=07 55=30
56=c0 57=90 58=3f 59=03 5a=7f 5b=07 5d=30 5e=c0 5f=90 60=3f 61=03 62=7f 63=07
65=30 66=c0 67=90 68=3f 69=03 6a=7f 6b=07 6d=30 6e=c0 6f=90 70=3f 71=03 72=7f
73=07 75=30 76=c0 77=90 78=3f 79=03 7a=7f 7b=07 7d=30 7e=c0 7f=90 80=3f 81=03
82=7f 83=07 85=30 86=c0 87=90 88=3f 89=03 8a=7f 8b=07 8d=30 8e=c0 8f=90 90=3f
91=03 92=7f 93=07 95=30 96=c0 97=90 98=3f 99=03 9a=7f 9b=07 9d=30 9e=c0 9f=90
a0=3f a1=03 a2=7f a3=07 a5=30 a6=c0 a7=90 a8=3f a9=03 aa=7f ab=07 ad=30 ae=c0
af=90 b0=3f b1=03 b2=7f b3=07 b5=30 b6=c0 b7=90 b8=3f b9=03 ba=7f bb=07 bd=30
be=c0 bf=90 c0=3f c1=03 c2=7f c3=07 c5=30 c6=c0 c7=90 c8=3f c9=03 ca=7f cb=07
cd=30 ce=c0 cf=90 d0=3f d1=03 d2=7f d3=07 d5=30 d6=c0 d7=90 d8=3f d9=03 da=7f
db=07 dd=30 de=c0 df=90 e0=3f e1=03 e2=7f e3=07 e5=30 e6=c0 e7=90 e8=3f e9=03
ea=7f eb=07 ed=30 ee=c0 ef=90 f0=3f f1=03 f2=7f f3=07 f5=30 f6=c0 f7=90 f8=3f
f9=03 fa=7f fb=07 fd=30 fe=c0 ff=90 words 00=3fff 01=03ff 02=7fff 03=07ff
04=00ff 05=30ff 06=c0ff 07=90ff
spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM non-parity PC3200CL3.0
spdmem1 at iic0 addr 0x51: 512MB DDR SDRAM non-parity PC3200CL3.0
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
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "VIA UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "VIA UHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83697HF rev 0x12
lm1 at wbsio0 port 0x290/8: W83697HF
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
mtrr: Pentium Pro MTRR support
rum0 at uhub0 port 3 "Ralink 802.11 bg WLAN" rev 2.00/0.01 addr 2
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:1f:1f:42:ea:b1
run0 at uhub0 port 4 "Ralink 802.11 n WLAN" rev 2.00/1.01 addr 3
run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address
00:c0:ca:36:b9:1b
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b