Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1067274ybg; Wed, 10 Jun 2020 23:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTE4sfGgOhs+nT8ri5oFLxATlGlcNxH6QGfLLQh8Xnn2rTq5MdW+QFwVC0mOwQgd2qm329 X-Received: by 2002:aa7:d2d9:: with SMTP id k25mr5782952edr.43.1591856692962; Wed, 10 Jun 2020 23:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591856692; cv=none; d=google.com; s=arc-20160816; b=Pp97reZiq1av5XLn6aA94YRjKqSed1EeyC3gWgqzKoYJiElYV/XK/hGyghY6WXvJqS qtcukklHtFMBIEMtilQG7PjPVHQM5QrCCFg3nQFeRfq/KujWJ63jP3b1puITwsQMkLDY Rtm52T9eS75YkYsiPg47ubarZgeKIEvHmZosDQwOIUK/6/oDnbGuWhqXxMlsEMqyEXpG tjYgCavJ+XrPEhT0tuh545hkLRubEnq8Vx7kh/UDiBxeW7i0Eojn7lWB8vXXxEaEyKyw HLHpWkMinwmWvibq153kLMsob1MoOeRYkD9fZlx9eAKCJUBdzvfAM5TCb/7R8IUJhGiV CaXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=arJl3QKKFQ/Hf8CbmhE3qTDRC4mgtRDbif79Ci3z+eM=; b=G441JkTnj7aukNPcN+Qmj4kALEeG2cToP2oKTaVR+tnuqD8pBD4fuDrN2CZqs/6Fzr s8r0mxeFFeSphzF8Sq35EULeVZOPe4sVqOWS+O/X86Pa6ODqBusOPGHSZro1CDck011z vo4vmmHBIlgUr3I9MV/YgggBKDt8z/KjuLu+M7lqwc1YE/+cB83a001z3PTwxOh8jvvT N+yV2u9RJjLokuq37tES2osbqCi5QxS8tNxjCg+muVXN4Aorv1Q1sef0FqO1ZTF/MhhI 2RKLLdgY4m2BlxXd4wBtgskSgDxGeTcGzKmozj7mH1PcSXaxtnoVyfO3Yd29rKCW/XOY IKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=s71AmKlp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si1414559eje.267.2020.06.10.23.24.14; Wed, 10 Jun 2020 23:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=s71AmKlp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbgFKGVJ (ORCPT + 99 others); Thu, 11 Jun 2020 02:21:09 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:33042 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbgFKGVJ (ORCPT ); Thu, 11 Jun 2020 02:21:09 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1591856469; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=arJl3QKKFQ/Hf8CbmhE3qTDRC4mgtRDbif79Ci3z+eM=; b=s71AmKlp//JoQarCxJFaMaYuT8Xh98lSRHY/cnxp/+/VLWYXSa1TL/JafI7EMne4UYrOUCB0 3sV//EKj/u1ufh6135rEfGN2i0dYtYs83NJjhmcP2LwGV50x4brwKnABl/R+POCWxUJuNDJ5 akd993hWMDeDAXeJ6xoMlwKfixA= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n10.prod.us-east-1.postgun.com with SMTP id 5ee1cd4f0206ad41d1f6fc9e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 11 Jun 2020 06:21:03 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 45DFBC43387; Thu, 11 Jun 2020 06:21:02 +0000 (UTC) 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, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from vnaralas-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vnaralas) by smtp.codeaurora.org (Postfix) with ESMTPSA id 83848C433CA; Thu, 11 Jun 2020 06:21:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 83848C433CA 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=vnaralas@codeaurora.org From: Venkateswara Naralasetty To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Venkateswara Naralasetty Subject: [PATCH] ath10k: fix retry packets update in station dump Date: Thu, 11 Jun 2020 11:50:46 +0530 Message-Id: <1591856446-26977-1-git-send-email-vnaralas@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When tx status enabled, retry count is updated from tx completion status. which is not working as expected due to firmware limitation where firmware can not provide per MSDU rate statistics from tx completion status. Due to this tx retry count is always 0 in station dump. Fix this issue by updating the retry packet count from per peer statistics. This patch will not break on SDIO devices since, this retry count is already updating from peer statistics for SDIO devices. HW used: QCA9984 FW version: 10.4-3.6-00104 Signed-off-by: Venkateswara Naralasetty --- drivers/net/wireless/ath/ath10k/htt_rx.c | 8 +++++--- drivers/net/wireless/ath/ath10k/mac.c | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index d787cbe..cac05e7 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -3575,12 +3575,14 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar, } if (ar->htt.disable_tx_comp) { - arsta->tx_retries += peer_stats->retry_pkts; arsta->tx_failed += peer_stats->failed_pkts; - ath10k_dbg(ar, ATH10K_DBG_HTT, "htt tx retries %d tx failed %d\n", - arsta->tx_retries, arsta->tx_failed); + ath10k_dbg(ar, ATH10K_DBG_HTT, "tx failed %d\n", + arsta->tx_failed); } + arsta->tx_retries += peer_stats->retry_pkts; + ath10k_dbg(ar, ATH10K_DBG_HTT, "htt tx retries %d", arsta->tx_retries); + if (ath10k_debug_is_extd_tx_stats_enabled(ar)) ath10k_accumulate_per_peer_tx_stats(ar, arsta, peer_stats, rate_idx); diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 919d155..d9d4b15 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -8547,12 +8547,13 @@ static void ath10k_sta_statistics(struct ieee80211_hw *hw, sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE); if (ar->htt.disable_tx_comp) { - sinfo->tx_retries = arsta->tx_retries; - sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES); sinfo->tx_failed = arsta->tx_failed; sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED); } + sinfo->tx_retries = arsta->tx_retries; + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES); + ath10k_mac_sta_get_peer_stats_info(ar, sta, sinfo); } -- 2.7.4