From patchwork Tue Mar 24 12:43:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6078481 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 77A2B9F350 for ; Tue, 24 Mar 2015 12:46:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C8FF201D3 for ; Tue, 24 Mar 2015 12:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC2B22024D for ; Tue, 24 Mar 2015 12:46:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218AbbCXMqG (ORCPT ); Tue, 24 Mar 2015 08:46:06 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:36162 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbbCXMqA (ORCPT ); Tue, 24 Mar 2015 08:46:00 -0400 Received: by labe2 with SMTP id e2so83003724lab.3 for ; Tue, 24 Mar 2015 05:45:58 -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=LAsvw7wZ7XpIgVsR1sDKMJIInr67vMHBqzUQ0A36duk=; b=I0le7Hm/r9+sOcKZXXQanm+x+9k293xqNfqbHUG49rkVDL2iMJ+rhNvyq8T8NxdPL7 ZJ3SFRxIKasNp5LuKuGJlhn9A8+QPnSlSw9L44hKO6vCmjeZmT2Lvo/xIhDFbj1kBsV2 SMVtHeWXMSU8Iu2WfGPVP0EVscOdGiy0OUMc0= 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=LAsvw7wZ7XpIgVsR1sDKMJIInr67vMHBqzUQ0A36duk=; b=iGZemTokvN6ylCwfNvrEA6K8zT5+zXfv0oizfQsYt5+CYqQuotFv1CB/UyZ09tFnCS gUNLEG6G6dLwj/DbKYkpGn+FFg6bViOGsmZuqX/IL2orpP8DVSPPTwckbdXVMi3fmBdK //ActoFDHOPkaryTkOXxJ2ct1puE5oYOWnYrQzRHCQ26BMP5KdmCmziIUBVSFa0RCiUd wMmFVJusIyygwAkRVsZsSRKdi0gqctOEukgaqo/5ODTsUHDi3h6AdG0EZ7yzL8+5cP3q M+wcQlLnY5gtwiPJXLioDfoyJurDdA1oMMLGyy/NQjVNxqCr4mcNVcDV3eMPBHvEsT+7 9DQA== X-Gm-Message-State: ALoCoQmXAEhH74loRE/lDAUQxAhaXpSaHTifAhwgex9q0zvm94UZfKgb/I6anNBKDsSYf1vQeoQLi2AT7R5yktePmYoakdoykumlsJT7KnqAqpwHcc+kVNTie2bzxJtlCm2DN46kvI6m X-Received: by 10.152.120.202 with SMTP id le10mr3476988lab.115.1427201158835; Tue, 24 Mar 2015 05:45:58 -0700 (PDT) Received: from bob.homerouter.cpe (apn-77-113-71-242.dynamic.gprs.plus.pl. [77.113.71.242]) by mx.google.com with ESMTPSA id jp17sm901084lab.34.2015.03.24.05.45.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Mar 2015 05:45:58 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH v5 7/7] ath10k: allocate fw resources for iface combinations Date: Tue, 24 Mar 2015 12:43:13 +0000 Message-Id: <1427200993-7550-8-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427200993-7550-1-git-send-email-michal.kazior@tieto.com> References: <1427200993-7550-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 The number of 3 vdevs wasn't enough to handle the worst case for interface combinations in practice. wpa_supplicant may need up to 4 vifs to have 2 vifs actually connected, i.e. p2pdev + client + 2x p2p (either p2p client or p2p go). This fixes worst case warning: Free vdev map is empty, no more interfaces allowed. This keeps the ability to associate 32 stations in AP mode at the cost of not being able to guarantee that under all circumstances, i.e. some combinations may consume additional fw peer entries for internal purposes leaving less resource for stations in AP mode. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/hw.h | 6 ++---- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 34fcb6d5786d..1e9a781a45b4 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -280,11 +280,9 @@ enum ath10k_hw_rate_cck { #define TARGET_10_2_DMA_BURST_SIZE 1 /* Target specific defines for WMI-TLV firmware */ -#define TARGET_TLV_NUM_VDEVS 3 +#define TARGET_TLV_NUM_VDEVS 4 #define TARGET_TLV_NUM_STATIONS 32 -#define TARGET_TLV_NUM_PEERS ((TARGET_TLV_NUM_STATIONS) + \ - (TARGET_TLV_NUM_VDEVS) + \ - 2) +#define TARGET_TLV_NUM_PEERS 35 #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 73cf3d00c2d0..f42ff9d97b00 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1318,8 +1318,8 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS); if (test_bit(WMI_SERVICE_RX_FULL_REORDER, ar->wmi.svc_map)) { - cfg->num_offload_peers = __cpu_to_le32(3); - cfg->num_offload_reorder_bufs = __cpu_to_le32(3); + cfg->num_offload_peers = __cpu_to_le32(TARGET_TLV_NUM_VDEVS); + cfg->num_offload_reorder_bufs = __cpu_to_le32(TARGET_TLV_NUM_VDEVS); } else { cfg->num_offload_peers = __cpu_to_le32(0); cfg->num_offload_reorder_bufs = __cpu_to_le32(0); @@ -1336,8 +1336,8 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->rx_timeout_pri[3] = __cpu_to_le32(0x28); cfg->rx_decap_mode = __cpu_to_le32(1); cfg->scan_max_pending_reqs = __cpu_to_le32(4); - cfg->bmiss_offload_max_vdev = __cpu_to_le32(3); - cfg->roam_offload_max_vdev = __cpu_to_le32(3); + cfg->bmiss_offload_max_vdev = __cpu_to_le32(TARGET_TLV_NUM_VDEVS); + cfg->roam_offload_max_vdev = __cpu_to_le32(TARGET_TLV_NUM_VDEVS); cfg->roam_offload_max_ap_profiles = __cpu_to_le32(8); cfg->num_mcast_groups = __cpu_to_le32(0); cfg->num_mcast_table_elems = __cpu_to_le32(0);