diff options
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r-- | sys/net80211/ieee80211.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 05eed9c0d35..10f5ffc95c1 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.54 2016/01/04 12:23:53 stsp Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.55 2016/01/04 12:25:46 stsp Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -902,6 +902,10 @@ ieee80211_next_mode(struct ifnet *ifp) * caller can select a rate set. This is problematic and the * work here assumes how things work elsewhere in this code. * + * Because the result of this function is ultimately used to select a + * rate from the rate set of the returned mode, it must not return + * IEEE80211_MODE_11N, which uses MCS instead of rates for unicast frames. + * * XXX never returns turbo modes -dcy */ enum ieee80211_phymode @@ -912,19 +916,15 @@ ieee80211_chan2mode(struct ieee80211com *ic, * NB: this assumes the channel would not be supplied to us * unless it was already compatible with the current mode. */ - if (ic->ic_curmode != IEEE80211_MODE_AUTO || - chan == IEEE80211_CHAN_ANYC) + if (ic->ic_curmode != IEEE80211_MODE_11N && + (ic->ic_curmode != IEEE80211_MODE_AUTO || + chan == IEEE80211_CHAN_ANYC)) return ic->ic_curmode; /* - * In autoselect mode; deduce a mode based on the channel + * In autoselect or 11n mode; deduce a mode based on the channel * characteristics. We assume that turbo-only channels * are not considered when the channel set is constructed. */ -#ifndef IEEE80211_NO_HT - if (IEEE80211_IS_CHAN_N(chan)) - return IEEE80211_MODE_11N; - else -#endif if (IEEE80211_IS_CHAN_T(chan)) return IEEE80211_MODE_TURBO; else if (IEEE80211_IS_CHAN_5GHZ(chan)) |