diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 6eaf26b07636..48982fb44995 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1250,6 +1250,22 @@ int iwl5000_send_tx_power(struct iwl_priv *priv) | |||
1250 | 1250 | ||
1251 | /* half dBm need to multiply */ | 1251 | /* half dBm need to multiply */ |
1252 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); | 1252 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); |
1253 | |||
1254 | if (priv->tx_power_lmt_in_half_dbm && | ||
1255 | priv->tx_power_lmt_in_half_dbm < tx_power_cmd.global_lmt) { | ||
1256 | /* | ||
1257 | * For the newer devices which using enhanced/extend tx power | ||
1258 | * table in EEPROM, the format is in half dBm. driver need to | ||
1259 | * convert to dBm format before report to mac80211. | ||
1260 | * By doing so, there is a possibility of 1/2 dBm resolution | ||
1261 | * lost. driver will perform "round-up" operation before | ||
1262 | * reporting, but it will cause 1/2 dBm tx power over the | ||
1263 | * regulatory limit. Perform the checking here, if the | ||
1264 | * "tx_power_user_lmt" is higher than EEPROM value (in | ||
1265 | * half-dBm format), lower the tx power based on EEPROM | ||
1266 | */ | ||
1267 | tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm; | ||
1268 | } | ||
1253 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; | 1269 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; |
1254 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; | 1270 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; |
1255 | 1271 | ||