diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-11 02:02:25 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-17 16:21:40 -0500 |
commit | 0fec954249b55318aced45a0e47e1dd023986e5f (patch) | |
tree | e2a8d46cfe9c060355be13c179f79961ee496c89 /drivers/net/wireless/iwlwifi | |
parent | a0f337cc3592b8206d371e549a495b4d7f9cc392 (diff) |
iwlwifi: pcie: determine the interrupt type in the handler
Instead of having:
iwl_pcie_irq_handler
iwl_pcie_isr_ict
iwl_pcie_isr_non_ict
we now have:
iwl_pcie_irq_handler:
if (use_ict))
iwl_pcie_int_cause_ict;
else
iwl_pcie_int_cause_non_ict;
This is much clearer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 5044fbd82e83..58d3f649905c 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -807,8 +807,7 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans) | |||
807 | wake_up(&trans_pcie->wait_command_queue); | 807 | wake_up(&trans_pcie->wait_command_queue); |
808 | } | 808 | } |
809 | 809 | ||
810 | /* legacy (non-ICT) ISR. Assumes that trans_pcie->irq_lock is held */ | 810 | static irqreturn_t iwl_pcie_int_cause_non_ict(struct iwl_trans *trans) |
811 | static irqreturn_t iwl_pcie_isr_non_ict(struct iwl_trans *trans) | ||
812 | { | 811 | { |
813 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 812 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
814 | u32 inta; | 813 | u32 inta; |
@@ -876,7 +875,7 @@ static irqreturn_t iwl_pcie_isr_non_ict(struct iwl_trans *trans) | |||
876 | * the interrupt we need to service, driver will set the entries back to 0 and | 875 | * the interrupt we need to service, driver will set the entries back to 0 and |
877 | * set index. | 876 | * set index. |
878 | */ | 877 | */ |
879 | static irqreturn_t iwl_pcie_isr_ict(struct iwl_trans *trans) | 878 | static irqreturn_t iwl_pcie_int_cause_ict(struct iwl_trans *trans) |
880 | { | 879 | { |
881 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 880 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
882 | irqreturn_t ret; | 881 | irqreturn_t ret; |
@@ -884,14 +883,6 @@ static irqreturn_t iwl_pcie_isr_ict(struct iwl_trans *trans) | |||
884 | u32 val = 0; | 883 | u32 val = 0; |
885 | u32 read; | 884 | u32 read; |
886 | 885 | ||
887 | /* dram interrupt table not set yet, | ||
888 | * use legacy interrupt. | ||
889 | */ | ||
890 | if (unlikely(!trans_pcie->use_ict)) { | ||
891 | ret = iwl_pcie_isr_non_ict(trans); | ||
892 | return ret; | ||
893 | } | ||
894 | |||
895 | trace_iwlwifi_dev_irq(trans->dev); | 886 | trace_iwlwifi_dev_irq(trans->dev); |
896 | 887 | ||
897 | /* Ignore interrupt if there's nothing in NIC to service. | 888 | /* Ignore interrupt if there's nothing in NIC to service. |
@@ -977,7 +968,14 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id) | |||
977 | 968 | ||
978 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); | 969 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); |
979 | 970 | ||
980 | ret = iwl_pcie_isr_ict(trans); | 971 | /* dram interrupt table not set yet, |
972 | * use legacy interrupt. | ||
973 | */ | ||
974 | if (likely(trans_pcie->use_ict)) | ||
975 | ret = iwl_pcie_int_cause_ict(trans); | ||
976 | else | ||
977 | ret = iwl_pcie_int_cause_non_ict(trans); | ||
978 | |||
981 | if (ret != IRQ_WAKE_THREAD) { | 979 | if (ret != IRQ_WAKE_THREAD) { |
982 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); | 980 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); |
983 | return ret; | 981 | return ret; |