aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-eeprom.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-10-06 11:10:00 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-10-06 11:10:00 -0400
commit7cb1b0887fcc61918e3d64827fbef968bb67a57a (patch)
treefa9103423af207c68be604523b3a362e1a6c3e14 /drivers/net/wireless/iwlwifi/iwl-eeprom.c
parent72645eff4b2ad6cf2b016b54f9d6817cca0a621d (diff)
iwlagn: reduce redundant parameter definitions
move paramater definitions to a device paramater structure only leaving the device name, which antennas are used and what firmware file to use in the iwl_cfg structure. this will not completely remove the redundancies but greatly reduce them for devices that only vary by name or antennas. the parameters that are more likely to change within a given device family are left in iwl_cfg. also separate bt param structure added to help reduce more. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index a45d02e555cf..88f4a80d4733 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -332,7 +332,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_release_semaphore);
332 332
333const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset) 333const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset)
334{ 334{
335 BUG_ON(offset >= priv->cfg->eeprom_size); 335 BUG_ON(offset >= priv->cfg->base_params->eeprom_size);
336 return &priv->eeprom[offset]; 336 return &priv->eeprom[offset];
337} 337}
338EXPORT_SYMBOL(iwlcore_eeprom_query_addr); 338EXPORT_SYMBOL(iwlcore_eeprom_query_addr);
@@ -364,7 +364,7 @@ static int iwl_init_otp_access(struct iwl_priv *priv)
364 * CSR auto clock gate disable bit - 364 * CSR auto clock gate disable bit -
365 * this is only applicable for HW with OTP shadow RAM 365 * this is only applicable for HW with OTP shadow RAM
366 */ 366 */
367 if (priv->cfg->shadow_ram_support) 367 if (priv->cfg->base_params->shadow_ram_support)
368 iwl_set_bit(priv, CSR_DBG_LINK_PWR_MGMT_REG, 368 iwl_set_bit(priv, CSR_DBG_LINK_PWR_MGMT_REG,
369 CSR_RESET_LINK_PWR_MGMT_DISABLED); 369 CSR_RESET_LINK_PWR_MGMT_DISABLED);
370 } 370 }
@@ -484,7 +484,7 @@ static int iwl_find_otp_image(struct iwl_priv *priv,
484 } 484 }
485 /* more in the link list, continue */ 485 /* more in the link list, continue */
486 usedblocks++; 486 usedblocks++;
487 } while (usedblocks <= priv->cfg->max_ll_items); 487 } while (usedblocks <= priv->cfg->base_params->max_ll_items);
488 488
489 /* OTP has no valid blocks */ 489 /* OTP has no valid blocks */
490 IWL_DEBUG_INFO(priv, "OTP has no valid blocks\n"); 490 IWL_DEBUG_INFO(priv, "OTP has no valid blocks\n");
@@ -512,8 +512,8 @@ int iwl_eeprom_init(struct iwl_priv *priv)
512 if (priv->nvm_device_type == -ENOENT) 512 if (priv->nvm_device_type == -ENOENT)
513 return -ENOENT; 513 return -ENOENT;
514 /* allocate eeprom */ 514 /* allocate eeprom */
515 IWL_DEBUG_INFO(priv, "NVM size = %d\n", priv->cfg->eeprom_size); 515 sz = priv->cfg->base_params->eeprom_size;
516 sz = priv->cfg->eeprom_size; 516 IWL_DEBUG_INFO(priv, "NVM size = %d\n", sz);
517 priv->eeprom = kzalloc(sz, GFP_KERNEL); 517 priv->eeprom = kzalloc(sz, GFP_KERNEL);
518 if (!priv->eeprom) { 518 if (!priv->eeprom) {
519 ret = -ENOMEM; 519 ret = -ENOMEM;
@@ -554,7 +554,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
554 CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | 554 CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK |
555 CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); 555 CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK);
556 /* traversing the linked list if no shadow ram supported */ 556 /* traversing the linked list if no shadow ram supported */
557 if (!priv->cfg->shadow_ram_support) { 557 if (!priv->cfg->base_params->shadow_ram_support) {
558 if (iwl_find_otp_image(priv, &validblockaddr)) { 558 if (iwl_find_otp_image(priv, &validblockaddr)) {
559 ret = -ENOENT; 559 ret = -ENOENT;
560 goto done; 560 goto done;