ath5k: Allow user/driver to set txpower
* Now that we have regulatory control enable the driver to set txpower on hw * Also use txpower table offset so that we can match power range set by user/driver with indices on power table. Tested 2 different cards (a CM9 and an RF5112-based ubnt) and got the same output using a remote machine to measure per-packet rssi (conected the cards using attenuators). I also switched between various tx power levels and i saw an equal power change on the remote machine (so txpower changes as expected) and verified that we have the same output on each rate. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
此提交包含在:
@@ -1100,11 +1100,12 @@ struct ath5k_hw {
|
||||
/* Values in 0.25dB units */
|
||||
s16 txp_min_pwr;
|
||||
s16 txp_max_pwr;
|
||||
/* Values in 0.5dB units */
|
||||
s16 txp_offset;
|
||||
s16 txp_ofdm;
|
||||
/* Values in dB units */
|
||||
s16 txp_cck_ofdm_pwr_delta;
|
||||
s16 txp_cck_ofdm_gainf_delta;
|
||||
/* Value in dB units */
|
||||
s16 txp_cck_ofdm_pwr_delta;
|
||||
} ah_txpower;
|
||||
|
||||
struct {
|
||||
@@ -1271,7 +1272,7 @@ extern unsigned int ath5k_hw_get_def_antenna(struct ath5k_hw *ah);
|
||||
extern int ath5k_hw_phy_disable(struct ath5k_hw *ah);
|
||||
/* TX power setup */
|
||||
extern int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 ee_mode, u8 txpower);
|
||||
extern int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 ee_mode, u8 txpower);
|
||||
extern int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower);
|
||||
|
||||
/*
|
||||
* Functions used internaly
|
||||
|
新增問題並參考
封鎖使用者