Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291311
b: refs/heads/master
c: 8722c89
h: refs/heads/master
i:
  291309: 7d970a6
  291307: 8acab9d
  291303: 4feb706
  291295: fbd5e9c
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Mar 8, 2012
1 parent 8620c86 commit cdaae00
Show file tree
Hide file tree
Showing 4 changed files with 17 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: c2945f390dbc725f3c3ef044a6a3f4e3909a7758
refs/heads/master: 8722c899a07f45457464803142bd1c2d2a2c3bd8
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ static inline void iwl_enable_interrupts(struct iwl_trans *trans)
iwl_write32(trans, CSR_INT_MASK, trans_pcie->inta_mask);
}

static inline void iwl_enable_rfkill_int(struct iwl_trans *trans)
{
IWL_DEBUG_ISR(trans, "Enabling rfkill interrupt\n");
iwl_write32(trans, CSR_INT_MASK, CSR_INT_BIT_RF_KILL);
}

/*
* we have 8 bits used like this:
*
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,10 +1134,8 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
if (test_bit(STATUS_INT_ENABLED, &trans->shrd->status))
iwl_enable_interrupts(trans);
/* Re-enable RF_KILL if it occurred */
else if (handled & CSR_INT_BIT_RF_KILL) {
IWL_DEBUG_ISR(trans, "Enabling rfkill interrupt\n");
iwl_write32(trans, CSR_INT_MASK, CSR_INT_BIT_RF_KILL);
}
else if (handled & CSR_INT_BIT_RF_KILL)
iwl_enable_rfkill_int(trans);
}

/******************************************************************************
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);

if (hw_rfkill) {
iwl_enable_interrupts(trans);
iwl_enable_rfkill_int(trans);
return -ERFKILL;
}

Expand Down Expand Up @@ -1553,8 +1553,7 @@ static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans)
iwl_write32(trans, CSR_INT, 0xFFFFFFFF);

/* Even if we stop the HW, we still want the RF kill interrupt */
IWL_DEBUG_ISR(trans, "Enabling rfkill interrupt\n");
iwl_write32(trans, CSR_INT_MASK, CSR_INT_BIT_RF_KILL);
iwl_enable_rfkill_int(trans);
}

static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid,
Expand Down Expand Up @@ -1647,10 +1646,14 @@ static int iwl_trans_pcie_resume(struct iwl_trans *trans)
{
bool hw_rfkill;

iwl_enable_interrupts(trans);

hw_rfkill = !(iwl_read32(trans, CSR_GP_CNTRL) &
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW);

if (hw_rfkill)
iwl_enable_rfkill_int(trans);
else
iwl_enable_interrupts(trans);

iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);

return 0;
Expand Down

0 comments on commit cdaae00

Please sign in to comment.