add a sysctl to ena/dis frobbing cca

This commit is contained in:
Sam Leffler 2009-03-05 00:15:43 +00:00
parent 59f72548f6
commit 9c859a041a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189380
2 changed files with 22 additions and 1 deletions

View File

@ -6861,6 +6861,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)
{
@ -6974,6 +6990,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
}
@ -7423,7 +7442,8 @@ ath_tdma_config(struct ath_softc *sc, struct ieee80211vap *vap)
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);

View File

@ -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 */