]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Extend the ANI code to implement basic channel survey support.
authoradrian <adrian@FreeBSD.org>
Sat, 28 Apr 2012 08:29:46 +0000 (08:29 +0000)
committeradrian <adrian@FreeBSD.org>
Sat, 28 Apr 2012 08:29:46 +0000 (08:29 +0000)
commit0d581e7a85f7b5fa60d74541897104ed606a47f8
tree13d0f4e76cd37c97ad639fa72db3ba6849a2e968
parentebcc237b86877ec440d76662899fecf13359e94f
Extend the ANI code to implement basic channel survey support.

* Always call ar5416GetListenTime()
* Modify ar5416GetListenTime() to:
  + don't update the ANI state if there isn't any ANI state;
  + don't update the channel survey state if there's no active
    channel - just to be paranoid
  + copy the channel survey results into the current sample slot
    based on the current channel; then increment the sample counter
    and sample history counter.
* Modify ar5416GetMIBCyclesPct() to simply return a HAL_SURVEY_SAMPLE,
  rather than a set of percentages.  The ANI code wasn't using the
  percentages anyway.

TODO:

* Create a new function which fetches the survey results periodically
* .. then modify the ANI code to use the pre-fetched values rather than
  fetching them again
* Roll the 11n ext busy function from ar5416_misc.c to update all the
  counters, then do the result calculation
* .. then, modify the MIB counter routine to correctly fetch a snapshot -
  freeze the counters, fetch the values, then reset the counters.
sys/dev/ath/ath_hal/ar5416/ar5416.h
sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
sys/dev/ath/ath_hal/ar5416/ar5416_misc.c