aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorChatre, Reinette <reinette.chatre@intel.com>2008-12-02 15:14:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:35:55 -0500
commitc02b3acd29766c6f79c2411cb5b85e1ee72c4c8f (patch)
tree2d7535f861a543a6578f9b0bfa594e2837ebaf17 /drivers/net/wireless/iwlwifi/iwl-agn.c
parentf3f911d1773d31f11038d90b04244bc3986c4ccd (diff)
iwlwifi: store ucode version number
We store the ucode version number as part of iwl_priv/iwl3945_priv. This enables us to determine if particular ucode has support for features in order to have driver support more than one ucode API. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e8368b69d8cd..5912cdec33a7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1575,7 +1575,7 @@ static int iwl_read_ucode(struct iwl_priv *priv)
1575 const char *name = priv->cfg->fw_name; 1575 const char *name = priv->cfg->fw_name;
1576 u8 *src; 1576 u8 *src;
1577 size_t len; 1577 size_t len;
1578 u32 ver, inst_size, data_size, init_size, init_data_size, boot_size; 1578 u32 inst_size, data_size, init_size, init_data_size, boot_size;
1579 1579
1580 /* Ask kernel firmware_class module to get the boot firmware off disk. 1580 /* Ask kernel firmware_class module to get the boot firmware off disk.
1581 * request_firmware() is synchronous, file is in memory on return. */ 1581 * request_firmware() is synchronous, file is in memory on return. */
@@ -1599,14 +1599,20 @@ static int iwl_read_ucode(struct iwl_priv *priv)
1599 /* Data from ucode file: header followed by uCode images */ 1599 /* Data from ucode file: header followed by uCode images */
1600 ucode = (void *)ucode_raw->data; 1600 ucode = (void *)ucode_raw->data;
1601 1601
1602 ver = le32_to_cpu(ucode->ver); 1602 priv->ucode_ver = le32_to_cpu(ucode->ver);
1603 inst_size = le32_to_cpu(ucode->inst_size); 1603 inst_size = le32_to_cpu(ucode->inst_size);
1604 data_size = le32_to_cpu(ucode->data_size); 1604 data_size = le32_to_cpu(ucode->data_size);
1605 init_size = le32_to_cpu(ucode->init_size); 1605 init_size = le32_to_cpu(ucode->init_size);
1606 init_data_size = le32_to_cpu(ucode->init_data_size); 1606 init_data_size = le32_to_cpu(ucode->init_data_size);
1607 boot_size = le32_to_cpu(ucode->boot_size); 1607 boot_size = le32_to_cpu(ucode->boot_size);
1608 1608
1609 IWL_DEBUG_INFO("f/w package hdr ucode version = 0x%x\n", ver); 1609 IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n",
1610 priv->ucode_ver);
1611 IWL_DEBUG_INFO("f/w package hdr ucode version = %u.%u.%u.%u\n",
1612 IWL_UCODE_MAJOR(priv->ucode_ver),
1613 IWL_UCODE_MINOR(priv->ucode_ver),
1614 IWL_UCODE_API(priv->ucode_ver),
1615 IWL_UCODE_SERIAL(priv->ucode_ver));
1610 IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", 1616 IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n",
1611 inst_size); 1617 inst_size);
1612 IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n", 1618 IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n",