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>
This commit is contained in:

committed by
John W. Linville

parent
6d5eaafa55
commit
8f655dde24
@@ -1209,6 +1209,9 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
|
||||
|
||||
pktlen = skb->len;
|
||||
|
||||
/* FIXME: If we are in g mode and rate is a CCK rate
|
||||
* subtract ah->ah_txpower.txp_cck_ofdm_pwr_delta
|
||||
* from tx power (value is in dB units already) */
|
||||
if (info->control.hw_key) {
|
||||
keyidx = info->control.hw_key->hw_key_idx;
|
||||
pktlen += info->control.hw_key->icv_len;
|
||||
@@ -2037,6 +2040,9 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
|
||||
antenna = sc->bsent & 4 ? 2 : 1;
|
||||
}
|
||||
|
||||
/* FIXME: If we are in g mode and rate is a CCK rate
|
||||
* subtract ah->ah_txpower.txp_cck_ofdm_pwr_delta
|
||||
* from tx power (value is in dB units already) */
|
||||
ds->ds_data = bf->skbaddr;
|
||||
ret = ah->ah_setup_tx_desc(ah, ds, skb->len,
|
||||
ieee80211_get_hdrlen_from_skb(skb),
|
||||
@@ -2601,12 +2607,6 @@ ath5k_reset(struct ath5k_softc *sc, bool stop, bool change_channel)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is needed only to setup initial state
|
||||
* but it's best done after a reset.
|
||||
*/
|
||||
ath5k_hw_set_txpower_limit(sc->ah, 0);
|
||||
|
||||
ret = ath5k_rx_start(sc);
|
||||
if (ret) {
|
||||
ATH5K_ERR(sc, "can't start recv logic\n");
|
||||
|
Reference in New Issue
Block a user