From owner-p4-projects@FreeBSD.ORG Tue May 17 23:28:34 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B0F616A4D1; Tue, 17 May 2005 23:28:34 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30E7716A4CE for ; Tue, 17 May 2005 23:28:34 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F357443D46 for ; Tue, 17 May 2005 23:28:33 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4HNSUcs060534 for ; Tue, 17 May 2005 23:28:31 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4HNSUhC060531 for perforce@freebsd.org; Tue, 17 May 2005 23:28:30 GMT (envelope-from sam@freebsd.org) Date: Tue, 17 May 2005 23:28:30 GMT Message-Id: <200505172328.j4HNSUhC060531@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 Subject: PERFORCE change 77110 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 23:28:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=77110 Change 77110 by sam@sam_ebb on 2005/05/17 23:27:50 dynamic turbo ap mode fixups: o the bss channel will be the base mode version; check for a corresponding dturbo channel before enabling o check ic_flags before enabling dynamic turbo--we coordinate the usage of all vap's through ic_flags in the 802.11 layer; this permits us to turn dturbo use on+off with ifconfig o correct the tmin/tmax calculation; was scaling twice for the beacon stagger, remove the one in ath_beacon_dturbo_config Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#13 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#13 (text+ko) ==== @@ -2344,12 +2344,14 @@ static void ath_beacon_dturbo_config(struct ath_softc *sc, u_int32_t intval) { -#define IS_CAPABLE(ic) \ - (ic->ic_caps & IEEE80211_C_TURBOP) +#define IS_CHAN_DTURBO(ic, c) \ + (ieee80211_find_channel(ic, (c)->ic_freq, \ + (c)->ic_flags | IEEE80211_CHAN_TURBO) != NULL) struct ieee80211com *ic = &sc->sc_ic; if (ic->ic_opmode == IEEE80211_M_HOSTAP && - IS_CAPABLE(ic) && IEEE80211_IS_CHAN_DTURBO(ic->ic_bsschan)) { + (ic->ic_flags & IEEE80211_F_TURBOP) && + IS_CHAN_DTURBO(ic, ic->ic_bsschan)) { /* Dynamic Turbo is supported on this channel. */ sc->sc_dturbo = 1; sc->sc_dt_tcount = 0; @@ -2367,19 +2369,16 @@ * * sc_dt_base_tmin : ~70 seconds * sc_dt_turbo_tmax : ~120 seconds - * - * NB: scale calculated values to account for staggered - * beacon handling */ - sc->sc_dt_base_tmin = 70 * 1024 * ATH_BCBUF / intval; - sc->sc_dt_turbo_tmax = 120 * 1024 * ATH_BCBUF / intval; + sc->sc_dt_base_tmin = 70 * 1024 / intval; + sc->sc_dt_turbo_tmax = 120 * 1024 / intval; sc->sc_dt_base_bw = 0; /* XXX: TBD */ sc->sc_dt_turbo_bw = 0; /* XXX: TBD */ } else { sc->sc_dturbo = 0; ic->ic_flags &= ~IEEE80211_F_BOOST; } -#undef IS_CAPABLE +#undef IS_CHAN_DTURBO } /*