Bug 113915 - [ndis] [patch] ndis wireless driver fails to associate when interface set to WPA
Summary: [ndis] [patch] ndis wireless driver fails to associate when interface set to WPA
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 7.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-06-21 17:40 UTC by Scot Hetzel
Modified: 2022-10-17 12:39 UTC (History)
0 users

See Also:


Attachments
file.diff (1.83 KB, patch)
2007-06-21 17:40 UTC, Scot Hetzel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scot Hetzel 2007-06-21 17:40:12 UTC
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

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:
How-To-Repeat: set the NDIS interface to "WPA DHCP" and then reboot the system.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-01-14 00:45:29 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Volker 2008-01-26 03:44:23 UTC
Scot,

I've tested wpa_supplicant with an ndis interface and it's working w/o
your patch using 'ifconfig_ndis0="WPA DHCP"'.

ndis0: <Dell Wireless 1490 Dual Band WLAN Mini-Card> mem
0xc8000000-0xc8003fff irq 18 at device 0.0 on pci48
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
ndis0: using obsoleted if_watchdog interface
ndis0: Ethernet address: 00:1a:73:ad:a4:67
ndis0: bssid_list failed
ndis0: bssid_list failed
ndis0: link state changed to UP

FreeBSD cesar.sz.vwsoft.com 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #8:
Tue Jan 22 01:29:52 CET 2008
root@cesar.sz.vwsoft.com:/usr/obj/usr/src/sys/CESAR  i386

I have been running this system with a 7.0-PRE amd64 kernel lately and
also haven't seen this problem.

Please check if you can recreate your problem with a recent 7.0
unpatched system.

Thx!

Volker
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2008-01-26 04:17:28 UTC
State Changed
From-To: open->feedback

Note that submitter has been asked for feedback.
Comment 4 Scot Hetzel 2008-02-15 00:03:13 UTC
On 1/25/08, Volker <volker@vwsoft.com> wrote:
> Scot,
>
>  I've tested wpa_supplicant with an ndis interface and it's working w/o
>  your patch using 'ifconfig_ndis0="WPA DHCP"'.
>
>  ndis0: <Dell Wireless 1490 Dual Band WLAN Mini-Card> mem
>  0xc8000000-0xc8003fff irq 18 at device 0.0 on pci48
>  ndis0: [ITHREAD]
>  ndis0: NDIS API version: 5.1
>  ndis0: using obsoleted if_watchdog interface
>  ndis0: Ethernet address: 00:1a:73:ad:a4:67
>  ndis0: bssid_list failed
>  ndis0: bssid_list failed
>  ndis0: link state changed to UP
>
>  FreeBSD cesar.sz.vwsoft.com 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #8:
>  Tue Jan 22 01:29:52 CET 2008
>  root@cesar.sz.vwsoft.com:/usr/obj/usr/src/sys/CESAR  i386
>
>  I have been running this system with a 7.0-PRE amd64 kernel lately and
>  also haven't seen this problem.
>
>  Please check if you can recreate your problem with a recent 7.0
>  unpatched system.
>

I can recreate the problem with a recent 8.0 system:

FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed Feb 13 11:28:36
CST 2008     swhetzel@hp010:/usr/src/sys/amd64/compile/DV8135NR  amd64

When I don't have ndis_event start, then I don't get an IP address
using DHCP.  With it running, I am able to receive an IP address.

ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:14:a5:72:68:64
        inet6 fe80::214:a5ff:fe72:6864%ndis0 prefixlen 64 scopeid 0x1
        inet 10.65.108.188 netmask 0xfffffc00 broadcast 10.65.111.255
        media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
        status: associated
        ssid campuswpa channel 6 (2437 Mhz 11g) bssid 00:0b:0e:19:33:42
        authmode OPEN privacy OFF bmiss 7 scanvalid 60 protmode CTS
        roaming MANUAL bintval 0

I have tested it on 3 different networks (2 - secure, 1 - open).

