summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-4965-ucode.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-ucode.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c b/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c
index 3c9df1bb5afe..d4dc597452ea 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c
@@ -48,22 +48,22 @@
* it's a pretty good bet that everything between them is good, too.
*/
static int
-il4965_verify_inst_sparse(struct il_priv *priv, __le32 *image, u32 len)
+il4965_verify_inst_sparse(struct il_priv *il, __le32 *image, u32 len)
{
u32 val;
int ret = 0;
u32 errcnt = 0;
u32 i;
- IL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
+ IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len);
for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) {
/* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log
* if IL_DL_IO is set */
- il_write_direct32(priv, HBUS_TARG_MEM_RADDR,
+ il_write_direct32(il, HBUS_TARG_MEM_RADDR,
i + IWL4965_RTC_INST_LOWER_BOUND);
- val = _il_read_direct32(priv, HBUS_TARG_MEM_RDAT);
+ val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
ret = -EIO;
errcnt++;
@@ -79,7 +79,7 @@ il4965_verify_inst_sparse(struct il_priv *priv, __le32 *image, u32 len)
* il4965_verify_inst_full - verify runtime uCode image in card vs. host,
* looking at all data.
*/
-static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
+static int il4965_verify_inst_full(struct il_priv *il, __le32 *image,
u32 len)
{
u32 val;
@@ -87,9 +87,9 @@ static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
int ret = 0;
u32 errcnt;
- IL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
+ IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len);
- il_write_direct32(priv, HBUS_TARG_MEM_RADDR,
+ il_write_direct32(il, HBUS_TARG_MEM_RADDR,
IWL4965_RTC_INST_LOWER_BOUND);
errcnt = 0;
@@ -97,9 +97,9 @@ static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
/* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log
* if IL_DL_IO is set */
- val = _il_read_direct32(priv, HBUS_TARG_MEM_RDAT);
+ val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
- IL_ERR(priv, "uCode INST section is invalid at "
+ IL_ERR(il, "uCode INST section is invalid at "
"offset 0x%x, is 0x%x, s/b 0x%x\n",
save_len - len, val, le32_to_cpu(*image));
ret = -EIO;
@@ -110,7 +110,7 @@ static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
}
if (!errcnt)
- IL_DEBUG_INFO(priv,
+ IL_DEBUG_INFO(il,
"ucode image in INSTRUCTION memory is good\n");
return ret;
@@ -120,47 +120,47 @@ static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
* il4965_verify_ucode - determine which instruction image is in SRAM,
* and verify its contents
*/
-int il4965_verify_ucode(struct il_priv *priv)
+int il4965_verify_ucode(struct il_priv *il)
{
__le32 *image;
u32 len;
int ret;
/* Try bootstrap */
- image = (__le32 *)priv->ucode_boot.v_addr;
- len = priv->ucode_boot.len;
- ret = il4965_verify_inst_sparse(priv, image, len);
+ image = (__le32 *)il->ucode_boot.v_addr;
+ len = il->ucode_boot.len;
+ ret = il4965_verify_inst_sparse(il, image, len);
if (!ret) {
- IL_DEBUG_INFO(priv, "Bootstrap uCode is good in inst SRAM\n");
+ IL_DEBUG_INFO(il, "Bootstrap uCode is good in inst SRAM\n");
return 0;
}
/* Try initialize */
- image = (__le32 *)priv->ucode_init.v_addr;
- len = priv->ucode_init.len;
- ret = il4965_verify_inst_sparse(priv, image, len);
+ image = (__le32 *)il->ucode_init.v_addr;
+ len = il->ucode_init.len;
+ ret = il4965_verify_inst_sparse(il, image, len);
if (!ret) {
- IL_DEBUG_INFO(priv, "Initialize uCode is good in inst SRAM\n");
+ IL_DEBUG_INFO(il, "Initialize uCode is good in inst SRAM\n");
return 0;
}
/* Try runtime/protocol */
- image = (__le32 *)priv->ucode_code.v_addr;
- len = priv->ucode_code.len;
- ret = il4965_verify_inst_sparse(priv, image, len);
+ image = (__le32 *)il->ucode_code.v_addr;
+ len = il->ucode_code.len;
+ ret = il4965_verify_inst_sparse(il, image, len);
if (!ret) {
- IL_DEBUG_INFO(priv, "Runtime uCode is good in inst SRAM\n");
+ IL_DEBUG_INFO(il, "Runtime uCode is good in inst SRAM\n");
return 0;
}
- IL_ERR(priv, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
+ IL_ERR(il, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
/* Since nothing seems to match, show first several data entries in
* instruction SRAM, so maybe visual inspection will give a clue.
* Selection of bootstrap image (vs. other images) is arbitrary. */
- image = (__le32 *)priv->ucode_boot.v_addr;
- len = priv->ucode_boot.len;
- ret = il4965_verify_inst_full(priv, image, len);
+ image = (__le32 *)il->ucode_boot.v_addr;
+ len = il->ucode_boot.len;
+ ret = il4965_verify_inst_full(il, image, len);
return ret;
}
OpenPOWER on IntegriCloud