From nobody@FreeBSD.org  Fri Jul 11 09:39:52 2008
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 78C1510657C9
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 09:39:51 +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 185B38FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 09:39:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6B9doLV090507
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 09:39:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m6B9doWZ090506;
	Fri, 11 Jul 2008 09:39:50 GMT
	(envelope-from nobody)
Message-Id: <200807110939.m6B9doWZ090506@www.freebsd.org>
Date: Fri, 11 Jul 2008 09:39:50 GMT
From: chris <chelton30@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ifconfig ral0 scan produces no output
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         125502
>Category:       kern
>Synopsis:       [ral] ifconfig ral0 scan produces no output unless in shared mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bschmidt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 11 09:40:07 UTC 2008
>Closed-Date:    Thu Dec 30 17:40:30 UTC 2010
>Last-Modified:  Thu Dec 30 17:40:30 UTC 2010
>Originator:     chris
>Release:        7.0 release
>Organization:
c m short
>Environment:
FreeBSD station1.bolaccrushing.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Using a dlink cardbus dwl-g630 if trying to scan for AP's you recieve no results after inserting the card. To scan for AP's i have to change to shared mode.


>How-To-Repeat:
Insert card
ifconfig ral0 up scan
Ctrl c
ifconfig ral0 authmode shared
ifconfig ral0 scan

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Fri Jul 11 20:11:15 UTC 2008 
State-Changed-Why:  
To submitter:  We'll probably need more details from you before 
there's any chance of diagnosing the problem.  To start with, could 
you try using the wlandebug tool, from /usr/src/tools/tools/net80211 
and see if that reveals anything obvious? 

# wlandebug -i ral0 +scan+auth+debug+assoc 
net.wlan.0.debug: 0 => 0xc80000<assoc,auth,scan> 



Responsible-Changed-From-To: freebsd-i386->freebsd-net 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Fri Jul 11 20:11:15 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s) 

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

From: Dimitry Andric <dimitry@andric.com>
To: bug-followup@FreeBSD.org, chelton30@gmail.com
Cc:  
Subject: Re: kern/125502: [ral] ifconfig ral0 scan produces no output unless
 in shared mode
