Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327686
b: refs/heads/master
c: 289e550
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Aug 21, 2012
1 parent 4ced8d6 commit 3f87e9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da0cabb8de68d9dba254810f65aa7146eb5f47b3
refs/heads/master: 289e5501c3141191dd830957f1d764d3dc14a54f
17 changes: 8 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ static int iwl_set_hw_ready(struct iwl_trans *trans)
static int iwl_prepare_card_hw(struct iwl_trans *trans)
{
int ret;
int t = 0;

IWL_DEBUG_INFO(trans, "iwl_trans_prepare_card_hw enter\n");

Expand All @@ -909,17 +910,15 @@ static int iwl_prepare_card_hw(struct iwl_trans *trans)
iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG,
CSR_HW_IF_CONFIG_REG_PREPARE);

ret = iwl_poll_bit(trans, CSR_HW_IF_CONFIG_REG,
~CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE,
CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE, 150000);
do {
ret = iwl_set_hw_ready(trans);
if (ret >= 0)
return 0;

if (ret < 0)
return ret;
usleep_range(200, 1000);
t += 200;
} while (t < 150000);

/* HW should be ready by now, check again. */
ret = iwl_set_hw_ready(trans);
if (ret >= 0)
return 0;
return ret;
}

Expand Down

0 comments on commit 3f87e9c

Please sign in to comment.