From patchwork Fri Mar 20 11:02:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Puzyniak X-Patchwork-Id: 6055571 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 523099F318 for ; Fri, 20 Mar 2015 11:01:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B6D7204D1 for ; Fri, 20 Mar 2015 11:01:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E31820303 for ; Fri, 20 Mar 2015 11:01:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YYufr-0003ue-Rw; Fri, 20 Mar 2015 11:01:07 +0000 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YYufn-0003hr-45 for ath10k@lists.infradead.org; Fri, 20 Mar 2015 11:01:03 +0000 Received: by lbbrr9 with SMTP id rr9so8037722lbb.0 for ; Fri, 20 Mar 2015 04:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cr5OpjMNIzMKY6HRIsokWY3HFHfU2P74U5DXUPum+E0=; b=m2wvQBr2106zOLfNHiE6v9IQNrCUOYh/OslTpZgVz7X8+gFdaRLnVSCND6tijzyJA2 GOEIUAMEPNv2qbZmjXdcHxdIP99aX5XIa64aGCO3qTK6KvIflZzl5IEMYiEWhQxwg30L T8g9R3SuwcMHHUMqCXvr98wpmKboPZD+TQqv4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cr5OpjMNIzMKY6HRIsokWY3HFHfU2P74U5DXUPum+E0=; b=An8WHAX+EDVQbqip2mjjADxxnPyxSns83sXQTjUyFvglENYkMegQ1wQOxUxBvDvbb8 dRwSU6uk5tWNA6zvNy+VAjyjhjxx6qw1+l6CJSzD1FzZCc1k0W6eNoZ8MQIk5E1qUtRi isOEZ/bOjTJSdyg+TMh0arSAwFbZbGo1VTNjvri/8NOgLMVT+bdWQ5YI/+F6oh2RAGn4 kWVDUTspYuuFYE9TtGi+KHRbCvAiproCVluhJqVDcm+Z+haOxWE3cTj6sC7NtnAqLj/O 06GxGllLHokVqPztw0UqdX8RWeH9I+jDzLlOXimY8csdkO2FgYfqfqPkedh4s4gdcNU9 4pyQ== X-Gm-Message-State: ALoCoQnuQACYMKrnUzA4nAxRq+gRn5+Gpi3Fo08+zKfAkGk4MZczGabhVcBuSOiBoK2wLJ5ZgbzdUuU6ji6Luk1iHXxm7u4k57iXrTzuY4KKGuqV3kJo3LIBKYlcHn3wA0w803d05zEq X-Received: by 10.152.23.133 with SMTP id m5mr47320592laf.71.1426849243909; Fri, 20 Mar 2015 04:00:43 -0700 (PDT) Received: from dell-lap.com ([91.198.246.8]) by mx.google.com with ESMTPSA id ds8sm856282lbb.18.2015.03.20.04.00.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 04:00:42 -0700 (PDT) From: Marek Puzyniak To: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH v4 3/6] ath10k: store max tdls vdevs that fw can handle Date: Fri, 20 Mar 2015 12:02:56 +0100 Message-Id: <1426849379-7562-4-git-send-email-marek.puzyniak@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426849379-7562-1-git-send-email-marek.puzyniak@tieto.com> References: <1426849379-7562-1-git-send-email-marek.puzyniak@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150320_040103_347413_C56B5265 X-CRM114-Status: GOOD ( 10.09 ) X-Spam-Score: -0.8 (/) Cc: Marek Puzyniak X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 Currently number of tdls vdevs supported by firmware is hardcoded. For future usage it is stored in ath10k structure based on defined value. Signed-off-by: Marek Puzyniak --- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index c0e454b..47a3c55 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -971,6 +971,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar->max_num_peers = TARGET_TLV_NUM_PEERS; ar->max_num_stations = TARGET_TLV_NUM_STATIONS; ar->max_num_vdevs = TARGET_TLV_NUM_VDEVS; + ar->max_num_tdls_vdevs = TARGET_TLV_NUM_TDLS_VDEVS; ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC; break; case ATH10K_FW_WMI_OP_VERSION_UNSET: diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index b07d883..7d4f9c9 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -638,6 +638,7 @@ struct ath10k { int max_num_peers; int max_num_stations; int max_num_vdevs; + int max_num_tdls_vdevs; struct work_struct offchan_tx_work; struct sk_buff_head offchan_tx_queue; diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 7f04645..3ae2dbf 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -261,6 +261,7 @@ struct ath10k_pktlog_hdr { #define TARGET_TLV_NUM_PEERS ((TARGET_TLV_NUM_STATIONS) + \ (TARGET_TLV_NUM_VDEVS) + \ 2) +#define TARGET_TLV_NUM_TDLS_VDEVS 1 #define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2) #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index a65e11b..80e882b 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1271,7 +1271,7 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->gtk_offload_max_vdev = __cpu_to_le32(2); cfg->num_msdu_desc = __cpu_to_le32(TARGET_TLV_NUM_MSDU_DESC); cfg->max_frag_entries = __cpu_to_le32(2); - cfg->num_tdls_vdevs = __cpu_to_le32(1); + cfg->num_tdls_vdevs = __cpu_to_le32(TARGET_TLV_NUM_TDLS_VDEVS); cfg->num_tdls_conn_table_entries = __cpu_to_le32(0x20); cfg->beacon_tx_offload_max_vdev = __cpu_to_le32(2); cfg->num_multicast_filter_entries = __cpu_to_le32(5);