From nobody Sun Feb 8 19:59:05 2026 Received: from e3i103.smtp2go.com (e3i103.smtp2go.com [158.120.84.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5E441AD403 for ; Wed, 29 Jan 2025 16:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=158.120.84.103 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738169962; cv=none; b=QXA3l8/quXE0G8nyQf23ThQ7XAKKEHfMamijcyyWK4+d9O51Cj8isW3nVzSmjf2s6+Bamds86xMC1Vcr9ffOdSiPJpdRZJW9k7i3O6ozirF42+SYCeDUGLucGjIQLsRYEw/s6nZRT3aigyXB21//3v6S48coXa+npQ8S3yKDQNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738169962; c=relaxed/simple; bh=vlR/mNTPKdf93728swy2ZznETWcIqOE2mb0rx2F285M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=K2xouPsRxgO31sua8oTDzMYuDnCU9O6+rPITEKV/XiWtUVTIzKnQSfUBNG/vOsZf68LpyrxDv9sbAXoNHZhyHs5GqEHKfdSZIfpLVq6qBq7Ni0ma9dvavSXr4+y/1/Bgx4tBh/SzX36jbKW+ikUNPEG6LqN9EKNu+0C1Og6bZ4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt; spf=pass smtp.mailfrom=em510616.triplefau.lt; dkim=pass (2048-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b=dKSEhUH+; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b=J4KcpJV0; arc=none smtp.client-ip=158.120.84.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=em510616.triplefau.lt Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b="dKSEhUH+"; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b="J4KcpJV0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smtpservice.net; i=@smtpservice.net; q=dns/txt; s=a1-4; t=1738169952; h=feedback-id : x-smtpcorp-track : date : message-id : to : subject : from : reply-to : sender : list-unsubscribe : list-unsubscribe-post; bh=yI14DNCfIlRuCxZ886YFaQ2/UtcUwqmz1COfGxdJOeo=; b=dKSEhUH+rPZa4+R4a83f1E820GR+1J2L3TRd/G7E+B0VERaWchNxI6b2GqbaETAHFtFT3 4j8PHPwsDJjVUcmzKDco/qePUHaCXJQZAZShYk7wahFLg/V6u7a8ZWpgERoCh3GO5a+v6l4 Sv7uhW/6Qr9SRZCSTsaR6X6wNHzMRA/79f7aahQueCxSppyOgh0MQmoj4TF81vpEWvvQlrJ KIlDvx9FajoDjKqsRq4r9z4y6eFx9dak1v8IySKV0ZV8sWuJmSCfpMmPgWLsncQooC57Omq 9Fn1bfSuUMKqgW7Q9A82buSx7mDiX+4dL7UbA9UPpicyi/qraooIMi17Fb/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triplefau.lt; i=@triplefau.lt; q=dns/txt; s=s510616; t=1738169952; h=from : subject : to : message-id : date; bh=yI14DNCfIlRuCxZ886YFaQ2/UtcUwqmz1COfGxdJOeo=; b=J4KcpJV0M5nXp+qP6dop+11IcIfHGofxOeqoaKlG3JL1d3vYpogub5iviq/x5W94xBMCF tskCEPtc3PP+jFSYo9K8McKqLSLVSPFr4ukyYSw6D/x7sU5ecec8YZMOxnuuxRD6upTcwXB ZqZlFh3H/wPlvyepHXAtfqnKTNMbWtOEXrrvQNUG8hIUpXhsqZ1PQSTQR46iGgOv9NkmbtF lv/XeNzgmKinivlW34dg5KrffD9EwdcCLUlhqwvd2MzuwkQKo+1vxpE5I945ALyzxHwsI2+ 5JtJVAO40jCNb7pEjAykYnNgHXopGv/GwKUyHnWXP3f6ilmBOFb2fcH5z3+g== Received: from [10.12.239.196] (helo=localhost) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97.1-S2G) (envelope-from ) id 1tdBP9-FnQW0hPzWk4-mJHD; Wed, 29 Jan 2025 16:59:07 +0000 From: Remi Pommarel To: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kalle Valo , Jeff Johnson , Remi Pommarel Subject: [PATCH v2] wifi: ath12k: remove return for empty tx bitrate in mac_op_sta_statistics Date: Wed, 29 Jan 2025 17:55:17 +0100 Message-Id: <38c2a7c4f7eaf57b9306bb95a9e6c42b7d987e05.1738169458.git.repk@triplefau.lt> X-Mailer: git-send-email 2.40.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please forward a copy of this message, including all headers, to Feedback-ID: 510616m:510616apGKSTK:510616sIr91F9xb_ X-smtpcorp-track: jIa9AarZSQdl.HBMw8Vtk6aEw.9Yni0ApWQme Content-Type: text/plain; charset="utf-8" Currently in ath12k_mac_op_sta_statistics() there is the following logic: if (!arsta->txrate.legacy && !arsta->txrate.nss) return; Because ath12k_sta_statistics is used to report many info to iw wlan0 link, if it return for empty legacy and nss of arsta->txrate, then the other stats after it will not be set. To address this issue remove the return and instead invert the logic to set the txrate logic if (arsta->txrate.legacy || arsta->txrate.nss). The same was done also in both ath10k with commit 1cd6ba8ae33e ("ath10k: remove return for NL80211_STA_INFO_TX_BITRATE") and ath11k as well with commit 1d795645e1ee ("ath11k: remove return for empty tx bitrate in mac_op_sta_statistics"). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Remi Pommarel Reviewed-by: Aditya Kumar Singh --- Changes in v2: - Rebase on ath-next drivers/net/wireless/ath/ath12k/mac.c | 33 +++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/a= th/ath12k/mac.c index 4fb7e235be66..e9663c6ac72c 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -10170,23 +10170,22 @@ static void ath12k_mac_op_sta_statistics(struct i= eee80211_hw *hw, sinfo->tx_duration =3D arsta->tx_duration; sinfo->filled |=3D BIT_ULL(NL80211_STA_INFO_TX_DURATION); =20 - if (!arsta->txrate.legacy && !arsta->txrate.nss) - return; - - if (arsta->txrate.legacy) { - sinfo->txrate.legacy =3D arsta->txrate.legacy; - } else { - sinfo->txrate.mcs =3D arsta->txrate.mcs; - sinfo->txrate.nss =3D arsta->txrate.nss; - sinfo->txrate.bw =3D arsta->txrate.bw; - sinfo->txrate.he_gi =3D arsta->txrate.he_gi; - sinfo->txrate.he_dcm =3D arsta->txrate.he_dcm; - sinfo->txrate.he_ru_alloc =3D arsta->txrate.he_ru_alloc; - sinfo->txrate.eht_gi =3D arsta->txrate.eht_gi; - sinfo->txrate.eht_ru_alloc =3D arsta->txrate.eht_ru_alloc; - } - sinfo->txrate.flags =3D arsta->txrate.flags; - sinfo->filled |=3D BIT_ULL(NL80211_STA_INFO_TX_BITRATE); + if (arsta->txrate.legacy || arsta->txrate.nss) { + if (arsta->txrate.legacy) { + sinfo->txrate.legacy =3D arsta->txrate.legacy; + } else { + sinfo->txrate.mcs =3D arsta->txrate.mcs; + sinfo->txrate.nss =3D arsta->txrate.nss; + sinfo->txrate.bw =3D arsta->txrate.bw; + sinfo->txrate.he_gi =3D arsta->txrate.he_gi; + sinfo->txrate.he_dcm =3D arsta->txrate.he_dcm; + sinfo->txrate.he_ru_alloc =3D arsta->txrate.he_ru_alloc; + sinfo->txrate.eht_gi =3D arsta->txrate.eht_gi; + sinfo->txrate.eht_ru_alloc =3D arsta->txrate.eht_ru_alloc; + } + sinfo->txrate.flags =3D arsta->txrate.flags; + sinfo->filled |=3D BIT_ULL(NL80211_STA_INFO_TX_BITRATE); + } =20 /* TODO: Use real NF instead of default one. */ signal =3D arsta->rssi_comb; --=20 2.40.0