From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Jay Sternberg <jay.e.sternberg@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>,
"John W. Linville" <linville@tuxdriver.com>
Subject: [132/136] iwlwifi: Handle new firmware file with ucode build number in header
Date: Thu, 01 Oct 2009 18:18:00 -0700 [thread overview]
Message-ID: <20091002012427.848787594@mini.kroah.org> (raw)
In-Reply-To: <20091002012911.GA18542@kroah.com>
[-- Attachment #1: iwlwifi-handle-new-firmware-file-with-ucode-build-number-in-header.patch --]
[-- Type: text/plain, Size: 20268 bytes --]
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jay Sternberg <jay.e.sternberg@intel.com>
commit cc0f555d511a5fe9d4519334c8f674a1dbab9e3a upstream.
Adding new API version to account for change to ucode file format. New
header includes the build number of the ucode. This build number is the
SVN revision thus allowing for exact correlation to the code that
generated it.
The header adds the build number so that older ucode images can also be
enhanced to include the build in the future.
some cleanup in iwl_read_ucode needed to ensure old header not used and
reduce unnecessary references through pointer with the data is already
in heap variable.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/iwlwifi/iwl-3945.c | 40 ++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-4965.c | 39 +++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-5000.c | 51 +++++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-6000.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 55 ++++++++++++++++------------
drivers/net/wireless/iwlwifi/iwl-core.h | 12 ++++++
drivers/net/wireless/iwlwifi/iwl-dev.h | 31 +++++++++++----
drivers/net/wireless/iwlwifi/iwl3945-base.c | 45 ++++++++++++----------
8 files changed, 224 insertions(+), 54 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2111,7 +2111,7 @@ static void iwl3945_nic_start(struct iwl
*/
static int iwl3945_read_ucode(struct iwl_priv *priv)
{
- struct iwl_ucode *ucode;
+ const struct iwl_ucode_header *ucode;
int ret = -EINVAL, index;
const struct firmware *ucode_raw;
/* firmware file name contains uCode/driver compatibility version */
@@ -2152,22 +2152,24 @@ static int iwl3945_read_ucode(struct iwl
goto error;
/* Make sure that we got at least our header! */
- if (ucode_raw->size < sizeof(*ucode)) {
+ if (ucode_raw->size < priv->cfg->ops->ucode->get_header_size(1)) {
IWL_ERR(priv, "File size way too small!\n");
ret = -EINVAL;
goto err_release;
}
/* Data from ucode file: header followed by uCode images */
- ucode = (void *)ucode_raw->data;
+ ucode = (struct iwl_ucode_header *)ucode_raw->data;
priv->ucode_ver = le32_to_cpu(ucode->ver);
api_ver = IWL_UCODE_API(priv->ucode_ver);
- inst_size = le32_to_cpu(ucode->inst_size);
- data_size = le32_to_cpu(ucode->data_size);
- init_size = le32_to_cpu(ucode->init_size);
- init_data_size = le32_to_cpu(ucode->init_data_size);
- boot_size = le32_to_cpu(ucode->boot_size);
+ inst_size = priv->cfg->ops->ucode->get_inst_size(ucode, api_ver);
+ data_size = priv->cfg->ops->ucode->get_data_size(ucode, api_ver);
+ init_size = priv->cfg->ops->ucode->get_init_size(ucode, api_ver);
+ init_data_size =
+ priv->cfg->ops->ucode->get_init_data_size(ucode, api_ver);
+ boot_size = priv->cfg->ops->ucode->get_boot_size(ucode, api_ver);
+ src = priv->cfg->ops->ucode->get_data(ucode, api_ver);
/* api_ver should match the api version forming part of the
* firmware filename ... but we don't check for that and only rely
@@ -2208,12 +2210,13 @@ static int iwl3945_read_ucode(struct iwl
/* Verify size of file vs. image size info in file's header */
- if (ucode_raw->size < sizeof(*ucode) +
+ if (ucode_raw->size != priv->cfg->ops->ucode->get_header_size(api_ver) +
inst_size + data_size + init_size +
init_data_size + boot_size) {
- IWL_DEBUG_INFO(priv, "uCode file size %zd too small\n",
- ucode_raw->size);
+ IWL_DEBUG_INFO(priv,
+ "uCode file size %zd does not match expected size\n",
+ ucode_raw->size);
ret = -EINVAL;
goto err_release;
}
@@ -2296,44 +2299,44 @@ static int iwl3945_read_ucode(struct iwl
/* Copy images into buffers for card's bus-master reads ... */
/* Runtime instructions (first block of data in file) */
- src = &ucode->data[0];
- len = priv->ucode_code.len;
+ len = inst_size;
IWL_DEBUG_INFO(priv,
"Copying (but not loading) uCode instr len %zd\n", len);
memcpy(priv->ucode_code.v_addr, src, len);
+ src += len;
+
IWL_DEBUG_INFO(priv, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n",
priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr);
/* Runtime data (2nd block)
* NOTE: Copy into backup buffer will be done in iwl3945_up() */
- src = &ucode->data[inst_size];
- len = priv->ucode_data.len;
+ len = data_size;
IWL_DEBUG_INFO(priv,
"Copying (but not loading) uCode data len %zd\n", len);
memcpy(priv->ucode_data.v_addr, src, len);
memcpy(priv->ucode_data_backup.v_addr, src, len);
+ src += len;
/* Initialization instructions (3rd block) */
if (init_size) {
- src = &ucode->data[inst_size + data_size];
- len = priv->ucode_init.len;
+ len = init_size;
IWL_DEBUG_INFO(priv,
"Copying (but not loading) init instr len %zd\n", len);
memcpy(priv->ucode_init.v_addr, src, len);
+ src += len;
}
/* Initialization data (4th block) */
if (init_data_size) {
- src = &ucode->data[inst_size + data_size + init_size];
- len = priv->ucode_init_data.len;
+ len = init_data_size;
IWL_DEBUG_INFO(priv,
"Copying (but not loading) init data len %zd\n", len);
memcpy(priv->ucode_init_data.v_addr, src, len);
+ src += len;
}
/* Bootstrap instructions (5th block) */
- src = &ucode->data[inst_size + data_size + init_size + init_data_size];
- len = priv->ucode_boot.len;
+ len = boot_size;
IWL_DEBUG_INFO(priv,
"Copying (but not loading) boot instr len %zd\n", len);
memcpy(priv->ucode_boot.v_addr, src, len);
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2784,11 +2784,50 @@ static int iwl3945_load_bsm(struct iwl_p
return 0;
}
+#define IWL3945_UCODE_GET(item) \
+static u32 iwl3945_ucode_get_##item(const struct iwl_ucode_header *ucode,\
+ u32 api_ver) \
+{ \
+ return le32_to_cpu(ucode->u.v1.item); \
+}
+
+static u32 iwl3945_ucode_get_header_size(u32 api_ver)
+{
+ return UCODE_HEADER_SIZE(1);
+}
+static u32 iwl3945_ucode_get_build(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ return 0;
+}
+static u8 *iwl3945_ucode_get_data(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ return (u8 *) ucode->u.v1.data;
+}
+
+IWL3945_UCODE_GET(inst_size);
+IWL3945_UCODE_GET(data_size);
+IWL3945_UCODE_GET(init_size);
+IWL3945_UCODE_GET(init_data_size);
+IWL3945_UCODE_GET(boot_size);
+
static struct iwl_hcmd_ops iwl3945_hcmd = {
.rxon_assoc = iwl3945_send_rxon_assoc,
.commit_rxon = iwl3945_commit_rxon,
};
+static struct iwl_ucode_ops iwl3945_ucode = {
+ .get_header_size = iwl3945_ucode_get_header_size,
+ .get_build = iwl3945_ucode_get_build,
+ .get_inst_size = iwl3945_ucode_get_inst_size,
+ .get_data_size = iwl3945_ucode_get_data_size,
+ .get_init_size = iwl3945_ucode_get_init_size,
+ .get_init_data_size = iwl3945_ucode_get_init_data_size,
+ .get_boot_size = iwl3945_ucode_get_boot_size,
+ .get_data = iwl3945_ucode_get_data,
+};
+
static struct iwl_lib_ops iwl3945_lib = {
.txq_attach_buf_to_tfd = iwl3945_hw_txq_attach_buf_to_tfd,
.txq_free_tfd = iwl3945_hw_txq_free_tfd,
@@ -2829,6 +2868,7 @@ static struct iwl_hcmd_utils_ops iwl3945
};
static struct iwl_ops iwl3945_ops = {
+ .ucode = &iwl3945_ucode,
.lib = &iwl3945_lib,
.hcmd = &iwl3945_hcmd,
.utils = &iwl3945_hcmd_utils,
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2221,12 +2221,50 @@ static void iwl4965_cancel_deferred_work
cancel_work_sync(&priv->txpower_work);
}
+#define IWL4965_UCODE_GET(item) \
+static u32 iwl4965_ucode_get_##item(const struct iwl_ucode_header *ucode,\
+ u32 api_ver) \
+{ \
+ return le32_to_cpu(ucode->u.v1.item); \
+}
+
+static u32 iwl4965_ucode_get_header_size(u32 api_ver)
+{
+ return UCODE_HEADER_SIZE(1);
+}
+static u32 iwl4965_ucode_get_build(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ return 0;
+}
+static u8 *iwl4965_ucode_get_data(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ return (u8 *) ucode->u.v1.data;
+}
+
+IWL4965_UCODE_GET(inst_size);
+IWL4965_UCODE_GET(data_size);
+IWL4965_UCODE_GET(init_size);
+IWL4965_UCODE_GET(init_data_size);
+IWL4965_UCODE_GET(boot_size);
+
static struct iwl_hcmd_ops iwl4965_hcmd = {
.rxon_assoc = iwl4965_send_rxon_assoc,
.commit_rxon = iwl_commit_rxon,
.set_rxon_chain = iwl_set_rxon_chain,
};
+static struct iwl_ucode_ops iwl4965_ucode = {
+ .get_header_size = iwl4965_ucode_get_header_size,
+ .get_build = iwl4965_ucode_get_build,
+ .get_inst_size = iwl4965_ucode_get_inst_size,
+ .get_data_size = iwl4965_ucode_get_data_size,
+ .get_init_size = iwl4965_ucode_get_init_size,
+ .get_init_data_size = iwl4965_ucode_get_init_data_size,
+ .get_boot_size = iwl4965_ucode_get_boot_size,
+ .get_data = iwl4965_ucode_get_data,
+};
static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = {
.get_hcmd_size = iwl4965_get_hcmd_size,
.build_addsta_hcmd = iwl4965_build_addsta_hcmd,
@@ -2287,6 +2325,7 @@ static struct iwl_lib_ops iwl4965_lib =
};
static struct iwl_ops iwl4965_ops = {
+ .ucode = &iwl4965_ucode,
.lib = &iwl4965_lib,
.hcmd = &iwl4965_hcmd,
.utils = &iwl4965_hcmd_utils,
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1426,6 +1426,44 @@ int iwl5000_calc_rssi(struct iwl_priv *p
return max_rssi - agc - IWL49_RSSI_OFFSET;
}
+#define IWL5000_UCODE_GET(item) \
+static u32 iwl5000_ucode_get_##item(const struct iwl_ucode_header *ucode,\
+ u32 api_ver) \
+{ \
+ if (api_ver <= 2) \
+ return le32_to_cpu(ucode->u.v1.item); \
+ return le32_to_cpu(ucode->u.v2.item); \
+}
+
+static u32 iwl5000_ucode_get_header_size(u32 api_ver)
+{
+ if (api_ver <= 2)
+ return UCODE_HEADER_SIZE(1);
+ return UCODE_HEADER_SIZE(2);
+}
+
+static u32 iwl5000_ucode_get_build(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ if (api_ver <= 2)
+ return 0;
+ return le32_to_cpu(ucode->u.v2.build);
+}
+
+static u8 *iwl5000_ucode_get_data(const struct iwl_ucode_header *ucode,
+ u32 api_ver)
+{
+ if (api_ver <= 2)
+ return (u8 *) ucode->u.v1.data;
+ return (u8 *) ucode->u.v2.data;
+}
+
+IWL5000_UCODE_GET(inst_size);
+IWL5000_UCODE_GET(data_size);
+IWL5000_UCODE_GET(init_size);
+IWL5000_UCODE_GET(init_data_size);
+IWL5000_UCODE_GET(boot_size);
+
struct iwl_hcmd_ops iwl5000_hcmd = {
.rxon_assoc = iwl5000_send_rxon_assoc,
.commit_rxon = iwl_commit_rxon,
@@ -1441,6 +1479,17 @@ struct iwl_hcmd_utils_ops iwl5000_hcmd_u
.calc_rssi = iwl5000_calc_rssi,
};
+struct iwl_ucode_ops iwl5000_ucode = {
+ .get_header_size = iwl5000_ucode_get_header_size,
+ .get_build = iwl5000_ucode_get_build,
+ .get_inst_size = iwl5000_ucode_get_inst_size,
+ .get_data_size = iwl5000_ucode_get_data_size,
+ .get_init_size = iwl5000_ucode_get_init_size,
+ .get_init_data_size = iwl5000_ucode_get_init_data_size,
+ .get_boot_size = iwl5000_ucode_get_boot_size,
+ .get_data = iwl5000_ucode_get_data,
+};
+
struct iwl_lib_ops iwl5000_lib = {
.set_hw_params = iwl5000_hw_set_hw_params,
.txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
@@ -1542,12 +1591,14 @@ static struct iwl_lib_ops iwl5150_lib =
};
struct iwl_ops iwl5000_ops = {
+ .ucode = &iwl5000_ucode,
.lib = &iwl5000_lib,
.hcmd = &iwl5000_hcmd,
.utils = &iwl5000_hcmd_utils,
};
static struct iwl_ops iwl5150_ops = {
+ .ucode = &iwl5000_ucode,
.lib = &iwl5150_lib,
.hcmd = &iwl5000_hcmd,
.utils = &iwl5000_hcmd_utils,
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -46,8 +46,8 @@
#include "iwl-5000-hw.h"
/* Highest firmware API version supported */
-#define IWL6000_UCODE_API_MAX 2
-#define IWL6050_UCODE_API_MAX 2
+#define IWL6000_UCODE_API_MAX 3
+#define IWL6050_UCODE_API_MAX 3
/* Lowest firmware API version supported */
#define IWL6000_UCODE_API_MIN 1
@@ -69,6 +69,7 @@ static struct iwl_hcmd_utils_ops iwl6000
};
static struct iwl_ops iwl6000_ops = {
+ .ucode = &iwl5000_ucode,
.lib = &iwl5000_lib,
.hcmd = &iwl5000_hcmd,
.utils = &iwl6000_hcmd_utils,
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1348,7 +1348,7 @@ static void iwl_nic_start(struct iwl_pri
*/
static int iwl_read_ucode(struct iwl_priv *priv)
{
- struct iwl_ucode *ucode;
+ struct iwl_ucode_header *ucode;
int ret = -EINVAL, index;
const struct firmware *ucode_raw;
const char *name_pre = priv->cfg->fw_name_pre;
@@ -1357,7 +1357,8 @@ static int iwl_read_ucode(struct iwl_pri
char buf[25];
u8 *src;
size_t len;
- u32 api_ver, inst_size, data_size, init_size, init_data_size, boot_size;
+ u32 api_ver, build;
+ u32 inst_size, data_size, init_size, init_data_size, boot_size;
/* Ask kernel firmware_class module to get the boot firmware off disk.
* request_firmware() is synchronous, file is in memory on return. */
@@ -1387,23 +1388,26 @@ static int iwl_read_ucode(struct iwl_pri
if (ret < 0)
goto error;
- /* Make sure that we got at least our header! */
- if (ucode_raw->size < sizeof(*ucode)) {
+ /* Make sure that we got at least the v1 header! */
+ if (ucode_raw->size < priv->cfg->ops->ucode->get_header_size(1)) {
IWL_ERR(priv, "File size way too small!\n");
ret = -EINVAL;
goto err_release;
}
/* Data from ucode file: header followed by uCode images */
- ucode = (void *)ucode_raw->data;
+ ucode = (struct iwl_ucode_header *)ucode_raw->data;
priv->ucode_ver = le32_to_cpu(ucode->ver);
api_ver = IWL_UCODE_API(priv->ucode_ver);
- inst_size = le32_to_cpu(ucode->inst_size);
- data_size = le32_to_cpu(ucode->data_size);
- init_size = le32_to_cpu(ucode->init_size);
- init_data_size = le32_to_cpu(ucode->init_data_size);
- boot_size = le32_to_cpu(ucode->boot_size);
+ build = priv->cfg->ops->ucode->get_build(ucode, api_ver);
+ inst_size = priv->cfg->ops->ucode->get_inst_size(ucode, api_ver);
+ data_size = priv->cfg->ops->ucode->get_data_size(ucode, api_ver);
+ init_size = priv->cfg->ops->ucode->get_init_size(ucode, api_ver);
+ init_data_size =
+ priv->cfg->ops->ucode->get_init_data_size(ucode, api_ver);
+ boot_size = priv->cfg->ops->ucode->get_boot_size(ucode, api_ver);
+ src = priv->cfg->ops->ucode->get_data(ucode, api_ver);
/* api_ver should match the api version forming part of the
* firmware filename ... but we don't check for that and only rely
@@ -1429,6 +1433,9 @@ static int iwl_read_ucode(struct iwl_pri
IWL_UCODE_API(priv->ucode_ver),
IWL_UCODE_SERIAL(priv->ucode_ver));
+ if (build)
+ IWL_DEBUG_INFO(priv, "Build %u\n", build);
+
IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n",
priv->ucode_ver);
IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n",
@@ -1443,12 +1450,14 @@ static int iwl_read_ucode(struct iwl_pri
boot_size);
/* Verify size of file vs. image size info in file's header */
- if (ucode_raw->size < sizeof(*ucode) +
+ if (ucode_raw->size !=
+ priv->cfg->ops->ucode->get_header_size(api_ver) +
inst_size + data_size + init_size +
init_data_size + boot_size) {
- IWL_DEBUG_INFO(priv, "uCode file size %d too small\n",
- (int)ucode_raw->size);
+ IWL_DEBUG_INFO(priv,
+ "uCode file size %d does not match expected size\n",
+ (int)ucode_raw->size);
ret = -EINVAL;
goto err_release;
}
@@ -1528,42 +1537,42 @@ static int iwl_read_ucode(struct iwl_pri
/* Copy images into buffers for card's bus-master reads ... */
/* Runtime instructions (first block of data in file) */
- src = &ucode->data[0];
- len = priv->ucode_code.len;
+ len = inst_size;
IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode instr len %Zd\n", len);
memcpy(priv->ucode_code.v_addr, src, len);
+ src += len;
+
IWL_DEBUG_INFO(priv, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n",
priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr);
/* Runtime data (2nd block)
* NOTE: Copy into backup buffer will be done in iwl_up() */
- src = &ucode->data[inst_size];
- len = priv->ucode_data.len;
+ len = data_size;
IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode data len %Zd\n", len);
memcpy(priv->ucode_data.v_addr, src, len);
memcpy(priv->ucode_data_backup.v_addr, src, len);
+ src += len;
/* Initialization instructions (3rd block) */
if (init_size) {
- src = &ucode->data[inst_size + data_size];
- len = priv->ucode_init.len;
+ len = init_size;
IWL_DEBUG_INFO(priv, "Copying (but not loading) init instr len %Zd\n",
len);
memcpy(priv->ucode_init.v_addr, src, len);
+ src += len;
}
/* Initialization data (4th block) */
if (init_data_size) {
- src = &ucode->data[inst_size + data_size + init_size];
- len = priv->ucode_init_data.len;
+ len = init_data_size;
IWL_DEBUG_INFO(priv, "Copying (but not loading) init data len %Zd\n",
len);
memcpy(priv->ucode_init_data.v_addr, src, len);
+ src += len;
}
/* Bootstrap instructions (5th block) */
- src = &ucode->data[inst_size + data_size + init_size + init_data_size];
- len = priv->ucode_boot.len;
+ len = boot_size;
IWL_DEBUG_INFO(priv, "Copying (but not loading) boot instr len %Zd\n", len);
memcpy(priv->ucode_boot.v_addr, src, len);
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -116,6 +116,17 @@ struct iwl_temp_ops {
void (*set_ct_kill)(struct iwl_priv *priv);
};
+struct iwl_ucode_ops {
+ u32 (*get_header_size)(u32);
+ u32 (*get_build)(const struct iwl_ucode_header *, u32);
+ u32 (*get_inst_size)(const struct iwl_ucode_header *, u32);
+ u32 (*get_data_size)(const struct iwl_ucode_header *, u32);
+ u32 (*get_init_size)(const struct iwl_ucode_header *, u32);
+ u32 (*get_init_data_size)(const struct iwl_ucode_header *, u32);
+ u32 (*get_boot_size)(const struct iwl_ucode_header *, u32);
+ u8 * (*get_data)(const struct iwl_ucode_header *, u32);
+};
+
struct iwl_lib_ops {
/* set hw dependent parameters */
int (*set_hw_params)(struct iwl_priv *priv);
@@ -171,6 +182,7 @@ struct iwl_lib_ops {
};
struct iwl_ops {
+ const struct iwl_ucode_ops *ucode;
const struct iwl_lib_ops *lib;
const struct iwl_hcmd_ops *hcmd;
const struct iwl_hcmd_utils_ops *utils;
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -66,6 +66,7 @@ extern struct iwl_cfg iwl1000_bgn_cfg;
/* shared structures from iwl-5000.c */
extern struct iwl_mod_params iwl50_mod_params;
extern struct iwl_ops iwl5000_ops;
+extern struct iwl_ucode_ops iwl5000_ucode;
extern struct iwl_lib_ops iwl5000_lib;
extern struct iwl_hcmd_ops iwl5000_hcmd;
extern struct iwl_hcmd_utils_ops iwl5000_hcmd_utils;
@@ -525,15 +526,29 @@ struct fw_desc {
};
/* uCode file layout */
-struct iwl_ucode {
- __le32 ver; /* major/minor/API/serial */
- __le32 inst_size; /* bytes of runtime instructions */
- __le32 data_size; /* bytes of runtime data */
- __le32 init_size; /* bytes of initialization instructions */
- __le32 init_data_size; /* bytes of initialization data */
- __le32 boot_size; /* bytes of bootstrap instructions */
- u8 data[0]; /* data in same order as "size" elements */
+struct iwl_ucode_header {
+ __le32 ver; /* major/minor/API/serial */
+ union {
+ struct {
+ __le32 inst_size; /* bytes of runtime code */
+ __le32 data_size; /* bytes of runtime data */
+ __le32 init_size; /* bytes of init code */
+ __le32 init_data_size; /* bytes of init data */
+ __le32 boot_size; /* bytes of bootstrap code */
+ u8 data[0]; /* in same order as sizes */
+ } v1;
+ struct {
+ __le32 build; /* build number */
+ __le32 inst_size; /* bytes of runtime code */
+ __le32 data_size; /* bytes of runtime data */
+ __le32 init_size; /* bytes of init code */
+ __le32 init_data_size; /* bytes of init data */
+ __le32 boot_size; /* bytes of bootstrap code */
+ u8 data[0]; /* in same order as sizes */
+ } v2;
+ } u;
};
+#define UCODE_HEADER_SIZE(ver) ((ver) == 1 ? 24 : 28)
struct iwl4965_ibss_seq {
u8 mac[ETH_ALEN];
next prev parent reply other threads:[~2009-10-02 1:35 UTC|newest]
Thread overview: 155+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091002011548.335611824@mini.kroah.org>
2009-10-02 1:29 ` [000/136] 2.6.31.2-stable review Greg KH
2009-10-02 1:15 ` [001/136] KVM: VMX: Fix EPT with WP bit change during paging Greg KH
2009-10-02 1:15 ` [002/136] pata_amd: do not filter out valid modes in nv_mode_filter Greg KH
2009-10-02 1:15 ` [003/136] p54usb: add Zcomax XG-705A usbid Greg KH
2009-10-02 1:15 ` [004/136] x86: Increase MIN_GAP to include randomized stack Greg KH
2009-10-02 1:15 ` [005/136] serial: bfin_5xx: fix building as module when early printk is enabled Greg KH
2009-10-02 1:15 ` [006/136] USB: option.c Add support for ZTE AC2726 EVDO modem Greg KH
2009-10-02 1:15 ` [007/136] USB: option: TELIT UC864G support Greg KH
2009-10-02 1:15 ` [008/136] video: s3c_fb.c: fix build with CONFIG_HOTPLUG=n Greg KH
2009-10-02 1:15 ` [009/136] kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling Greg KH
2009-10-02 1:15 ` [010/136] drivers/mfd/ab3100-core.c: fix powerpc build error Greg KH
2009-10-02 1:15 ` [011/136] thinkpad-acpi: dont ask about brightness_mode for fw. 1V and 1R Greg KH
2009-10-02 1:16 ` [012/136] ACPI: pci_slot.ko wants a 64-bit _SUN Greg KH
2009-10-02 1:16 ` [013/136] fbcon: only unbind from console if successfully registered Greg KH
2009-10-02 1:16 ` [014/136] kallsyms: fix segfault in prefix_underscores_count() Greg KH
2009-10-02 1:16 ` [015/136] sisfb: change SiS_DDC_Port type to SISIOADDRESS Greg KH
2009-10-02 1:16 ` [016/136] mmc_spi: fail gracefully if host or card do not support the switch command Greg KH
2009-10-02 1:16 ` [017/136] alpha: AGP update (fixes compile failure) Greg KH
2009-10-02 1:16 ` [018/136] fs: make sure data stored into inode is properly seen before unlocking new inode Greg KH
2009-10-02 1:16 ` [019/136] eCryptfs: Handle unrecognized tag 3 cipher codes Greg KH
2009-10-02 1:16 ` [020/136] eCryptfs: Check for O_RDONLY lower inodes when opening lower files Greg KH
2009-10-02 1:16 ` [021/136] eCryptfs: Filename encryption only supports password auth tokens Greg KH
2009-10-02 1:16 ` [022/136] eCryptfs: Validate global auth tok keys Greg KH
2009-10-02 1:16 ` [023/136] eCryptfs: Prevent lower dentry from going negative during unlink Greg KH
2009-10-02 1:16 ` [024/136] [CIFS] Re-enable Lanman security Greg KH
2009-10-02 1:16 ` [025/136] xen: make -fstack-protector work under Xen Greg KH
2009-10-02 1:16 ` [026/136] xen: only enable interrupts while actually blocking for spinlock Greg KH
2009-10-02 1:16 ` [027/136] xen: use stronger barrier after unlocking lock Greg KH
2009-10-02 1:16 ` [028/136] xen: check EFER for NX before setting up GDT mapping Greg KH
2009-10-02 1:16 ` [029/136] perf_counter: Fix perf_copy_attr() pointer arithmetic Greg KH
2009-10-02 1:16 ` [030/136] perf tools: Fix buffer allocation Greg KH
2009-10-02 1:16 ` [031/136] tty: serial/pcmcia: add ID for Advantech card Greg KH
2009-10-02 1:16 ` [032/136] PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend() Greg KH
2009-10-02 1:16 ` [033/136] PM / yenta: Fix cardbus suspend/resume regression Greg KH
2009-10-02 1:16 ` [034/136] sony-laptop: check for rfkill hard block at load time Greg KH
2009-10-02 1:16 ` [035/136] nilfs2: fix missing zero-fill initialization of btree node cache Greg KH
2009-10-02 1:16 ` [036/136] ar9170usb: add usbid for TP-Link TL-WN821N v2 Greg KH
2009-10-02 1:16 ` [037/136] mtd: nand: fix ECC Correction bug for SMC ordering for NDFC driver Greg KH
2009-10-02 1:16 ` [038/136] mtd: ofpart: Check availability of reg property instead of name property Greg KH
2009-10-02 1:16 ` [039/136] mtd: cfi_cmdset_0002: add 0xFF intolerance for M29W128G Greg KH
2009-10-02 1:16 ` [040/136] USB: serial: ftdi_sio: new hardware support - hameg power supply Greg KH
2009-10-02 1:16 ` [041/136] USB: add PIDs for FTDI based OpenDCC hardware Greg KH
2009-10-02 1:16 ` [042/136] USB: serial: ftdi: handle gnICE+ JTAG adaptors Greg KH
2009-10-02 1:16 ` [043/136] USB: CDC WDM driver doesnt support non-blocking reads Greg KH
2009-10-02 1:16 ` [044/136] USB: fix cdc-acm regression in open Greg KH
2009-10-02 1:16 ` [045/136] cdc_acm: Fix to use modern speed interfaces Greg KH
2009-10-02 1:16 ` [046/136] tty: remove dtr/rts use from the driver open methods Greg KH
2009-10-02 1:16 ` [047/136] tty: gigaset: really fix chars_in_buffer Greg KH
2009-10-02 1:16 ` [048/136] kaweth: Fix memory leak in kaweth_control() Greg KH
2009-10-02 1:16 ` [049/136] x86: SGI UV: Fix IPI macros Greg KH
2009-10-02 1:16 ` [050/136] USB: serial: pl2303: new hardware support - sanwa multimeter Greg KH
2009-10-02 1:16 ` [051/136] USB: storage: fix a resume path GFP_NOIO must be used Greg KH
2009-10-02 1:16 ` [052/136] USB: usb-storage fails to attach to Huawei Datacard cdrom device Greg KH
2009-10-02 1:16 ` [053/136] USB: usbtmc: sanity checks for DEV_DEP_MSG_IN urbs Greg KH
2009-10-02 1:16 ` [054/136] USB: sl811-hcd: Fix device disconnect: Greg KH
2009-10-02 1:16 ` [055/136] drm/i915: remove restore in resume Greg KH
2009-10-02 1:16 ` [056/136] drm/i915: Only destroy a constructed mmap offset Greg KH
2009-10-02 1:16 ` [057/136] drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks Greg KH
2009-10-02 1:16 ` [058/136] drm/i915: Add buffer to inactive list immediately during fault Greg KH
2009-10-02 1:16 ` [059/136] drm/i915: Check that the relocation points to within the target Greg KH
2009-10-02 1:16 ` [060/136] drm/i915: Fix typo for wrong LVDS clock setting on IGDNG Greg KH
2009-10-02 1:16 ` [061/136] drm/i915: Fix SSC frequence for IGDNG Greg KH
2009-10-02 1:16 ` [062/136] drm/i915: Remove DAC disable in CRT force detect on IGDNG Greg KH
2009-10-02 1:16 ` [063/136] drm/i915: Fix LVDS panel fitting on Arrandale Greg KH
2009-10-02 1:16 ` [064/136] drm/I915: Use the CRT DDC to get the EDID for DVI-connector on Mac Greg KH
2009-10-02 1:16 ` [065/136] drm/i915: fix tiling on IGDNG Greg KH
2009-10-02 1:16 ` [066/136] agp/intel: Fix the pre-9xx chipset flush Greg KH
2009-10-02 1:16 ` [067/136] nfsd4: fix null dereference creating nfsv4 callback client Greg KH
2009-10-02 1:16 ` [068/136] can: fix NOHZ local_softirq_pending 08 warning Greg KH
2009-10-02 1:16 ` [069/136] ahci: restore pci_intx() handling Greg KH
2009-10-02 1:16 ` [070/136] [ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume Greg KH
2009-10-02 1:16 ` [071/136] net ax25: Fix signed comparison in the sockopt handler Greg KH
2009-10-02 1:17 ` [072/136] net: Make the copy length in af_packet sockopt handler unsigned Greg KH
2009-10-02 1:17 ` [073/136] pty_write: dont do a tty_wakeup() when the buffers are full Greg KH
2009-10-02 1:17 ` [074/136] KVM: fix cpuid E2BIG handling for extended request types Greg KH
2009-10-02 1:17 ` [075/136] KVM: MMU: fix missing locking in alloc_mmu_pages Greg KH
2009-10-02 1:17 ` [076/136] KVM: MMU: fix bogus alloc_mmu_pages assignment Greg KH
2009-10-02 1:17 ` [077/136] KVM: Protect update_cr8_intercept() when running without an apic Greg KH
2009-10-02 1:17 ` [078/136] Revert "KVM: x86: check for cr3 validity in ioctl_set_sregs" Greg KH
2009-10-02 1:17 ` [079/136] [CPUFREQ] Fix NULL ptr regression in powernow-k8 Greg KH
2009-10-03 15:19 ` Herton Ronaldo Krzesinski
2009-10-05 16:08 ` [Stable-review] " Greg KH
2009-10-02 1:17 ` [080/136] perf tools: do not complain if root is owning perf.data Greg KH
2009-10-02 1:17 ` [081/136] netfilter: nf_nat: fix inverted logic for persistent NAT mappings Greg KH
2009-10-02 1:17 ` [082/136] netfilter: nf_conntrack: netns fix re reliable conntrack event delivery Greg KH
2009-10-02 1:17 ` [083/136] netfilter: bridge: refcount fix Greg KH
2009-10-02 1:17 ` [084/136] netfilter: ebt_ulog: fix checkentry return value Greg KH
2009-10-02 1:17 ` [085/136] ath5k: Wakeup fixes Greg KH
2009-10-02 1:17 ` [086/136] ath5k: do not release irq across suspend/resume Greg KH
2009-10-02 1:17 ` [087/136] Driver core: add new device to buss list before probing Greg KH
2009-10-02 1:17 ` [088/136] tty: Add a full port_close function Greg KH
2009-10-02 1:17 ` [089/136] tty: USB hangup is racy Greg KH
2009-10-02 1:17 ` [090/136] tty: USB can now use the shutdown method for kref based freeing of ports Greg KH
2009-10-02 1:17 ` [091/136] hwmon: (asus_atk0110) Add maintainer information Greg KH
2009-10-02 1:17 ` [092/136] tty: USB serial termios bits Greg KH
2009-10-02 1:17 ` [093/136] usb-serial: change referencing of port and serial structures Greg KH
2009-10-02 1:17 ` [094/136] usb-serial: put subroutines in logical order Greg KH
2009-10-02 1:17 ` [095/136] usb-serial: change logic of serial lookups Greg KH
2009-10-02 1:17 ` [096/136] usb-serial: acquire references when a new tty is installed Greg KH
2009-10-02 1:17 ` [097/136] usb-serial: fix termios initialization logic Greg KH
2009-10-02 1:17 ` [098/136] usb-serial: rename subroutines Greg KH
2009-10-02 1:17 ` [099/136] usb-serial: add missing tests and debug lines Greg KH
2009-10-02 1:17 ` [100/136] usb-serial: straighten out serial_open Greg KH
2009-10-02 1:17 ` [101/136] USB serial: update the console driver Greg KH
2009-10-02 1:17 ` [102/136] USB: xhci: Work around for chain bit in link TRBs Greg KH
2009-10-02 1:17 ` [103/136] USB: xhci: Fix slot and endpoint context debugging Greg KH
2009-10-02 1:17 ` [104/136] USB: xhci: Configure endpoint code refactoring Greg KH
2009-10-02 1:17 ` [105/136] USB: xhci: Set correct max packet size for HS/FS control endpoints Greg KH
2009-10-02 1:17 ` [106/136] USB: xhci: Support full speed devices Greg KH
2009-10-02 1:17 ` [107/136] USB: xhci: Handle stalled control endpoints Greg KH
2009-10-02 1:17 ` [108/136] USB: xhci: Add quirk for Fresco Logic xHCI hardware Greg KH
2009-10-02 1:17 ` [109/136] USB: xhci: Make TRB completion code comparison readable Greg KH
2009-10-02 16:38 ` David Vrabel
2009-10-02 16:53 ` [stable] " Greg KH
2009-10-02 17:23 ` David Vrabel
2009-10-02 17:35 ` Greg KH
2009-10-02 1:17 ` [110/136] USB: xhci: Handle babbling endpoints correctly Greg KH
2009-10-02 1:17 ` [111/136] USB: xhci: Dont touch xhci_td after its freed Greg KH
2009-10-02 1:17 ` [112/136] USB: xhci: Check URBs actual transfer buffer size Greg KH
2009-10-02 1:17 ` [113/136] USB: xhci: Check URB_SHORT_NOT_OK before setting short packet status Greg KH
2009-10-02 1:17 ` [114/136] USB: xhci: Set -EREMOTEIO when xHC gives bad transfer length Greg KH
2009-10-02 1:17 ` [115/136] USB: xhci: Support interrupt transfers Greg KH
2009-10-02 1:17 ` [116/136] USB: Fix SS endpoint companion descriptor parsing Greg KH
2009-10-02 1:17 ` [117/136] /proc/kcore: work around a BUG() Greg KH
2009-10-02 1:17 ` [118/136] hugetlb: restore interleaving of bootmem huge pages (2.6.31) Greg KH
2009-10-02 1:17 ` [119/136] page-allocator: limit the number of MIGRATE_RESERVE pageblocks per zone Greg KH
2009-10-02 1:17 ` [120/136] mm: munlock use follow_page Greg KH
2009-10-02 16:46 ` Hugh Dickins
2009-10-02 16:54 ` Greg KH
2009-10-02 1:17 ` [121/136] mm: fix anonymous dirtying Greg KH
2009-10-02 16:34 ` Hugh Dickins
2009-10-02 16:55 ` Greg KH
2009-10-02 1:17 ` [122/136] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust() Greg KH
2009-10-02 16:36 ` Hugh Dickins
2009-10-02 16:54 ` Greg KH
2009-10-02 1:17 ` [123/136] Fix idle time field in /proc/uptime Greg KH
2009-10-02 1:17 ` [124/136] drm/i915: Handle ERESTARTSYS during page fault Greg KH
2009-10-02 1:17 ` [125/136] em28xx: ir-kbd-i2c init data needs a persistent object Greg KH
2009-10-02 1:17 ` [126/136] saa7134: " Greg KH
2009-10-02 1:17 ` [127/136] powerpc/8xx: Fix regression introduced by cache coherency rewrite Greg KH
2009-10-02 1:17 ` [128/136] powerpc: Fix incorrect setting of __HAVE_ARCH_PTE_SPECIAL Greg KH
2009-10-02 1:17 ` [129/136] HID: completely remove apple mightymouse from blacklist Greg KH
2009-10-02 1:17 ` [130/136] [SCSI] mptsas : PAE Kernel more than 4 GB kernel panic Greg KH
2009-10-02 1:17 ` [131/136] NOMMU: Fix MAP_PRIVATE mmap() of objects where the data can be mapped directly Greg KH
2009-10-02 1:18 ` Greg KH [this message]
2009-10-02 1:18 ` [133/136] iwlwifi: update 1000 series API version to match firmware Greg KH
2009-10-02 1:18 ` [134/136] iwlagn: modify digital SVR for 1000 Greg KH
2009-10-02 1:18 ` [135/136] iwlwifi: traverse linklist to find the valid OTP block Greg KH
2009-10-02 1:18 ` [136/136] iwlwifi: fix unloading driver while scanning Greg KH
2009-10-02 5:01 ` [000/136] 2.6.31.2-stable review Eric W. Biederman
2009-10-02 5:10 ` Greg KH
2009-10-02 5:34 ` Eric W. Biederman
2009-10-02 6:06 ` Eric W. Biederman
2009-10-06 0:12 ` Daisuke Nishimura
2009-10-09 22:30 ` [Stable-review] " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091002012427.848787594@mini.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jay.e.sternberg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=reinette.chatre@intel.com \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome