Wireless ral(4) problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Wireless ral(4) problem

Giancarlo Razzolini
Hy guys,
   
    I'm having a problem with a ral(4) based card. I'm using the RT2561S
chipset. It's configured ok in hostap mode with wpa-psk and wpa1 as
wpaproto, i can connect with my clients correctly, but it sometimes is
freezing up. I captured some packets on both ends and there are lots of
retransmissions and duplicate packets. They seem to increase near the
freeze. It's quite annoying and happens randomly, but i noticed that it
happens most when i'm with heavy traffic. After some seconds it is
working again. I'm currently using 4.4, but will install the 4.5 this
weekend. When i was reading the manual of ral(4) in the 4.5 release, i
saw this:

Host AP mode doesn't support power saving.  Clients attempting to use
     power saving mode may experience significant packet loss (disabling power
     saving on the client will fix this).

    Maybe this is the problem i'm having. I'm using intel ABG 3945
chipset on clients. Unfortunately i don't have any other client with a
different chipset. The only problem is when i issue the iwconfig command
on linux, it tells me that power management is disabled. I was also
thinking if it isn't a limitation of my hardware. I'm using K6 with
350Mhz and 128MB of ram. As is stated on the man page, it uses the
software stack for my chipset, so it implies more use of cpu. I enabled
the debug mode on the ral driver. It shows the key exchange. Sometimes i
notice something strange:

May  1 19:14:27 frwlock /bsd: ral0: received auth from xx:xx:xx:xx:xx:xx
rssi 117 mode 11g
May  1 19:14:27 frwlock /bsd: ral0: sending auth to xx:xx:xx:xx:xx:xx on
channel 11 mode 11g
May  1 19:14:27 frwlock /bsd: ral0: station xx:xx:xx:xx:xx:xx already
authenticated (open)
May  1 19:14:27 frwlock /bsd: ral0: received assoc_req from
xx:xx:xx:xx:xx:xx rssi 116 mode 11g
May  1 19:14:27 frwlock /bsd: ral0: sending assoc_resp to
xx:xx:xx:xx:xx:xx on channel 11 mode 11g
May  1 19:14:27 frwlock /bsd: ral0: sending msg 1/4 of the 4-way
handshake to xx:xx:xx:xx:xx:xx
May  1 19:14:27 frwlock /bsd: ral0: station xx:xx:xx:xx:xx:xx
deauthenticate (reason 15)
May  1 19:14:27 frwlock /bsd: ral0: sending deauth to xx:xx:xx:xx:xx:xx
on channel 11 mode 11g
May  1 19:14:30 frwlock /bsd: ral0: received auth from xx:xx:xx:xx:xx:xx
rssi 116 mode 11g
May  1 19:14:30 frwlock /bsd: ral0: sending auth to xx:xx:xx:xx:xx:xx on
channel 11 mode 11g
May  1 19:14:30 frwlock /bsd: ral0: station xx:xx:xx:xx:xx:xx newly
authenticated (open)
May  1 19:14:30 frwlock /bsd: ral0: received assoc_req from
xx:xx:xx:xx:xx:xx rssi 117 mode 11g
May  1 19:14:30 frwlock /bsd: ral0: sending assoc_resp to
xx:xx:xx:xx:xx:xx on channel 11 mode 11g
May  1 19:14:30 frwlock /bsd: ral0: sending msg 1/4 of the 4-way
handshake to xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: received msg 2/4 of the 4-way
handshake from xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: sending msg 3/4 of the 4-way
handshake to xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: received msg 4/4 of the 4-way
handshake from xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: sending msg 1/2 of the group key
handshake to xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: sending msg 1/2 of the group key
handshake to xx:xx:xx:xx:xx:xx
May  1 19:14:31 frwlock /bsd: ral0: received msg 2/2 of the group key
handshake from xx:xx:xx:xx:xx:xx

    This happens sometimes on the freezes, but not always. Follows the
dmesg:

