* [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi
@ 2013-04-17 17:45 Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/wmi.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 533e25f..08ad148 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -23,7 +23,7 @@
#include "wmi.h"
#include "mac.h"
-struct wmi_struct {
+struct ath10k_wmi {
struct ath10k *ar;
enum htc_endpoint_id eid;
@@ -38,7 +38,7 @@ struct wmi_struct {
void ath10k_wmi_flush_tx(struct ath10k *ar)
{
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
int ret;
ret = wait_event_timeout(wmi->wq,
@@ -55,7 +55,7 @@ void ath10k_wmi_flush_tx(struct ath10k *ar)
int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
{
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
int ret;
ret = wait_for_completion_timeout(&wmi->service_ready,
WMI_SERVICE_READY_TIMEOUT_HZ);
@@ -64,7 +64,7 @@ int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar)
{
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
int ret;
ret = wait_for_completion_timeout(&wmi->unified_ready,
WMI_UNIFIED_READY_TIMEOUT_HZ);
@@ -92,7 +92,7 @@ static struct sk_buff *ath10k_wmi_alloc_skb(u32 len)
static void ath10k_wmi_htc_tx_complete(struct sk_buff *skb)
{
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
- struct wmi_struct *wmi = skb_cb->htc.priv;
+ struct ath10k_wmi *wmi = skb_cb->htc.priv;
dev_kfree_skb(skb);
@@ -105,7 +105,7 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
enum wmi_cmd_id cmd_id)
{
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
struct wmi_cmd_hdr *cmd_hdr;
int status;
@@ -841,7 +841,7 @@ static void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar, struct sk_buff *skb)
{
struct ath_common *common = ath10k_common(ar);
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
struct wmi_service_ready_event *ev = (void *)skb->data;
if (skb->len < sizeof(*ev)) {
@@ -899,7 +899,7 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar, struct sk_buff
static int ath10k_wmi_ready_event_rx(struct ath10k *ar, struct sk_buff *skb)
{
struct wmi_ready_event *ev = (void *)skb->data;
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
if (WARN_ON(skb->len < sizeof(*ev)))
return -EINVAL;
@@ -925,7 +925,7 @@ static int ath10k_wmi_ready_event_rx(struct ath10k *ar, struct sk_buff *skb)
return 0;
}
-static void ath10k_wmi_event_process(struct wmi_struct *wmi, struct sk_buff *skb)
+static void ath10k_wmi_event_process(struct ath10k_wmi *wmi, struct sk_buff *skb)
{
struct ath10k *ar = wmi->ar;
struct wmi_cmd_hdr *cmd_hdr;
@@ -1055,7 +1055,7 @@ static void ath10k_wmi_event_process(struct wmi_struct *wmi, struct sk_buff *skb
static void ath10k_wmi_event_work(struct work_struct *work)
{
- struct wmi_struct *wmi = container_of(work, struct wmi_struct,
+ struct ath10k_wmi *wmi = container_of(work, struct ath10k_wmi,
wmi_event_work);
struct sk_buff *skb;
@@ -1070,7 +1070,7 @@ static void ath10k_wmi_event_work(struct work_struct *work)
static void ath10k_wmi_process_rx(void *ptr, struct sk_buff *skb)
{
- struct wmi_struct *wmi = ptr;
+ struct ath10k_wmi *wmi = ptr;
struct wmi_cmd_hdr *cmd_hdr = (struct wmi_cmd_hdr *)skb->data;
enum wmi_event_id event_id = __le16_to_cpu(cmd_hdr->cmd_id);
@@ -1096,7 +1096,7 @@ static void ath10k_wmi_process_rx(void *ptr, struct sk_buff *skb)
/* WMI Initialization functions */
int ath10k_wmi_attach(struct ath10k *ar)
{
- struct wmi_struct *wmi;
+ struct ath10k_wmi *wmi;
wmi = kzalloc(sizeof(*wmi), GFP_KERNEL);
if (!wmi)
@@ -1116,7 +1116,7 @@ int ath10k_wmi_attach(struct ath10k *ar)
void ath10k_wmi_detach(struct ath10k *ar)
{
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
struct sk_buff *skb;
/* HTC should've drained the packets already */
@@ -1141,7 +1141,7 @@ int ath10k_wmi_connect_htc_service(struct ath10k *ar)
int status;
struct htc_service_connect_req connect;
struct htc_service_connect_resp response;
- struct wmi_struct *wmi = ar->modules.wmi;
+ struct ath10k_wmi *wmi = ar->modules.wmi;
memset(&connect, 0, sizeof(connect));
memset(&response, 0, sizeof(response));
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-18 10:36 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks Bartosz Markowski
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.c | 25 +++++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/core.h | 3 +++
drivers/net/wireless/ath/ath10k/pci.c | 6 +++---
drivers/net/wireless/ath/ath10k/wmi.c | 7 -------
4 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 213c851..a1c4312 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -663,6 +663,31 @@ void ath10k_core_unregister(struct ath10k *ar)
}
EXPORT_SYMBOL(ath10k_core_unregister);
+#if defined(CONFIG_PM_SLEEP)
+int ath10k_pdev_suspend_target(struct ath10k *ar) {
+ int ret;
+
+ ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
+
+ ret = ath10k_wmi_pdev_suspend_target(ar);
+
+ return ret;
+}
+EXPORT_SYMBOL(ath10k_pdev_suspend_target);
+
+int ath10k_pdev_resume_target(struct ath10k *ar) {
+
+ int ret;
+
+ ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
+
+ ret = ath10k_wmi_pdev_resume_target(ar);
+
+ return ret;
+}
+EXPORT_SYMBOL(ath10k_pdev_resume_target);
+#endif
+
MODULE_AUTHOR("Qualcomm Atheros");
MODULE_DESCRIPTION("Core module for AR9888 PCIe devices.");
MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 193ac31..00cf53a 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -370,5 +370,8 @@ void ath10k_core_destroy(struct ath10k *ar);
int ath10k_core_register(struct ath10k *ar);
void ath10k_core_unregister(struct ath10k *ar);
+int ath10k_pdev_suspend_target(struct ath10k *ar);
+int ath10k_pdev_resume_target(struct ath10k *ar);
+
void ath10k_remain_on_channel_reset(unsigned long ptr);
#endif /* _CORE_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index ce77f9f..2f141fea 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2420,7 +2420,7 @@ static int ath10k_pci_suspend(struct device *device)
if (!ar_pci)
return -ENODEV;
- if (!ath10k_wmi_pdev_suspend_target(ar)) {
+ if (!ath10k_pdev_suspend_target(ar)) {
left = wait_event_interruptible_timeout(ar->event_queue,
ar->is_target_paused == true,
1 * HZ);
@@ -2490,9 +2490,9 @@ static int ath10k_pci_resume(struct device *device)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
}
- ret = ath10k_wmi_pdev_resume_target(ar);
+ ret = ath10k_pdev_resume_target(ar);
if (ret)
- ath10k_warn("ath10k_wmi_pdev_resume_target: %d\n", ret);
+ ath10k_warn("target resume failed: %d\n", ret);
return ret;
}
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 08ad148..9a2bfab 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1229,19 +1229,13 @@ int ath10k_wmi_pdev_suspend_target(struct ath10k *ar)
cmd = (void *)skb->data;
cmd->suspend_opt = WMI_PDEV_SUSPEND;
- ath10k_dbg(ATH10K_DBG_WMI, "%s: called", __func__);
-
return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_SUSPEND_CMDID);
}
-EXPORT_SYMBOL(ath10k_wmi_pdev_suspend_target);
-
int ath10k_wmi_pdev_resume_target(struct ath10k *ar)
{
struct sk_buff *skb;
- ath10k_dbg(ATH10K_DBG_WMI, "%s: called", __func__);
-
skb = ath10k_wmi_alloc_skb(0);
if (skb == NULL) {
ath10k_warn("%s: ath10k_wmi_alloc_skb() failed\n", __func__);
@@ -1250,7 +1244,6 @@ int ath10k_wmi_pdev_resume_target(struct ath10k *ar)
return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_RESUME_CMDID);
}
-EXPORT_SYMBOL(ath10k_wmi_pdev_resume_target);
#endif /* CONFIG_PM_SLEEP */
int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-18 1:52 ` Sujith Manoharan
2013-04-17 17:45 ` [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
No need to check CONFIG_PM_SLEEP everywhere, the PCI suspend
hooks is the only place we need to check it.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.c | 2 --
drivers/net/wireless/ath/ath10k/wmi.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index a1c4312..c660722 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -663,7 +663,6 @@ void ath10k_core_unregister(struct ath10k *ar)
}
EXPORT_SYMBOL(ath10k_core_unregister);
-#if defined(CONFIG_PM_SLEEP)
int ath10k_pdev_suspend_target(struct ath10k *ar) {
int ret;
@@ -686,7 +685,6 @@ int ath10k_pdev_resume_target(struct ath10k *ar) {
return ret;
}
EXPORT_SYMBOL(ath10k_pdev_resume_target);
-#endif
MODULE_AUTHOR("Qualcomm Atheros");
MODULE_DESCRIPTION("Core module for AR9888 PCIe devices.");
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 9a2bfab..6d609ae 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1216,7 +1216,6 @@ int ath10k_wmi_pdev_set_channel(struct ath10k *ar, const struct wmi_channel_arg
return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_SET_CHANNEL_CMDID);
}
-#if defined(CONFIG_PM_SLEEP)
int ath10k_wmi_pdev_suspend_target(struct ath10k *ar)
{
struct wmi_pdev_suspend_cmd *cmd;
@@ -1244,7 +1243,6 @@ int ath10k_wmi_pdev_resume_target(struct ath10k *ar)
return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_RESUME_CMDID);
}
-#endif /* CONFIG_PM_SLEEP */
int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,
u32 value)
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-18 10:36 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code Bartosz Markowski
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
Also throw an error to PCI if WMI suspend command fails.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 50 +++++++++++++++++----------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 2f141fea..22b533b 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2420,33 +2420,35 @@ static int ath10k_pci_suspend(struct device *device)
if (!ar_pci)
return -ENODEV;
- if (!ath10k_pdev_suspend_target(ar)) {
- left = wait_event_interruptible_timeout(ar->event_queue,
- ar->is_target_paused == true,
- 1 * HZ);
-
- if (!left) {
- ath10k_warn("failed to receive target pasused"
- " event [left=%d]\n", left);
- return -EIO;
- }
- /*
- * reset is_target_paused and host can check that in next time,
- * or it will always be TRUE and host just skip the waiting
- * condition, it causes target assert due to host already
- * suspend
- */
- ar->is_target_paused = false;
+ if (ath10k_pdev_suspend_target(ar))
+ return -EIO;
- pci_read_config_dword(pdev, ATH10K_PCI_PM_CONTROL, &val);
+ left = wait_event_interruptible_timeout(ar->event_queue,
+ ar->is_target_paused == true,
+ 1 * HZ);
- if ((val & 0x000000ff) != 0x3) {
- pci_save_state(pdev);
- pci_disable_device(pdev);
- pci_write_config_dword(pdev, ATH10K_PCI_PM_CONTROL,
- (val & 0xffffff00) | 0x03);
- }
+ if (!left) {
+ ath10k_warn("failed to receive target pasused"
+ " event [left=%d]\n", left);
+ return -EIO;
}
+ /*
+ * reset is_target_paused and host can check that in next time,
+ * or it will always be TRUE and host just skip the waiting
+ * condition, it causes target assert due to host already
+ * suspend
+ */
+ ar->is_target_paused = false;
+
+ pci_read_config_dword(pdev, ATH10K_PCI_PM_CONTROL, &val);
+
+ if ((val & 0x000000ff) != 0x3) {
+ pci_save_state(pdev);
+ pci_disable_device(pdev);
+ pci_write_config_dword(pdev, ATH10K_PCI_PM_CONTROL,
+ (val & 0xffffff00) | 0x03);
+ }
+
return 0;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
` (2 preceding siblings ...)
2013-04-17 17:45 ` [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-18 10:37 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 6/7] ath10k: shift extern variable where it belongs Bartosz Markowski
` (2 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.h | 2 --
drivers/net/wireless/ath/ath10k/debug.h | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 00cf53a..c585a67 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -276,10 +276,8 @@ struct ath10k {
void *wmi;
} modules;
-#if defined(CONFIG_PM_SLEEP)
wait_queue_head_t event_queue;
bool is_target_paused;
-#endif
struct ath10k_bmi bmi;
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index dc4847b..681e400 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -70,7 +70,7 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar,
num_peer_stats = __le32_to_cpu(ev->num_peer_stats); /* 0 or max peers */
if (num_pdev_stats) {
- struct wmi_pdev_stats *pdev_stats = (void *)tmp;
+ struct wmi_pdev_stats *pdev_stats = (struct wmi_pdev_stats *)tmp;
fw_stats->ch_noise_floor = __le32_to_cpu(pdev_stats->chan_nf);
fw_stats->tx_frame_count = __le32_to_cpu(pdev_stats->tx_frame_count);
@@ -127,7 +127,7 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar,
struct wmi_vdev_stats *vdev_stats;
for (i = 0; i < num_vdev_stats; i++) {
- vdev_stats = (void *)tmp;
+ vdev_stats = (struct wmi_vdev_stats *)tmp;
tmp += sizeof(struct wmi_vdev_stats);
}
}
@@ -138,7 +138,7 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar,
fw_stats->peers = num_peer_stats;
for (i = 0; i < num_peer_stats; i++) {
- peer_stats = (void *)tmp;
+ peer_stats = (struct wmi_peer_stats *)tmp;
WMI_MAC_ADDR_TO_CHAR_ARRAY(&peer_stats->peer_macaddr,
fw_stats->peer_stat[i].peer_macaddr);
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 6/7] ath10k: shift extern variable where it belongs
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
` (3 preceding siblings ...)
2013-04-17 17:45 ` [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 7/7] ath10k: remove unnecessary NULL check Bartosz Markowski
2013-04-18 5:23 ` [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Michal Kazior
6 siblings, 0 replies; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
ath10k_target_ps is PCI specific
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/hif.h | 2 --
drivers/net/wireless/ath/ath10k/pci.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h
index e9e202e..66f1d1f 100644
--- a/drivers/net/wireless/ath/ath10k/hif.h
+++ b/drivers/net/wireless/ath/ath10k/hif.h
@@ -21,8 +21,6 @@
#include <linux/kernel.h>
#include "core.h"
-extern unsigned int ath10k_target_ps;
-
#define HIF_TYPE_AR9888 1
/* FW dump area */
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index d6ffd84..708c087 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -351,6 +351,8 @@ void ath10k_pci_target_ps_control(struct ath10k *ar,
bool sleep_ok,
bool wait_for_it);
+extern unsigned int ath10k_target_ps;
+
static inline void TARGET_ACCESS_BEGIN(struct ath10k *ar)
{
if (ath10k_target_ps)
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 7/7] ath10k: remove unnecessary NULL check
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
` (4 preceding siblings ...)
2013-04-17 17:45 ` [ath9k-devel] [PATCH 6/7] ath10k: shift extern variable where it belongs Bartosz Markowski
@ 2013-04-17 17:45 ` Bartosz Markowski
2013-04-18 5:23 ` [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Michal Kazior
6 siblings, 0 replies; 15+ messages in thread
From: Bartosz Markowski @ 2013-04-17 17:45 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index ff4b1bf..299b9e6 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -622,8 +622,7 @@ static int ath10k_htc_rx_completion_handler(struct ath10k *ar,
/* skb is now owned by the rx completion handler */
skb = NULL;
out:
- if (skb != NULL)
- kfree_skb(skb);
+ kfree_skb(skb);
return status;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks
2013-04-17 17:45 ` [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks Bartosz Markowski
@ 2013-04-18 1:52 ` Sujith Manoharan
2013-04-18 6:21 ` Markowski Bartosz
0 siblings, 1 reply; 15+ messages in thread
From: Sujith Manoharan @ 2013-04-18 1:52 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski wrote:
> No need to check CONFIG_PM_SLEEP everywhere, the PCI suspend
> hooks is the only place we need to check it.
The PM_SLEEP wrappers are required for OpenWrt.
Sujith
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
` (5 preceding siblings ...)
2013-04-17 17:45 ` [ath9k-devel] [PATCH 7/7] ath10k: remove unnecessary NULL check Bartosz Markowski
@ 2013-04-18 5:23 ` Michal Kazior
2013-04-18 6:22 ` Markowski Bartosz
6 siblings, 1 reply; 15+ messages in thread
From: Michal Kazior @ 2013-04-18 5:23 UTC (permalink / raw)
To: ath9k-devel
On 17/04/13 19:45, Bartosz Markowski wrote:
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
> ---
> drivers/net/wireless/ath/ath10k/wmi.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
This is something I've actually done in one of my patches I posted
yesterday morning.
-- Pozdrawiam / Best regards, Michal Kazior.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks
2013-04-18 1:52 ` Sujith Manoharan
@ 2013-04-18 6:21 ` Markowski Bartosz
2013-04-18 6:31 ` Sujith Manoharan
0 siblings, 1 reply; 15+ messages in thread
From: Markowski Bartosz @ 2013-04-18 6:21 UTC (permalink / raw)
To: ath9k-devel
On 18/04/13 03:52, Sujith Manoharan wrote:
> Bartosz Markowski wrote:
>> No need to check CONFIG_PM_SLEEP everywhere, the PCI suspend
>> hooks is the only place we need to check it.
> The PM_SLEEP wrappers are required for OpenWrt.
>
> Sujith
Everywhere? The PCI suspend/resume callbacks are still wrapped up.
-Bartosz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi
2013-04-18 5:23 ` [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Michal Kazior
@ 2013-04-18 6:22 ` Markowski Bartosz
0 siblings, 0 replies; 15+ messages in thread
From: Markowski Bartosz @ 2013-04-18 6:22 UTC (permalink / raw)
To: ath9k-devel
On 18/04/13 07:23, Michal Kazior wrote:
> On 17/04/13 19:45, Bartosz Markowski wrote:
>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
>> ---
>> drivers/net/wireless/ath/ath10k/wmi.c | 28 ++++++++++++++--------------
>> 1 file changed, 14 insertions(+), 14 deletions(-)
> This is something I've actually done in one of my patches I posted
> yesterday morning.
>
Sorry Michal, I had to miss it.
Please drop this patch then.
-Bartosz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks
2013-04-18 6:21 ` Markowski Bartosz
@ 2013-04-18 6:31 ` Sujith Manoharan
0 siblings, 0 replies; 15+ messages in thread
From: Sujith Manoharan @ 2013-04-18 6:31 UTC (permalink / raw)
To: ath9k-devel
Markowski Bartosz wrote:
> Everywhere? The PCI suspend/resume callbacks are still wrapped up.
Sorry, I didn't even look at the patch. ;)
Sujith
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file
2013-04-17 17:45 ` [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
@ 2013-04-18 10:36 ` Kalle Valo
0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2013-04-18 10:36 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -663,6 +663,31 @@ void ath10k_core_unregister(struct ath10k *ar)
> }
> EXPORT_SYMBOL(ath10k_core_unregister);
>
> +#if defined(CONFIG_PM_SLEEP)
> +int ath10k_pdev_suspend_target(struct ath10k *ar) {
> + int ret;
> +
> + ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
> +
> + ret = ath10k_wmi_pdev_suspend_target(ar);
> +
> + return ret;
> +}
> +EXPORT_SYMBOL(ath10k_pdev_suspend_target);
> +
> +int ath10k_pdev_resume_target(struct ath10k *ar) {
> +
> + int ret;
> +
> + ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
> +
> + ret = ath10k_wmi_pdev_resume_target(ar);
> +
> + return ret;
> +}
> +EXPORT_SYMBOL(ath10k_pdev_resume_target);
Please rename them to ath10k_core_suspend() and _resume() or something
like that.
--
Kalle Valo
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend
2013-04-17 17:45 ` [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
@ 2013-04-18 10:36 ` Kalle Valo
0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2013-04-18 10:36 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> Also throw an error to PCI if WMI suspend command fails.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Separate patches for reindent and the new error, please.
--
Kalle Valo
^ permalink raw reply [flat|nested] 15+ messages in thread
* [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code
2013-04-17 17:45 ` [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code Bartosz Markowski
@ 2013-04-18 10:37 ` Kalle Valo
0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2013-04-18 10:37 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
> ---
> drivers/net/wireless/ath/ath10k/core.h | 2 --
> drivers/net/wireless/ath/ath10k/debug.h | 6 +++---
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
> index 00cf53a..c585a67 100644
> --- a/drivers/net/wireless/ath/ath10k/core.h
> +++ b/drivers/net/wireless/ath/ath10k/core.h
> @@ -276,10 +276,8 @@ struct ath10k {
> void *wmi;
> } modules;
>
> -#if defined(CONFIG_PM_SLEEP)
> wait_queue_head_t event_queue;
> bool is_target_paused;
> -#endif
I think this is leftovers from a previous patch.
--
Kalle Valo
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-04-18 10:37 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 17:45 [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
2013-04-18 10:36 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 3/7] ath10k: remove excessive ifdef checks Bartosz Markowski
2013-04-18 1:52 ` Sujith Manoharan
2013-04-18 6:21 ` Markowski Bartosz
2013-04-18 6:31 ` Sujith Manoharan
2013-04-17 17:45 ` [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
2013-04-18 10:36 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code Bartosz Markowski
2013-04-18 10:37 ` Kalle Valo
2013-04-17 17:45 ` [ath9k-devel] [PATCH 6/7] ath10k: shift extern variable where it belongs Bartosz Markowski
2013-04-17 17:45 ` [ath9k-devel] [PATCH 7/7] ath10k: remove unnecessary NULL check Bartosz Markowski
2013-04-18 5:23 ` [ath9k-devel] [PATCH 1/7] ath10k: rename struct wmi_struct -> struct ath10k_wmi Michal Kazior
2013-04-18 6:22 ` Markowski Bartosz
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.