aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2008-10-27 17:22:46 +0000
committerSam Leffler <sam@FreeBSD.org>2008-10-27 17:22:46 +0000
commit577eaa6032e1d5d1cc4b66794664c03a1d48b901 (patch)
tree1ff085ef8a6ed25491dae84edd9fb1dcf5f1eb15 /sys/dev/ath
parent3297be131d4d3dfc1246a6f6cd09c6e968616936 (diff)
Notes
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c18
-rw-r--r--sys/dev/ath/if_athvar.h6
2 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 94351fc8daf5..094320fb1379 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -6625,6 +6625,19 @@ ath_sysctl_tpcts(SYSCTL_HANDLER_ARGS)
return !ath_hal_settpcts(sc->sc_ah, tpcts) ? EINVAL : 0;
}
+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 void
ath_sysctlattach(struct ath_softc *sc)
{
@@ -6713,6 +6726,11 @@ ath_sysctlattach(struct ath_softc *sc)
"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,
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index a62db4084d77..d8d94db0cbe2 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -601,6 +601,12 @@ void ath_intr(void *);
(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