Re: [PATCH v3 2/3] ath10k: Disable interface pause wow config for integrated chipset

2019-02-07 Thread Kalle Valo
Govind Singh  wrote:

> wow pause iface config controls the PCI D0/D3-WOW cases for pcie
> bus state. Firmware does not expects WOW_IFACE_PAUSE_ENABLED config
> for bus/link that cannot be suspended ex:snoc and does not trigger
> common subsystem shutdown.
> Disable interface pause wow config for integrated chipset(WCN3990)
> for correct WOW configuration in the firmware.
> 
> Testing:
> Tested on WCN3990 HW.
> Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.
> 
> Signed-off-by: Govind Singh 
> Signed-off-by: Kalle Valo 

This issued a new warning:

drivers/net/wireless/ath/ath10k/wmi-tlv.c:3327:41: warning: incorrect type in 
assignment (different base types)
drivers/net/wireless/ath/ath10k/wmi-tlv.c:3327:41:expected restricted 
__le32 [usertype] pause_iface_config
drivers/net/wireless/ath/ath10k/wmi-tlv.c:3327:41:got int

I fixed it in the pending branch:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending=f21da752a87f8fefdf97fcef565adce9c778fc5e

-- 
https://patchwork.kernel.org/patch/10799253/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


[PATCH v3 2/3] ath10k: Disable interface pause wow config for integrated chipset

2019-02-06 Thread Govind Singh
wow pause iface config controls the PCI D0/D3-WOW cases for pcie
bus state. Firmware does not expects WOW_IFACE_PAUSE_ENABLED config
for bus/link that cannot be suspended ex:snoc and does not trigger
common subsystem shutdown.
Disable interface pause wow config for integrated chipset(WCN3990)
for correct WOW configuration in the firmware.

Testing:
Tested on WCN3990 HW.
Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.

Signed-off-by: Govind Singh 
---
 drivers/net/wireless/ath/ath10k/core.c |  5 +++--
 drivers/net/wireless/ath/ath10k/core.h |  2 ++
 drivers/net/wireless/ath/ath10k/coredump.c |  2 +-
 drivers/net/wireless/ath/ath10k/debug.c|  4 ++--
 drivers/net/wireless/ath/ath10k/htc.c  |  6 +++---
 drivers/net/wireless/ath/ath10k/htt_rx.c   | 10 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c   |  6 +++---
 drivers/net/wireless/ath/ath10k/pci.c  |  3 ++-
 drivers/net/wireless/ath/ath10k/txrx.c |  2 +-
 drivers/net/wireless/ath/ath10k/wmi-tlv.c  |  2 ++
 drivers/net/wireless/ath/ath10k/wmi-tlv.h  |  7 +++
 11 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index 2bdb632b7b1a..01ad53f3c569 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2955,8 +2955,9 @@ static void ath10k_core_register_work(struct work_struct 
*work)
 int ath10k_core_register(struct ath10k *ar,
 const struct ath10k_bus_params *bus_params)
 {
-   ar->chip_id = bus_params->chip_id;
-   ar->dev_type = bus_params->dev_type;
+   ar->bus_param.chip_id = bus_params->chip_id;
+   ar->bus_param.dev_type = bus_params->dev_type;
+   ar->bus_param.link_can_suspend = bus_params->link_can_suspend;
queue_work(ar->workqueue, >register_work);
 
return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.h 
b/drivers/net/wireless/ath/ath10k/core.h
index d14a4f928218..2f43326decf6 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -921,6 +921,7 @@ enum ath10k_dev_type {
 struct ath10k_bus_params {
u32 chip_id;
enum ath10k_dev_type dev_type;
+   bool link_can_suspend;
 };
 
 struct ath10k {
@@ -1189,6 +1190,7 @@ struct ath10k {
enum ath10k_radar_confirmation_state radar_conf_state;
struct ath10k_radar_found_info last_radar_info;
struct work_struct radar_confirmation_work;
+   struct ath10k_bus_params bus_param;
 
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
diff --git a/drivers/net/wireless/ath/ath10k/coredump.c 
b/drivers/net/wireless/ath/ath10k/coredump.c
index eadae2f9206b..bf84e999466f 100644
--- a/drivers/net/wireless/ath/ath10k/coredump.c
+++ b/drivers/net/wireless/ath/ath10k/coredump.c
@@ -1167,7 +1167,7 @@ static struct ath10k_dump_file_data 
*ath10k_coredump_build(struct ath10k *ar)
dump_data->version = cpu_to_le32(ATH10K_FW_CRASH_DUMP_VERSION);
 
guid_copy(_data->guid, _data->guid);
-   dump_data->chip_id = cpu_to_le32(ar->chip_id);
+   dump_data->chip_id = cpu_to_le32(ar->bus_param.chip_id);
dump_data->bus_type = cpu_to_le32(0);
dump_data->target_version = cpu_to_le32(ar->target_version);
dump_data->fw_version_major = cpu_to_le32(ar->fw_version_major);
diff --git a/drivers/net/wireless/ath/ath10k/debug.c 
b/drivers/net/wireless/ath/ath10k/debug.c
index 02988fc378a1..9f2534d6b56f 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -58,7 +58,7 @@ void ath10k_debug_print_hwfw_info(struct ath10k *ar)
ath10k_info(ar, "%s target 0x%08x chip_id 0x%08x sub %04x:%04x",
ar->hw_params.name,
ar->target_version,
-   ar->chip_id,
+   ar->bus_param.chip_id,
ar->id.subsystem_vendor, ar->id.subsystem_device);
 
ath10k_info(ar, "kconfig debug %d debugfs %d tracing %d dfs %d testmode 
%d\n",
@@ -625,7 +625,7 @@ static ssize_t ath10k_read_chip_id(struct file *file, char 
__user *user_buf,
size_t len;
char buf[50];
 
-   len = scnprintf(buf, sizeof(buf), "0x%08x\n", ar->chip_id);
+   len = scnprintf(buf, sizeof(buf), "0x%08x\n", ar->bus_param.chip_id);
 
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
 }
diff --git a/drivers/net/wireless/ath/ath10k/htc.c 
b/drivers/net/wireless/ath/ath10k/htc.c
index 28daed5981a1..7654a21323ce 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -53,7 +53,7 @@ static inline void ath10k_htc_restore_tx_skb(struct 
ath10k_htc *htc,
 {
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
 
-   if (htc->ar->dev_type != ATH10K_DEV_TYPE_HL)
+   if (htc->ar->bus_param.dev_type != ATH10K_DEV_TYPE_HL)
dma_unmap_single(htc->ar->dev, skb_cb->paddr,