Date: Wed, 27 Aug 2008 23:36:46 +0200

 The ral I've got here on RELENG_7 is a mini-PCI card:
 
 ral0: <Ralink Technology RT2561S> mem 0xdfef8000-0xdfefffff irq 18 at device 2.0 on pci2
 ral0: MAC/BBP RT2561C, RF RT5225
 ral0: Ethernet address: 00:12:0e:61:48:e4
 ral0: [ITHREAD]
 
 I've got exactly the same as the original submitter: "ifconfig ral0
 scan" keeps busy forever, and never returns, if authmode is open.  When
 I set authmode to shared, it scans within a few seconds, usually.
 
 When turning on +scan+auth+debug+assoc, I get the following for authmode
 shared:
 
 ral0: scan_next: chan   2g ->   1g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 1
 ral0: scan_next: chan   1g ->   6g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 6
 ral0: scan_next: chan   6g ->  11g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 11
 ral0: scan_next: chan  11g ->   7g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 7
 ral0: scan_next: chan   7g ->  13g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 13
 ral0: scan_next: chan  13g ->  52a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 52
 ral0: scan_next: chan  52a ->  56a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 56
 ral0: scan_next: chan  56a ->  60a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 60
 ral0: scan_next: chan  60a ->  64a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 64
 ral0: scan_next: chan  64a ->  36a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 36
 ral0: scan_next: chan  36a ->  40a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 40
 ral0: scan_next: chan  40a ->  44a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 44
 ral0: ieee80211_start_scan: active scan already in progress
 ral0: scan_next: chan  44a ->  48a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 48
 ral0: scan_next: chan  48a ->   2g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 2
 ral0: received probe_resp from 00:90:4c:60:04:00 rssi 27
 [00:90:4c:60:04:00] new probe_resp on chan 2 (bss chan 2) "slackernet"
 [00:90:4c:60:04:00] caps 0x411 bintval 100 erp 0x0
 ral0: ieee80211_add_scan: chan   2g min dwell met (8236357 > 8236355)
 ral0: received beacon from 00:90:4c:60:04:00 rssi 27
 [00:90:4c:60:04:00] new beacon on chan 2 (bss chan 2) "slackernet"
 [00:90:4c:60:04:00] caps 0x411 bintval 100 erp 0x0
 ral0: scan_next: chan   2g ->   3g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 3
 ral0: scan_next: chan   3g ->   4g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 4
 ral0: received probe_resp from 00:1b:2f:de:86:1e rssi 17
 ral0: received beacon from 00:1b:2f:de:86:1e rssi 17
 ral0: scan_next: chan   4g ->   5g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 5
 ral0: received probe_resp from 00:1b:2f:de:86:1e rssi 15
 [00:1b:2f:de:86:1e] new probe_resp on chan 5 (bss chan 5) "pipi"
 [00:1b:2f:de:86:1e] caps 0x431 bintval 100 erp 0x0
 ral0: ieee80211_add_scan: chan   5g min dwell met (8236845 > 8236843)
 ral0: received beacon from 00:1b:2f:de:86:1e rssi 15
 [00:1b:2f:de:86:1e] new beacon on chan 5 (bss chan 5) "pipi"
 [00:1b:2f:de:86:1e] caps 0x431 bintval 100 erp 0x0
 ral0: scan_next: chan   5g ->   8g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 8
 ral0: scan_next: chan   8g ->   9g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 9
 ral0: scan_next: chan   9g ->  10g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 10
 ral0: scan_next: chan  10g ->  12g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 12
 ral0: scan_next: chan  12g ->  14g [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 14
 ral0: scan_next: chan  14g -> 149a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 149
 ral0: scan_next: chan 149a -> 153a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 153
 ral0: scan_next: chan 153a -> 157a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 157
 ral0: scan_next: chan 157a -> 161a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 161
 ral0: scan_next: chan 161a -> 100a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 100
 ral0: scan_next: chan 100a -> 104a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 104
 ral0: scan_next: chan 104a -> 108a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 108
 ral0: scan_next: chan 108a -> 112a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 112
 ral0: scan_next: chan 112a -> 116a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 116
 ral0: scan_next: chan 116a -> 120a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 120
 ral0: scan_next: chan 120a -> 124a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 124
 ral0: scan_next: chan 124a -> 128a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 128
 ral0: scan_next: chan 128a -> 132a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 132
 ral0: scan_next: chan 132a -> 136a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 136
 ral0: scan_next: chan 136a -> 140a [active, dwell min 20 max 200]
 ral0: [ff:ff:ff:ff:ff:ff] send probe req on channel 140
 ral0:  macaddr          bssid         chan  rssi  rate flag  wep  essid
  - 00:90:4c:60:04:00 00:90:4cral0: received beacon from 00:90:4c:60:04:00 rssi 27
 [00:90:4c:60:04:00] new beacon on chan 2 (bss chan 2) "slackernet"
 [00:90:4c:60:04:00] caps 0x411 bintval 100 erp 0x0
 :60:04:00    2    30  54M   ess  wep! "slackernet"
  - 00:1b:2f:de:86:1e 00:1b:2f:de:86:1e    5    16  54M   ess  wep! "pipi"
 ral0: ieee80211_add_scan: chan   2g min dwell met (8241192 > 8240968)
 ral0: scan_next: done, restart [ticks 8241200, dwell min 20 scanend 2155701896]
 
 ...and this in an endless loop, of course.  But the ifconfig *does*
 return.  When authmode is open, I get exactly the same messages, but
 ifconfig doesn't return.
 
 The last thing it appears to do, according to ktrace, is to read from a
 socket: 
 
 ...
   2544 ifconfig CALL  __sysctl(0xbfbfe2c0,0x6,0,0xbfbfe2d8,0,0)
   2544 ifconfig RET   __sysctl 0
   2544 ifconfig CALL  __sysctl(0xbfbfe2c0,0x6,0x8102000,0xbfbfe2d8,0,0)
   2544 ifconfig RET   __sysctl 0
   2544 ifconfig CALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
   2544 ifconfig RET   socket 3
   2544 ifconfig CALL  socket(PF_ROUTE,SOCK_RAW,0)
   2544 ifconfig RET   socket 4
   2544 ifconfig CALL  ioctl(0x3,SIOCS80211,0xbfbfe290)
   2544 ifconfig RET   ioctl 0
   2544 ifconfig CALL  read(0x4,0xbfbfda90,0x800)
 
 and here it hangs, until interrupted.
 
Responsible-Changed-From-To: freebsd-net->bschmidt 
Responsible-Changed-By: bschmidt 
Responsible-Changed-When: Thu Dec 30 11:30:44 UTC 2010 
Responsible-Changed-Why:  
over to me 

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

From: Bernhard Schmidt <bschmidt@freebsd.org>
To: Dimitry Andric <dimitry@andric.com>
Cc: bug-followup@freebsd.org,
 chelton30@gmail.com
Subject: Re: kern/125502: [ral] ifconfig ral0 scan produces no output unless in shared mode
Date: Thu, 30 Dec 2010 12:31:00 +0100

 On Wednesday 27 August 2008 23:40:03 Dimitry Andric wrote:
 >  I've got exactly the same as the original submitter: "ifconfig ral0
 >  scan" keeps busy forever, and never returns, if authmode is open.  When
 >  I set authmode to shared, it scans within a few seconds, usually.
 
 Have a look at http://lists.freebsd.org/pipermail/freebsd-net/2010-
 December/027327.html
 
 -- 
 Bernhard

From: Dimitry Andric <dimitry@andric.com>
To: Bernhard Schmidt <bschmidt@freebsd.org>
Cc: bug-followup@freebsd.org, chelton30@gmail.com
Subject: Re: kern/125502: [ral] ifconfig ral0 scan produces no output unless
 in shared mode
Date: Thu, 30 Dec 2010 14:55:45 +0100

 On 2010-12-30 12:31, Bernhard Schmidt wrote:
 > http://lists.freebsd.org/pipermail/freebsd-net/2010-December/027327.html
 
 Thanks for that fix, but unfortunately I do not have the ral hardware
 anymore... :(
State-Changed-From-To: feedback->closed 
State-Changed-By: bschmidt 
State-Changed-When: Thu Dec 30 17:38:28 UTC 2010 
State-Changed-Why:  
OP does not have access to that HW anymore and I'm sure that provided 
patch does address this issue. 
Thanks for feedback! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125502 
>Unformatted:
