From patchwork Wed Sep 25 09:38:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Markowski X-Patchwork-Id: 2941151 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9FF6A9F288 for ; Wed, 25 Sep 2013 09:38:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE87C20417 for ; Wed, 25 Sep 2013 09:38:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95A4C20583 for ; Wed, 25 Sep 2013 09:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883Ab3IYJij (ORCPT ); Wed, 25 Sep 2013 05:38:39 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:61761 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753672Ab3IYJie (ORCPT ); Wed, 25 Sep 2013 05:38:34 -0400 X-AuditID: 83cfa826-b7f408e000003a47-21-5242af133a1b Received: from FIVLA-EXHUB02.eu.tieto.com ( [131.207.136.42]) by ebb06.tieto.com (SMTP Mailer) with SMTP id EF.82.14919.31FA2425; Wed, 25 Sep 2013 12:38:28 +0300 (EEST) Received: from uw000975.eu.tieto.com (10.28.19.100) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Wed, 25 Sep 2013 12:38:27 +0300 From: Bartosz Markowski To: CC: , Bartosz Markowski Subject: [PATCH 10/13] ath10k: add TARGET values for 10.x firmware Date: Wed, 25 Sep 2013 11:38:08 +0200 Message-ID: <1380101891-18312-11-git-send-email-bartosz.markowski@tieto.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1380101891-18312-1-git-send-email-bartosz.markowski@tieto.com> References: <1380101891-18312-1-git-send-email-bartosz.markowski@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsXSfL5DS1dkvVOQwfOXjBaPLh1jtngy+TuL xZsVd9gdmD0+z7zL5rF5Sb3H501yAcxRXDYpqTmZZalF+nYJXBmXdi1kKfhrXrHl1UO2BsZ1 hl2MnBwSAiYSz+7PYoawxSQu3FvP1sXIxSEksIpR4sLp/0wQzjJGiRVXd7ODVLEJmErc37CC FcQWEVCQ+DXpIxuIzSwQLvFq6y8WEFtYwEliw421TCA2i4CqxI9L/WA2r4CPxJ51C5ggtslL PL3fB9bLCRQ/uu812HwhAW+JpunXWSHqBSVOznzCAjFfQuLgixfMEDUaEnN2vmSZwCgwC0nZ LCRlCxiZVjHypyYlGZjplWSmluTrJefnbmIEB+EKtR2Mzx5IHWIU4GBU4uF9sdAxSIg1say4 MvcQoyQHk5Io7521TkFCfEn5KZUZicUZ8UWlOanFhxglOJiVRHjDFwPleFMSK6tSi/JhUtIc LErivBs6gCYJpCeWpGanphakFsFkZTg4lCR4V4MMFSxKTU+tSMvMKUFIM3FwggznARr+AaSG t7ggMbc4Mx0if4pRUUqcdxNIQgAkkVGaB9cLSxKvGMWBXhHmPQlSxQNMMHDdr4AGMwENdugA G1ySiJCSamBcnpDy7tzRPS9MbV+xHGpYEL55jciLk2vulQqe+X31vYL6EpMP3Ye63J5/5ZQ1 fP5zfZFqzMXi56buujNelmz/dcuvMDfzy/0LjIm/z6zn/b1heZKzvVijZGJY/qvDsQXvOhl0 DLN2G2xLDJ5/ZLVeX7XbzCoZqU/Rn9ouTV8VrPV9yeyNFk+8lViKMxINtZiLihMB5FusK+0C AAA= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Introduce all TARGET specific values for 10.x firmware. Some of them are common for both firmwares we will support, but to avoid confusion, define everything with prefix 10X_. Signed-off-by: Bartosz Markowski --- drivers/net/wireless/ath/ath10k/hw.h | 31 ++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 58 ++++++++++++++++----------------- 2 files changed, 60 insertions(+), 29 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 1b3cf01..6cc3453 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -53,6 +53,7 @@ enum ath10k_mcast2ucast_mode { ATH10K_MCAST2UCAST_ENABLED = 1, }; +/* Target specific defines for MAIN firmware */ #define TARGET_NUM_VDEVS 8 #define TARGET_NUM_PEER_AST 2 #define TARGET_NUM_WDS_ENTRIES 32 @@ -83,6 +84,36 @@ enum ath10k_mcast2ucast_mode { #define TARGET_NUM_MSDU_DESC (1024 + 400) #define TARGET_MAX_FRAG_ENTRIES 0 +/* Target specific defines for 10.X firmware */ +#define TARGET_10X_NUM_VDEVS 16 +#define TARGET_10X_NUM_PEER_AST 2 +#define TARGET_10X_NUM_WDS_ENTRIES 32 +#define TARGET_10X_DMA_BURST_SIZE 0 +#define TARGET_10X_MAC_AGGR_DELIM 0 +#define TARGET_10X_AST_SKID_LIMIT 16 +#define TARGET_10X_NUM_PEERS (128 + (TARGET_10X_NUM_VDEVS)) +#define TARGET_10X_NUM_OFFLOAD_PEERS 0 +#define TARGET_10X_NUM_OFFLOAD_REORDER_BUFS 0 +#define TARGET_10X_NUM_PEER_KEYS 2 +#define TARGET_10X_NUM_TIDS 256 +#define TARGET_10X_TX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2)) +#define TARGET_10X_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2)) +#define TARGET_10X_RX_TIMEOUT_LO_PRI 100 +#define TARGET_10X_RX_TIMEOUT_HI_PRI 40 +#define TARGET_10X_RX_DECAP_MODE ATH10K_HW_TXRX_ETHERNET +#define TARGET_10X_SCAN_MAX_PENDING_REQS 4 +#define TARGET_10X_BMISS_OFFLOAD_MAX_VDEV 2 +#define TARGET_10X_ROAM_OFFLOAD_MAX_VDEV 2 +#define TARGET_10X_ROAM_OFFLOAD_MAX_AP_PROFILES 8 +#define TARGET_10X_GTK_OFFLOAD_MAX_VDEV 3 +#define TARGET_10X_NUM_MCAST_GROUPS 0 +#define TARGET_10X_NUM_MCAST_TABLE_ELEMS 0 +#define TARGET_10X_MCAST2UCAST_MODE ATH10K_MCAST2UCAST_DISABLED +#define TARGET_10X_TX_DBG_LOG_SIZE 1024 +#define TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1 +#define TARGET_10X_VOW_CONFIG 0 +#define TARGET_10X_NUM_MSDU_DESC (1024 + 400) +#define TARGET_10X_MAX_FRAG_ENTRIES 0 /* Number of Copy Engines supported */ #define CE_COUNT 8 diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index f88a1d3..f0e1ea9 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -1458,9 +1458,9 @@ static void ath10k_wmi_10x_service_ready_event_rx(struct ath10k *ar, * peers, 1 extra for self peer on target */ /* this needs to be tied, host and target * can get out of sync */ - num_units = TARGET_NUM_PEERS + 1; + num_units = TARGET_10X_NUM_PEERS + 1; if (num_unit_info & NUM_UNITS_IS_NUM_VDEVS) - num_units = TARGET_NUM_VDEVS + 1; + num_units = TARGET_10X_NUM_VDEVS + 1; } ath10k_dbg(ATH10K_DBG_WMI, @@ -2027,48 +2027,48 @@ int ath10k_wmi_10x_cmd_init(struct ath10k *ar) u32 len, val; int i; - config.num_vdevs = __cpu_to_le32(TARGET_NUM_VDEVS); - config.num_peers = __cpu_to_le32(TARGET_NUM_PEERS + TARGET_NUM_VDEVS); - config.num_peer_keys = __cpu_to_le32(TARGET_NUM_PEER_KEYS); - config.num_tids = __cpu_to_le32(TARGET_NUM_TIDS); - config.ast_skid_limit = __cpu_to_le32(TARGET_AST_SKID_LIMIT); - config.tx_chain_mask = __cpu_to_le32(TARGET_TX_CHAIN_MASK); - config.rx_chain_mask = __cpu_to_le32(TARGET_RX_CHAIN_MASK); - config.rx_timeout_pri_vo = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI); - config.rx_timeout_pri_vi = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI); - config.rx_timeout_pri_be = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI); - config.rx_timeout_pri_bk = __cpu_to_le32(TARGET_RX_TIMEOUT_HI_PRI); - config.rx_decap_mode = __cpu_to_le32(TARGET_RX_DECAP_MODE); + config.num_vdevs = __cpu_to_le32(TARGET_10X_NUM_VDEVS); + config.num_peers = __cpu_to_le32(TARGET_10X_NUM_PEERS); + config.num_peer_keys = __cpu_to_le32(TARGET_10X_NUM_PEER_KEYS); + config.num_tids = __cpu_to_le32(TARGET_10X_NUM_TIDS); + config.ast_skid_limit = __cpu_to_le32(TARGET_10X_AST_SKID_LIMIT); + config.tx_chain_mask = __cpu_to_le32(TARGET_10X_TX_CHAIN_MASK); + config.rx_chain_mask = __cpu_to_le32(TARGET_10X_RX_CHAIN_MASK); + config.rx_timeout_pri_vo = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI); + config.rx_timeout_pri_vi = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI); + config.rx_timeout_pri_be = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI); + config.rx_timeout_pri_bk = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_HI_PRI); + config.rx_decap_mode = __cpu_to_le32(TARGET_10X_RX_DECAP_MODE); config.scan_max_pending_reqs = - __cpu_to_le32(TARGET_SCAN_MAX_PENDING_REQS); + __cpu_to_le32(TARGET_10X_SCAN_MAX_PENDING_REQS); config.bmiss_offload_max_vdev = - __cpu_to_le32(TARGET_BMISS_OFFLOAD_MAX_VDEV); + __cpu_to_le32(TARGET_10X_BMISS_OFFLOAD_MAX_VDEV); config.roam_offload_max_vdev = - __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_VDEV); + __cpu_to_le32(TARGET_10X_ROAM_OFFLOAD_MAX_VDEV); config.roam_offload_max_ap_profiles = - __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES); + __cpu_to_le32(TARGET_10X_ROAM_OFFLOAD_MAX_AP_PROFILES); - config.num_mcast_groups = __cpu_to_le32(TARGET_NUM_MCAST_GROUPS); + config.num_mcast_groups = __cpu_to_le32(TARGET_10X_NUM_MCAST_GROUPS); config.num_mcast_table_elems = - __cpu_to_le32(TARGET_NUM_MCAST_TABLE_ELEMS); + __cpu_to_le32(TARGET_10X_NUM_MCAST_TABLE_ELEMS); - config.mcast2ucast_mode = __cpu_to_le32(TARGET_MCAST2UCAST_MODE); - config.tx_dbg_log_size = __cpu_to_le32(TARGET_TX_DBG_LOG_SIZE); - config.num_wds_entries = __cpu_to_le32(TARGET_NUM_WDS_ENTRIES); - config.dma_burst_size = __cpu_to_le32(TARGET_DMA_BURST_SIZE); - config.mac_aggr_delim = __cpu_to_le32(TARGET_MAC_AGGR_DELIM); + config.mcast2ucast_mode = __cpu_to_le32(TARGET_10X_MCAST2UCAST_MODE); + config.tx_dbg_log_size = __cpu_to_le32(TARGET_10X_TX_DBG_LOG_SIZE); + config.num_wds_entries = __cpu_to_le32(TARGET_10X_NUM_WDS_ENTRIES); + config.dma_burst_size = __cpu_to_le32(TARGET_10X_DMA_BURST_SIZE); + config.mac_aggr_delim = __cpu_to_le32(TARGET_10X_MAC_AGGR_DELIM); - val = TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK; + val = TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK; config.rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(val); - config.vow_config = __cpu_to_le32(TARGET_VOW_CONFIG); + config.vow_config = __cpu_to_le32(TARGET_10X_VOW_CONFIG); - config.num_msdu_desc = __cpu_to_le32(TARGET_NUM_MSDU_DESC); - config.max_frag_entries = __cpu_to_le32(TARGET_MAX_FRAG_ENTRIES); + config.num_msdu_desc = __cpu_to_le32(TARGET_10X_NUM_MSDU_DESC); + config.max_frag_entries = __cpu_to_le32(TARGET_10X_MAX_FRAG_ENTRIES); len = sizeof(*cmd) + (sizeof(struct host_memory_chunk) * ar->wmi.num_mem_chunks);