summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-ucode.c
diff options
context:
space:
mode:
authorDon Fry <donald.h.fry@intel.com>2012-02-06 17:06:07 -0800
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-17 10:56:33 -0800
commit4a986777a53d5fe8fd92ef30e0e8eedd0ff800b1 (patch)
tree72328763ebe76c24589f7916647b2c291702b83d /drivers/net/wireless/iwlwifi/iwl-ucode.c
parent06e03f8ce91b71c6ce4134c8bf9ed801aed0382c (diff)
downloadop-kernel-dev-4a986777a53d5fe8fd92ef30e0e8eedd0ff800b1.zip
op-kernel-dev-4a986777a53d5fe8fd92ef30e0e8eedd0ff800b1.tar.gz
iwlwifi: save ucode capabilities in iwl_fw
The capabilities parsed from the ucode file are never saved. Save them in the iwl_fw structure. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-ucode.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c
index 01768f7..9e21fc1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c
@@ -805,7 +805,7 @@ static int iwl_parse_v1_v2_firmware(struct iwl_nic *nic,
static int iwl_parse_tlv_firmware(struct iwl_nic *nic,
const struct firmware *ucode_raw,
struct iwlagn_firmware_pieces *pieces,
- struct iwlagn_ucode_capabilities *capa)
+ struct iwl_ucode_capabilities *capa)
{
struct iwl_tlv_ucode_header *ucode = (void *)ucode_raw->data;
struct iwl_ucode_tlv *tlv;
@@ -1012,6 +1012,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
{
struct iwl_nic *nic = context;
struct iwl_cfg *cfg = cfg(nic);
+ struct iwl_fw *fw = &nic->fw;
struct iwl_priv *priv = priv(nic); /* temporary */
struct iwl_ucode_header *ucode;
int err;
@@ -1022,11 +1023,10 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
u32 api_ver;
char buildstr[25];
u32 build;
- struct iwlagn_ucode_capabilities ucode_capa = {
- .max_probe_length = 200,
- .standard_phy_calibration_size =
- IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE,
- };
+
+ fw->ucode_capa.max_probe_length = 200;
+ fw->ucode_capa.standard_phy_calibration_size =
+ IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;
if (!api_ok)
api_ok = api_max;
@@ -1057,7 +1057,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
err = iwl_parse_v1_v2_firmware(nic, ucode_raw, &pieces);
else
err = iwl_parse_tlv_firmware(nic, ucode_raw, &pieces,
- &ucode_capa);
+ &fw->ucode_capa);
if (err)
goto try_again;
@@ -1219,23 +1219,23 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
cfg->base_params->max_event_log_size;
nic->inst_errlog_ptr = pieces.inst_errlog_ptr;
#ifndef CONFIG_IWLWIFI_P2P
- ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
+ fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
#endif
priv->new_scan_threshold_behaviour =
- !!(ucode_capa.flags & IWL_UCODE_TLV_FLAGS_NEWSCAN);
+ !!(fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_NEWSCAN);
if (!(cfg->sku & EEPROM_SKU_CAP_IPAN_ENABLE))
- ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
+ fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
/*
* if not PAN, then don't support P2P -- might be a uCode
* packaging bug or due to the eeprom check above
*/
- if (!(ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN))
- ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
+ if (!(fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN))
+ fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
- if (ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN) {
+ if (fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN) {
priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN;
nic->shrd->cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
} else {
@@ -1246,25 +1246,25 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
* figure out the offset of chain noise reset and gain commands
* base on the size of standard phy calibration commands table size
*/
- if (ucode_capa.standard_phy_calibration_size >
+ if (fw->ucode_capa.standard_phy_calibration_size >
IWL_MAX_PHY_CALIBRATE_TBL_SIZE)
- ucode_capa.standard_phy_calibration_size =
+ fw->ucode_capa.standard_phy_calibration_size =
IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE;
priv->phy_calib_chain_noise_reset_cmd =
- ucode_capa.standard_phy_calibration_size;
+ fw->ucode_capa.standard_phy_calibration_size;
priv->phy_calib_chain_noise_gain_cmd =
- ucode_capa.standard_phy_calibration_size + 1;
+ fw->ucode_capa.standard_phy_calibration_size + 1;
/* initialize all valid contexts */
- iwl_init_context(priv, ucode_capa.flags);
+ iwl_init_context(priv, fw->ucode_capa.flags);
/**************************************************
* This is still part of probe() in a sense...
*
* 9. Setup and register with mac80211 and debugfs
**************************************************/
- err = iwlagn_mac_setup_register(priv, &ucode_capa);
+ err = iwlagn_mac_setup_register(priv, &fw->ucode_capa);
if (err)
goto out_unbind;
OpenPOWER on IntegriCloud