svn commit: r189410 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Thu Mar 5 08:49:14 PST 2009
Author: sam
Date: Thu Mar 5 16:49:13 2009
New Revision: 189410
URL: http://svn.freebsd.org/changeset/base/189410
Log:
merge r189380: add a sysctl to ena/dis frobbing cca
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/ath/if_ath.c
projects/vap7/sys/dev/ath/if_athvar.h
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
Modified: projects/vap7/sys/dev/ath/if_ath.c
==============================================================================
--- projects/vap7/sys/dev/ath/if_ath.c Thu Mar 5 16:48:23 2009 (r189409)
+++ projects/vap7/sys/dev/ath/if_ath.c Thu Mar 5 16:49:13 2009 (r189410)
@@ -6857,6 +6857,22 @@ ath_sysctl_intmit(SYSCTL_HANDLER_ARGS)
return !ath_hal_setintmit(sc->sc_ah, intmit) ? EINVAL : 0;
}
+#ifdef ATH_SUPPORT_TDMA
+static int
+ath_sysctl_setcca(SYSCTL_HANDLER_ARGS)
+{
+ struct ath_softc *sc = arg1;
+ int setcca, error;
+
+ setcca = sc->sc_setcca;
+ error = sysctl_handle_int(oidp, &setcca, 0, req);
+ if (error || !req->newptr)
+ return error;
+ sc->sc_setcca = (setcca != 0);
+ return 0;
+}
+#endif /* ATH_SUPPORT_TDMA */
+
static void
ath_sysctlattach(struct ath_softc *sc)
{
@@ -6970,6 +6986,9 @@ ath_sysctlattach(struct ath_softc *sc)
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0,
"TDMA calculated super frame");
+ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "setcca", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
+ ath_sysctl_setcca, "I", "enable CCA control");
}
#endif
}
@@ -7442,7 +7461,8 @@ ath_tdma_config(struct ath_softc *sc, st
ath_hal_intrset(ah, 0);
ath_beaconq_config(sc); /* setup h/w beacon q */
- ath_hal_setcca(ah, AH_FALSE); /* disable CCA */
+ if (sc->sc_setcca)
+ ath_hal_setcca(ah, AH_FALSE); /* disable CCA */
ath_tdma_bintvalsetup(sc, tdma); /* calculate beacon interval */
ath_tdma_settimers(sc, sc->sc_tdmabintval,
sc->sc_tdmabintval | HAL_BEACON_RESET_TSF);
Modified: projects/vap7/sys/dev/ath/if_athvar.h
==============================================================================
--- projects/vap7/sys/dev/ath/if_athvar.h Thu Mar 5 16:48:23 2009 (r189409)
+++ projects/vap7/sys/dev/ath/if_athvar.h Thu Mar 5 16:49:13 2009 (r189410)
@@ -255,6 +255,7 @@ struct ath_softc {
sc_wmetkipmic:1,/* can do WME+TKIP MIC */
sc_resume_up: 1,/* on resume, start all vaps */
sc_tdma : 1,/* TDMA in use */
+ sc_setcca : 1,/* set/clr CCA with TDMA */
sc_resetcal : 1;/* reset cal state next trip */
uint32_t sc_eerd; /* regdomain from EEPROM */
uint32_t sc_eecc; /* country code from EEPROM */
More information about the svn-src-projects
mailing list