Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3880645pxb; Tue, 19 Apr 2022 11:40:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHbznfMBL0OBT82Go8V54Al+UZVp9uIfyi5yMqjSyNMYKxyw7LUwj08zO4OZhkHCJlbwC5 X-Received: by 2002:a17:902:6b0b:b0:158:d1e7:3d0f with SMTP id o11-20020a1709026b0b00b00158d1e73d0fmr16938838plk.71.1650393634716; Tue, 19 Apr 2022 11:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650393634; cv=none; d=google.com; s=arc-20160816; b=t24kE4nDR167vFx/6yM4jY5jm7JBrpNCm9rmwzXJfixx2SZV3DyDUXSjSGuVV+Isvf uiCBxtp8dqIl6mMzecHghZs9fBwr/ORKqTBE/ADhGySKpMPFJNnuPjncmCjTfNFR4+qH 3ACNwjkuOHqJVJWEFv4/CsInUvXhbZPVKA8VLHkpju/dE/Vz/OPorRiKDohxGM/9L6Hs 4bpQrkVBfOsmGpuDpaZytnhor8ZuEknaiK/7s36gBd50Eo6g3M/TLcPtCcK+qAkQnHk8 jxnCvc1BaCF83jtRWnR9av7Pk0e8XS6zN0u++ZoeHQ/lARwBz/4uAK3AJYawUaEQWlqc jPsw== 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=j7rfOcb5ore4spqG2afb6TfSGvNyv50OEMND50/fOUk=; b=tKgnkV/SZuc0wZYRpbFUTL2SyNcUWBYl/6Qrfc5WFfuPwYL5SvW8YIb36+3rgdhbTq rYUiqO6c2DrgYbH6YzqBYhrrI+cgVkJHxxOjDavAGwtgFNTmzoR3fG+r5fwJLaPXpCkG nxFtc7wX4HqgFGJiRejX/wi16FrDwN4nmXuDnf9Eu6I9FeNU/CO1Enq2tBcG7KLhGoPN y6o8Kl5uKfiIY7ZRs1fAkwX9Fyrz7GzmMcFxOOoMEwVjB1KU1Kf7EqWDAJCWMyZfFh4G c3CbEJE9DXYkbW0y/ucujwFjI12/gMTFNzUNa1XOtdWEVlF2JwLzVoy68mAf/Z2k0WqG 6ZYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xVb1q9Yv; 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 q6-20020a170902f78600b00153b2d1655dsi3708pln.357.2022.04.19.11.40.17; Tue, 19 Apr 2022 11:40:34 -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=xVb1q9Yv; 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 S241760AbiDRNWa (ORCPT + 99 others); Mon, 18 Apr 2022 09:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241671AbiDRNDY (ORCPT ); Mon, 18 Apr 2022 09:03:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C8933E28; Mon, 18 Apr 2022 05:44:02 -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 1400AB80E4B; Mon, 18 Apr 2022 12:44:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EA2EC385A1; Mon, 18 Apr 2022 12:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650285839; bh=FndZYfUSXaI+j6oH0t5F4btQ64JgEFYgdQQJjXBnm1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xVb1q9YvDPmMUTUiUnNhNaDqDebGnnDe+XQnhFZGihuZXS7TbRYtLTT5FyILAW416 D7R5se+PzdpTqtWX+ilNSeiPRYkibEmZdqina/Ctj+8FUo5DudNxQuIRYnWNX6HXzI QO7vqFzWfnO9WaRDqPUhAHuwgdwtZg8aCoCUuCrU= 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.4 41/63] ath9k: Properly clear TX status area before reporting to mac80211 Date: Mon, 18 Apr 2022 14:13:38 +0200 Message-Id: <20220418121136.979138803@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121134.149115109@linuxfoundation.org> References: <20220418121134.149115109@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 @@ -2509,6 +2509,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; @@ -2551,9 +2553,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)