Scot
Comment 5 Scot Hetzel 2008-02-15 00:07:47 UTC
On 2/14/08, Scot Hetzel <swhetzel@gmail.com> wrote:
> On 1/25/08, Volker <volker@vwsoft.com> wrote:
>  > Scot,
>  >
>  >  I've tested wpa_supplicant with an ndis interface and it's working w/o
>  >  your patch using 'ifconfig_ndis0="WPA DHCP"'.
>  >
>  >  ndis0: <Dell Wireless 1490 Dual Band WLAN Mini-Card> mem
>  >  0xc8000000-0xc8003fff irq 18 at device 0.0 on pci48
>  >  ndis0: [ITHREAD]
>  >  ndis0: NDIS API version: 5.1
>  >  ndis0: using obsoleted if_watchdog interface
>  >  ndis0: Ethernet address: 00:1a:73:ad:a4:67
>  >  ndis0: bssid_list failed
>  >  ndis0: bssid_list failed
>  >  ndis0: link state changed to UP
>  >
>  >  FreeBSD cesar.sz.vwsoft.com 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #8:
>  >  Tue Jan 22 01:29:52 CET 2008
>  >  root@cesar.sz.vwsoft.com:/usr/obj/usr/src/sys/CESAR  i386
>  >
>  >  I have been running this system with a 7.0-PRE amd64 kernel lately and
>  >  also haven't seen this problem.
>  >
>  >  Please check if you can recreate your problem with a recent 7.0
>  >  unpatched system.
>  >
>
>
> I can recreate the problem with a recent 8.0 system:
>
>  FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed Feb 13 11:28:36
>  CST 2008     swhetzel@hp010:/usr/src/sys/amd64/compile/DV8135NR  amd64
>
>  When I don't have ndis_event start, then I don't get an IP address
>  using DHCP.  With it running, I am able to receive an IP address.
>
>  ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         ether 00:14:a5:72:68:64
>         inet6 fe80::214:a5ff:fe72:6864%ndis0 prefixlen 64 scopeid 0x1
>         inet 10.65.108.188 netmask 0xfffffc00 broadcast 10.65.111.255
>         media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
>         status: associated
>         ssid campuswpa channel 6 (2437 Mhz 11g) bssid 00:0b:0e:19:33:42
>         authmode OPEN privacy OFF bmiss 7 scanvalid 60 protmode CTS
>         roaming MANUAL bintval 0
>
>  I have tested it on 3 different networks (2 - secure, 1 - open).
>

Feb 14 17:46:40 hp010 kernel: ndis0: <Broadcom 802.11b/g WLAN> mem
0xc0204000-0xc0205fff irq 21 at device 2.0 on pci6
Feb 14 17:46:40 hp010 kernel: ndis0: [ITHREAD]
Feb 14 17:46:40 hp010 kernel: ndis0: NDIS API version: 5.1
Feb 14 17:46:40 hp010 kernel: ndis0: using obsoleted if_watchdog interface
Feb 14 17:46:40 hp010 kernel: ndis0: Ethernet address: 00:14:a5:72:68:64
Feb 14 17:46:47 hp010 kernel: ndis0: link state changed to DOWN
Feb 14 17:46:54 hp010 kernel: ndis0: link state changed to UP
Feb 14 17:47:05 hp010 kernel: ndis0: link state changed to DOWN
Feb 14 17:47:12 hp010 kernel: ndis0: link state changed to UP

Here's what happens after I stop ndis0, and restart it with ndis_event enabled.

Feb 14 17:51:03 hp010 kernel: ndis0: link state changed to DOWN
Feb 14 17:51:14 hp010 kernel: ndis0: link state changed to DOWN
Feb 14 17:51:21 hp010 kernel: ndis0: link state changed to UP
Feb 14 17:51:23 hp010 kernel: ndis0: link state changed to DOWN
Feb 14 17:51:39 hp010 kernel: ndis0: link state changed to UP
Feb 14 17:51:51 hp010 dhclient: New IP Address (ndis0): 10.65.108.188
Feb 14 17:51:51 hp010 dhclient: New Subnet Mask (ndis0): 255.255.252.0
Feb 14 17:51:51 hp010 dhclient: New Broadcast Address (ndis0): 10.65.111.255
Feb 14 17:51:51 hp010 dhclient: New Routers (ndis0): 10.65.110.1

Scot
Comment 6 Volker Werth freebsd_committer freebsd_triage 2008-05-17 21:13:39 UTC
State Changed
From-To: feedback->open


feedback already received
Comment 7 Chris Rees freebsd_committer freebsd_triage 2012-10-27 19:52:19 UTC
State Changed
From-To: open->feedback

Two questions; 1) Is this still a problem with the new wireless network 
RC system in 9.0, and 2) I suspect that it is, so please would you give 
this patch a spin? http://www.bayofrum.net/~crees/patches/113915  It's 
mostly based on yours, and cleans up wpa_supplicant a bit.
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:20 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 9 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:39:32 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>