Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2007 16:38:10 GMT
From:      Scot Hetzel <swhetzel@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/113915: ndis wireless driver fails to associate when interface set to WPA
Message-ID:  <200706211638.l5LGcArS040270@www.freebsd.org>
Resent-Message-ID: <200706211640.l5LGeCZD017707@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         113915
>Category:       conf
>Synopsis:       ndis wireless driver fails to associate when interface set to WPA
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 21 16:40:12 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Scot Hetzel
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jun 19 01:49:53 CDT 2007     swhetzel@hp010:/usr/src/sys/amd64/compile/GENERIC  amd64

>Description:
When I try and boot a system with the NDIS interface configured as:

ifconfig_ndis0="WPA DHCP"

I see it continuously trying to get a DHCP address, but it fails.  I found the problem is because wpa_supplicant is not realizing that it had successfully connected to the wireless network, so it continuously connects/disconnects.

By starting /usr/sbin/ndis_events, then wpa_supplicant will associate, and the wireless network is accessible.

hp010# dmesg | grep ndis
ndis0: <Broadcom 802.11b/g WLAN> mem 0xc0204000-0xc0205fff irq 21 at device 2.0 on pci6
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
ndis0: using obsoleted if_watchdog interface
ndis0: Ethernet address: 00:14:a5:72:68:64
>How-To-Repeat:
set the NDIS interface to "WPA DHCP" and then reboot the system.
>Fix:
Start ndis_events before starting wpa_supplicant for NDIS interfaces.

apply the attached patch which will start ndis_events when the NDIS interface is set for WPA.

Updated files:

etc/network.subr
etc/rc.d/Makefile

New file

etc/rc.d/ndis_events

Patch attached with submission follows:

Index: etc/network.subr
===================================================================
RCS file: /home/ncvs/src/etc/network.subr,v
retrieving revision 1.180
diff -u -r1.180 network.subr
--- etc/network.subr	23 May 2007 00:18:44 -0000	1.180
+++ etc/network.subr	21 Jun 2007 15:53:12 -0000
@@ -52,6 +52,11 @@
 		if [ $_cfg -ne 0 ] ; then
 			ifconfig $1 up
 		fi
+		case $1 in
+		ndis*)
+			/etc/rc.d/ndis_events start
+			;;
+		esac
 		/etc/rc.d/wpa_supplicant start $1
 		_cfg=0		# XXX: not sure this should count
 	fi
@@ -80,6 +85,11 @@
 
 	if wpaif $1; then
 		/etc/rc.d/wpa_supplicant stop $1
+		case $1 in
+		ndis*)
+			/etc/rc.d/ndis_events stop
+			;;
+		esac
 		_cfg=0
 	fi
 
Index: etc/rc.d/Makefile
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/Makefile,v
retrieving revision 1.81
diff -u -r1.81 Makefile
--- etc/rc.d/Makefile	9 Apr 2007 19:21:27 -0000	1.81
+++ etc/rc.d/Makefile	21 Jun 2007 15:33:26 -0000
@@ -23,7 +23,7 @@
 	ldconfig local localpkg lpd \
 	mixer motd mountcritlocal mountcritremote mountlate \
 	mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \
-	named natd netif netoptions \
+	named natd netif ndis_events netoptions \
 	network_ipv6 newsyslog nfsclient nfsd \
 	nfslocking nfsserver nisdomain nsswitch ntpd ntpdate \
 	othermta \
Index: etc/rc.d/ndis_events
===================================================================
RCS file: etc/rc.d/ndis_events
diff -N etc/rc.d/ndis_events
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ etc/rc.d/ndis_events	21 Jun 2007 15:35:44 -0000
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ndis_events
+# REQUIRE: mountcritremote
+# BEFORE: wpa_supplicant
+# KEYWORD: nojail nostart
+
+. /etc/rc.subr
+. /etc/network.subr
+
+name="ndis_events"
+rcvar=
+command="/usr/sbin/${name}"
+
+load_rc_config $name
+run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706211638.l5LGcArS040270>