From nobody@FreeBSD.org  Wed Aug 25 18:31:56 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 295B31065696
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Aug 2010 18:31:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 192CB8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Aug 2010 18:31:56 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7PIVtkc062879
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Aug 2010 18:31:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o7PIVt3g062878;
	Wed, 25 Aug 2010 18:31:55 GMT
	(envelope-from nobody)
Message-Id: <201008251831.o7PIVt3g062878@www.freebsd.org>
Date: Wed, 25 Aug 2010 18:31:55 GMT
From: David Gurvich <davidgurvich@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ralink rt2661 fails to maintain connection
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149969
>Category:       kern
>Synopsis:       [wlan] [ral] ralink rt2661 fails to maintain connection
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 25 18:40:04 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Aug 30 01:40:01 UTC 2010
>Originator:     David Gurvich
>Release:        8.1-release
>Organization:
none
>Environment:
FreeBSD Lucifer 8.1-RELEASE FreeBSD 8.1-RELEASE #0 r210200M: Wed Jul 21 13:25:43 CEST 2010     root@neo.vx.sk:/usr/obj/i386/usr/src/sys/GENERIC  i386

>Description:
The ralink driver seems to put the card to sleep at random intervals and fails to wakeup or drops the connection. I can bring the connection back up by cycling ral0 with ifconfig ral0 down/up.  Going through /etc/rc.d/netif restart also works.

Here is the relevant output of pciconf -lv
ral0@pci0:1:2:0:	class=0x028000 card=0xe9351458 chip=0x04011814 rev=0x00 hdr=0x00
    vendor     = 'Ralink Technology, Corp.'
    device     = 'Ralink MIMO RT 2661 Wireless 54 Mbps (RT 2661)'
    class      = network
Here are some excerpts from dmesg, with the last line repeated multiple times.
ral0: <Ralink Technology RT2661> mem 0xd0200000-0xd0207fff irq 11 at device 2.0 on pci1
ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
ral0: [ITHREAD]
ral0: need multicast update callback
Even though I see that irq11 is being used I don't see that with vmstat -i
irq11: cbb0 fwohci*

I'm not certain how to get more information.
>How-To-Repeat:
rc.conf:
wlans_ral0="wlan0"
ifconfig_wlan0="WPA DHCP"
wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

# Home network
network={
	ssid="myssid"
	key_mgmt=NONE
	wep_tx_keyidx=0
	wep_key0=123456789A
}

>Fix:


>Release-Note:
>Audit-Trail:

From: David Gurvich <davidgurvich@gmail.com>
To: bug-followup@FreeBSD.org, davidgurvich@gmail.com
Cc:  
Subject: Re: kern/149969: ralink rt2661 fails to maintain connection
Date: Fri, 27 Aug 2010 23:45:26 -0400

 --e0cb4e8878e3dc7539048eda0f71
 Content-Type: text/plain; charset=ISO-8859-1
 
 If I move the laptop up and down then the connection seems to get
 reestablished.  I'm not sure why that becomes necessary but I'm suspecting a
 reception problem.  The issue does not occur with Linux distributions in the
 same location so I was somewhat confused.  I'll test by changing the
 internal antenna for a better set and see what happens.
 
 --e0cb4e8878e3dc7539048eda0f71
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 If I move the laptop up and down then the connection seems to get reestabli=
 shed.=A0 I&#39;m not sure why that becomes necessary but I&#39;m suspecting=
  a reception problem.=A0 The issue does not occur with Linux distributions =
 in the same location so I was somewhat confused.=A0 I&#39;ll test by changi=
 ng the internal antenna for a better set and see what happens.<br>
 
 --e0cb4e8878e3dc7539048eda0f71--
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Sun Aug 29 20:27:52 UTC 2010 
State-Changed-Why:  
David, 
does the device work for your if you disable powersave operation? 

Please note: For your IRQ question, the asterisk in the output indicates 
more devices being assigned to that IRQ but vmstat -i is unable to display all. 


Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sun Aug 29 20:27:52 UTC 2010 
Responsible-Changed-Why:  
over to maintainer(s) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149969 

From: David Gurvich <davidgurvich@gmail.com>
To: bug-followup@FreeBSD.org, davidgurvich@gmail.com
Cc:  
Subject: Re: kern/149969: [wlan] [ral] ralink rt2661 fails to maintain connection
Date: Sun, 29 Aug 2010 21:30:09 -0400

 --001636284f88b99398048f006758
 Content-Type: text/plain; charset=ISO-8859-1
 
 Perhaps I am disabling powersave incorrectly?  In rc.conf the
 ifconfig_wlan0="WPA DHCP -powersave".  I've also tried on the command line
 "ifconfig wlan0 -powersave".  If I do the same thing with ral0 I get an
 error that the argument is not valid.
 
 --001636284f88b99398048f006758
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Perhaps I am disabling powersave incorrectly?=A0 In rc.conf the ifconfig_wl=
 an0=3D&quot;WPA DHCP -powersave&quot;.=A0 I&#39;ve also tried on the comman=
 d line &quot;ifconfig wlan0 -powersave&quot;.=A0 If I do the same thing wit=
 h ral0 I get an error that the argument is not valid.<br>
 
 --001636284f88b99398048f006758--
>Unformatted:
