Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 16:58:06 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184346 - in head/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample
Message-ID:  <200810271658.m9RGw6iL045914@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810271658.m9RGw6iL045914>