From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 914E925A65E for ; Sun, 26 Jan 2025 18:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737916301; cv=none; b=QI93c7/Kl+1Rw+Ej5D8QzX0/R77LdbaUcr2oL2IpJ4Dqu8BadY9POrsgdJp2trTNHL1GbZS+qoS/ykrgjyE0CqQ02W4F86/cy/qVSeMfkMtBrqZ6QNOoD15p2Qs2rL4Y60o1/rasfDOknZafdpEcXmGDJMkHMQHMBWs2rjp80+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737916301; c=relaxed/simple; bh=QzBAPB22KF7FuTVH5V8/Wp7I8rmVsErNsYwFVhjg1vc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kPW8LCg9N20D5TX+qSWKDQZXnThUTOmt+6rTYF759Wt0zysoTUU67hl/4q9uNgqcn5vOzHStpPk6q6mEGCnP6kc9/xikaTgIMQP9mKwfTT0x7ajW5eO5zudjbawD9v/aaY7rKxA3+oiJY6woLmCtmqfD1wDhG2pPF9VGSbfJDkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hAW7lAlh; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hAW7lAlh" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50QBuv6Y024606 for ; Sun, 26 Jan 2025 18:31:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Pud9PNRzD3MI/cZaRiKgG8KDXkfED8iswD139srnImw=; b=hAW7lAlhfQDg3c/R vYx1YGZSSfeiuA9g7t5ZT76496dTY1uzbLEImPjPDOJsHZMxxtflKaRGwbXbBDWr eTVuuyGk1dci4tpmZSYhKHloTF0D75mf2jjvmX9L9ldgP3Xhouos5zvYOdBgeRzK NP9mcX0o+uk9d0csBQxUa5M1rPuwLftwzdoFK5F7uB8iOcTxYCvIV5yYdT/GA03+ QoramRI4dHWZ4/NtNAwrrtB8tHs9XKSChxjuaNQpzufwCxsyDnqBH5HS8rtC37wy 2xIYP0Yj2jsqnMUGAmi+bh07wYoaW7bXqHRj86jFPCxYcJzY44svbxD5gXm3hmMs i3vANQ== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44cs0d263n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 26 Jan 2025 18:31:38 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2ee46799961so10612465a91.2 for ; Sun, 26 Jan 2025 10:31:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737916297; x=1738521097; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Pud9PNRzD3MI/cZaRiKgG8KDXkfED8iswD139srnImw=; b=NaQz+pAL8xCDp7PfYCEN2P1hWlLJzna+BBUlbP2mFJ6NaRYC/CCuyaMroZOV96iT9d UwZsKpYNXyz/QCYR3XGmvRHUwW1VHPtDGghqsb99RJbsSHzO+cAJ/ZbYvfMG3RBLAvDP jXn3i1h8TW4Q/9PcBpNrrBcW7W/ufw/hQ8tdv2hqDBIgEUq8RCrU8z8XZ9/OK5iMEmN8 ka8lFtBlDN+XvIrlFbYTMocThXmIQD9r3H/3EXcMIU49uwLFP10PVHqNFo5pPMI/aJj5 HC8Zn7nPDJxGJqJXgMbkjDEqiEOB538dcxrCMDCCvCdyy5pV7w/Iz9IkXom/aJOSDjS+ nUug== X-Forwarded-Encrypted: i=1; AJvYcCUvkcwDG/ulXI8E1SGqh9pRy1+uSCY2yJMzSxB3gas1X9lwu15Jo1O4JNSrk7yQl8E6AwbnuBk1eeDkj5s=@vger.kernel.org X-Gm-Message-State: AOJu0YxDyiKTstb2jrsSpTHyu+pZiFVGnYAH3SGlNbJIFiklGvERLxEH 7Be+960CAdV1/vmFq1VzHT4glV9sW7S/NCY0iSsMojV3G3Xp8IoDCEhGQVdok2cRbIxkrZDMK9Z uBHOvgf6JVQz2Dosb2KVspRrCbc2fOPmIlkDPXOaG83ihbikC4Q8wIsAzte4w+9k= X-Gm-Gg: ASbGncv8d2YyLxl0Eief+5IiXihVFw+fvzrXqg2Kosj3Ktb6nYAnwtgx/AwT2pztl1P +cze8ZBcrY+oJGGWzeXy2Ha0xTEcLuLi4YHxvgYWTfEdsgZjY1ObnkS4gENa3hE8OgbZT/70JHL m3bb4HJxUKdFAEzgdbdZqDTMuq71jBq9qFFAE10ynqKmqzvtFTJaHkM41ad6GAezr2hjx6dRiAV iitn/uBp1CPSpJTnC8tGuX/nefFLZI3o9FwtsS0YoqjArlUe4HEU2iowCeephI4KxohTmWKRj5d niiiKhn2AJWzYpgPbYXfCiVb/TC7j5gWkrLlBz0Z37PN4fPCrR8ARaoH+nf2EV6OCaTOzIdGGw= = X-Received: by 2002:a17:90b:5244:b0:2ef:2f49:7d7f with SMTP id 98e67ed59e1d1-2f782cb58c3mr63699414a91.18.1737916296990; Sun, 26 Jan 2025 10:31:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8M/rAM+9mO1LI7JuFdJJ4HCifG7IRN2A7evzv5QhhiiEsTUKLj3nd77QPQ12zTll45lKhvQ== X-Received: by 2002:a17:90b:5244:b0:2ef:2f49:7d7f with SMTP id 98e67ed59e1d1-2f782cb58c3mr63699389a91.18.1737916296622; Sun, 26 Jan 2025 10:31:36 -0800 (PST) Received: from [192.168.1.111] (c-73-202-227-126.hsd1.ca.comcast.net. [73.202.227.126]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7ffa44530sm6088931a91.7.2025.01.26.10.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jan 2025 10:31:36 -0800 (PST) Message-ID: Date: Sun, 26 Jan 2025 10:31:35 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath12k: remove return for empty tx bitrate in mac_op_sta_statistics To: Remi Pommarel , ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kalle Valo , Jeff Johnson References: From: Jeff Johnson Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: MFsIN2u4Z7VMT82Iiz4-pSa20ZHigtSK X-Proofpoint-GUID: MFsIN2u4Z7VMT82Iiz4-pSa20ZHigtSK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-26_07,2025-01-23_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501260150 On 1/17/2025 11:30 AM, Remi Pommarel wrote: > 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 > --- > drivers/net/wireless/ath/ath12k/mac.c | 29 +++++++++++++-------------- > 1 file changed, 14 insertions(+), 15 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c > index d493ec812055..cbc79ec7ac47 100644 > --- a/drivers/net/wireless/ath/ath12k/mac.c > +++ b/drivers/net/wireless/ath/ath12k/mac.c > @@ -8912,21 +8912,20 @@ static void ath12k_mac_op_sta_statistics(struct ieee80211_hw *hw, > sinfo->tx_duration = arsta->tx_duration; > sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_DURATION); > > - if (!arsta->txrate.legacy && !arsta->txrate.nss) > - return; > - > - if (arsta->txrate.legacy) { > - sinfo->txrate.legacy = arsta->txrate.legacy; > - } else { > - sinfo->txrate.mcs = arsta->txrate.mcs; > - sinfo->txrate.nss = arsta->txrate.nss; > - sinfo->txrate.bw = arsta->txrate.bw; > - sinfo->txrate.he_gi = arsta->txrate.he_gi; > - sinfo->txrate.he_dcm = arsta->txrate.he_dcm; > - sinfo->txrate.he_ru_alloc = arsta->txrate.he_ru_alloc; > - } > - sinfo->txrate.flags = arsta->txrate.flags; > - sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE); > + if (arsta->txrate.legacy || arsta->txrate.nss) { > + if (arsta->txrate.legacy) { > + sinfo->txrate.legacy = arsta->txrate.legacy; > + } else { > + sinfo->txrate.mcs = arsta->txrate.mcs; > + sinfo->txrate.nss = arsta->txrate.nss; > + sinfo->txrate.bw = arsta->txrate.bw; > + sinfo->txrate.he_gi = arsta->txrate.he_gi; > + sinfo->txrate.he_dcm = arsta->txrate.he_dcm; > + sinfo->txrate.he_ru_alloc = arsta->txrate.he_ru_alloc; > + } > + sinfo->txrate.flags = arsta->txrate.flags; > + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE); > + } > > /* TODO: Use real NF instead of default one. */ > sinfo->signal = arsta->rssi_comb + ATH12K_DEFAULT_NOISE_FLOOR; This patch conflicts with the following that is in the pending branch: https://patchwork.kernel.org/project/linux-wireless/patch/20250115063537.35797-2-quic_lingbok@quicinc.com/ The pending patch adds eht settings: + sinfo->txrate.eht_gi = arsta->txrate.eht_gi; + sinfo->txrate.eht_ru_alloc = arsta->txrate.eht_ru_alloc; The pending branch will be promoted to ath-next & main soon, so please rebase after that occurs /jeff