kern/131781: [ndis] ndis keeps dropping the link

Adam K Kirchhoff adamk at voicenet.com
Wed Feb 18 11:34:05 PST 2009


On Wed, 18 Feb 2009 13:49:35 -0500
Adam K Kirchhoff <adamk at voicenet.com> wrote:

> On Wed, 18 Feb 2009 19:27:36 +0100
> "Paul B. Mahol" <onemda at gmail.com> wrote:
> 
> > On 2/18/09, Adam K Kirchhoff <adamk at voicenet.com> wrote:
> > > On Wed, 18 Feb 2009 16:33:56 +0100
> > > "Paul B. Mahol" <onemda at gmail.com> wrote:
> > >
> > >> On 2/18/09, Adam K Kirchhoff <adamk at voicenet.com> wrote:
> > >> > On Wed, 18 Feb 2009 12:06:21 +0100
> > >> > "Paul B. Mahol" <onemda at gmail.com> wrote:
> > >> >
> > >> >> On 2/17/09, Adam K Kirchhoff <adamk at voicenet.com> wrote:
> > >> >> > On Tuesday 17 February 2009 17:14:07 Paul B. Mahol wrote:
> > >> >> >> On 2/17/09, Adam K Kirchhoff <adamk at voicenet.com> wrote:
> > >> >> >> > On Tue, 17 Feb 2009 19:22:22 +0100
> > >> >> >> >
> > >> >> >> > "Paul B. Mahol" <onemda at gmail.com> wrote:
> > >> >> >> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=131781
> > >> >> >> >>
> > >> >> >> >> This one should not happen, 108 rate should get recognized.
> > >> >> >> >> I will try to reproduce it on CURRENT.
> > >> >> >> >>
> > >> >> >> >> To OP, could you try 7 STABLE after 31 Jan? I guess it should not
> > >> >> >> >> change anything but you never know.
> > >> >> >> >
> > >> >> >> > Sorry, I must have copied and pasted the uname output from the
> > >> >> >> > wrong
> > >> >> >> > machine.  This is actually FreeBSD 7.1-STABLE #4: Mon Feb 16
> > >> >> >> > 16:37:18
> > >> >> >> > EST 2009 :-)
> > >> >> >>
> > >> >> >> miniport dump NDIS_STATUS_UNSUPPORTED_MEDIA for error in
> > >> >> >> ndis_setstate() for setting OID_802_11_CONFIGURATION.
> > >> >> >
> > >> >> > Sorry if I seem slow, but are you asking me to check something there,
> > >> >> > or
> > >> >> > just
> > >> >> > stating what you think the problem is? :-)
> > >> >>
> > >> >> You can add printf() before "ndis_set_info(sc,
> > >> >> OID_802_11_CONFIGURATION, &config, &len);" in ndis_setstate_80211() to
> > >> >> check what value for config.nc_dsconfig is by default.
> > >> >
> > >> > I'll try that shortly.
> > >> >
> > >> >> Also try changing "sysctl debug.ndis=1" and post console debug ouput
> > >> >> again.
> > >> >
> > >> > This was strange.  If I boot up and enable debugging before I try to
> > >> > run '/etc/rc.d/netif start ndis0' everything works just fine.  I get an
> > >> > IP address and stay connected (at least under a light load).  This is
> > >> > the output:
> > >> >
> > >> > ndis_newstate: INIT -> INIT
> > >> > ndis0: NDIS ERROR: c00013a7 (unknown error)
> > >> > ndis0: NDIS ERROR: c0001392 (unknown error)
> > >>
> > >> these two errors means:
> > >>
> > >> EVENT_NDIS_ADAPTER_CHECK_ERROR
> > >> EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER
> > >>
> > >> Looks like minport driver doesnt like your card.
> > >> Are you absolutly sure that you are using right miniport driver?
> > >
> > > Frankly, no.  This laptop came with a broadcom minipci card.  I
> > > replaced it with the intel one that I'm now using since intel network
> > > cards have native drivers under FreeBSD :-)  I've downloaded the latest
> > > drivers from the intel website
> > > (
> > > http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&Inst=Yes&ProductID=1637&DwnldID=17228&strOSs=45&OSFullName=Windows*%20XP%20Home%20Edition&lang=eng
> > > )
> > > and used them to generate the driver with ndisgen.  Is there a
> > > recommended windows driver to use with ndis for this intel network card?
> > >
> > >> > Setting BSSID to ff:ff:ff:ff:ff:ff
> > >> > Setting ESSID to ""
> > >> > ndis0: no matching rate for: 108
> > >> > ndis_newstate: INIT -> RUN
> > >> > ndis0: link state changed to UP
> > >> > ndis_newstate: RUN -> INIT
> > >> > Setting channel to 2412000kHz
> > >> > ndis0: couldn't change DS config to 2412000kHz: 19
> > >> > Setting BSSID to ff:ff:ff:ff:ff:ff
> > >> > Setting ESSID to "Mckella280Front"
> > >> > ndis0: link state changed to DOWN
> > >> > ndis0: no matching rate for: 108
> > >> > ndis_newstate: INIT -> RUN
> > >> > ndis0: link state changed to UP
> > >> >
> > >> > If I then stop the network on that device, disable debug, and try to
> > >> > start it up again, I get the same problem as before:
> > >> >
> > >> > ndis0: couldn't change DS config to 2412000kHz: 19
> > >> > ndis0: link state changed to DOWN
> > >> > ndis0: no matching rate for: 108
> > >> > ndis0: link state changed to UP
> > >> > ndis0: couldn't change DS config to 2412000kHz: 19
> > >> > ndis0: link state changed to DOWN
> > >> > ndis0: no matching rate for: 108
> > >> > ndis0: link state changed to UP
> > >> > ndis0: link state changed to DOWN
> > >> >
> > >> > If I then stop the network, enable debugging, and start up the network,
> > >> > the problem persists.
> > >> >
> > >>
> > >> You are starting ndis0 in same way in both cases?
> > >
> > > Yes. I booted up with the ifconfig_ndis0 line commented out
> > > in /etc/rc.conf.  I then uncommented the line, enabled debugging, and
> > > started the network with '/etc/rc.d/netif start ndis0'.  I then brought
> > > the network down, disabled debugging, and started the network with the
> > > same command.  After stopping the interface, and re-enabling
> > > networking, I started the interface with the same command the third
> > > time.
> > >
> > > Adam
> > >
> > > --
> > > This message has been scanned for viruses and
> > > dangerous content by MailScanner, and is
> > > believed to be clean.
> > >
> > >
> > 
> > Did you copied whole ndis relevant debug output?
> > scan results are missing.
> > Are you using wpa_supplicant?
> 
> Yes, I am using wpa_supplicant...  I have ifconfig_ndis0="DHCP WPA" in
> my /etc/rc.conf file and the wpa_supplicant.conf file is presumably
> configured correctly as I am connecting.
> 
> I'm pretty sure I copied every line that contained ndis, but I'll
> double check shortly.


