From owner-svn-src-head@FreeBSD.ORG Mon Oct 27 16:58:07 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06C2A106567B; Mon, 27 Oct 2008 16:58:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E83218FC1C; Mon, 27 Oct 2008 16:58:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RGw6G4045919; Mon, 27 Oct 2008 16:58:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RGw6iL045914; Mon, 27 Oct 2008 16:58:06 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271658.m9RGw6iL045914@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 16:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184346 - in head/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:58:07 -0000 Author: sam Date: Mon Oct 27 16:58:06 2008 New Revision: 184346 URL: http://svn.freebsd.org/changeset/base/184346 Log: now that the new association callback is used when joining a bss we can eliminate the ath_rate_newassoc callback and associated code Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athrate.h Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 16:58:06 2008 (r184346) @@ -321,49 +321,6 @@ ath_rate_ctl_start(struct ath_softc *sc, #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } 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. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 16:58:06 2008 (r184346) @@ -295,49 +295,6 @@ ath_rate_ctl_start(struct ath_softc *sc, #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } 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. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 16:58:06 2008 (r184346) @@ -759,34 +759,6 @@ ath_rate_ctl_reset(struct ath_softc *sc, } static void -rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_newassoc(sc, ATH_NODE(ni), 1); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - - if (state == IEEE80211_S_RUN) { - if (vap->iv_opmode != IEEE80211_M_STA) { - /* - * Sync rates for associated stations and neighbors. - */ - ieee80211_iterate_nodes(&ic->ic_sta, rate_cb, sc); - } - ath_rate_newassoc(sc, ATH_NODE(vap->iv_bss), 1); - } -} - -static void ath_rate_sysctlattach(struct ath_softc *sc, struct sample_softc *osc) { struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 16:58:06 2008 (r184346) @@ -5664,11 +5664,6 @@ ath_newstate(struct ieee80211vap *vap, e if (ath_hal_keyisvalid(ah, i)) ath_hal_keysetmac(ah, i, ni->ni_bssid); } - /* - * Notify the rate control algorithm so rates - * are setup should ath_beacon_alloc be called. - */ - ath_rate_newstate(vap, nstate); /* * Invoke the parent method to do net80211 work. Modified: head/sys/dev/ath/if_athrate.h ============================================================================== --- head/sys/dev/ath/if_athrate.h Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/if_athrate.h Mon Oct 27 16:58:06 2008 (r184346) @@ -97,12 +97,6 @@ void ath_rate_node_cleanup(struct ath_so */ void ath_rate_newassoc(struct ath_softc *, struct ath_node *, int isNewAssociation); -/* - * Update/reset rate control state for 802.11 state transitions. - * Important mostly as the analog to ath_rate_newassoc when operating - * in station mode. - */ -void ath_rate_newstate(struct ieee80211vap *, enum ieee80211_state); /* * Transmit handling.