From patchwork Tue Jan 10 15:53:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Shafi Shajakhan X-Patchwork-Id: 9508075 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE02D606E1 for ; Tue, 10 Jan 2017 15:53:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFC342859F for ; Tue, 10 Jan 2017 15:53:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4864285A5; Tue, 10 Jan 2017 15:53:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BAF992859F for ; Tue, 10 Jan 2017 15:53:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cQyjc-00026c-NQ; Tue, 10 Jan 2017 15:53:16 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQyjZ-00015C-10 for ath10k@lists.infradead.org; Tue, 10 Jan 2017 15:53:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1484063592; x=1515599592; h=from:to:cc:subject:date:message-id:mime-version; bh=1q4+anKqDHKXsqtmB6SBrxbwmfPY+xlI7gCGB5iSOEg=; b=YYcVmidlAIxG2deEUDSYAqdZucpCQsv/fcV1oE3hgRdpWnakAWmnfVaA TUyQsr0YtZ3lCmi1WHR4Al5lAQFP0StUyKZWMtkAsFmiifqPNQkorBtzW apFVIm03HIB18XycqoqUCzhfiCVyK3ZmEgk6wNBjhcl9yxRaCbYIAzV3G U=; X-IronPort-AV: E=Sophos;i="5.33,344,1477983600"; d="scan'208";a="349775772" Received: from unknown (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by wolverine02.qualcomm.com with ESMTP; 10 Jan 2017 07:52:49 -0800 From: Mohammed Shafi Shajakhan X-IronPort-AV: E=McAfee;i="5700,7163,8403"; a="1288237475" Received: from nasanexm02c.na.qualcomm.com ([10.85.0.43]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 10 Jan 2017 07:52:49 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM02C.na.qualcomm.com (10.85.0.43) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 10 Jan 2017 07:52:47 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 10 Jan 2017 21:22:38 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 10 Jan 2017 21:23:24 +0530 To: Subject: [PATCH] ath10k: Fix Tx legacy rate reporting Date: Tue, 10 Jan 2017 21:23:23 +0530 Message-ID: <1484063603-13652-1-git-send-email-mohammed@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170110_075313_184909_10996A74 X-CRM114-Status: UNSURE ( 7.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mohammed@codeaurora.org, linux-wireless@vger.kernel.org, Mohammed Shafi Shajakhan Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mohammed Shafi Shajakhan Tx legacy rate is reported 10 fold, as below iw dev wlan#N station dump | grep "tx bitrate" tx bitrate: 240.0 MBit/s This is because by mistake we muliply by the hardware reported rate twice by 10, fix this. Fixes: cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4") Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index cb86530..ae10fe1 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2247,7 +2247,7 @@ static inline bool is_valid_legacy_rate(u8 rate) rate *= 10; if (rate == 60 && txrate.flags == WMI_RATE_PREAMBLE_CCK) rate = rate - 5; - arsta->txrate.legacy = rate * 10; + arsta->txrate.legacy = rate; } else if (txrate.flags == WMI_RATE_PREAMBLE_HT) { arsta->txrate.flags = RATE_INFO_FLAGS_MCS; arsta->txrate.mcs = txrate.mcs;