All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH] ath10k: move QCA9880_1.0 PCI-specific hacks to pci sub-module
@ 2013-04-19  7:11 Bartosz Markowski
  2013-04-22  8:52 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Markowski @ 2013-04-19  7:11 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h |    3 ---
 drivers/net/wireless/ath/ath10k/pci.c  |    4 ++--
 drivers/net/wireless/ath/ath10k/pci.h  |   16 +++++++++++-----
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index f47b2a0..954a33d 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -327,9 +327,6 @@ struct ath10k {
 	struct mutex vdev_mtx;
 	struct completion vdev_setup_done;
 
-	bool hw_v1_workaround;
-	spinlock_t hw_v1_workaround_lock;
-
 	struct workqueue_struct *workqueue;
 
 	/* prevents concurrent FW reconfiguration */
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e4024ef..48a13b0 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2222,8 +2222,8 @@ retry:
 
 	/* Enable AR9888 V1 HW workarounds */
 	if (pci_dev->device == AR9888_1_0_DEVICE_ID) {
-		ar->hw_v1_workaround = true;
-		spin_lock_init(&ar->hw_v1_workaround_lock);
+		ar_pci->hw_v1_workaround = true;
+		spin_lock_init(&ar_pci->hw_v1_workaround_lock);
 	}
 
 	ar_pci->ar = ar;
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index 9b497a7..d468c31 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -218,6 +218,9 @@ struct ath10k_pci {
 
 	/* Map CE id to ce_state */
 	struct ce_state *ce_id_to_state[CE_COUNT_MAX];
+
+	bool hw_v1_workaround;
+	spinlock_t hw_v1_workaround_lock;
 };
 
 static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
@@ -259,17 +262,19 @@ static inline void pci_write32_v1_workaround(struct ath10k *ar,
 					     void __iomem *addr,
 					     u32 offset, u32 value)
 {
-	if (ar->hw_v1_workaround) {
+	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
+
+	if (ar_pci->hw_v1_workaround) {
 		unsigned long irq_flags;
 
-		spin_lock_irqsave(&ar->hw_v1_workaround_lock, irq_flags);
+		spin_lock_irqsave(&ar_pci->hw_v1_workaround_lock, irq_flags);
 
 		ioread32(addr+offset+4); /* 3rd read prior to write */
 		ioread32(addr+offset+4); /* 2nd read prior to write */
 		ioread32(addr+offset+4); /* 1st read prior to write */
 		iowrite32(value, addr+offset);
 
-		spin_unlock_irqrestore(&ar->hw_v1_workaround_lock, irq_flags);
+		spin_unlock_irqrestore(&ar_pci->hw_v1_workaround_lock, irq_flags);
 	} else
 		iowrite32(value, addr+offset);
 }
@@ -315,10 +320,11 @@ static inline void WAR_CE_SRC_RING_WRITE_IDX_SET(struct ath10k *ar,
 						 u32 ctrl_addr,
 						 unsigned int write_index)
 {
+	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
 	void __iomem *indicator_addr;
-	void __iomem *targid = ath10k_pci_priv(ar)->mem;
+	void __iomem *targid = ar_pci->mem;
 
-	if (!ar->hw_v1_workaround) {
+	if (!ar_pci->hw_v1_workaround) {
 		CE_SRC_RING_WRITE_IDX_SET(ar, targid, ctrl_addr, write_index);
 		return;
 	}
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [ath9k-devel] [PATCH] ath10k: move QCA9880_1.0 PCI-specific hacks to pci sub-module
  2013-04-19  7:11 [ath9k-devel] [PATCH] ath10k: move QCA9880_1.0 PCI-specific hacks to pci sub-module Bartosz Markowski
@ 2013-04-22  8:52 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-04-22  8:52 UTC (permalink / raw)
  To: ath9k-devel

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>

Thanks, applied.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-22  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19  7:11 [ath9k-devel] [PATCH] ath10k: move QCA9880_1.0 PCI-specific hacks to pci sub-module Bartosz Markowski
2013-04-22  8:52 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.