From owner-p4-projects@FreeBSD.ORG Sat Oct 18 23:06:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 39C6C106568E; Sat, 18 Oct 2008 23:06:49 +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 D91CB106568A for ; Sat, 18 Oct 2008 23:06:48 +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 C6E088FC18 for ; Sat, 18 Oct 2008 23:06:48 +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 m9IN6mJF075862 for ; Sat, 18 Oct 2008 23:06:48 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9IN6mkD075860 for perforce@freebsd.org; Sat, 18 Oct 2008 23:06:48 GMT (envelope-from sam@freebsd.org) Date: Sat, 18 Oct 2008 23:06:48 GMT Message-Id: <200810182306.m9IN6mkD075860@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 151522 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, 18 Oct 2008 23:06:49 -0000 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.