Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2003 14:54:30 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38544 for review
Message-ID:  <200309242154.h8OLsUsw018688@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38544

Change 38544 by sam@sam_ebb on 2003/09/24 14:53:56

	Correct rate set negotiation when operating as a station: if the
	AP has basic rates that we do not support then ignore them instead
	of marking the rate set in error.
	
	This fixes an 11b station associating with an 11g/b AP.

Affected files ...

.. //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 edit

Differences ...

==== //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 (text+ko) ====

@@ -220,7 +220,7 @@
 	okrate = badrate = 0;
 	srs = &ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)];
 	nrs = &ni->ni_rates;
-	for (i = 0; i < ni->ni_rates.rs_nrates; ) {
+	for (i = 0; i < nrs->rs_nrates; ) {
 		ignore = 0;
 		if (flags & IEEE80211_F_DOSORT) {
 			/*
@@ -259,7 +259,16 @@
 					break;
 			}
 			if (j == srs->rs_nrates) {
-				if (nrs->rs_rates[i] & IEEE80211_RATE_BASIC)
+				/*
+				 * A rate in the node's rate set is not
+				 * supported.  If this is a basic rate and we
+				 * are operating as an AP then this is an error.
+				 * Otherwise we just discard/ignore the rate.
+				 * Note that this is important for 11b stations
+				 * when they want to associate with an 11g AP.
+				 */
+				if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
+				    (nrs->rs_rates[i] & IEEE80211_RATE_BASIC))
 					error++;
 				ignore++;
 			}



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