From patchwork Tue Feb 12 13:48:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dundi Raviteja X-Patchwork-Id: 10807923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9089A13B4 for ; Tue, 12 Feb 2019 13:48:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F6D229AC6 for ; Tue, 12 Feb 2019 13:48:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73ECF2AD7B; Tue, 12 Feb 2019 13:48:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2735229AC6 for ; Tue, 12 Feb 2019 13:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=4T2WEn7VR9i24cEwBDWXxTasegahq3al8ooZG47gAUM=; b=ITR C8T2bsX/eiD8RLp1DU//WYBzaQJv5ueMJ9x9DkREVRftyE578Q0ij2Kith1qrVr+532i6g8qex51y e0xf2VSWVtkW8ipteTFSmg8w+T7TpwH8/EnnPhmJvW3yDgH7C5gcvEtR1z9PCpwuhW+MQjVR9T6VK 9IoIzF+faSPo0UzHnCfxYbb9qO+aktUC1R0iMzrGhgrXwKSFBRI7auiMSC8klXhx2Tpq3thBwz9Hu M+r5CIYZDLuC1EM3Vqtk2uIfFGd0bJfS7Z6Gx3DH19LedhoKt/jvftl94a4pvXHRonpNpx/e8G8mw O5RychcNqku55iqhiwGgbejxwkt4hzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtYQA-00049T-Nr; Tue, 12 Feb 2019 13:48:22 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtYQ7-000492-Mg for ath10k@lists.infradead.org; Tue, 12 Feb 2019 13:48:21 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 74B1A605FC; Tue, 12 Feb 2019 13:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1549979298; bh=LnzSpdR2CIxHpUzst55xOm6Fil8GNvpR6RFONl2pLgA=; h=From:To:Cc:Subject:Date:From; b=mrTxKT8AOemrAvGcIFO47tkV7CQgp5O0gpDSM6MONxnrYyNVwdJd+g1qxOfgrHWtw azdSPFAF2o3J9U/m5WbgXY7hmFkmVkq0OJ5USm0bbtl3TWeFA/w2r4ur3E5nIG1eDt AS3luj11nNbrbSAb7wnSDsXUasyl1xKfQZmjvSus= Received: from dundi-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dundi@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DBD6360208; Tue, 12 Feb 2019 13:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1549979298; bh=LnzSpdR2CIxHpUzst55xOm6Fil8GNvpR6RFONl2pLgA=; h=From:To:Cc:Subject:Date:From; b=mrTxKT8AOemrAvGcIFO47tkV7CQgp5O0gpDSM6MONxnrYyNVwdJd+g1qxOfgrHWtw azdSPFAF2o3J9U/m5WbgXY7hmFkmVkq0OJ5USm0bbtl3TWeFA/w2r4ur3E5nIG1eDt AS3luj11nNbrbSAb7wnSDsXUasyl1xKfQZmjvSus= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DBD6360208 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=dundi@codeaurora.org From: Dundi Raviteja To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Enable support for beacon interval per VAP Date: Tue, 12 Feb 2019 19:18:06 +0530 Message-Id: <1549979286-9255-1-git-send-email-dundi@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190212_054820_001640_D6C18C4C X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Dundi Raviteja MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Enable support to configure different beacon interval per VAP. To support this feature, map different beacon interval service bit to wmi tlv service. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Dundi Raviteja --- drivers/net/wireless/ath/ath10k/mac.c | 33 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 3 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index e49b367..09c4705 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -8232,6 +8232,30 @@ void ath10k_mac_destroy(struct ath10k *ar) }, }; +static struct +ieee80211_iface_combination ath10k_tlv_qcs_bcn_int_if_comb[] = { + { + .limits = ath10k_tlv_if_limit, + .num_different_channels = 1, + .max_interfaces = 4, + .beacon_int_infra_match = true, + .beacon_int_min_gcd = 1, + .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit), + }, + { + .limits = ath10k_tlv_qcs_if_limit, + .num_different_channels = 2, + .max_interfaces = 4, + .n_limits = ARRAY_SIZE(ath10k_tlv_qcs_if_limit), + }, + { + .limits = ath10k_tlv_if_limit_ibss, + .num_different_channels = 1, + .max_interfaces = 2, + .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit_ibss), + }, +}; + static const struct ieee80211_iface_limit ath10k_10_4_if_limits[] = { { .max = 1, @@ -8642,6 +8666,15 @@ int ath10k_mac_register(struct ath10k *ar) ath10k_tlv_qcs_if_comb; ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_tlv_qcs_if_comb); + + if (test_bit + (WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, + ar->wmi.svc_map)) { + ar->hw->wiphy->iface_combinations = + ath10k_tlv_qcs_bcn_int_if_comb; + ar->hw->wiphy->n_iface_combinations = + ARRAY_SIZE(ath10k_tlv_qcs_bcn_int_if_comb); + } } else { ar->hw->wiphy->iface_combinations = ath10k_tlv_if_comb; ar->hw->wiphy->n_iface_combinations = diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h index e07e990..9f78502 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h @@ -1567,6 +1567,9 @@ enum wmi_tlv_service { SVCMAP(WMI_TLV_SERVICE_THERM_THROT, WMI_SERVICE_THERM_THROT, WMI_TLV_MAX_SERVICE); + SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, + WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, + WMI_TLV_MAX_SERVICE); } #undef SVCMAP