aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi-project.org>2009-03-15 16:20:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:56 -0400
commit8f655dde240293f3b82313cae91c64ffd7b64c50 (patch)
tree9e206a5b57c31dfe392ee9cd98348559c25ea784 /drivers/net/wireless/ath5k/base.c
parent6d5eaafa558783a669bb46c3dba902370e8f0ffc (diff)
ath5k: Add tx power calibration support
* Add tx power calibration support * Add a few tx power limits * Hardcode default power to 12.5dB * Disable TPC for now v2: Address Jiri's comments Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index ef9825fa4ec8..f28b86c5d346 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1209,6 +1209,9 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1209 1209
1210 pktlen = skb->len; 1210 pktlen = skb->len;
1211 1211
1212 /* FIXME: If we are in g mode and rate is a CCK rate
1213 * subtract ah->ah_txpower.txp_cck_ofdm_pwr_delta
1214 * from tx power (value is in dB units already) */
1212 if (info->control.hw_key) { 1215 if (info->control.hw_key) {
1213 keyidx = info->control.hw_key->hw_key_idx; 1216 keyidx = info->control.hw_key->hw_key_idx;
1214 pktlen += info->control.hw_key->icv_len; 1217 pktlen += info->control.hw_key->icv_len;
@@ -2037,6 +2040,9 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
2037 antenna = sc->bsent & 4 ? 2 : 1; 2040 antenna = sc->bsent & 4 ? 2 : 1;
2038 } 2041 }
2039 2042
2043 /* FIXME: If we are in g mode and rate is a CCK rate
2044 * subtract ah->ah_txpower.txp_cck_ofdm_pwr_delta
2045 * from tx power (value is in dB units already) */
2040 ds->ds_data = bf->skbaddr; 2046 ds->ds_data = bf->skbaddr;
2041 ret = ah->ah_setup_tx_desc(ah, ds, skb->len, 2047 ret = ah->ah_setup_tx_desc(ah, ds, skb->len,
2042 ieee80211_get_hdrlen_from_skb(skb), 2048 ieee80211_get_hdrlen_from_skb(skb),
@@ -2601,12 +2607,6 @@ ath5k_reset(struct ath5k_softc *sc, bool stop, bool change_channel)
2601 goto err; 2607 goto err;
2602 } 2608 }
2603 2609
2604 /*
2605 * This is needed only to setup initial state
2606 * but it's best done after a reset.
2607 */
2608 ath5k_hw_set_txpower_limit(sc->ah, 0);
2609
2610 ret = ath5k_rx_start(sc); 2610 ret = ath5k_rx_start(sc);
2611 if (ret) { 2611 if (ret) {
2612 ATH5K_ERR(sc, "can't start recv logic\n"); 2612 ATH5K_ERR(sc, "can't start recv logic\n");