summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_proto.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-26 16:54:55 +0000
committersam <sam@FreeBSD.org>2003-09-26 16:54:55 +0000
commitd39b84f6ea494a7cbeef6071986a4793b0103e77 (patch)
tree31b83807d82afba6cb32b8a5645f951d55e9f19f /sys/net80211/ieee80211_proto.c
parent22bdcdfcee58aa1bd57b6499c6bae32f2a2e2f86 (diff)
downloadFreeBSD-src-d39b84f6ea494a7cbeef6071986a4793b0103e77.zip
FreeBSD-src-d39b84f6ea494a7cbeef6071986a4793b0103e77.tar.gz
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.
Diffstat (limited to 'sys/net80211/ieee80211_proto.c')
-rw-r--r--sys/net80211/ieee80211_proto.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 5520597..047d29c 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -220,7 +220,7 @@ ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags
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 @@ ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags
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++;
}
OpenPOWER on IntegriCloud