Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3374691pxb; Tue, 19 Apr 2022 00:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Ikpz4LktzJEvkxF6zN9x8xiKK0veRzcI9zpVS08tXls9UmAxwE7D4Uax+fKSn23yyJGR X-Received: by 2002:a05:6402:14b:b0:418:d06e:5d38 with SMTP id s11-20020a056402014b00b00418d06e5d38mr15805784edu.90.1650353858725; Tue, 19 Apr 2022 00:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650353858; cv=none; d=google.com; s=arc-20160816; b=xicX9Oo99KrYCwaCgsFQ9F9FEPbE9wc4Z9eWwi955OcaynI12D4dWNbBNZtUatdqJe JvxftQvb+7Fh3g5mAscUg0Aj8ig0OvUObswpSFNW1rAw9flnQgbiZGnuumLa3XdIG7e3 hGaAWhM2N3GEjas5XCVmH8aSEzRsMBI5289A7sCS6/jZayxYlv1f/7qZqxbWQbWLZdV/ Ed5PtwpS9p2eL1yvvh/8KsWfzOao7vfLHezGneqF6RrhJqG+7NUs5z6dvSTWj3PYpVsz BuOAOxvK5TMmxOqb/RZs6wQjB8l2t+7b37/ekEqzyuU9NRYwPYiE/6MSxe1RK3QuXuje vbzA== 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=KA3Zem8Nq4v9Ko12d3zRkT8WwgN/cqrJR4f+/raon4k=; b=T0Q2sih5bpi+fGBm/xM2mWLhWi5s7pHgkw0VEF+XNUT4afAp36pM/2KWuZ7UpG4Ykk bsVls/87Xar2JhIUTHbxYpZUrAREWTO+NsEuCdkovupC7njRHX55E1qSlC7Tuj837bh8 +qOoXb9QvEnSV2MSoSJDcLSAayTIZ9+DZEwmi+Xa4siLxXMIqN0kt9ivvF/PPzVw7t8Y BDIMsGvoSgwK+vnT/3CG3jkwEUVS+LE7SN7pF1J234Y8QmxdCvHDqRQAUQ9S65An7ZgE OBj1/3pKng5dwT9cEQkbnvCShvcwY6/trFEv6qAkUpwAhSAaEekc4ovzYML9xszQqKCY bIoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=llNipg52; 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 hq25-20020a1709073f1900b006efe352c5f1si767964ejc.691.2022.04.19.00.37.14; Tue, 19 Apr 2022 00:37:38 -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=llNipg52; 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 S240063AbiDRMnj (ORCPT + 99 others); Mon, 18 Apr 2022 08:43:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239263AbiDRMco (ORCPT ); Mon, 18 Apr 2022 08:32:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B07126112; Mon, 18 Apr 2022 05:24:25 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E688860FD7; Mon, 18 Apr 2022 12:24:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA47EC385A7; Mon, 18 Apr 2022 12:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284664; bh=z/Mk8EdyPU3wldlUmqLKlaYC3CgDe+9Ov5RINbFMnyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=llNipg52terkyTnp1ZXNXFq8rmAUPJuCbCg1gaWG5SmcWgoB/9YPzRn1H1gqttN26 rJtXVBdlucWCLE7/5OoR4aQVwsWEL4bqw+fplhUeKU8qK3KGMguxd9nLFotG0MK9IH YdPCezhiXgsowTTqUBCmkw18KWsQmrXs3IucC6/w= 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.17 189/219] ath9k: Properly clear TX status area before reporting to mac80211 Date: Mon, 18 Apr 2022 14:12:38 +0200 Message-Id: <20220418121212.166178489@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@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 @@ -2553,6 +2553,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; @@ -2595,9 +2597,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)