summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorRakesh Pillai <pillair@codeaurora.org>2017-01-23 17:19:13 +0530
committerRakesh Pillai <pillair@codeaurora.org>2017-01-28 17:38:23 +0530
commitc08c17a3bed82ce7bc50049e2f62df44571a08f6 (patch)
treefec955467b39120defc29e1e669c5ca695687b14 /drivers/net
parentbb1e977d1eb32b2a3ab0120cfc6564be24fce9ee (diff)
ath10k: Refactor wmi init cmd for WCN3990
WMI init cmd parameters num_wds_entries, num_perrs and skid_limit have different values for WCN3990. Refactor the wmi init cmd for WCN3990 with appropriate values. CRs-Fixed: 1115155 Change-Id: I6fadc8bd8e655eed589de658a036b4062c6da310 Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/hw.h5
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-tlv.c15
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 6f458da744e2..00e11b1a939d 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -518,6 +518,11 @@ ath10k_rx_desc_get_l3_pad_bytes(struct ath10k_hw_params *hw,
#define TARGET_TLV_NUM_MSDU_DESC (1024 + 32)
#define TARGET_TLV_NUM_WOW_PATTERNS 22
+/* Target specific defines for WMI-HL-1.0 firmware */
+#define TARGET_HL_10_TLV_NUM_PEERS 14
+#define TARGET_HL_10_TLV_AST_SKID_LIMIT 6
+#define TARGET_HL_10_TLV_NUM_WDS_ENTRIES 2
+
/* Diagnostic Window */
#define CE_DIAG_PIPE 7
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index fb6f948c6c0e..51d64d91b727 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -1400,7 +1400,18 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
cmd->num_host_mem_chunks = __cpu_to_le32(ar->wmi.num_mem_chunks);
cfg->num_vdevs = __cpu_to_le32(TARGET_TLV_NUM_VDEVS);
- cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS);
+ if (QCA_REV_WCN3990(ar)) {
+ cfg->num_peers = __cpu_to_le32(TARGET_HL_10_TLV_NUM_PEERS);
+ cfg->ast_skid_limit =
+ __cpu_to_le32(TARGET_HL_10_TLV_AST_SKID_LIMIT);
+ cfg->num_wds_entries =
+ __cpu_to_le32(TARGET_HL_10_TLV_NUM_WDS_ENTRIES);
+ } else {
+ cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS);
+ cfg->ast_skid_limit = __cpu_to_le32(0x10);
+ cfg->num_wds_entries = __cpu_to_le32(0x20);
+ }
+
if (test_bit(WMI_SERVICE_RX_FULL_REORDER, ar->wmi.svc_map)) {
cfg->num_offload_peers = __cpu_to_le32(TARGET_TLV_NUM_VDEVS);
@@ -1412,7 +1423,6 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
cfg->num_peer_keys = __cpu_to_le32(2);
cfg->num_tids = __cpu_to_le32(TARGET_TLV_NUM_TIDS);
- cfg->ast_skid_limit = __cpu_to_le32(0x10);
cfg->tx_chain_mask = __cpu_to_le32(0x7);
cfg->rx_chain_mask = __cpu_to_le32(0x7);
cfg->rx_timeout_pri[0] = __cpu_to_le32(0x64);
@@ -1428,7 +1438,6 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
cfg->num_mcast_table_elems = __cpu_to_le32(0);
cfg->mcast2ucast_mode = __cpu_to_le32(0);
cfg->tx_dbg_log_size = __cpu_to_le32(0x400);
- cfg->num_wds_entries = __cpu_to_le32(0x20);
cfg->dma_burst_size = __cpu_to_le32(0);
cfg->mac_aggr_delim = __cpu_to_le32(0);
cfg->rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(0);