diff options
Diffstat (limited to 'sys/net80211/ieee80211_proto.c')
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 13 |
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++; } |