Alright, here's the full 'dmesg' output from when I loaded the kernel module:

ndis0: <Intel(R) PRO/Wireless 2200BG Network Connection> mem 0xdfcff000-0xdfcfffff irq 17 at device 3.0 on pci3
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.0
ndis0: WARNING: using obsoleted if_watchdog interface
ndis0: Ethernet address: 00:13:ce:a8:10:ea
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
ndis_newstate: INIT -> INIT
ndis0: couldn't change Testing config.nc_dsconfig: 0 
Setting BSSID to ff:ff:ff:ff:ff:ff
Setting ESSID to ""
ndis0: no matching rate for: 108
ndis_newstate: INIT -> RUN
ndis0: link state changed to UP
ndis_newstate: RUN -> INIT
ndis0: couldn't change Testing config.nc_dsconfig: 0 
Setting channel to 2412000kHz
ndis0: couldn't change DS config to 2412000kHz: 19
Setting BSSID to ff:ff:ff:ff:ff:ff
Setting ESSID to "Mckella280Front"
ndis0: link state changed to DOWN
ndis0: no matching rate for: 108
ndis_newstate: INIT -> RUN
ndis0: link state changed to UP
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis_newstate: RUN -> SCAN
ndis0: link state changed to DOWN
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)
ndis0: NDIS ERROR: c00013a7 (unknown error)

As soon as those NDIS ERRORs start, the connection seems to die.

I think I edited if_ndis.c in the correct place and had it output what
I think you wanted to see...  Here's the diff, so please let me know if
I grabbed the wrong information, or did it at the wrong place.  If I
did it correctly, it looks like config.nc_dsconfig is 0.

--- if_ndis.c	2009-01-31 00:22:11.000000000 -0500
+++ if_ndis.c.orig	2009-02-18 14:03:30.000000000 -0500
@@ -2459,6 +2459,11 @@
 	bzero((char *)&config, len);
 	config.nc_length = len;
 	config.nc_fhconfig.ncf_length = sizeof(ndis_80211_config_fh);
+       
+	 device_printf(sc->ndis_dev, "couldn't change "
+           "Testing config.nc_dsconfig: %u \n",
+           config.nc_dsconfig);
+	
 	rval = ndis_get_info(sc, OID_802_11_CONFIGURATION, &config, &len); 
 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the freebsd-net mailing list