Skip to content

Commit

Permalink
iwlwifi: pcie: reset the NIC before the bring up
Browse files Browse the repository at this point in the history
This allows to clean all kinds of bad state it might be in.
This solves situation where HW RFkill was switched while
the NIC was offline.
Until now, we relied on the firmware to do clean the
interrupt, but new firmwares don't do that any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Jul 26, 2013
1 parent bb963c4 commit 2997494
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
return err;
}

/* Reset the entire device */
iwl_set_bit(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);

usleep_range(10, 15);

iwl_pcie_apm_init(trans);

/* From now on, the op_mode will be kept updated about RF kill state */
Expand Down

0 comments on commit 2997494

Please sign in to comment.