Date: Sat, 11 Oct 2003 22:14:53 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 39547 for review Message-ID: <200310120514.h9C5Ermr079134@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=39547 Change 39547 by sam@sam_ebb on 2003/10/11 22:14:23 change ath_rate_ctl_reset to handle transition from station mode to adhoc mode; was not resetting the initial xmit rate causing outbound frames to be dicarded Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#15 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#15 (text+ko) ==== @@ -2565,20 +2565,13 @@ struct ieee80211_node *ni; struct ath_node *an; - an = (struct ath_node *) ic->ic_bss; - an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0; - if (ic->ic_opmode == IEEE80211_M_STA) { - 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!")); - ni->ni_txrate = ni->ni_rates.rs_nrates - 1; - } else { - /* use lowest rate */ - ni->ni_txrate = 0; - } - } else { + if (ic->ic_opmode != IEEE80211_M_STA) { + /* + * When operating as a station the node table holds + * the AP's that were discovered during scanning. + * For any other operating mode we want to reset the + * tx rate state of each node. + */ TAILQ_FOREACH(ni, &ic->ic_node, ni_list) { ni->ni_txrate = 0; /* use lowest rate */ an = (struct ath_node *) ni; @@ -2586,6 +2579,22 @@ an->an_tx_upper = 0; } } + /* + * Reset local xmit state; this is really only meaningful + * when operating in station or adhoc mode. + */ + ni = ic->ic_bss; + an = (struct ath_node *) ni; + an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0; + if (state == IEEE80211_S_RUN) { + /* start with highest negotiated rate */ + KASSERT(ni->ni_rates.rs_nrates > 0, + ("transition to RUN state w/ no rates!")); + ni->ni_txrate = ni->ni_rates.rs_nrates - 1; + } else { + /* use lowest rate */ + ni->ni_txrate = 0; + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310120514.h9C5Ermr079134>