Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Oct 2008 23:06:48 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151522 for review
Message-ID:  <200810182306.m9IN6mkD075860@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151522

Change 151522 by sam@sam_ebb on 2008/10/18 23:06:02

	o remove explicit call to ath_newassoc now that net80211 calls
	  the driver on joining a bss; note this also fixes adhoc mode
	  in that we assign a clr key to the master
	o remove ath_rate_newstate as it is no longer needed with the
	  callbacks to ath_newassoc

Affected files ...

.. //depot/projects/vap/sys/dev/ath/ath_rate/amrr/amrr.c#11 edit
.. //depot/projects/vap/sys/dev/ath/ath_rate/onoe/onoe.c#14 edit
.. //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#14 edit
.. //depot/projects/vap/sys/dev/ath/if_ath.c#96 edit
.. //depot/projects/vap/sys/dev/ath/if_athrate.h#10 edit

Differences ...

==== //depot/projects/vap/sys/dev/ath/ath_rate/amrr/amrr.c#11 (text+ko) ====

@@ -320,49 +320,6 @@
 #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.
  */

==== //depot/projects/vap/sys/dev/ath/ath_rate/onoe/onoe.c#14 (text+ko) ====

@@ -294,49 +294,6 @@
 #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.
  */

==== //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#14 (text+ko) ====

@@ -761,34 +761,6 @@
 }
 
 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);

==== //depot/projects/vap/sys/dev/ath/if_ath.c#96 (text+ko) ====

@@ -5699,11 +5699,6 @@
 			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.

==== //depot/projects/vap/sys/dev/ath/if_athrate.h#10 (text+ko) ====

@@ -97,12 +97,6 @@
  */
 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?200810182306.m9IN6mkD075860>