OpenBSD 4.4 (GENERIC) #1021: Tue Aug 12 17:16:55 MDT 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD-K6(tm) 3D processor ("AuthenticAMD" 586-class) 351 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX
real mem  = 133775360 (127MB)
avail mem = 120934400 (115MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/16/99, BIOS32 rev. 0 @ 0xf0690
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xd42
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf0ca0/160 (8 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Acer Labs M1533 ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xc000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Acer Labs M1541 PCI" rev 0x04
ppb0 at pci0 dev 1 function 0 "Acer Labs M5243 AGP/PCI-PCI" rev 0x04
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "SiS 6326 VGA" rev 0xc3
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
agp0 at vga1: aperture at 0xe0000000, size 0x4000000
drm at vga1 unsupported
alipm0 at pci0 dev 3 function 0 "Acer Labs M7101 Power" rev 0x00: SMBus
disabled
eso0 at pci0 dev 6 function 0 "ESS SOLO-1 AudioDrive" rev 0x01: ES1946,
irq 5
audio0 at eso0
opl0 at eso0: model OPL3
midi0 at opl0: <ESO Yamaha OPL3>
mpu at eso0 not configured
pcib0 at pci0 dev 7 function 0 "Acer Labs M1533 ISA" rev 0xc3
ral0 at pci0 dev 9 function 0 "Ralink RT2561S" rev 0x00: irq 10, address
00:1d:1a:02:50:b6
ral0: MAC/BBP RT2561C, RF RT2527
vr0 at pci0 dev 10 function 0 "VIA VT6105 RhineIII" rev 0x86: irq 5,
address 00:08:54:03:15:bf
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 4: OUI
0x004063, model 0x0034
rl0 at pci0 dev 12 function 0 "Realtek 8139" rev 0x10: irq 11, address
00:e0:7d:fd:08:94
rlphy0 at rl0 phy 0: RTL internal PHY
pciide0 at pci0 dev 15 function 0 "Acer Labs M5229 UDMA IDE" rev 0xc1:
DMA, channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALLlct15 07>
wd0: 16-sector PIO, LBA, 7161MB, 14666177 sectors
wd1 at pciide0 channel 0 drive 1: <SAMSUNG WA32543A>
wd1: 16-sector PIO, LBA, 2442MB, 5001696 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
wd1(pciide0:0:1): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
eso0: mapping Audio 1 DMA using I/O space at 0x410
isa0 at pcib0
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
pcppi0 at isa0 port 0x61
midi1 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
lm0 at isa0 port 0x290/8: W83781D
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
isapnp0 at isa0 port 0x279: read port 0x203
com3 at isapnp0 "U.S.Robotics Inc. Sportster 33., USR0002, , " port
0x2f8/8 irq 3: ns16550a, 16 byte fifo
biomask f345 netmask ff65 ttymask ffff
mtrr: K6-family MTRR support (2 registers)
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Thanks on advance,

--
Giancarlo Razzolini
http://lock.razzolini.adm.br
Linux User 172199
Red Hat Certified Engineer no:804006389722501
Verify:https://www.redhat.com/certification/rhce/current/
Moleque Sem Conteudo Numero #002
OpenBSD Stable
Ubuntu 8.04 Hardy Heron
4386 2A6F FFD4 4D5F 5842  6EA0 7ABE BBAB 9C0E 6B85

Reply | Threaded
Open this post in threaded view
|

Re: Wireless ral(4) problem

Tom-314
Hi Giancarlo,

  I have the same problem. On 4.5-release. My wifi card locks up and
often will lock up the machine if there
is heavy traffic (like a BitTorrent).

ral0 at pci0 dev 14 function 0 "Ralink RT2661" rev 0x00: irq 10,
address 00:14:85:xx:xx:xx
ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)

  I'm using Linux wireless clients that talk to the OpenBSD router and
as far as I can tell, they all have powersave
turned off.

  Has this been addressed in -current at all I wonder?

  Tom

Reply | Threaded
Open this post in threaded view
|

Re: Wireless ral(4) problem

Dorian Büttner
Tom schrieb:

> Hi Giancarlo,
>
>   I have the same problem. On 4.5-release. My wifi card locks up and
> often will lock up the machine if there
> is heavy traffic (like a BitTorrent).
>
> ral0 at pci0 dev 14 function 0 "Ralink RT2661" rev 0x00: irq 10,
> address 00:14:85:xx:xx:xx
> ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
>
>   I'm using Linux wireless clients that talk to the OpenBSD router and
> as far as I can tell, they all have powersave
> turned off.
>
>   Has this been addressed in -current at all I wonder?
>
>   Tom
>  
What I experience, is, that the traffic leading to the freeze doesn't
need to come in via the ral card, it can be on an vr interface as well.
I have used several services ftp, http etc for ages now on the vr
devices without a hitch, and since I inserted the ral into the soekris
it randomly locks up 'by itself',
and will do nearly immediately if I suck files via wired LAN. So I
suspect this is something in the driver itself, propably more to do with
resource allocation or somewhat.
Anyone knows some useful test scenario, I'll gladly do the practical
work here?

Reply | Threaded
Open this post in threaded view
|

Re: Wireless ral(4) problem

Tom-314
2009/5/2 Dorian BC<ttner <[hidden email]>:

> Tom schrieb:
>>
>> Hi Giancarlo,
>>
>> B I have the same problem. On 4.5-release. My wifi card locks up and
>> often will lock up the machine if there
>> is heavy traffic (like a BitTorrent).
>>
>> ral0 at pci0 dev 14 function 0 "Ralink RT2661" rev 0x00: irq 10,
>> address 00:14:85:xx:xx:xx
>> ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
>>
>> B I'm using Linux wireless clients that talk to the OpenBSD router and
>> as far as I can tell, they all have powersave
>> turned off.
>>
>> B Has this been addressed in -current at all I wonder?
>>
>> B Tom
>>
>
> What I experience, is, that the traffic leading to the freeze doesn't need
> to come in via the ral card, it can be on an vr interface as well.
> I have used several services ftp, http etc for ages now on the vr devices
> without a hitch, and since I inserted the ral into the soekris it randomly
> locks up 'by itself',
> and will do nearly immediately if I suck files via wired LAN. So I suspect
> this is something in the driver itself, propably more to do with resource
> allocation or somewhat.
> Anyone knows some useful test scenario, I'll gladly do the practical work
> here?

Same here. If I could do a proper test and debugging on this for furthering
the research to fix this, I would gladly do so. ifconfig ral0 debug seems to
give no useful information at time of crash. All I see are handshakes, auths,
and deauths.

I would really love to know what is making it lock up solid. I can't even send
a
BREAK on the serial console to  get into ddb when it locks up solid. All I
can
do is use my trust paperclip to reset the machine.

I have used rtorrent as a test on the Soekris itself, and it works
fine using the
vr(4) driver. If I ifconfig ral0 down, or even disable ral after boot
-c, the box is
quite reliable and will stay up just fine with high amounts of traffic.

It definitely seems to be ral(4) and the way that driver interacts with
OpenBSD
and everything else.

Tom

Reply | Threaded
Open this post in threaded view
|

Re: Wireless ral(4) problem

Daniel Melameth
On Sat, May 2, 2009 at 4:49 AM, Tom <[hidden email]> wrote:
> Same here. If I could do a proper test and debugging on this for furthering
> the research to fix this, I would gladly do so. ifconfig ral0 debug seems
to
> give no useful information at time of crash. All I see are handshakes,
auths,
> and deauths.
>
> I would really love to know what is making it lock up solid. I can't even
send

> a
> BREAK on the serial console to  get into ddb when it locks up solid. All I
> can
> do is use my trust paperclip to reset the machine.
>
> I have used rtorrent as a test on the Soekris itself, and it works
> fine using the
> vr(4) driver. If I ifconfig ral0 down, or even disable ral after boot
> -c, the box is
> quite reliable and will stay up just fine with high amounts of traffic.
>
> It definitely seems to be ral(4) and the way that driver interacts with
> OpenBSD
> and everything else.

This is related to hostap mode and not a Soekris issue.  I've had
boxes that work fine as ral wireless clients, but once I turn them
into ral APs, they dont work very well for long.

Reply | Threaded
Open this post in threaded view
|

Re: Wireless ral(4) problem

Giancarlo Razzolini
In reply to this post by Tom-314
Tom escreveu:

> Hi Giancarlo,
>
>   I have the same problem. On 4.5-release. My wifi card locks up and
> often will lock up the machine if there
> is heavy traffic (like a BitTorrent).
>
> ral0 at pci0 dev 14 function 0 "Ralink RT2661" rev 0x00: irq 10,
> address 00:14:85:xx:xx:xx
> ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
>
>   I'm using Linux wireless clients that talk to the OpenBSD router and
> as far as I can tell, they all have powersave
> turned off.
>
>   Has this been addressed in -current at all I wonder?
>
>   Tom
>
>
>  
The only difference is that my box never lock up. It remain working.
Only the wireless communication with the clients stop for some seconds,
and then get back working as nothing had happened. I saw this on the manual:

Some PCI ral adapters seem to strictly require a system supporting PCI
     2.2 or greater and will likely not work in systems based on older revi
     sions of the PCI specification.  Check the board's PCI version before
     purchasing the card.

So i went check to see if my pci card requires the 2.2 PCI revision or
not. It is an OvisLink EVO-W54PCI and it is listed on the man page as
one that should work. On the manual of the card there is nothing saying
what revision it need. But i came across a PDF file when searching the
net, and it says that the card need the 2.2 PCI revision. Mine is 2.1:

pcibios0 at bios0: rev 2.1 @ 0xf0000/0xd42

AFAIK, the card shouldn't even be detected, nor should it be working. I
can only guess if this isn't my problem. I was already planning on
replacing my firewall machine, guess i'll have to do it faster than planned.

My regards,

--
Giancarlo Razzolini
http://lock.razzolini.adm.br
Linux User 172199
Red Hat Certified Engineer no:804006389722501
Verify:https://www.redhat.com/certification/rhce/current/
Moleque Sem Conteudo Numero #002
OpenBSD Stable
Ubuntu 8.04 Hardy Heron
4386 2A6F FFD4 4D5F 5842  6EA0 7ABE BBAB 9C0E 6B85