Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3096666pxb; Mon, 18 Apr 2022 15:50:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyntcfqZl1NWlq/Pdz6+eLlHN3yRrZ3jk4oScgKXJDhV/M5pzgkoOat1a1/A7y2eWQGmU/p X-Received: by 2002:a05:6402:1c1e:b0:416:5b93:eacf with SMTP id ck30-20020a0564021c1e00b004165b93eacfmr14635219edb.302.1650322255557; Mon, 18 Apr 2022 15:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650322255; cv=none; d=google.com; s=arc-20160816; b=jmb5H343Hjjb8LJ/m3PQHnUTwlOlA/lAnM0g7J26MhMtyWsD7il2TWtXoOWtJoal0d tAscHXDEgxqSKjox81At8MtkkPfAufgdbU1W+RSo1PnrB+jsf+F03ivL+0dDTWUD7+xA WXRE4NrNL2JexHQLIBhHTzvelx5rSodIAJkYz2FENNVgS1v/h4VaJhcqVQ+EQuJwUTed +d1BrzCigwoWp94/GMXQIfqf8pQPKDvR6qxrqpRLCB0/ZsI2c1Wm1VYpYhh8SFxwCDHX r0CDimSxjEvQCOqlnIGkua23XVVxAGRRQ+umkqtj3n9y/7OFm8eHtTeU3bDWPP2jlYo2 TXCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DlbpHRVUu28m9O6Q9bsHLTuZRZ1cV62PnKAI+Z6CnoQ=; b=wyekBomrFZzWaYxfR1DpxSzQLldn3JTTUbCACRkhl1XIybbIXHOQaWxPxRG8Vc35ur mlf6tI5XvG3tDoyMzJ+tdgGvkdQfWlGjigZW1FCnaef7FNyrZuqDfoeLrl98y42pHFDG /BcPqYh2L+OiP3gwHBmrAvMzS03LdtyFxzr6WRaxTh9SQCRLogNXor6WtdidinytcSKc XKviy3RNqt74vzptyj4/F41ekX9EeEyFRNLkpsHrs2nVHytTsvLFZ9p8e8+QqoOrVmo8 HqD75G6A6R85ITT6jkaq3lRo3NiGqtiZjNXMGMqDHn6z3yzw/dOqFMKS7clwFpYst0L8 ++Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RsBj2/H9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o24-20020a056402039800b0041cc2ef4536si6894388edv.554.2022.04.18.15.50.30; Mon, 18 Apr 2022 15:50:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RsBj2/H9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242042AbiDRNSE (ORCPT + 99 others); Mon, 18 Apr 2022 09:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242233AbiDRM7n (ORCPT ); Mon, 18 Apr 2022 08:59:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381F330542; Mon, 18 Apr 2022 05:40:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B8CD5B80EDE; Mon, 18 Apr 2022 12:40:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03814C385A1; Mon, 18 Apr 2022 12:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650285626; bh=epETK8RMdi/qHauVcO3oyZYPjLD8fCCYT0QAkxHcJgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RsBj2/H9g6aj6UmGbT+mEMhMAhszreIyvSfAJzqJgi+1TffVOtac9j2aFfiASCIfv UlhIkDZPlhfahsTcNAP7G64yy5ENzvvNIx30KOL1l+s1SKp0okdXTlSJNyPuYPsuFs zoogEN7HV2u19eyuQaFNJAoYEKnmF2GVJO8OIDCA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bagas Sanjaya , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo Subject: [PATCH 5.10 077/105] ath9k: Properly clear TX status area before reporting to mac80211 Date: Mon, 18 Apr 2022 14:13:19 +0200 Message-Id: <20220418121148.818096123@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121145.140991388@linuxfoundation.org> References: <20220418121145.140991388@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Toke Høiland-Jørgensen commit 037250f0a45cf9ecf5b52d4b9ff8eadeb609c800 upstream. The ath9k driver was not properly clearing the status area in the ieee80211_tx_info struct before reporting TX status to mac80211. Instead, it was manually filling in fields, which meant that fields introduced later were left as-is. Conveniently, mac80211 actually provides a helper to zero out the status area, so use that to make sure we zero everything. The last commit touching the driver function writing the status information seems to have actually been fixing an issue that was also caused by the area being uninitialised; but it only added clearing of a single field instead of the whole struct. That is now redundant, though, so revert that commit and use it as a convenient Fixes tag. Fixes: cc591d77aba1 ("ath9k: Make sure to zero status.tx_time before reporting TX status") Reported-by: Bagas Sanjaya Cc: Signed-off-by: Toke Høiland-Jørgensen Tested-by: Bagas Sanjaya Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220330164409.16645-1-toke@toke.dk Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/xmit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2512,6 +2512,8 @@ static void ath_tx_rc_status(struct ath_ struct ath_hw *ah = sc->sc_ah; u8 i, tx_rateindex; + ieee80211_tx_info_clear_status(tx_info); + if (txok) tx_info->status.ack_signal = ts->ts_rssi; @@ -2554,9 +2556,6 @@ static void ath_tx_rc_status(struct ath_ } 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)