diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-05-21 11:55:54 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-06 13:24:19 +0200 |
commit | 26a7ca9a71a3f7e1826de96b1a1e907123e11b07 (patch) | |
tree | 7ab52c58fdd876bacf112c1bfceeac865f196704 /drivers/net/wireless/iwlwifi/dvm/rxon.c | |
parent | 08838cdeca65e754af5c755a05f6cdb1c632eda8 (diff) |
iwlwifi: refactor EEPROM reading/parsing
The EEPROM reading/parsing code is all mixed in
the driver today, and the EEPROM is parsed only
when we access data from it. This is problematic
because the NVM needs to be parsed and that is
independent of reading it. Also, the NVM format
for new devices will be different and probably
require a new parser.
Therefore refactor the reading and parsing and
create two independent components. Reading the
EEPROM requires direct hardware accesses and
therefore access to the transport, but parsing
is independent and can be done on an NVM blob.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rxon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c index 4f55689ac6a7..6ee940f497f9 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rxon.c +++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c @@ -420,10 +420,10 @@ static int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) return -EINVAL; } - if (tx_power > priv->tx_power_device_lmt) { + if (tx_power > DIV_ROUND_UP(priv->eeprom_data->max_tx_pwr_half_dbm, 2)) { IWL_WARN(priv, "Requested user TXPOWER %d above upper limit %d.\n", - tx_power, priv->tx_power_device_lmt); + tx_power, priv->eeprom_data->max_tx_pwr_half_dbm); return -EINVAL; } |