diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 197dbe0a868c..826c15602c46 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -838,8 +838,9 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, | |||
838 | unsigned long *flags) | 838 | unsigned long *flags) |
839 | { | 839 | { |
840 | int ret; | 840 | int ret; |
841 | struct iwl_trans_pcie *pcie_trans = IWL_TRANS_GET_PCIE_TRANS(trans); | 841 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
842 | spin_lock_irqsave(&pcie_trans->reg_lock, *flags); | 842 | |
843 | spin_lock_irqsave(&trans_pcie->reg_lock, *flags); | ||
843 | 844 | ||
844 | /* this bit wakes up the NIC */ | 845 | /* this bit wakes up the NIC */ |
845 | __iwl_trans_pcie_set_bit(trans, CSR_GP_CNTRL, | 846 | __iwl_trans_pcie_set_bit(trans, CSR_GP_CNTRL, |
@@ -875,7 +876,7 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, | |||
875 | WARN_ONCE(1, | 876 | WARN_ONCE(1, |
876 | "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n", | 877 | "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n", |
877 | val); | 878 | val); |
878 | spin_unlock_irqrestore(&pcie_trans->reg_lock, *flags); | 879 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); |
879 | return false; | 880 | return false; |
880 | } | 881 | } |
881 | } | 882 | } |
@@ -884,22 +885,22 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, | |||
884 | * Fool sparse by faking we release the lock - sparse will | 885 | * Fool sparse by faking we release the lock - sparse will |
885 | * track nic_access anyway. | 886 | * track nic_access anyway. |
886 | */ | 887 | */ |
887 | __release(&pcie_trans->reg_lock); | 888 | __release(&trans_pcie->reg_lock); |
888 | return true; | 889 | return true; |
889 | } | 890 | } |
890 | 891 | ||
891 | static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans, | 892 | static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans, |
892 | unsigned long *flags) | 893 | unsigned long *flags) |
893 | { | 894 | { |
894 | struct iwl_trans_pcie *pcie_trans = IWL_TRANS_GET_PCIE_TRANS(trans); | 895 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
895 | 896 | ||
896 | lockdep_assert_held(&pcie_trans->reg_lock); | 897 | lockdep_assert_held(&trans_pcie->reg_lock); |
897 | 898 | ||
898 | /* | 899 | /* |
899 | * Fool sparse by faking we acquiring the lock - sparse will | 900 | * Fool sparse by faking we acquiring the lock - sparse will |
900 | * track nic_access anyway. | 901 | * track nic_access anyway. |
901 | */ | 902 | */ |
902 | __acquire(&pcie_trans->reg_lock); | 903 | __acquire(&trans_pcie->reg_lock); |
903 | 904 | ||
904 | __iwl_trans_pcie_clear_bit(trans, CSR_GP_CNTRL, | 905 | __iwl_trans_pcie_clear_bit(trans, CSR_GP_CNTRL, |
905 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 906 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
@@ -910,7 +911,7 @@ static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans, | |||
910 | * scheduled on different CPUs (after we drop reg_lock). | 911 | * scheduled on different CPUs (after we drop reg_lock). |
911 | */ | 912 | */ |
912 | mmiowb(); | 913 | mmiowb(); |
913 | spin_unlock_irqrestore(&pcie_trans->reg_lock, *flags); | 914 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); |
914 | } | 915 | } |
915 | 916 | ||
916 | static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, | 917 | static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, |