Date: Sat, 13 Dec 2003 10:39:15 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 43903 for review Message-ID: <200312131839.hBDIdFN9057356@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=43903 Change 43903 by sam@sam_ebb on 2003/12/13 10:38:26 only expect a negotiated rate set when operating in station mode; this corrects a problem where marking the interface up in monitor mode w/o first operating in another mode would cause an assertion failure note this may be suboptimal for adhoc mode; we may want to default to a base rate other than the lowest Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#48 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#48 (text+ko) ==== @@ -2774,7 +2774,21 @@ struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - if (ic->ic_opmode != IEEE80211_M_STA) { + if (ic->ic_opmode == IEEE80211_M_STA) { + /* + * Reset local xmit state; this is really only + * meaningful when operating in station mode. + */ + ni = ic->ic_bss; + if (state == IEEE80211_S_RUN) { + /* start with highest negotiated rate */ + KASSERT(ni->ni_rates.rs_nrates > 0, + ("transition to RUN state w/ no rates!")); + ath_rate_update(sc, ni, ni->ni_rates.rs_nrates - 1); + } else { + ath_rate_update(sc, ni, 0); + } + } else { /* * When operating as a station the node table holds * the AP's that were discovered during scanning. @@ -2783,19 +2797,7 @@ */ TAILQ_FOREACH(ni, &ic->ic_node, ni_list) ath_rate_update(sc, ni, 0); /* use lowest rate */ - } - /* - * Reset local xmit state; this is really only meaningful - * when operating in station or adhoc mode. - */ - ni = ic->ic_bss; - if (state == IEEE80211_S_RUN) { - /* start with highest negotiated rate */ - KASSERT(ni->ni_rates.rs_nrates > 0, - ("transition to RUN state w/ no rates!")); - ath_rate_update(sc, ni, ni->ni_rates.rs_nrates - 1); - } else { - ath_rate_update(sc, ni, 0); /* use lowest rate */ + ath_rate_update(sc, ic->ic_bss, 0); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312131839.hBDIdFN9057356>