From owner-p4-projects@FreeBSD.ORG Tue Nov 30 18:10:16 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88DBF16A4D0; Tue, 30 Nov 2004 18:10:16 +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 646ED16A4CE for ; Tue, 30 Nov 2004 18:10:16 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5249843D46 for ; Tue, 30 Nov 2004 18:10:16 +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 iAUIAG79010847 for ; Tue, 30 Nov 2004 18:10:16 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAUIAGnW010844 for perforce@freebsd.org; Tue, 30 Nov 2004 18:10:16 GMT (envelope-from sam@freebsd.org) Date: Tue, 30 Nov 2004 18:10:16 GMT Message-Id: <200411301810.iAUIAGnW010844@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 66117 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, 30 Nov 2004 18:10:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=66117 Change 66117 by sam@sam_ebb on 2004/11/30 18:09:36 expose ath_setdefantenna for use by external code Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#33 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#13 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#33 (text+ko) ==== @@ -131,6 +131,7 @@ static void ath_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, struct ieee80211_node *ni, int subtype, int rssi, u_int32_t rstamp); +static void ath_setdefantenna(struct ath_softc *, u_int); static void ath_rx_proc(void *, int); static struct ath_txq *ath_txq_setup(struct ath_softc*, int qtype, int subtype); static int ath_tx_setup(struct ath_softc *, int, int); @@ -421,6 +422,13 @@ break; } + /* + * Setup rate control. Some rate control modules + * call back to change the anntena state so expose + * the necessary entry points. + * XXX maybe belongs in struct ath_ratectrl? + */ + sc->sc_setdefantenna = ath_setdefantenna; sc->sc_rc = ath_rate_attach(sc); if (sc->sc_rc == NULL) { error = EIO; @@ -2389,6 +2397,9 @@ } } +/* + * Set the default antenna. + */ static void ath_setdefantenna(struct ath_softc *sc, u_int antenna) { ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#13 (text+ko) ==== @@ -151,6 +151,7 @@ struct mtx sc_mtx; /* master lock (recursive) */ struct ath_hal *sc_ah; /* Atheros HAL */ struct ath_ratectrl *sc_rc; /* tx rate control support */ + void (*sc_setdefantenna)(struct ath_softc *, u_int); unsigned int sc_invalid : 1,/* disable hardware accesses */ sc_mrretry : 1, /* multi-rate retry support */ sc_softled : 1, /* enable LED gpio status */