svn commit: r227045 - in user/adrian/if_ath_tx/sys/dev/ath: .
ath_hal ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Thu Nov 3 02:38:32 UTC 2011
Author: adrian
Date: Thu Nov 3 02:38:32 2011
New Revision: 227045
URL: http://svn.freebsd.org/changeset/base/227045
Log:
Add in a (temporary!) hack to allow the CCA to be forced.
I'm seeing some very bizarre merlin behaviour where it thinks the
air is > 95% busy, and thus never thinks the air is ready for TX.
Comparing the RX clear / RX frame counters to Sowl (AR9160) show that
they're decoding the same number of frames, but Merlin seems to
calibrate the NF much, much lower than Sowl - and then thinks it
can't TX for most of it.
When I force the CCA to be the same as what Sowl sees (ie, ~ -85dB)
then suddenly it thinks it can TX.
I'll chase up _why_ this happens with the Atheros baseband/radio
team.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ah.h
user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ah.h Wed Nov 2 23:40:21 2011 (r227044)
+++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ah.h Thu Nov 3 02:38:32 2011 (r227045)
@@ -780,6 +780,7 @@ typedef struct
int ah_dma_beacon_response_time;/* in TU's */
int ah_sw_beacon_response_time; /* in TU's */
int ah_additional_swba_backoff; /* in TU's */
+ int ah_cca;
} HAL_OPS_CONFIG;
/*
Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Wed Nov 2 23:40:21 2011 (r227044)
+++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu Nov 3 02:38:32 2011 (r227045)
@@ -627,6 +627,10 @@ ar5416LoadNF(struct ath_hal *ah, const s
else
nf_val = default_nf;
+ /* Override */
+ if (ah->ah_config.ah_cca != 0)
+ nf_val = ah->ah_config.ah_cca;
+
val = OS_REG_READ(ah, ar5416_cca_regs[i]);
val &= 0xFFFFFE00;
val |= (((uint32_t) nf_val << 1) & 0x1ff);
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Wed Nov 2 23:40:21 2011 (r227044)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Thu Nov 3 02:38:32 2011 (r227045)
@@ -893,4 +893,9 @@ ath_sysctl_hal_attach(struct ath_softc *
SYSCTL_ADD_INT(ctx, child, OID_AUTO, "swba_backoff", CTLFLAG_RW,
&sc->sc_ah->ah_config.ah_additional_swba_backoff, 0,
"Atheros HAL additional SWBA backoff time");
+
+ sc->sc_ah->ah_config.ah_cca = 0;
+ SYSCTL_ADD_INT(ctx, child, OID_AUTO, "cca", CTLFLAG_RW,
+ &sc->sc_ah->ah_config.ah_cca, 0, "CCA override");
+
}
More information about the svn-src-user
mailing list