PERFORCE change 141148 for review
Sam Leffler
sam at FreeBSD.org
Sun May 4 17:24:23 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=141148
Change 141148 by sam at 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
More information about the p4-projects
mailing list