From owner-p4-projects@FreeBSD.ORG Tue Jul 29 15:59:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 26FF71065670; Tue, 29 Jul 2008 15:59:14 +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 DFA4D106566B for ; Tue, 29 Jul 2008 15:59:13 +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 CD1E38FC13 for ; Tue, 29 Jul 2008 15:59:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6TFxDiW038963 for ; Tue, 29 Jul 2008 15:59:13 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6TFxDXW038961 for perforce@freebsd.org; Tue, 29 Jul 2008 15:59:13 GMT (envelope-from sam@freebsd.org) Date: Tue, 29 Jul 2008 15:59:13 GMT Message-Id: <200807291559.m6TFxDXW038961@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 146208 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: Tue, 29 Jul 2008 15:59:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=146208 Change 146208 by sam@sam_ebb on 2008/07/29 15:58:58 connect IEEE80211_IOC_TXPOWER Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#87 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#87 (text+ko) ==== @@ -1560,7 +1560,23 @@ static int ath_reset_vap(struct ieee80211vap *vap, u_long cmd) { - return ath_reset(vap->iv_ic->ic_ifp); + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ath_softc *sc = ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + + switch (cmd) { + case IEEE80211_IOC_TXPOWER: + /* + * If per-packet TPC is enabled, then we have nothing + * to do; otherwise we need to force the global limit. + * All this can happen directly; no need to reset. + */ + if (!ath_hal_gettpc(ah)) + ath_hal_settxpowlimit(ah, ic->ic_txpowlimit); + return 0; + } + return ath_reset(ifp); } static int