PERFORCE change 38544 for review
Sam Leffler
sam at FreeBSD.org
Wed Sep 24 14:54:32 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38544
Change 38544 by sam at 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++;
}
More information about the p4-projects
mailing list