aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/reset.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi-project.org>2009-02-08 23:03:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:44:43 -0500
commit6f3b414aca060a847e243f676b8601731938eb48 (patch)
tree51345c9930dbb9281d2f3dd0ebf0268870caa357 /drivers/net/wireless/ath5k/reset.c
parent33a31826b4fe9f26d6b383bad19b7ae522fda006 (diff)
ath5k: Update gain_F calibration code and add documentation
* Update and cleanup rf gain optimization code * Add comments and refferences to docs and use sane function names * Use only step index on ath5k_gain, no need to have a pointer to the current step since we can determine te step from it's index, this also allows us to put all other structs on rfgain.h and cleanup ath5k.h a little * No need for ah_rfgain variable, we use ah_gain.g_state for everything * Tested on RF2112B chip but gain_F calibration is not yet done (we will finish this on the next patch where we'll rewrite rf-buffer handling) * Use initial rf gain settings for 2316 and 2317 SoCs introduced on a previous patch It seems big but it's mostly cleanup, very few functional changes have been made on phy.c Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/reset.c')
-rw-r--r--drivers/net/wireless/ath5k/reset.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c
index dc2d7d8bdb7a..f7ce80e67dd4 100644
--- a/drivers/net/wireless/ath5k/reset.c
+++ b/drivers/net/wireless/ath5k/reset.c
@@ -441,9 +441,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
441 s_led[1] = ath5k_hw_reg_read(ah, AR5K_GPIOCR); 441 s_led[1] = ath5k_hw_reg_read(ah, AR5K_GPIOCR);
442 s_led[2] = ath5k_hw_reg_read(ah, AR5K_GPIODO); 442 s_led[2] = ath5k_hw_reg_read(ah, AR5K_GPIODO);
443 443
444 if (change_channel && ah->ah_rf_banks != NULL)
445 ath5k_hw_get_rf_gain(ah);
446
447 444
448 /*Wakeup the device*/ 445 /*Wakeup the device*/
449 ret = ath5k_hw_nic_wakeup(ah, channel->hw_value, false); 446 ret = ath5k_hw_nic_wakeup(ah, channel->hw_value, false);
@@ -530,7 +527,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
530 * Write initial RF gain settings 527 * Write initial RF gain settings
531 * This should work for both 5111/5112 528 * This should work for both 5111/5112
532 */ 529 */
533 ret = ath5k_hw_rfgain(ah, freq); 530 ret = ath5k_hw_rfgain_init(ah, freq);
534 if (ret) 531 if (ret)
535 return ret; 532 return ret;
536 533