From patchwork Thu Nov 28 08:21:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265479 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D987E112B for ; Thu, 28 Nov 2019 08:21:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B604121775 for ; Thu, 28 Nov 2019 08:21:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XxmYxJo0"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="nK6fpeAL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="gAWEBwN1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B604121775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=LivU7ztxIRe61oBup+Dr/3M8DgxzlLI3KQpgqyztGvs=; b=XxmYxJo0ky4r2Z/Oy+w6n16yuj WEdyEKEBierc76r4Nw8EhdC/n2+8KCtvcyZurn1pj+M8f1Y2CaOCU+knfpGWxqmf2sUMyrTCFOiuh RgyrXsTI469+PJhQR9Z+zklu7OasRFzIhoyGXDHsFfqCgimGCcDgmZEl9l1pr7MTqNACrOjledhWe 3EDkEFBCvrOWSL59Mt3M5k/qAeSXr1e0wluuymathSdgRUyavzRGUTb3SO9fipt+PVwYlCSLJcun1 +HV1b2ePjm1m6PZUzD7vecuNv94KAwr30SW+GpOIfdA3r3yQL7VvI+Dh+3VDunjVyBrr8gOmgHmXc MEgF38nA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3f-00017O-OW; Thu, 28 Nov 2019 08:21:51 +0000 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3c-00015g-JU for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929306; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=sEGOELBgXukVU9+vmbil9rrl31RCGE4lmVVW+Rgl6ao=; b=nK6fpeALV2iFwFscnsRwtLTLmSvhpBUzmu6QCeqJKAv68d0FiG96TCOguCr4Qxkm XeOQadMh4v7EofjgnVvjsHD/HkZKb5dWRC1tFbsxzxWS8U497k2FVmDWRf6uPcwpG/k qrVl8efa9N3uKUNCVNVHhntUqXVZXX/1DJAmiNdE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929306; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=sEGOELBgXukVU9+vmbil9rrl31RCGE4lmVVW+Rgl6ao=; b=gAWEBwN1AfuoIFatMrJicIaBGg6EFYhGyPoBlbtaJYgVUo7EBfN0vnpNE9XHZp65 fQB80LIoirC42mR3h+t1u4JOsu26Jpt402VSdc/nV1oLfEkS8wxL82Njqx07BPvZGSN 9yBCyKxIZ9/Vomz+pE12GU9W1sy9WzxNQmWirhLU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 46A36C447A6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 1/9] ath11k: Update tx and rx chain count properly on drv_set_antenna Date: Thu, 28 Nov 2019 08:21:46 +0000 Message-ID: <0101016eb11a12a4-fe2e3161-3d2e-4f10-a232-29a3f71fa979-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.18 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002148_661823_C4408659 X-CRM114-Status: UNSURE ( 6.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.18 listed in list.dnswl.org] X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Sriram R Set the number of tx and rx chains properly on drv_set_antenna(). This will ensure the related ht/vht/he caps are properly recalculated based on the tx/rx chains set. Signed-off-by: Sriram R Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 5231c4fa0e38..5ee7c2a1c611 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3480,6 +3480,8 @@ static int __ath11k_set_antenna(struct ath11k *ar, u32 tx_ant, u32 rx_ant) return ret; } + ar->num_tx_chains = get_num_chains(tx_ant); + ret = ath11k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_RX_CHAIN_MASK, rx_ant, ar->pdev->pdev_id); if (ret) { @@ -3488,6 +3490,8 @@ static int __ath11k_set_antenna(struct ath11k *ar, u32 tx_ant, u32 rx_ant) return ret; } + ar->num_rx_chains = get_num_chains(rx_ant); + /* Reload HT/VHT/HE capability */ ath11k_mac_setup_ht_vht_cap(ar, &ar->pdev->cap, NULL); ath11k_mac_setup_he_cap(ar, &ar->pdev->cap); From patchwork Thu Nov 28 08:21:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265483 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A9401393 for ; Thu, 28 Nov 2019 08:21:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6733D216F4 for ; Thu, 28 Nov 2019 08:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sz2xa6PZ"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Y3Scindc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="GCguwmmu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6733D216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=KmOVHElvas2CJDsxVkI3beSq5TGQTH6874ajvRkWzrM=; b=sz2xa6PZfe2TfCFXO55INV3vZM VTAE7Ik7ZazMNiFaSrvHe2lVPh1zyqXYbFIr8FzbXaqoLt8P+5qValBS/icF/4ncfxnkLFe1o6p8C TlJz1gmkEYC0a+IpN9am1agEA5b4ZHssEK8J3pCvTIxjO97fCAu8XilEAxt5z1pgyc87zL+bG4B3/ OW8vpGL1WSC+DNET2ZC7kJDYT3reZf+NyVM+8BKPdB41BLyHZQU95G2XTY0nV5gig4Dh4sBZS4s/Q 1HBKwoUTFUdqY0Mqu4H2oujvBEkJ5zNvb85gB+bkaYZnugTev7oJVv0FhHafZtoSP4MtJBR+NEtWy tKdcCXMg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3i-0001A7-D2; Thu, 28 Nov 2019 08:21:54 +0000 Received: from a27-55.smtp-out.us-west-2.amazonses.com ([54.240.27.55]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3f-00015k-7Y for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929307; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=v5x3u/SOMrsGref20eNJy3xwG6ss0dzL+7zh2dH5bTE=; b=Y3ScindczTxwKENesL9xepX/E3KleiJpWQADQgU+LPFujE2+yH0FcGvRPyZwkToI qhtOquSICR37bj2HykwGsJEr1pu2s17QLjPIX5pMxvFF/8V78Ou8NjyBy2mZ9s8fEl5 BmabkIVVJD2Vzd6Orf6Y9dZ8ph6vFHjOPFIbbIHM= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929307; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=v5x3u/SOMrsGref20eNJy3xwG6ss0dzL+7zh2dH5bTE=; b=GCguwmmunrUDxMnxjdqRUXxVp5evda6XIMTEcdrjCrctvMlRDI89HF/OxPn56cOv p/DTYnkgpkoPqGSSKZQy4smnUYRGJButmLjmi6kHxjSrec/bJLSAnHwhWaskOLeCZgo Ese2ImgS9RkaKjiToF/NUVbd1VvkGrJNa1xpHA0s= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A85F0C447AF Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 2/9] ath11k: Advertise MPDU start spacing as no restriction Date: Thu, 28 Nov 2019 08:21:47 +0000 Message-ID: <0101016eb11a16f0-6c665138-c118-4689-8365-a7a9aa406c20-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.55 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002151_294729_433F7295 X-CRM114-Status: UNSURE ( 7.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.55 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Venkateswara Naralasetty Adverise MPDU start spacing as no restriction in ht capabilities, Since IPQ8074 hw support all sorts of mpdu start spcing. With this observed minor uplink performance improvement in lower data frame size case with Veriwave clients. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 5ee7c2a1c611..b048057b398f 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3089,7 +3089,7 @@ ath11k_create_ht_cap(struct ath11k *ar, u32 ar_ht_cap, u32 rate_cap_rx_chainmask ht_cap.ht_supported = 1; ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; - ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_8; + ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE; ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; ht_cap.cap |= IEEE80211_HT_CAP_DSSSCCK40; ht_cap.cap |= WLAN_HT_CAP_SM_PS_STATIC << IEEE80211_HT_CAP_SM_PS_SHIFT; From patchwork Thu Nov 28 08:21:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265481 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D97881393 for ; Thu, 28 Nov 2019 08:21:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0305216F4 for ; Thu, 28 Nov 2019 08:21:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oHMrO2uM"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="aNnL734D"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="GAze1P/Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0305216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=WZsw1mQx/wCJJp7w4QHUOrt6nGLm06Y3nBEfkEuzg5o=; b=oHMrO2uMGaRhn9Nh39MmjslOv4 Qq+v8n/VL29QRIvfYCuyCIJWtmIPohL4rAo6noFX7lOWWLo6HqrQ8Czx7movj7JmTTQEJCUdamjt3 B8qSyd9BgI+C90yoRsqOrTBWTuct6DWCa2rfRNq66z8IxBJ72wQo/J8kgb7bu5+ndK2790j3scMna AgQFnaC2bxHJd6hySKYmgg2tZfqL9s1SAMxlCEBDdFQtyR1fV4+o6vHhtlNp+8bd0peNmGuuR4ZNq FTjSadiQE6nd8xq/BM70Lk1A0QBbFji7bPkO+vbHO15T2CqIfcZestt96SrQ97nPY473NeBWY2NlG 4KD33ZOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3h-00018t-30; Thu, 28 Nov 2019 08:21:53 +0000 Received: from a27-10.smtp-out.us-west-2.amazonses.com ([54.240.27.10]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3f-00016A-6W for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929308; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=WNgcdifeKPsqi/GRjYzosb1eetOaTcII9PbVVYOev18=; b=aNnL734DQA31CQUTSAFUZKbtEq8YZuqpHjIFBwedur8H6qxeTP1gac+5IUhM1OPk H1W7N5TZ+5+RKcYziLeH5QA3rxGNv7UIjzxR2NurKgk0KDH69LVKzJtfZm3WjE6dVX2 rcNGdXSTa2gldgk/Mfdqg85Q6ms4pBhx8no8NX0s= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929308; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=WNgcdifeKPsqi/GRjYzosb1eetOaTcII9PbVVYOev18=; b=GAze1P/Z7dt65wVZdnFyjdyX2RUTCbat5mXIZHyWaIQUEDUPf4wF353DecIcE5c0 fuBR4bbiWT2oahREYZ3crcimWmBggZd2l00I1tq0bAodaQT0BfCRbF/qdZtP8RrvNjA fMt01XoxHyXVOBSUi0YMkFNu2iKAEmZck3r3rQk4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 18162C447AF Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 3/9] ath11k: fix memory leak in monitor mode Date: Thu, 28 Nov 2019 08:21:48 +0000 Message-ID: <0101016eb11a1b8d-63b9e4ac-451a-474c-bc76-8193ac8044bb-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.10 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002151_263724_F37B7B8E X-CRM114-Status: UNSURE ( 8.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.10 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Miles Hu remove tail check to avoid last amsdu leak. recycle skb in ppdu id wrap around case Signed-off-by: Miles Hu Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/dp_rx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 8c21925a522a..85e999c7a238 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3735,8 +3735,15 @@ ath11k_dp_rx_mon_mpdu_pop(struct ath11k *ar, if (ath11k_dp_rx_mon_comp_ppduid(msdu_ppdu_id, ppdu_id, - &rx_bufs_used)) + &rx_bufs_used)) { + if (rx_bufs_used) { + drop_mpdu = true; + dev_kfree_skb_any(msdu); + msdu = NULL; + goto next_msdu; + } return rx_bufs_used; + } pmon->mon_last_linkdesc_paddr = paddr; is_first_msdu = false; } @@ -3938,7 +3945,7 @@ static int ath11k_dp_rx_mon_deliver(struct ath11k *ar, u32 mac_id, ath11k_dp_rx_deliver_msdu(ar, napi, mon_skb); mon_skb = skb_next; - } while (mon_skb && (mon_skb != tail_msdu)); + } while (mon_skb); rxs->flag = 0; return 0; From patchwork Thu Nov 28 08:21:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265487 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99F7A1393 for ; Thu, 28 Nov 2019 08:21:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EAFE216F4 for ; Thu, 28 Nov 2019 08:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y5XuhW/g"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Xp+kHsbY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="NeolLQdr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EAFE216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=BGFZdLj5/bkfxAlBlzVpFNtPM0v7g4dXDHZ2C+6nvgU=; b=Y5XuhW/gY54Ag5T51xkwa0Cf1b qKN3WWaSPFIFFvJUVmY6KxqDIyBSEXKgsUUMU5Vu80bgo3/JQDLCjyrwkRAa+y223dwqvnuBD3+fz 0++CrYfRnPh+AC1AGw9cgau8LObWHTm8AYIPx+OeacH+uzuQaXRwPqB7uckihJrCrsRYMaGr9qMl1 NpoEr5LHy8KzzW55ykA7wxJ/6dBk5OWA0HXIl4sWC4WDGamn6MmJUWMwknkkuhmF/tYZ8MNgg5Zdk Rlht/auFkYU/Z97hk7MbtBlAmScaKkPZ90LZiCp4x+PyBUdMtB24vP947huL+y0SouXLQK13rrlC3 UclpYL5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3l-0001CV-QB; Thu, 28 Nov 2019 08:21:57 +0000 Received: from a27-55.smtp-out.us-west-2.amazonses.com ([54.240.27.55]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3g-00017T-Q0 for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929311; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=L/0Xv8IPDrrhX6sor/2ApevdfjypRx0hQPc9cSJK/yE=; b=Xp+kHsbY1vle69VdNlR8F/bPR8q/z10D9p6vHeMODMJxhbF9RiM5HkyooNyaMxV/ cgjotBB8eTAhj8R4CztgESm7WJVoE+2YqmktM4Z7bn023iY0cqRR43ilXiNPyxf8gOR F9uFpEqXLDH/3oiCgz1W5yKMlJxPOqoN7DcmTH8I= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929311; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=L/0Xv8IPDrrhX6sor/2ApevdfjypRx0hQPc9cSJK/yE=; b=NeolLQdrzrQzB6Ehm/6uw3Jn47HOSTsbvtObm/cYPtYY9yBvPs5R5gwu/AEhgYPV yKIB3nVQSUfJv+OrX4EwHSG2w+nsGOR7UAEZ5i3trDrU67AUGSOkEtbD3hRos5UF3dw MypxpMnL7VLuY+MsfjTjARUaEm+0CsIUHT4u6jaM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 74F66C447B4 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 4/9] ath11k: fix vht guard interval mapping Date: Thu, 28 Nov 2019 08:21:51 +0000 Message-ID: <0101016eb11a25fa-46ffc2be-3377-49fe-94d0-48052e6cd865-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.55 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002152_869097_475AC5F9 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.55 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Manikanta Pubbisetty Guard interval value which comes from VHT_SIG_A TLV has a mapping where value 0 corresponds to LGI, 1 and 3 corresponds to SGI. Value 3 which is SGI(0.4us) in VHT was incorrectly mapped to a GI of 3.2us(only applicable in HE) resulting in incorrect rx GI stats. Fixing the mapping. Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/hal_rx.c | 16 +++++++++++++--- drivers/net/wireless/ath/ath11k/hal_rx.h | 6 ++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c index 6168a4eb0c0b..9e0f8064e427 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.c +++ b/drivers/net/wireless/ath/ath11k/hal_rx.c @@ -920,6 +920,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab, (struct hal_rx_vht_sig_a_info *)tlv_data; u32 nsts; u32 group_id; + u8 gi_setting; info0 = __le32_to_cpu(vht_sig->info0); info1 = __le32_to_cpu(vht_sig->info1); @@ -928,9 +929,18 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab, info0); ppdu_info->mcs = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_MCS, info1); - ppdu_info->gi = - FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING, - info1); + gi_setting = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING, + info1); + switch (gi_setting) { + case HAL_RX_VHT_SIG_A_NORMAL_GI: + ppdu_info->gi = HAL_RX_GI_0_8_US; + break; + case HAL_RX_VHT_SIG_A_SHORT_GI: + case HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY: + ppdu_info->gi = HAL_RX_GI_0_4_US; + break; + } + ppdu_info->is_stbc = info0 & HAL_RX_VHT_SIG_A_INFO_INFO0_STBC; nsts = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO0_NSTS, info0); if (ppdu_info->is_stbc && nsts > 0) diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h index 2271bf56183b..bb022c781c48 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.h +++ b/drivers/net/wireless/ath/ath11k/hal_rx.h @@ -189,6 +189,12 @@ struct hal_rx_vht_sig_a_info { __le32 info1; } __packed; +enum hal_rx_vht_sig_a_gi_setting { + HAL_RX_VHT_SIG_A_NORMAL_GI = 0, + HAL_RX_VHT_SIG_A_SHORT_GI = 1, + HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY = 3, +}; + #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS GENMASK(6, 3) #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM BIT(7) #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW GENMASK(20, 19) From patchwork Thu Nov 28 08:21:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265491 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23DD8112B for ; Thu, 28 Nov 2019 08:22:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F21D0216F4 for ; Thu, 28 Nov 2019 08:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O5Ta/++q"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Xlh3XPn+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="P173OfIN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F21D0216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=rliHJpskwTwuzNp1bDcXG6Mmbq134DYyNy4wfsPhJow=; b=O5Ta/++qGn9MowE/L609Az/24g uzLxB3Aa6HpAhDz5o/FH6j96JKuZ5EAUi1+beh0jkuH+pt/9bSvu6D1dlRzCYhf04eKq/qkxYTMnb OH2KgoPgMtTPLLhxWdMQlLDiArgvJYwF2q9A15N/Nf1owaqcu6L+GhT6b5o9EBomoGypHqEe5fb1v /xGxcnemuTGIHyP8wt06AOZAYWoVwaRKEN0i65iChoF8MpNetOiueKJKft2hr6Yg6oN8YiBYdOUE6 ovHhd+z/iLw7z+KiSLTddwfCjGE2adhxdyeV3ZxNHhzo8TAhWilBo+mcjszo+gmF7D/nfFEO40V6i /qmXiwWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3m-0001Cv-4M; Thu, 28 Nov 2019 08:21:58 +0000 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3i-00015g-D7 for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929311; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=aUv0KBO7HVmsZw5SfF+y8ankZYJlZjOYIXnZE05cXVo=; b=Xlh3XPn+7wrtCR8DVRRDzbuTyNXYlC3HcNodJxh0afhcihDNeUhbHTtFTk3H5e5l n+25oFEsuBR++qXNtAzKvaEow0dAl5esuAsVW5SX/Rpv4HJShj2KZJJ5J72BMXUwmTi vYUXslk6xPRGEFNUBHjsfq/pmFa+1Jqx8M74POaE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929311; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=aUv0KBO7HVmsZw5SfF+y8ankZYJlZjOYIXnZE05cXVo=; b=P173OfINMbdEl2DZnmGaYIHVtVQ7Tg0LaKkEB5ERylJUbNV2ZshmvsA7NDjUKNab 6/m1RtUVUKsY1DFGSzJRz++P9+r+3Y+sx3mpzjKWBWSuGHf/ByHIWKQnEdiKRcmmiar IXxsAjzMVjKTrTTk5GUC2PjqteXqsu874F5+3tEo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CFCBFC447BB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 5/9] ath11k: update tx duration in station info Date: Thu, 28 Nov 2019 08:21:51 +0000 Message-ID: <0101016eb11a268a-08e82b29-536f-4c1b-b967-3759497a3943-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.18 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002154_471583_41B74546 X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.18 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Venkateswara Naralasetty Update tx duration in station info form PPDU stats so that users can dump tx duration of the station. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 065cb9dc880b..06482a5c102d 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -335,6 +335,7 @@ struct ath11k_sta { struct rate_info txrate; struct rate_info last_txrate; u64 rx_duration; + u64 tx_duration; u8 rssi_comb; struct ath11k_htt_tx_stats *tx_stats; struct ath11k_rx_peer_stats *rx_stats; diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 85e999c7a238..8f69de594ada 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1147,7 +1147,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, arsta->txrate.nss = nss; arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw); arsta->tx_info.status.rates[0].flags |= ath11k_bw_to_mac80211_bwflags(bw); - + arsta->tx_duration += tx_duration; memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info)); if (succ_pkts) { diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index b048057b398f..624534d4c33a 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5316,6 +5316,9 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw, sinfo->rx_duration = arsta->rx_duration; sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_DURATION); + sinfo->tx_duration = arsta->tx_duration; + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_DURATION); + if (!arsta->txrate.legacy && !arsta->txrate.nss) return; From patchwork Thu Nov 28 08:21:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265493 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72A291393 for ; Thu, 28 Nov 2019 08:22:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E91D216F4 for ; Thu, 28 Nov 2019 08:22:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mSZuh88l"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="BASKkb2K"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="SLFLq+ug" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E91D216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=aPgZUXv7AMyjQjMSkMrbMCu2dc+V0jxtpYx8O2jFjsI=; b=mSZuh88l0LM+oDu2oPilx0tWY3 47b9HRMx4hIy0oMyZcTiUAOgD9x+8gCFXVN8KaR1nUWNp156S9SMq22JyLhUD7umcoz5z3TpxJJVX mN35ie+aSmpsvjBTuNZs1TbqBe5OQknYycMNEKrrp40Kimp7WpykZy+gmAbF3wTHJ7J343qTp/tue 21VBUf2UI3ts0C/VT3L6jSMeaZYUchtReZaWS8r9gUvcO8bEkfIgxFIIJE2dTIxSJy44cVk0L1TU8 hk2q/aPyIS03vLVRvjHJnR8yXTy/b6YCEU489/miUd2SWEk7O9Oa2RN7FuA+JA1UgHDS1S2JQvXrh FTqay9Jg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3m-0001Dn-Nm; Thu, 28 Nov 2019 08:21:58 +0000 Received: from a27-185.smtp-out.us-west-2.amazonses.com ([54.240.27.185]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3k-0001AV-8q for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:21:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929314; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=QEsyDzKGcwXw7o//8GjjRGe83FqjCYiLKw/dfUTQGc0=; b=BASKkb2KUadKO9WoNDtVuVHS8O4LGIEAGqWIjjbi6CsxWyUGIXdzUL2TVDoDMFbH MrKH0sNswsXmpc/ZThPSXxj0bLegYxCk5+p8yDyGbEfCLIdJQjtMvCwNsQERC6U1YV2 BYbJcRbqSh7kgVOBN64uUY56THmHHPmmqLIMsqLM= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929314; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=QEsyDzKGcwXw7o//8GjjRGe83FqjCYiLKw/dfUTQGc0=; b=SLFLq+ugyNGGpyXs8WLFFBNEkXKSL29u2PWeutVTYWXXom1QMQG3bHAWWbTGLjtX KOyMwJCWszjkHW6vlXYXFp2KeFk7XG7xgbkkkiCLUuP2kNdt3WP+JyD/6IHM3qocwol I5Lfb/dSjXm6XAhmspKY5lQn6+MgZP1SClsVpfsA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 35A64C447B4 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 6/9] ath11k: Skip update peer stats for management packets Date: Thu, 28 Nov 2019 08:21:54 +0000 Message-ID: <0101016eb11a30c2-7e950fe3-fd78-4353-9c28-3fcf7cbde859-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.185 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002156_335497_C17A2E61 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.185 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Venkateswara Naralasetty Currently HTT_PPDU_STATS_TAG_USR_COMPLTN_ACK_BA_STATUS tag of PPDU stats doesn't have valid success bytes info of management frames. So skip update peer stats for management packets. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/dp.h | 4 +++- drivers/net/wireless/ath/ath11k/dp_rx.c | 33 ++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h index db216f055c42..82ddd7017722 100644 --- a/drivers/net/wireless/ath/ath11k/dp.h +++ b/drivers/net/wireless/ath/ath11k/dp.h @@ -1176,7 +1176,9 @@ struct htt_ppdu_stats_usr_cmpltn_cmn { #define HTT_PPDU_STATS_ACK_BA_INFO_NUM_MPDU_M GENMASK(8, 0) #define HTT_PPDU_STATS_ACK_BA_INFO_NUM_MSDU_M GENMASK(24, 9) -#define HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM GENMASK(3, 0) +#define HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM GENMASK(31, 25) + +#define HTT_PPDU_STATS_NON_QOS_TID 16 struct htt_ppdu_stats_usr_cmpltn_ack_ba_status { u32 ppdu_id; diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 8f69de594ada..a380efb9caa6 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1034,6 +1034,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, u32 succ_bytes = 0; u16 rate = 0, succ_pkts = 0; u32 tx_duration = 0; + u8 tid = HTT_PPDU_STATS_NON_QOS_TID; bool is_ampdu = false; if (!usr_stats) @@ -1051,6 +1052,8 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, succ_bytes = usr_stats->ack_ba.success_bytes; succ_pkts = FIELD_GET(HTT_PPDU_STATS_ACK_BA_INFO_NUM_MSDU_M, usr_stats->ack_ba.info); + tid = FIELD_GET(HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM, + usr_stats->ack_ba.info); } if (common->fes_duration_us) @@ -1156,19 +1159,23 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, ieee80211_tx_rate_update(ar->hw, sta, &arsta->tx_info); } - memset(peer_stats, 0, sizeof(*peer_stats)); - - peer_stats->succ_pkts = succ_pkts; - peer_stats->succ_bytes = succ_bytes; - peer_stats->is_ampdu = is_ampdu; - peer_stats->duration = tx_duration; - peer_stats->ba_fails = - HTT_USR_CMPLTN_LONG_RETRY(usr_stats->cmpltn_cmn.flags) + - HTT_USR_CMPLTN_SHORT_RETRY(usr_stats->cmpltn_cmn.flags); - - if (ath11k_debug_is_extd_tx_stats_enabled(ar)) - ath11k_accumulate_per_peer_tx_stats(arsta, - peer_stats, rate_idx); + /* PPDU stats reported for mgmt packet doesn't have valid tx bytes. + * So skip peer stats update for mgmt packets. + */ + if (tid < HTT_PPDU_STATS_NON_QOS_TID) { + memset(peer_stats, 0, sizeof(*peer_stats)); + peer_stats->succ_pkts = succ_pkts; + peer_stats->succ_bytes = succ_bytes; + peer_stats->is_ampdu = is_ampdu; + peer_stats->duration = tx_duration; + peer_stats->ba_fails = + HTT_USR_CMPLTN_LONG_RETRY(usr_stats->cmpltn_cmn.flags) + + HTT_USR_CMPLTN_SHORT_RETRY(usr_stats->cmpltn_cmn.flags); + + if (ath11k_debug_is_extd_tx_stats_enabled(ar)) + ath11k_accumulate_per_peer_tx_stats(arsta, + peer_stats, rate_idx); + } spin_unlock_bh(&ab->base_lock); rcu_read_unlock(); From patchwork Thu Nov 28 08:21:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265499 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D679112B for ; Thu, 28 Nov 2019 08:22:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE343216F4 for ; Thu, 28 Nov 2019 08:22:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EI8yO7DB"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="oWTD/Ms5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="KwKt16Dk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE343216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=j1VIg9EtO2IF2VkAn7XUhiKdFj077gBzjAc3SRWB2Uc=; b=EI8yO7DBKa+W4IqmkUBFiI0iTP qJ2WfqEnylMW5a+i6aThl8LqLXm0Fz62pta2JvsqJ9etX/iNJ08uYSQVSrSzzCdfhAEzdFHVenOuh /OOYNSw813r2X8gKv82yg7+iW1ARkdQ0oi2zhnNpgNW1op2BsAsnOhD7jWzrieUxV03YQSvL69LBW KDkUQ0AKsBcyY6M7vAjXy30AZQwaGOjxs8PyczLPBgviZrzmeZ+QyUaLWCNOI9niwznK7iA7bvCLm LDRPoevHXnvx6wOFsTCSV1YDKsIX5mfZp6yy+wn6CBO4G960+57dyouzSPNGBv7HArwqMpCWSOGqy 2KIOvysQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3p-0001Gb-CC; Thu, 28 Nov 2019 08:22:01 +0000 Received: from a27-56.smtp-out.us-west-2.amazonses.com ([54.240.27.56]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3m-00015f-QD for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:22:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929317; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=smkaAF+Q9BbyK1rh8+3dV5VqcBVn+APzGR/8SUK26Zc=; b=oWTD/Ms5sYDPfnuWuPWLATHk7SxOAkOsAvkgx8sDoV6z36ynclo5zt73KbvIkH0p l5Ts7uZYxK/QP+vWept6C1gkMX8n5RYV/0c/Tqw9554k/xdeNDfmjmN2v99pLoURjd9 5a9L+QYi6TNs2Pm6gp+6Ziw9bv+LBBfkAMQlvToo= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929317; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=smkaAF+Q9BbyK1rh8+3dV5VqcBVn+APzGR/8SUK26Zc=; b=KwKt16DkaKFOUbClaZtlD3LBeWNy5BkqL6cbkVLuc5gRF+baDF+Afv2c3PBdMpWj wCShToaLvjiNJ6X1XppUi/OA/LdLvkZO4FfN6xpJdxKyeBXIGBsYW20/+1Xz4qpKrHD PJlC0JzjumfnU5GkPLlqo1pBpUat/p+NUF0egtck= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8C332C44BE6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 7/9] ath11k: Move mac80211 hw allocation before wmi_init command Date: Thu, 28 Nov 2019 08:21:57 +0000 Message-ID: <0101016eb11a3e68-0204394d-b197-47a2-9ccf-cb7f338a8ed1-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.56 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002158_911424_FEB7C78A X-CRM114-Status: GOOD ( 13.32 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.56 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Vasanthakumar Thiagarajan This is to prepare REO ring setup before sending wmi_init command. Firmware expects all the required REO rings to be setup while processing wmi_init command. But as per the current initialization sequence, REO ring configurations are done only after wmi_init command is sent. Also refactoring ath11k_mac_create() into ath11k_mac_alloc() and ath11k_mac_register() to it mac80211 hw structure available before sending wmi_init command. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/core.c | 27 ++++++---- drivers/net/wireless/ath/ath11k/mac.c | 97 +++++++++++++++++++++------------- drivers/net/wireless/ath/ath11k/mac.h | 3 +- 3 files changed, 81 insertions(+), 46 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 37d4ecb458db..c9c9e4b5ef6b 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -378,23 +378,22 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab) return ret; } - ret = ath11k_mac_create(ab); + ret = ath11k_mac_register(ab); if (ret) { - ath11k_err(ab, "failed to create new hw device with mac80211 :%d\n", - ret); + ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret); goto err_pdev_debug; } ret = ath11k_dp_pdev_alloc(ab); if (ret) { ath11k_err(ab, "failed to attach DP pdev: %d\n", ret); - goto err_mac_destroy; + goto err_mac_unregister; } return 0; -err_mac_destroy: - ath11k_mac_destroy(ab); +err_mac_unregister: + ath11k_mac_unregister(ab); err_pdev_debug: ath11k_debug_pdev_destroy(ab); @@ -470,28 +469,37 @@ static int ath11k_core_start(struct ath11k_base *ab, goto err_hif_stop; } + ret = ath11k_mac_allocate(ab); + if (ret) { + ath11k_err(ab, "failed to create new hw device with mac80211 :%d\n", + ret); + goto err_hif_stop; + } + ret = ath11k_wmi_cmd_init(ab); if (ret) { ath11k_err(ab, "failed to send wmi init cmd: %d\n", ret); - goto err_hif_stop; + goto err_mac_destroy; } ret = ath11k_wmi_wait_for_unified_ready(ab); if (ret) { ath11k_err(ab, "failed to receive wmi unified ready event: %d\n", ret); - goto err_hif_stop; + goto err_mac_destroy; } ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab); if (ret) { ath11k_err(ab, "failed to send htt version request message: %d\n", ret); - goto err_hif_stop; + goto err_mac_destroy; } return 0; +err_mac_destroy: + ath11k_mac_destroy(ab); err_hif_stop: ath11k_ahb_stop(ab); err_wmi_detach: @@ -537,6 +545,7 @@ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab) err_core_stop: ath11k_core_stop(ab); + ath11k_mac_destroy(ab); err_dp_free: ath11k_dp_free(ab); mutex_unlock(&ab->core_lock); diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 624534d4c33a..e4dfce6b63f0 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5513,7 +5513,38 @@ static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = { }, }; -static int ath11k_mac_register(struct ath11k *ar) +static void __ath11k_mac_unregister(struct ath11k *ar) +{ + cancel_work_sync(&ar->regd_update_work); + + ieee80211_unregister_hw(ar->hw); + + idr_for_each(&ar->txmgmt_idr, ath11k_mac_tx_mgmt_pending_free, ar); + idr_destroy(&ar->txmgmt_idr); + + kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); + kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); + + SET_IEEE80211_DEV(ar->hw, NULL); +} + +void ath11k_mac_unregister(struct ath11k_base *ab) +{ + struct ath11k *ar; + struct ath11k_pdev *pdev; + int i; + + for (i = 0; i < ab->num_radios; i++) { + pdev = &ab->pdevs[i]; + ar = pdev->ar; + if (!ar) + continue; + + __ath11k_mac_unregister(ar); + } +} + +static int __ath11k_mac_register(struct ath11k *ar) { struct ath11k_base *ab = ar->ab; struct ath11k_pdev_cap *cap = &ar->pdev->cap; @@ -5657,32 +5688,48 @@ static int ath11k_mac_register(struct ath11k *ar) return ret; } -void ath11k_mac_unregister(struct ath11k_base *ab) +int ath11k_mac_register(struct ath11k_base *ab) { struct ath11k *ar; struct ath11k_pdev *pdev; int i; + int ret; for (i = 0; i < ab->num_radios; i++) { pdev = &ab->pdevs[i]; ar = pdev->ar; - if (!ar) - continue; - cancel_work_sync(&ar->regd_update_work); + if (ab->pdevs_macaddr_valid) { + ether_addr_copy(ar->mac_addr, pdev->mac_addr); + } else { + ether_addr_copy(ar->mac_addr, ab->mac_addr); + ar->mac_addr[4] += i; + } - ieee80211_unregister_hw(ar->hw); + ret = __ath11k_mac_register(ar); + if (ret) + goto err_cleanup; - idr_for_each(&ar->txmgmt_idr, ath11k_mac_tx_mgmt_pending_free, ar); - idr_destroy(&ar->txmgmt_idr); + idr_init(&ar->txmgmt_idr); + spin_lock_init(&ar->txmgmt_idr_lock); + } - kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); - kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); + /* Initialize channel counters frequency value in hertz */ + ab->cc_freq_hz = IPQ8074_CC_FREQ_HERTZ; + ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS)) - 1; + + return 0; - SET_IEEE80211_DEV(ar->hw, NULL); +err_cleanup: + for (i = i - 1; i >= 0; i--) { + pdev = &ab->pdevs[i]; + ar = pdev->ar; + __ath11k_mac_unregister(ar); } + + return ret; } -int ath11k_mac_create(struct ath11k_base *ab) +int ath11k_mac_allocate(struct ath11k_base *ab) { struct ieee80211_hw *hw; struct ath11k *ar; @@ -5699,7 +5746,7 @@ int ath11k_mac_create(struct ath11k_base *ab) if (!hw) { ath11k_warn(ab, "failed to allocate mac80211 hw device\n"); ret = -ENOMEM; - goto err_destroy_mac; + goto err_free_mac; } ar = hw->priv; @@ -5720,13 +5767,6 @@ int ath11k_mac_create(struct ath11k_base *ab) ar->num_tx_chains = get_num_chains(pdev->cap.tx_chain_mask); ar->num_rx_chains = get_num_chains(pdev->cap.rx_chain_mask); - if (ab->pdevs_macaddr_valid) { - ether_addr_copy(ar->mac_addr, pdev->mac_addr); - } else { - ether_addr_copy(ar->mac_addr, ab->mac_addr); - ar->mac_addr[4] += i; - } - pdev->ar = ar; spin_lock_init(&ar->data_lock); INIT_LIST_HEAD(&ar->arvifs); @@ -5744,26 +5784,11 @@ int ath11k_mac_create(struct ath11k_base *ab) INIT_WORK(&ar->wmi_mgmt_tx_work, ath11k_mgmt_over_wmi_tx_work); skb_queue_head_init(&ar->wmi_mgmt_tx_queue); clear_bit(ATH11K_FLAG_MONITOR_ENABLED, &ar->monitor_flags); - - ret = ath11k_mac_register(ar); - if (ret) { - ath11k_warn(ab, "failed to register hw device\n"); - pdev->ar = NULL; - ieee80211_free_hw(hw); - goto err_destroy_mac; - } - - idr_init(&ar->txmgmt_idr); - spin_lock_init(&ar->txmgmt_idr_lock); } - /* Initialize channel counters frequency value in hertz */ - ab->cc_freq_hz = IPQ8074_CC_FREQ_HERTZ; - ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS)) - 1; - return 0; -err_destroy_mac: +err_free_mac: ath11k_mac_destroy(ab); return ret; diff --git a/drivers/net/wireless/ath/ath11k/mac.h b/drivers/net/wireless/ath/ath11k/mac.h index 8c37573ae5dc..f286531cdd78 100644 --- a/drivers/net/wireless/ath/ath11k/mac.h +++ b/drivers/net/wireless/ath/ath11k/mac.h @@ -118,9 +118,10 @@ struct ath11k_generic_iter { extern const struct htt_rx_ring_tlv_filter ath11k_mac_mon_status_filter_default; -int ath11k_mac_create(struct ath11k_base *ab); void ath11k_mac_destroy(struct ath11k_base *ab); void ath11k_mac_unregister(struct ath11k_base *ab); +int ath11k_mac_register(struct ath11k_base *ab); +int ath11k_mac_allocate(struct ath11k_base *ab); int ath11k_mac_hw_ratecode_to_legacy_rate(u8 hw_rc, u8 preamble, u8 *rateidx, u16 *rate); u8 ath11k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband, From patchwork Thu Nov 28 08:21:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265503 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6A501393 for ; Thu, 28 Nov 2019 08:22:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 833E0216F4 for ; Thu, 28 Nov 2019 08:22:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cVFZjYz3"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="TuqOA+kd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="AnYQu4nt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 833E0216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=M0SDwlpfCD0D0kpdVVpom7q8JQ1KbodIbUxVZHKYA6M=; b=cVFZjYz3pJboKb4ok8H2wBipQz 7vTWjc9DxwQQQE9zUje3jn56SGtR1qXzcyehcDwaf3I5LV/TTTXSFzR+eWrkzRKli2ueGVh53CtVj jadE7qY/nhrTfxbKhcRowpYVB2yVaaSo2rkcx8DFwBprDnSb/ZfEm3K5s4Me/WqS1Svd8LCDsQK42 1wZgxgNnxtyTQl9+KwZYF/rnq/L4QpSdBrqddmSxITVwpLzSRRzPQz0Bm0ToEA0PfqkfUyWMY1Q2m Ruxf6BepcX7HhM5nMT8J/V0/f/v0XsPHo6lBwg06OhXj1rS4b//R5uRLZrJ+MlLgPieJ83de88UOH h5sewXaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3s-0001JF-UG; Thu, 28 Nov 2019 08:22:04 +0000 Received: from a27-188.smtp-out.us-west-2.amazonses.com ([54.240.27.188]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3p-0001GE-S4 for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:22:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929319; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=fYh+h0OLmMSbGrKdOftWyma26CCH4Pw5VCOMKmEOevE=; b=TuqOA+kdp6QI14Z0w8PqSTczaY5hU5grEFXieujw6xZSq08sHPq0ei0TMu6BFIxu CjI4bB3sSxCk8yoEjui6hlRr0OTtziqhCmutmt6B6dQCWxM5WnSfeWPF4dJw1suQjBQ VLaEbu5yRROrFQHeQ2MDU7B6UQZIbZLjLp6Gq3lY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929319; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=fYh+h0OLmMSbGrKdOftWyma26CCH4Pw5VCOMKmEOevE=; b=AnYQu4ntz6AN+73eg00Ru+XR4cM1DbGawwb4YfH0YYD3rbdwFFd8DS7EHL3OWmmb iuNr6VhHS4PcOvLn1CNeq1BSwoGtTl5MTRgo3CoPJistVvQt10Wi5O0cpH3YPb4Qcx+ km+c9kXOcykc+zjZmfMY0MZZOhmRnkZjIo5b+GmU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3A945C48B38 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 8/9] ath11k: Setup REO destination ring before sending wmi_init command Date: Thu, 28 Nov 2019 08:21:58 +0000 Message-ID: <0101016eb11a43ec-88f19574-c964-4172-83a6-32a94ede2995-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.188 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002201_929579_FEE53EA5 X-CRM114-Status: GOOD ( 12.06 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.188 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: Vasanthakumar Thiagarajan Firmware expects all the required REO destination rings setup while processing wmi_init command. Not doing this causes connected stations getting disconnected and not able to connect back. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/core.c | 19 +++++++++++-- drivers/net/wireless/ath/ath11k/dp.c | 10 +++++-- drivers/net/wireless/ath/ath11k/dp.h | 1 + drivers/net/wireless/ath/ath11k/dp_rx.c | 49 +++++++++++++++++++++++++++------ drivers/net/wireless/ath/ath11k/dp_rx.h | 2 ++ 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index c9c9e4b5ef6b..5cdc9b2aee51 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -10,6 +10,7 @@ #include "ahb.h" #include "core.h" #include "dp_tx.h" +#include "dp_rx.h" #include "debug.h" unsigned int ath11k_debug_mask; @@ -325,6 +326,7 @@ static void ath11k_core_stop(struct ath11k_base *ab) ath11k_qmi_firmware_stop(ab); ath11k_ahb_stop(ab); ath11k_wmi_detach(ab); + ath11k_dp_pdev_reo_cleanup(ab); /* De-Init of components as needed */ } @@ -476,28 +478,38 @@ static int ath11k_core_start(struct ath11k_base *ab, goto err_hif_stop; } + ath11k_dp_pdev_pre_alloc(ab); + + ret = ath11k_dp_pdev_reo_setup(ab); + if (ret) { + ath11k_err(ab, "failed to initialize reo destination rings: %d\n", ret); + goto err_mac_destroy; + } + ret = ath11k_wmi_cmd_init(ab); if (ret) { ath11k_err(ab, "failed to send wmi init cmd: %d\n", ret); - goto err_mac_destroy; + goto err_reo_cleanup; } ret = ath11k_wmi_wait_for_unified_ready(ab); if (ret) { ath11k_err(ab, "failed to receive wmi unified ready event: %d\n", ret); - goto err_mac_destroy; + goto err_reo_cleanup; } ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab); if (ret) { ath11k_err(ab, "failed to send htt version request message: %d\n", ret); - goto err_mac_destroy; + goto err_reo_cleanup; } return 0; +err_reo_cleanup: + ath11k_dp_pdev_reo_cleanup(ab); err_mac_destroy: ath11k_mac_destroy(ab); err_hif_stop: @@ -561,6 +573,7 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab) ath11k_dp_pdev_free(ab); ath11k_ahb_stop(ab); ath11k_wmi_detach(ab); + ath11k_dp_pdev_reo_cleanup(ab); mutex_unlock(&ab->core_lock); ath11k_dp_free(ab); diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index 72c21cf6a352..b966a16a930f 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -684,11 +684,10 @@ void ath11k_dp_pdev_free(struct ath11k_base *ab) } } -int ath11k_dp_pdev_alloc(struct ath11k_base *ab) +void ath11k_dp_pdev_pre_alloc(struct ath11k_base *ab) { struct ath11k *ar; struct ath11k_pdev_dp *dp; - int ret; int i; for (i = 0; i < ab->num_radios; i++) { @@ -704,6 +703,13 @@ int ath11k_dp_pdev_alloc(struct ath11k_base *ab) idr_init(&dp->rxdma_mon_buf_ring.bufs_idr); spin_lock_init(&dp->rxdma_mon_buf_ring.idr_lock); } +} + +int ath11k_dp_pdev_alloc(struct ath11k_base *ab) +{ + struct ath11k *ar; + int ret; + int i; /* TODO:Per-pdev rx ring unlike tx ring which is mapped to different AC's */ for (i = 0; i < ab->num_radios; i++) { diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h index 82ddd7017722..f7e53509ae07 100644 --- a/drivers/net/wireless/ath/ath11k/dp.h +++ b/drivers/net/wireless/ath/ath11k/dp.h @@ -1507,6 +1507,7 @@ void ath11k_dp_vdev_tx_attach(struct ath11k *ar, struct ath11k_vif *arvif); void ath11k_dp_free(struct ath11k_base *ab); int ath11k_dp_alloc(struct ath11k_base *ab); int ath11k_dp_pdev_alloc(struct ath11k_base *ab); +void ath11k_dp_pdev_pre_alloc(struct ath11k_base *ab); void ath11k_dp_pdev_free(struct ath11k_base *ab); int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, int mac_id, enum hal_ring_type ring_type); diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index a380efb9caa6..1b3b65c0038c 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -395,12 +395,51 @@ static void ath11k_dp_rx_pdev_srng_free(struct ath11k *ar) struct ath11k_pdev_dp *dp = &ar->dp; ath11k_dp_srng_cleanup(ar->ab, &dp->rx_refill_buf_ring.refill_buf_ring); - ath11k_dp_srng_cleanup(ar->ab, &dp->reo_dst_ring); ath11k_dp_srng_cleanup(ar->ab, &dp->rxdma_err_dst_ring); ath11k_dp_srng_cleanup(ar->ab, &dp->rx_mon_status_refill_ring.refill_buf_ring); ath11k_dp_srng_cleanup(ar->ab, &dp->rxdma_mon_buf_ring.refill_buf_ring); } +void ath11k_dp_pdev_reo_cleanup(struct ath11k_base *ab) +{ + struct ath11k_pdev_dp *dp; + struct ath11k *ar; + int i; + + for (i = 0; i < ab->num_radios; i++) { + ar = ab->pdevs[i].ar; + dp = &ar->dp; + ath11k_dp_srng_cleanup(ab, &dp->reo_dst_ring); + } +} + +int ath11k_dp_pdev_reo_setup(struct ath11k_base *ab) +{ + struct ath11k *ar; + struct ath11k_pdev_dp *dp; + int ret; + int i; + + for (i = 0; i < ab->num_radios; i++) { + ar = ab->pdevs[i].ar; + dp = &ar->dp; + ret = ath11k_dp_srng_setup(ab, &dp->reo_dst_ring, HAL_REO_DST, + dp->mac_id, dp->mac_id, + DP_REO_DST_RING_SIZE); + if (ret) { + ath11k_warn(ar->ab, "failed to setup reo_dst_ring\n"); + goto err_reo_cleanup; + } + } + + return 0; + +err_reo_cleanup: + ath11k_dp_pdev_reo_cleanup(ab); + + return ret; +} + static int ath11k_dp_rx_pdev_srng_alloc(struct ath11k *ar) { struct ath11k_pdev_dp *dp = &ar->dp; @@ -416,14 +455,6 @@ static int ath11k_dp_rx_pdev_srng_alloc(struct ath11k *ar) return ret; } - ret = ath11k_dp_srng_setup(ar->ab, &dp->reo_dst_ring, HAL_REO_DST, - dp->mac_id, dp->mac_id, - DP_REO_DST_RING_SIZE); - if (ret) { - ath11k_warn(ar->ab, "failed to setup reo_dst_ring\n"); - return ret; - } - ret = ath11k_dp_srng_setup(ar->ab, &dp->rxdma_err_dst_ring, HAL_RXDMA_DST, 0, dp->mac_id, DP_RXDMA_ERR_DST_RING_SIZE); diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.h b/drivers/net/wireless/ath/ath11k/dp_rx.h index 026820fda568..eec5deaa59ad 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.h +++ b/drivers/net/wireless/ath/ath11k/dp_rx.h @@ -48,6 +48,8 @@ int ath11k_peer_rx_tid_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id, u8 tid, u32 ba_win_sz, u16 ssn); void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base *ab, struct sk_buff *skb); +int ath11k_dp_pdev_reo_setup(struct ath11k_base *ab); +void ath11k_dp_pdev_reo_cleanup(struct ath11k_base *ab); int ath11k_dp_rx_pdev_alloc(struct ath11k_base *ab, int pdev_idx); void ath11k_dp_rx_pdev_free(struct ath11k_base *ab, int pdev_idx); void ath11k_dp_reo_cmd_list_cleanup(struct ath11k_base *ab); From patchwork Thu Nov 28 08:21:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265501 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A38B1393 for ; Thu, 28 Nov 2019 08:22:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6665C216F4 for ; Thu, 28 Nov 2019 08:22:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AmhaipWZ"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="n4AxzrAO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="C3qUPKZ+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6665C216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References: In-Reply-To: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:List-Owner; bh=raQRYhyTMHl69AvZ9VevpkEKZf3cNO2WCKR4DPto+DI=; b=AmhaipWZWqTY6JtLAfHZnaDrOc TW9D6nfdtzP7jV5349n1TjCYooGqaZJYB7/4mJpWQZWafyRuKMiCCc0Dj3D/h/9zOpj3TRV3DO9zq ZUEwxhhYQU4p576u20kM3wrrhrFzd5Mx9hBBUJTk9Bbfm/0SUFwmS1JYoC+cTwq2wK8o1uFR6JAju TW0ZpVNGSnuZ/bH9+DOpxtRM43YlAhdJ8p93oGjMuM0losNk8iNe7dXUzmhYDyfnb7DdlQT/BflJ9 LhZ+7RFU7Wk6y9mKZEjelYMyrQ1KHARkOFwn0ZIAbsGuf/9YbbnlW0WZEncB8sT2+rLUZDnejXG3z Bu2+1W9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3q-0001Hm-Ld; Thu, 28 Nov 2019 08:22:02 +0000 Received: from a27-10.smtp-out.us-west-2.amazonses.com ([54.240.27.10]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaF3n-00016A-Ob for ath11k@lists.infradead.org; Thu, 28 Nov 2019 08:22:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929319; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=dHuD82+0yJBVXsYeOupsPuTPdmUJSLK1w+BQHGdGNGI=; b=n4AxzrAOb4m09cpT1Lnxi0nqEeWeW7iXY+BP39bhOq+hDt1N5YVahtbq5UtAfFKv N2nzQ7rKS4mxb8TGsbsLFLeNqnhWAnBeE2OhWBzQJLRSGiIxmM6cXqIyCeULc5ePoy7 savMnVdmwvZfKTjYm31Y/Hi7822Mlv3XErc4p6gc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929318; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=dHuD82+0yJBVXsYeOupsPuTPdmUJSLK1w+BQHGdGNGI=; b=C3qUPKZ+7VJqr4+r6Sr8dHJPZW1VpsS8+0NyVrSjunxdKDkQ9c9TLxoGe9KI60zB AWWIt8gjc+V1qoxxb11rZghOs82BOBYw2M8GJFg43NUHIWzurUvMjq9EJFA1aGTnen0 Bd1eadZ5ywWRYiGpIlLz4RJknSqyGR/BlIRJTC/E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9D30AC48B00 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 9/9] ath11k: fix indentation in ath11k_mac_prepare_he_mode() Date: Thu, 28 Nov 2019 08:21:58 +0000 Message-ID: <0101016eb11a43dd-8eeb5e90-80fa-4b34-8662-e7a9e210ae0e-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> References: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org> X-SES-Outgoing: 2019.11.28-54.240.27.10 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_002159_828262_B47B7274 X-CRM114-Status: UNSURE ( 8.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [54.240.27.10 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath11k@lists.infradead.org MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org From: John Crispin Signed-off-by: John Crispin Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/mac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index e4dfce6b63f0..978d8768d68a 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3883,15 +3883,15 @@ ath11k_mac_prepare_he_mode(struct ath11k_pdev *pdev, u32 viftype) hecap_phy_ptr = &cap_band->he_cap_phy_info[0]; hemode = FIELD_PREP(HE_MODE_SU_TX_BFEE, HE_SU_BFEE_ENABLE) | - FIELD_PREP(HE_MODE_SU_TX_BFER, HECAP_PHY_SUBFMR_GET(hecap_phy_ptr)) | - FIELD_PREP(HE_MODE_UL_MUMIMO, HECAP_PHY_ULMUMIMO_GET(hecap_phy_ptr)); + FIELD_PREP(HE_MODE_SU_TX_BFER, HECAP_PHY_SUBFMR_GET(hecap_phy_ptr)) | + FIELD_PREP(HE_MODE_UL_MUMIMO, HECAP_PHY_ULMUMIMO_GET(hecap_phy_ptr)); /* TODO WDS and other modes */ if (viftype == NL80211_IFTYPE_AP) { hemode |= FIELD_PREP(HE_MODE_MU_TX_BFER, - HECAP_PHY_MUBFMR_GET(hecap_phy_ptr)) | - FIELD_PREP(HE_MODE_DL_OFDMA, HE_DL_MUOFDMA_ENABLE) | - FIELD_PREP(HE_MODE_UL_OFDMA, HE_UL_MUOFDMA_ENABLE); + HECAP_PHY_MUBFMR_GET(hecap_phy_ptr)) | + FIELD_PREP(HE_MODE_DL_OFDMA, HE_DL_MUOFDMA_ENABLE) | + FIELD_PREP(HE_MODE_UL_OFDMA, HE_UL_MUOFDMA_ENABLE); } else { hemode |= FIELD_PREP(HE_MODE_MU_TX_BFEE, HE_MU_BFEE_ENABLE); }