From nobody@FreeBSD.org  Wed Jan 21 13:22:07 2009
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 D56D5106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Jan 2009 13:22:07 +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 C3FCC8FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Jan 2009 13:22:07 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LDM7av030667
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Jan 2009 13:22:07 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0LDM7wY030665;
	Wed, 21 Jan 2009 13:22:07 GMT
	(envelope-from nobody)
Message-Id: <200901211322.n0LDM7wY030665@www.freebsd.org>
Date: Wed, 21 Jan 2009 13:22:07 GMT
From: Erwin Hoffmann <feh@fehcom.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: wpa_supplicant returns 'no space on device'
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130820
>Category:       kern
>Synopsis:       [ndis] wpa_supplicant(8) returns 'no space on device'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 21 13:30:00 UTC 2009
>Closed-Date:    
>Last-Modified:  Thu Mar  5 01:50:01 UTC 2009
>Originator:     Erwin Hoffmann
>Release:        6.3
>Organization:
FEHCom
>Environment:
artemis# uname -a
FreeBSD artemis.fehnet.de 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:18:52 UTC 2008     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Hi,

Conditions: HP Notebook Nx6125 with broadcom Wlan adapter.
Ndis driver installed and working

artemis# ifconfig ndis0
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ether 00:14:a5:69:76:9e
        media: IEEE 802.11 Wireless Ethernet autoselect
        status: no carrier
        ssid "" channel 1
        authmode OPEN privacy OFF txpowmax 100 bmiss 7 protmode CTS
        roaming MANUAL

Trying to call wpa_supplicant provides the following error message:

wpa_supplicant -Initializing interface 'ndis0' conf '/etc/wpa_supplicant.conf' driver 'default' 
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='wheel'
eapol_version=2
ap_scan=1
fast_reauth=1
Line: 6 - start of a new network block
ssid - hexdump_ascii(len=15):
     XX XX XX XX 5a 42 6f 78 40 46 45 48 43 6f XX      FRITZBox@FEHCom 
PSK (ASCII passphrase) - hexdump_ascii(len=16): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='FRITZBox@FEHCom'
Initializing interface (2) 'ndis0'
Own MAC address: 00:14:a5:69:76:9e
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
ctrl_interface_group=0 (from group name 'wheel')
Added interface ndis0
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed 
up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Cached scan results are empty - not posting
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
EAPOL: disable timer tick
ioctl[SIOCG80211, op 24, len 24576]: No space left on device
Scan results: -1
Failed to get scan results

..

The wpa_supplicant has raised /var/run/wpa_supplicant/ndis0

wpa_supplicant tries it over and over again and restarts (unsuccessfully).

--

From my preliminary analysis, this problem is due to the failure reporting the status of IEE80211 to the control file. 

"op 24" probably originates from /usr/include/net80211/ieee80211_ioctl.h:

#define IEEE80211_IOC_SCAN_RESULTS      24






>How-To-Repeat:

>Fix:
Currently none.

However the problem is independent of the wpa_supplicant (I tried the port's one 0.3.8 and further 0.3.11 and the most recent one 0.6.7, which compiles (almost without trouble) under FreeBSD.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jan 21 18:29:51 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130820 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Mar 5 01:43:20 UTC 2009 
State-Changed-Why:  
To submitter: did the suggestion from Paul B. Mahol fix this problem? 

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

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/130820: [ndis] wpa_supplicant(8) returns 'no space on
	device'
Date: Wed, 4 Mar 2009 19:44:31 -0600

 ----- Forwarded message from "Paul B. Mahol" <onemda@gmail.com> -----
 
 From: "Paul B. Mahol" <onemda@gmail.com>
 To: linimon@freebsd.org
 Cc: freebsd-net@freebsd.org, freebsd-bugs@freebsd.org
 Subject: Re: kern/130820: [ndis] wpa_supplicant(8) returns 'no space on 
 	device'
 
 Yet another invalid bug report.
 OP should use -Dndis and not -Dbsd
 
 -- 
 Paul
 
 ----- End forwarded message -----
>Unformatted:
