From owner-p4-projects@FreeBSD.ORG Sat Oct 4 18:07:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B75B1106569B; Sat, 4 Oct 2008 18:07:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7966E1065699 for ; Sat, 4 Oct 2008 18:07:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 67F2F8FC08 for ; Sat, 4 Oct 2008 18:07:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m94I7PXC097784 for ; Sat, 4 Oct 2008 18:07:25 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m94I7Pbc097782 for perforce@freebsd.org; Sat, 4 Oct 2008 18:07:25 GMT (envelope-from sam@freebsd.org) Date: Sat, 4 Oct 2008 18:07:25 GMT Message-Id: <200810041807.m94I7Pbc097782@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 150981 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 18:07:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=150981 Change 150981 by sam@sam_ebb on 2008/10/04 18:07:12 remove an_tp; the net80211 layer calculates the same thing but does a better job--just use it Affected files ... .. //depot/projects/vap/sys/dev/ath/ath_rate/amrr/amrr.c#10 edit .. //depot/projects/vap/sys/dev/ath/ath_rate/onoe/onoe.c#13 edit .. //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#13 edit .. //depot/projects/vap/sys/dev/ath/if_ath.c#95 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#31 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/ath_rate/amrr/amrr.c#10 (text+ko) ==== @@ -277,8 +277,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) - struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; int srate; KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates")); ==== //depot/projects/vap/sys/dev/ath/ath_rate/onoe/onoe.c#13 (text+ko) ==== @@ -251,8 +251,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) - struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; int srate; KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates")); ==== //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#13 (text+ko) ==== @@ -656,7 +656,7 @@ { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; struct sample_node *sn = ATH_NODE_SAMPLE(an); const HAL_RATE_TABLE *rt = sc->sc_currates; int x, y, srate; ==== //depot/projects/vap/sys/dev/ath/if_ath.c#95 (text+ko) ==== @@ -5864,29 +5864,10 @@ struct ath_node *an = ATH_NODE(ni); struct ieee80211vap *vap = ni->ni_vap; struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; - const struct ieee80211_txparam *tp; - enum ieee80211_phymode mode; + const struct ieee80211_txparam *tp = ni->ni_txparms; - /* - * Deduce netband of station to simplify setting up xmit - * parameters. Note this allows us to assign different - * parameters to each station in a mixed bss (b/g, n/[abg]). - */ - if (ni->ni_flags & IEEE80211_NODE_HT) { - if (IEEE80211_IS_CHAN_5GHZ(ni->ni_chan)) - mode = IEEE80211_MODE_11NA; - else - mode = IEEE80211_MODE_11NG; - } else if (IEEE80211_IS_CHAN_A(ni->ni_chan)) - mode = IEEE80211_MODE_11A; - else if (ni->ni_flags & IEEE80211_NODE_ERP) - mode = IEEE80211_MODE_11G; - else - mode = IEEE80211_MODE_11B; - tp = &vap->iv_txparms[mode]; - an->an_tp = tp; - an->an_mcastrix = ath_tx_findrix(sc->sc_rates[mode], tp->mcastrate); - an->an_mgmtrix = ath_tx_findrix(sc->sc_rates[mode], tp->mgmtrate); + an->an_mcastrix = ath_tx_findrix(sc->sc_currates, tp->mcastrate); + an->an_mgmtrix = ath_tx_findrix(sc->sc_currates, tp->mgmtrate); ath_rate_newassoc(sc, an, isnew); if (isnew && ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#31 (text+ko) ==== @@ -82,7 +82,6 @@ /* driver-specific node state */ struct ath_node { struct ieee80211_node an_node; /* base class */ - const struct ieee80211_txparam *an_tp; u_int8_t an_mgmtrix; /* min h/w rate index */ u_int8_t an_mcastrix; /* mcast h/w rate index */ struct ath_buf *an_ff_buf[WME_NUM_AC]; /* ff staging area */