ath5k: use noise calibration from madwifi hal
authorBob Copeland <me@bobcopeland.com>
Wed, 14 Oct 2009 18:16:30 +0000 (14:16 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Oct 2009 20:48:18 +0000 (16:48 -0400)
commite5e2647fd6ceef2cdc479954b84517535eb7febd
treef0b22db14bae1881ea5cb4a9c6825192ac4a6afc
parente307fcf0a10f9c0c21b3d8b2ff7862b29796cc7f
ath5k: use noise calibration from madwifi hal

This updates ath5k to calibrate the noise floor similar to the
way it is done in the madwifi hal and ath9k.  Of note:

- we start NF measurement at the same time as AGC calibration,
  but do not actually read the value until the periodic (long)
  calibration
- we keep a history of the last few values read and write the
  median back to the hardware for CCA
- we do not complain if NF calibration isn't complete, instead
  we keep the last read value.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/ath5k.h
drivers/net/wireless/ath/ath5k/attach.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/reg.h
drivers/net/wireless/ath/ath5k/reset.c