From owner-p4-projects@FreeBSD.ORG Sun May 4 17:24:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2579F1065671; Sun, 4 May 2008 17:24:23 +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 DC3DF106564A for ; Sun, 4 May 2008 17:24:22 +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 E33058FC1B for ; Sun, 4 May 2008 17:24:22 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m44HOMAp062102 for ; Sun, 4 May 2008 17:24:22 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m44HOM7x062100 for perforce@freebsd.org; Sun, 4 May 2008 17:24:22 GMT (envelope-from sam@freebsd.org) Date: Sun, 4 May 2008 17:24:22 GMT Message-Id: <200805041724.m44HOM7x062100@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 141148 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: Sun, 04 May 2008 17:24:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=141148 Change 141148 by sam@sam_ebb on 2008/05/04 17:23:58 save intmit sysctl knob; not useful w/ hal in cvs Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#70 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#23 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#70 (text+ko) ==== @@ -6582,6 +6582,19 @@ } static int +ath_sysctl_intmit(SYSCTL_HANDLER_ARGS) +{ + struct ath_softc *sc = arg1; + int intmit, error; + + intmit = ath_hal_getintmit(sc->sc_ah); + error = sysctl_handle_int(oidp, &intmit, 0, req); + if (error || !req->newptr) + return error; + return !ath_hal_setintmit(sc->sc_ah, intmit) ? EINVAL : 0; +} + +static int ath_sysctl_wmetkipmic(SYSCTL_HANDLER_ARGS) { struct ath_softc *sc = arg1; @@ -6694,6 +6707,11 @@ "rfkill", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_rfkill, "I", "enable/disable RF kill switch"); } + if (ath_hal_hasintmit(ah)) { + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intmit", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + ath_sysctl_intmit, "I", "interference mitigation"); + } sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#23 (text+ko) ==== @@ -596,6 +596,12 @@ (ath_hal_getcapability(_ah, HAL_CAP_TPC_CTS, 0, _ptpcts) == HAL_OK) #define ath_hal_settpcts(_ah, _tpcts) \ ath_hal_setcapability(_ah, HAL_CAP_TPC_CTS, 0, _tpcts, NULL) +#define ath_hal_hasintmit(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 0, NULL) == HAL_OK) +#define ath_hal_getintmit(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 1, NULL) == HAL_OK) +#define ath_hal_setintmit(_ah, _v) \ + ath_hal_setcapability(_ah, HAL_CAP_INTMIT, 1, _v, NULL) #define ath_hal_getchannoise(_ah, _c) \ ((*(_ah)->ah_getChanNoise)((_ah), (_c))) #if HAL_ABI_VERSION < 0x05122200