Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb4e624 authored by Johannes Berg's avatar Johannes Berg
Browse files

iwlwifi: always use 'trans_pcie' name



A few places use 'pcie_trans' which is a bit non-standard,
use 'trans_pcie' there as well.

Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent fecba09e
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -838,8 +838,9 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
						unsigned long *flags)
						unsigned long *flags)
{
{
	int ret;
	int ret;
	struct iwl_trans_pcie *pcie_trans = IWL_TRANS_GET_PCIE_TRANS(trans);
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
	spin_lock_irqsave(&pcie_trans->reg_lock, *flags);

	spin_lock_irqsave(&trans_pcie->reg_lock, *flags);


	/* this bit wakes up the NIC */
	/* this bit wakes up the NIC */
	__iwl_trans_pcie_set_bit(trans, CSR_GP_CNTRL,
	__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,
			WARN_ONCE(1,
			WARN_ONCE(1,
				  "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
				  "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
				  val);
				  val);
			spin_unlock_irqrestore(&pcie_trans->reg_lock, *flags);
			spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
			return false;
			return false;
		}
		}
	}
	}
@@ -884,22 +885,22 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
	 * Fool sparse by faking we release the lock - sparse will
	 * Fool sparse by faking we release the lock - sparse will
	 * track nic_access anyway.
	 * track nic_access anyway.
	 */
	 */
	__release(&pcie_trans->reg_lock);
	__release(&trans_pcie->reg_lock);
	return true;
	return true;
}
}


static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans,
static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans,
					      unsigned long *flags)
					      unsigned long *flags)
{
{
	struct iwl_trans_pcie *pcie_trans = IWL_TRANS_GET_PCIE_TRANS(trans);
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);


	lockdep_assert_held(&pcie_trans->reg_lock);
	lockdep_assert_held(&trans_pcie->reg_lock);


	/*
	/*
	 * Fool sparse by faking we acquiring the lock - sparse will
	 * Fool sparse by faking we acquiring the lock - sparse will
	 * track nic_access anyway.
	 * track nic_access anyway.
	 */
	 */
	__acquire(&pcie_trans->reg_lock);
	__acquire(&trans_pcie->reg_lock);


	__iwl_trans_pcie_clear_bit(trans, CSR_GP_CNTRL,
	__iwl_trans_pcie_clear_bit(trans, CSR_GP_CNTRL,
				   CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
				   CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
@@ -910,7 +911,7 @@ static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans,
	 * scheduled on different CPUs (after we drop reg_lock).
	 * scheduled on different CPUs (after we drop reg_lock).
	 */
	 */
	mmiowb();
	mmiowb();
	spin_unlock_irqrestore(&pcie_trans->reg_lock, *flags);
	spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
}
}


static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,