From patchwork Tue Mar 17 12:30:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6031701 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 F13119F2A9 for ; Tue, 17 Mar 2015 12:34:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08ABF20465 for ; Tue, 17 Mar 2015 12:34:05 +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 614922045E for ; Tue, 17 Mar 2015 12:34:03 +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 1YXqh3-0007xA-Un; Tue, 17 Mar 2015 12:33:57 +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 1YXqgx-0007o3-K6 for ath10k@lists.infradead.org; Tue, 17 Mar 2015 12:33:53 +0000 Received: by lbcgn8 with SMTP id gn8so5773515lbc.2 for ; Tue, 17 Mar 2015 05:33:28 -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=DW5Nvbjc5BvJXuhZwRFPOgK+LkDMP6EqoBYr5ZxvuKU=; b=bZCb9eLjdRCXMAJlVWYliEzqVjuR4CFqxOYcrvIkNIpxElVc/hRGFt1mnThMevLTzK uLPsc97wJBKR6oeXsaY5qlO0DBs/3TEqXq11ocx7wkMqWPjzI8QVEAgskVmj5LUCulFM INEI0oe9zWVAYEfxnpz8DA9xeI/XKkfRdcL4Y= 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=DW5Nvbjc5BvJXuhZwRFPOgK+LkDMP6EqoBYr5ZxvuKU=; b=htG+3ZuXA1t8RD+438EUUe2vVjdkC2dqgfB7MhKpN9XSJMfDfSK8dxiFFNDNwHjJ0w Wr/5p/npP9K5w6/tTYzOhXdRNrD0GBq49uAoiVf1lPkNmWEFIZvM6tA7//VP2x0H4nIy yDnLjDqGdVEoe52DIHkTt/SkTQRC0P4QOz501CUdgR9yLGAHBDsHcewfotO7u2mpsZsE GmqMJNAZvlKsR0enuhGjE8w/i8MJjrKwyrusdDHfBO5pXb6Mr1UgyEIwQqoMWqw9fkuo 0b/HrewbICsKcLLrJ5COsLat7HUVml7AFHrTsNF6qCsU3KToW3rUCIJLTUUBeWKw9Lb8 VYfg== X-Gm-Message-State: ALoCoQmSQkcKP5dGa4TC5Glgp/J0GHGcvl5CB9k4QctjXfARE1w/eIJml/GwkZ/APnX1MK/xnbV97mM120XGNvMkyKdEVM3AwwHrum/RmLe7WXHhreT/6XrOoNrwi/Tff1gX1ipY+p4/1Y70kDnhKBcwoAOBuWSgfgur52BF0ArtPMgC2RRt5XQ= X-Received: by 10.152.45.37 with SMTP id j5mr60437844lam.31.1426595608861; Tue, 17 Mar 2015 05:33:28 -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 w9sm2774934laj.24.2015.03.17.05.33.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2015 05:33:28 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH v4 7/7] ath10k: allocate fw resources for iface combinations Date: Tue, 17 Mar 2015 12:30:48 +0000 Message-Id: <1426595448-1630-8-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426595448-1630-1-git-send-email-michal.kazior@tieto.com> References: <1426595448-1630-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150317_053351_871800_92439F4B X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior 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 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 7f04645..904ce48 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -256,11 +256,9 @@ struct ath10k_pktlog_hdr { #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_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 45f8431..d92fedf 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1286,8 +1286,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); @@ -1304,8 +1304,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);