From patchwork Fri Feb 15 16:48:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 10815445 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-2.web.codeaurora.org (Postfix) with ESMTP id 3DCA017D5 for ; Fri, 15 Feb 2019 16:49:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A4102FBD4 for ; Fri, 15 Feb 2019 16:49:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B4D02FBDB; Fri, 15 Feb 2019 16:49: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9F932FBD4 for ; Fri, 15 Feb 2019 16:49:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388366AbfBOQtU (ORCPT ); Fri, 15 Feb 2019 11:49:20 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38007 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388334AbfBOQtU (ORCPT ); Fri, 15 Feb 2019 11:49:20 -0500 Received: by mail-ed1-f67.google.com with SMTP id h58so8486653edb.5 for ; Fri, 15 Feb 2019 08:49:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1zSmmzsKU/67oSzxkP3nnUTXMLRwYqn+zk9jXOXk0W4=; b=FtWr5sW29+WKR/I87AtT/BuZYwhDyCk/h8ZU+5fU8BfVg2HWOWYmqTm/HYc4B1CkUI RoVv5KcFlIMzG0YNGucc5N5lg2wqvjX/xoL/EAvznITpwe4S7tToTZgrMfkEd5o67liV ZAf7cJx4VEVtbO9dvqp+EyXitkc6UkrFEj6d4D82I7ZG7io5peD0XYmQtC17HxeJ4lRI 2u5V+PIE1gDPAVup9+B9SIJg34+9tmZthLisPFcxPlYvLIqwqJCGu5jk2i5nSSjdng9N S7sFmMrzc2uhWi1XthVFpVdMNxJca/DYqul3El3P5w3Lhbjn5YNJAL04OWid2rBC/YKK uVHA== X-Gm-Message-State: AHQUAuak5tW35kRT3GntBONC+AVRvx1Su+qe73wfg4dFFKk/ZLnXbbDC e6+5ihNgfwARQIJhDKKQ1TtGkw== X-Google-Smtp-Source: AHgI3IYLDn+bYGu683n6n8Dn+3n3w/cRp7DiCxBrsKIHNIzzleryALCsXPYuKV7ouu7ur+eDB+zfiw== X-Received: by 2002:a17:906:28c9:: with SMTP id p9mr1786607ejd.43.1550249358831; Fri, 15 Feb 2019 08:49:18 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id s14sm1315992ejz.35.2019.02.15.08.49.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 08:49:17 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 7A55A1825DD; Fri, 15 Feb 2019 17:49:17 +0100 (CET) From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org Cc: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= Subject: [PATCH] ath9k: Make sure to zero status.tx_time before reporting TX status Date: Fri, 15 Feb 2019 17:48:55 +0100 Message-Id: <20190215164855.30666-1-toke@redhat.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since ath9k reports airtime usage directly using the ieee80211_report_airtime() callback, it shouldn't also report it using the tx_time in status. Make sure the field is zeroed before TX status is reported to avoid spurious airtime being accounted by bits being left over from earlier uses of the cb. Fixes: 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling and airtime APIs") Signed-off-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/xmit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 06e0c5a6fab6..773d428ff1b0 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2552,6 +2552,9 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, } tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1; + + /* we report airtime in ath_tx_count_airtime(), don't report twice */ + tx_info->status.tx_time = 0; } static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)