diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2008-12-02 15:14:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:35:56 -0500 |
commit | a0987a8d68c86562f267efa97be01314c490c496 (patch) | |
tree | bd2fe7c65c61fbbb9a94c5264b0690fddbcbe6d2 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | c02b3acd29766c6f79c2411cb5b85e1ee72c4c8f (diff) |
iwlwifi: rely on API version read from firmware
This adds the infrastructure to support older firmware APIs.
The API version number is stored as part of the filename, we first try to
load the most recent firmware and progressively try lower versions.
The API version is also read from the firmware self and stored as part
of the iwl_priv structure. Only firmware that is supported by driver will
be loaded. The version number read from firmware is compared
to supported versions in the driver not the API version used as part of
filename.
An example using this new infrastrucure:
if (IWL_UCODE_API(priv->ucode_ver) >= 2) {
Driver interacts with Firmware API version >= 2.
} else {
Driver interacts with Firmware API version 1.
}
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-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index d95a15fc2602..4e6b7154c223 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -2508,13 +2508,17 @@ void iwl3945_hw_cancel_deferred_work(struct iwl3945_priv *priv) | |||
2508 | 2508 | ||
2509 | static struct iwl_3945_cfg iwl3945_bg_cfg = { | 2509 | static struct iwl_3945_cfg iwl3945_bg_cfg = { |
2510 | .name = "3945BG", | 2510 | .name = "3945BG", |
2511 | .fw_name = "iwlwifi-3945" IWL3945_UCODE_API ".ucode", | 2511 | .fw_name_pre = IWL3945_FW_PRE, |
2512 | .ucode_api_max = IWL3945_UCODE_API_MAX, | ||
2513 | .ucode_api_min = IWL3945_UCODE_API_MIN, | ||
2512 | .sku = IWL_SKU_G, | 2514 | .sku = IWL_SKU_G, |
2513 | }; | 2515 | }; |
2514 | 2516 | ||
2515 | static struct iwl_3945_cfg iwl3945_abg_cfg = { | 2517 | static struct iwl_3945_cfg iwl3945_abg_cfg = { |
2516 | .name = "3945ABG", | 2518 | .name = "3945ABG", |
2517 | .fw_name = "iwlwifi-3945" IWL3945_UCODE_API ".ucode", | 2519 | .fw_name_pre = IWL3945_FW_PRE, |
2520 | .ucode_api_max = IWL3945_UCODE_API_MAX, | ||
2521 | .ucode_api_min = IWL3945_UCODE_API_MIN, | ||
2518 | .sku = IWL_SKU_A|IWL_SKU_G, | 2522 | .sku = IWL_SKU_A|IWL_SKU_G, |
2519 | }; | 2523 | }; |
2520 | 2524 | ||