* [ath9k-devel] [PATCH] ath10k: Fix PCI probe
@ 2013-04-22 11:21 Sujith Manoharan
2013-04-23 4:34 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Sujith Manoharan @ 2013-04-22 11:21 UTC (permalink / raw)
To: ath9k-devel
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
The target should always be woken up when the device
is being probed and this shouldn't depend on the module
parameter "ath10k_target_ps", which is used to enable
target PowerSave.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 12 +++---------
drivers/net/wireless/ath/ath10k/pci.h | 16 ++++++++++++++--
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e75b36b..dbe9fe4 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -442,7 +442,7 @@ static void ath10k_pci_wait_for_target_to_awake(struct ath10k *ar)
ath10k_warn("Unable to wakeup target\n");
}
-void ath10k_pci_wake(struct ath10k *ar)
+void ath10k_do_pci_wake(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
void __iomem *pci_addr = ar_pci->mem;
@@ -450,9 +450,6 @@ void ath10k_pci_wake(struct ath10k *ar)
int tot_delay = 0;
int curr_delay = 5;
- if (!ath10k_target_ps)
- return;
-
if (atomic_read(&ar_pci->keep_awake_count) == 0) {
/* Force AWAKE */
iowrite32(PCIE_SOC_WAKE_V_MASK_T(ar),
@@ -483,14 +480,11 @@ void ath10k_pci_wake(struct ath10k *ar)
max_delay = tot_delay;
}
-void ath10k_pci_sleep(struct ath10k *ar)
+void ath10k_do_pci_sleep(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
void __iomem *pci_addr = ar_pci->mem;
- if (!ath10k_target_ps)
- return;
-
if (atomic_dec_and_test(&ar_pci->keep_awake_count)) {
/* Allow sleep */
ar_pci->verified_awake = false;
@@ -1688,7 +1682,7 @@ static int ath10k_pci_probe_device(struct ath10k *ar)
else {
/* Force AWAKE forever */
ath10k_dbg(ATH10K_DBG_PCI, "on-chip power save disabled\n");
- ath10k_pci_wake(ar);
+ ath10k_do_pci_wake(ar);
}
ath10k_pci_ce_init(ar);
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index a3b5e88..fd2cd71 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -355,7 +355,19 @@ static inline void WAR_CE_SRC_RING_WRITE_IDX_SET(struct ath10k *ar,
extern unsigned int ath10k_target_ps;
-void ath10k_pci_wake(struct ath10k *ar);
-void ath10k_pci_sleep(struct ath10k *ar);
+void ath10k_do_pci_wake(struct ath10k *ar);
+void ath10k_do_pci_sleep(struct ath10k *ar);
+
+static inline void ath10k_pci_wake(struct ath10k *ar)
+{
+ if (ath10k_target_ps)
+ ath10k_do_pci_wake(ar);
+}
+
+static inline void ath10k_pci_sleep(struct ath10k *ar)
+{
+ if (ath10k_target_ps)
+ ath10k_do_pci_sleep(ar);
+}
#endif /* _PCI_H_ */
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [ath9k-devel] [PATCH] ath10k: Fix PCI probe
2013-04-22 11:21 [ath9k-devel] [PATCH] ath10k: Fix PCI probe Sujith Manoharan
@ 2013-04-23 4:34 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-04-23 4:34 UTC (permalink / raw)
To: ath9k-devel
Sujith Manoharan <sujith@msujith.org> writes:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
>
> The target should always be woken up when the device
> is being probed and this shouldn't depend on the module
> parameter "ath10k_target_ps", which is used to enable
> target PowerSave.
>
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Thanks, applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-23 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 11:21 [ath9k-devel] [PATCH] ath10k: Fix PCI probe Sujith Manoharan
2013-04-23 4:34 ` 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.