From patchwork Thu Nov 28 08:21:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265469 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 9A4401393 for ; Thu, 28 Nov 2019 08:21:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79FFF21771 for ; Thu, 28 Nov 2019 08:21:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="AzysRx/4"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="BWV+oAQ4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbfK1IVq (ORCPT ); Thu, 28 Nov 2019 03:21:46 -0500 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]:54578 "EHLO a27-18.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IVq (ORCPT ); Thu, 28 Nov 2019 03:21:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929305; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=sEGOELBgXukVU9+vmbil9rrl31RCGE4lmVVW+Rgl6ao=; b=AzysRx/4DWFV8KcMP/q7eKFtyu/EaxyQmSUL7z0iBdZft/SWrRk3gemhQ11YuaC9 +JUk454CyczW5WndUfpsL1Sba3Qr4lXe/sk8l/CS39lvJXnWKxGjZE3SJzJehAwoQA4 vh/peC3pOS/4DLZkiV4+Xl+GWz6UF8p3Pp1efXjM= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929305; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=sEGOELBgXukVU9+vmbil9rrl31RCGE4lmVVW+Rgl6ao=; b=BWV+oAQ4n1bjBysAIHaCdb9wtPZv7dC0z0+pEA4GPrhTaqKHx/J66EvtcHBRfrik pnqMd87BkDr+cK23rVlZZoT0jyqnoI2L66ySjIgpH6o874ViCMU3Gjayk3TcxTtSy5/ JM74qR96CVl2sApoZWGD1NFS+K8Klgmc1bmTmjc0= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 1/9] ath11k: Update tx and rx chain count properly on drv_set_antenna Date: Thu, 28 Nov 2019 08:21:45 +0000 Message-ID: <0101016eb11a10c9-dd904af5-539a-4c05-9ffc-3a1cc33b99f5-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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: 11265471 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 23DF01393 for ; Thu, 28 Nov 2019 08:21:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03FE221771 for ; Thu, 28 Nov 2019 08:21:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="KbGpLuUF"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="CMPNBR4j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbfK1IVs (ORCPT ); Thu, 28 Nov 2019 03:21:48 -0500 Received: from a27-10.smtp-out.us-west-2.amazonses.com ([54.240.27.10]:41290 "EHLO a27-10.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IVs (ORCPT ); Thu, 28 Nov 2019 03:21:48 -0500 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=KbGpLuUFO2Twcn7ioEm3SVbTWzpns9BixdiWUbh8wTYTw71HMy+kipTpEO9cmQ/z kfnyaeKjj4S0BYPFjrV2l5tV5bmIu2WAEtu3o5nXfdF6kK/W88cgCkgfAAJKXFxrq+/ X4vAtJl6QT1y+e15rIgIWu724LVt/1l+CkbqQGOA= 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=CMPNBR4jlGeF34b1z0DB7w5exxblkTKrgKzXIzBVaqjK7U/xnMEzkaTS7rkpdUq4 d9cAc/BIQcVrAqQEj2eMVRFmsOFwTF2kKq4oHOccWLPT9MgS8tvGxwt2PFiANK7ynVO hQ33XVK1dVKMg2QoIHbOlQntn8gj+OlIcrAM2lN4= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 2/9] ath11k: Advertise MPDU start spacing as no restriction Date: Thu, 28 Nov 2019 08:21:47 +0000 Message-ID: <0101016eb11a16cc-733e674c-13f1-45bb-8822-0f2225eaa4a5-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265475 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 3DD251393 for ; Thu, 28 Nov 2019 08:21:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D57521771 for ; Thu, 28 Nov 2019 08:21:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="hcKOBTHL"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="Wa863X5p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727510AbfK1IVu (ORCPT ); Thu, 28 Nov 2019 03:21:50 -0500 Received: from a27-55.smtp-out.us-west-2.amazonses.com ([54.240.27.55]:35278 "EHLO a27-55.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727266AbfK1IVu (ORCPT ); Thu, 28 Nov 2019 03:21:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929310; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=WNgcdifeKPsqi/GRjYzosb1eetOaTcII9PbVVYOev18=; b=hcKOBTHLyIGmbGsIEQekoTFR61FAkcGrn9kwAwMunCqjPJiPmTYXpe2zzuQ6SHq/ wFYY7VlaF1ggFyKBzbbLDkhIaP7TdX9MjnNdoz+CAgAP6SS+13nxwjlWpS8O7HPrLFD jF/yHqWec+ODOKhUBPDfAYw+CRltHKA3CjkMQ8Mk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929310; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=WNgcdifeKPsqi/GRjYzosb1eetOaTcII9PbVVYOev18=; b=Wa863X5pjKNwcR/gNhU105kk/sfGY/BmPtl/OcrSwu7qFdDRz+OEEKZ8WaJdjcq3 ElMEZWNddD21DRdcZ8HxeUMqbDQq38wgM4C5jd3oL8tcIbFiziS0FHW4BcLFo6Izd+9 X94558rV7dZCJVsdO+F562PEhDwxOcpGld/fzFgI= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 3/9] ath11k: fix memory leak in monitor mode Date: Thu, 28 Nov 2019 08:21:49 +0000 Message-ID: <0101016eb11a2018-f7fbb7a5-d195-4af8-8733-408db6c9a012-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265473 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 8B9E4112B for ; Thu, 28 Nov 2019 08:21:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BF3A21771 for ; Thu, 28 Nov 2019 08:21:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="HwB3yQbx"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="YFDBFDs8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727515AbfK1IVv (ORCPT ); Thu, 28 Nov 2019 03:21:51 -0500 Received: from a27-10.smtp-out.us-west-2.amazonses.com ([54.240.27.10]:41290 "EHLO a27-10.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IVu (ORCPT ); Thu, 28 Nov 2019 03:21:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929310; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=L/0Xv8IPDrrhX6sor/2ApevdfjypRx0hQPc9cSJK/yE=; b=HwB3yQbxNtrx3iw7tNyUzQUdQ7nmdDgTiADyZlMHNP8iVoYcwg5mmxcvFwpO2fc+ 0Gs2UJ8EWGt6cbmPQjYa8PN8/T4AZrgIGXPGxBPDcQEln607Bx5FnUkDx0+vSwHR9Z0 8ArI4J5h8jrUYkGnqk4VUniffrVkG69RMPqBMFS4= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929310; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=L/0Xv8IPDrrhX6sor/2ApevdfjypRx0hQPc9cSJK/yE=; b=YFDBFDs8yzmfUbsIvh6h3r5iHt1YOuYiY8zeYh4PJ5qzsbuQVxX7zHLiOYMBu0J9 Ne0UcuDsmYeTTm3FZBTAvSL0rYxgePneA+rfWP8PFwpDoGYWS1CdhayCd6bCsqLv/Hl s/KB5b4o06nRmTGoqzccenbqQfXkUDwpaOOM8m/Q= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 4/9] ath11k: fix vht guard interval mapping Date: Thu, 28 Nov 2019 08:21:50 +0000 Message-ID: <0101016eb11a212a-91838b15-bf0c-41df-ae5d-7fa19bf5d263-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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: 11265477 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 C5C9A1393 for ; Thu, 28 Nov 2019 08:21:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A561221771 for ; Thu, 28 Nov 2019 08:21:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="OCUdyCpr"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="Be6RcJtu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbfK1IVx (ORCPT ); Thu, 28 Nov 2019 03:21:53 -0500 Received: from a27-10.smtp-out.us-west-2.amazonses.com ([54.240.27.10]:41290 "EHLO a27-10.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IVw (ORCPT ); Thu, 28 Nov 2019 03:21:52 -0500 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=OCUdyCprPA9riOM3fZrNpLnSKtTTr7t1C5KpTKmxNSE8oWRXGDT4amwZvFpixo2U c0MHWfVFqXtAw1I1YDUJFqO60LtxBCAFdJfAGRRAgVWN3UfuXZOVQFDTOTrY94+61gP 3uDLOQrjSFrnTD01ysOwhq7Z958MKf68DXD12bm4= 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=Be6RcJtuhdc2d4pmlSrpZDokC22e2OC7ANyteJVdZyPCoutE4qYfTpZSu6V2sUnZ YrUzIQqUHPoYMyc0hSq7PPxlRzIlisVRieJAQXw8BF6xKWuXTkZ6nI+7OmRCPEkMty6 hoH+zXd8yXJC3t930eY72SM/KNOUQsxhI75VPJWU= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 5/9] ath11k: update tx duration in station info Date: Thu, 28 Nov 2019 08:21:51 +0000 Message-ID: <0101016eb11a27fd-1680b7b5-4be4-48b1-8259-c9e83a16bcbb-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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: 11265485 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 DD686112B for ; Thu, 28 Nov 2019 08:21:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD4DD21771 for ; Thu, 28 Nov 2019 08:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="AopF1mM5"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="TdybZrm8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727516AbfK1IV4 (ORCPT ); Thu, 28 Nov 2019 03:21:56 -0500 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]:54578 "EHLO a27-18.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IVz (ORCPT ); Thu, 28 Nov 2019 03:21:55 -0500 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=AopF1mM5kknDmaHP1Ji9WUaSMj1gvYmlZHyGso3DZnYm7HRcUCLEYr/hPV9ymXM/ YINbH2YMb4Km9/IeIUqZx0N6AY6BVXPOmN8QHddnj0GkdfSnMMIDNfiZghq8kNrmMd4 Qlr0HzWwfdjwAN0L+sON1NfKG8tW6spJwkEkr+DU= 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=TdybZrm82jlzW0Xwselrt5vGR58ajJQBsI+V75MHToXgb/ERp0EYrM4KJ0ME5J3a SycwKq5NenaT0NjOwPT2ns9+5jDZONYVRXghE9SR8ABG/AOINc3zwOE1nfwUjMyWKs0 JVJrydHMPABtXFreY5Bpgt3wdnBAla16IOJuJ6V8= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 6/9] ath11k: Skip update peer stats for management packets Date: Thu, 28 Nov 2019 08:21:54 +0000 Message-ID: <0101016eb11a33ac-09205b3e-5960-452d-8478-b6a52f3a12c5-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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: 11265489 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 C374714B7 for ; Thu, 28 Nov 2019 08:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A0BB21775 for ; Thu, 28 Nov 2019 08:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="cspRJXSH"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="AmMaTWkM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727527AbfK1IV7 (ORCPT ); Thu, 28 Nov 2019 03:21:59 -0500 Received: from a27-186.smtp-out.us-west-2.amazonses.com ([54.240.27.186]:54978 "EHLO a27-186.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbfK1IV6 (ORCPT ); Thu, 28 Nov 2019 03:21:58 -0500 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=cspRJXSHDfAHqDmIIKo/uxu12BCf7/5RK7MRnzfq+ERd4iHSCSMgt7U2ZhkOerg3 yhKPdaoxzd/jdgtYoYDcwy3PRBKgNsm52vWJ+BBgcNeLO48Cmjr9Gu5tho9zZIJ0+U0 8twuMyk4L3eyet8uOYSp5gAwYNJtZyYtwGIARdA8= 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=AmMaTWkMfP4GRWfja37+FRpMhTzqMZ0cV+P8WacYv6xej/WBq8V8zPGq0EKq8rqK eaCT9FE2J1teeVtXHbGJhPfCeTLPfx7KhYxzKwJO0hFf5E9dKBSDIG1Va39dpHKHaxa cMT99Evz4U+PtmNdo5no8Z42fROIcYwhwOVTNSEQ= 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 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 Cc: ath11k@lists.infradead.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: <0101016eb11a3f4b-7d13aad5-6bab-4dda-bbc3-07131f0937b1-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.186 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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: 11265495 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 7FFC318B7 for ; Thu, 28 Nov 2019 08:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52F3D21775 for ; Thu, 28 Nov 2019 08:22:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="nAHENxwo"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="ZUty63ns" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbfK1IV7 (ORCPT ); Thu, 28 Nov 2019 03:21:59 -0500 Received: from a27-188.smtp-out.us-west-2.amazonses.com ([54.240.27.188]:54782 "EHLO a27-188.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbfK1IV7 (ORCPT ); Thu, 28 Nov 2019 03:21:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929318; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=fYh+h0OLmMSbGrKdOftWyma26CCH4Pw5VCOMKmEOevE=; b=nAHENxwoIfys5OZTooOdwsjyhN2sfm8P4RWuNpwZkz+cVdCsaYR/DrdVNH9p5eGv x+ClDH/5izf9Xe5THba2ckqlf7QNI+/vrVAF1f5iUfFry0IehvZigN0+mFE8DFThHAN A4ZJ3eOriEVgz2RTL2Jwm50fARNyX7Vig5f3w9Lk= 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=fYh+h0OLmMSbGrKdOftWyma26CCH4Pw5VCOMKmEOevE=; b=ZUty63nsWIbZkNZLZNaRqHEr0eB7jsX7FL7BAQdCx1zYjudSz6pocq6du2a0dSzv OqwuHYIu5HxJI4E80iaszbxbUU7mcPGlnfxUYFL0PgfM5vwiJrPe+ItqXALkrQDZz2K EIsM1cF/vC0FFqqiflLhEcebbeFnxBYuMyTLATZk= 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 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 Cc: ath11k@lists.infradead.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: <0101016eb11a409c-82b249a6-9f02-4f9e-bab1-c28e04c7bc1e-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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:22:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11265497 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 C167F1393 for ; Thu, 28 Nov 2019 08:22:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0BCF21771 for ; Thu, 28 Nov 2019 08:22:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="TYclLICO"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="VF5QdKeV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727535AbfK1IWB (ORCPT ); Thu, 28 Nov 2019 03:22:01 -0500 Received: from a27-56.smtp-out.us-west-2.amazonses.com ([54.240.27.56]:39138 "EHLO a27-56.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbfK1IWA (ORCPT ); Thu, 28 Nov 2019 03:22:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574929320; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=dHuD82+0yJBVXsYeOupsPuTPdmUJSLK1w+BQHGdGNGI=; b=TYclLICOqQJdfjnmj6wwKo/UGQ4uncxq6SxkdlF22PSXGhcG7THT3TKn4mqEpit/ idzhIhaGtPmwrEHdwGtwhsJOeWHDwP/HxNMMtjPyu4fn2D19KUJzrVVjJ0qPHNpBnVa QH7a0RoKhi/Be4PE649j5GewyY733+DH48NmAcvg= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574929320; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=dHuD82+0yJBVXsYeOupsPuTPdmUJSLK1w+BQHGdGNGI=; b=VF5QdKeVMqgaQpmI7hETnpG5yk2n6SPbGnc5toHF0MTb4vToo9Dlb3kdeYoobj8S 83wr7TRDgUggpOR7+cK9nBWcoRRZURqnG4cPnxHxZFNsUVChD3QyEoNPVQOwQDbsNDV 1KoL8AoY3ObXhZvovezbnHcyBydSsrnNDrJET94c= 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 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 Cc: ath11k@lists.infradead.org Subject: [PATCH 9/9] ath11k: fix indentation in ath11k_mac_prepare_he_mode() Date: Thu, 28 Nov 2019 08:22:00 +0000 Message-ID: <0101016eb11a483b-ffff8cbb-bd85-45d2-bc54-791a59d0904b-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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); }