Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
From: Lingbo Kong <quic_lingbok@quicinc.com>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v4 1/3] wifi: ath12k: report station mode transmit rate
Date: Mon, 29 Apr 2024 17:29:22 +0800	[thread overview]
Message-ID: <0a6b96a1-cc02-4251-9d96-9684b25654d9@quicinc.com> (raw)
In-Reply-To: <f974973d-5797-39c2-fddf-c928755c76a9@quicinc.com>



On 2024/4/29 17:11, Karthikeyan Periyasamy wrote:
> 
> 
> On 4/19/2024 8:51 AM, Lingbo Kong wrote:
>> Currently, the transmit rate of "iw dev xxx station dump" command
>> always show an invalid value.
>>
>> To address this issue, ath12k parse the info of transmit complete
>> report from firmware and indicate the transmit rate to mac80211.
>>
>> This patch affects the station mode of WCN7850 and QCN9274.
>>
>> After that, "iw dev xxx station dump" show the correct transmit rate.
>> Such as:
>>
>> Station 00:03:7f:12:03:03 (on wlo1)
>>          inactive time:  872 ms
>>          rx bytes:       219111
>>          rx packets:     1133
>>          tx bytes:       53767
>>          tx packets:     462
>>          tx retries:     51
>>          tx failed:      0
>>          beacon loss:    0
>>          beacon rx:      403
>>          rx drop misc:   74
>>          signal:         -95 dBm
>>          beacon signal avg:      -18 dBm
>>          tx bitrate:     1441.1 MBit/s 80MHz EHT-MCS 13 EHT-NSS 2 
>> EHT-GI 0
>>
>> Tested-on: WCN7850 hw2.0 PCI 
>> WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1
>>
>> Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
[...]
>> @@ -522,10 +645,26 @@ static void ath12k_dp_tx_status_parse(struct 
>> ath12k_base *ab,
>>       ts->ppdu_id = le32_get_bits(desc->info1,
>>                       HAL_WBM_COMPL_TX_INFO1_TQM_STATUS_NUMBER);
>> -    if (le32_to_cpu(desc->rate_stats.info0) & 
>> HAL_TX_RATE_STATS_INFO0_VALID)
>> -        ts->rate_stats = le32_to_cpu(desc->rate_stats.info0);
>> -    else
>> -        ts->rate_stats = 0;
>> +
>> +    if (le32_to_cpu(desc->info2) & HAL_WBM_COMPL_TX_INFO2_FIRST_MSDU)
>> +        ts->flags |= HAL_TX_STATUS_FLAGS_FIRST_MSDU;
>> +
>> +    ts->peer_id = le32_get_bits(desc->info3, 
>> HAL_WBM_COMPL_TX_INFO3_PEER_ID);
>> +
>> +    if (le32_to_cpu(desc->rate_stats.info0) & 
>> HAL_TX_RATE_STATS_INFO0_VALID) {
>> +        ts->pkt_type = le32_get_bits(desc->rate_stats.info0,
>> +                         HAL_TX_RATE_STATS_INFO0_PKT_TYPE);
>> +        ts->mcs = le32_get_bits(desc->rate_stats.info0,
>> +                    HAL_TX_RATE_STATS_INFO0_MCS);
>> +        ts->sgi = le32_get_bits(desc->rate_stats.info0,
>> +                    HAL_TX_RATE_STATS_INFO0_SGI);
>> +        ts->bw = le32_get_bits(desc->rate_stats.info0,
>> +                       HAL_TX_RATE_STATS_INFO0_BW);
>> +        ts->ru_tones = le32_get_bits(desc->rate_stats.info0,
>> +                         HAL_TX_RATE_STATS_INFO0_TONES_IN_RU);
>> +        ts->ofdma = le32_get_bits(desc->rate_stats.info0,
>> +                      HAL_TX_RATE_STATS_INFO0_OFDMA_TX);
>> +    }
> 
> 
> Why multiple read from dma mapped area say desc->rate_stats.info0 lead 
> to increase in CPU cycles. Instead you do one read from dma mapped area 
> desc->rate_stats.info0 and classify into your own data structure ?
> 
> And the info0 classification used within the 
> ath12k_dp_tx_update_txcompl(), so you can do the classification within 
> this API.
> 
yes, thanks for pointing of this.
i will apply it in next version:),

Best regards
Lingbo Kong



  reply	other threads:[~2024-04-29  9:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19  3:21 [PATCH v4 0/3] wifi: ath12k: report station mode stats Lingbo Kong
2024-04-19  3:21 ` [PATCH v4 1/3] wifi: ath12k: report station mode transmit rate Lingbo Kong
2024-04-25 10:37   ` Kalle Valo
2024-04-26  8:01     ` Lingbo Kong
2024-04-26 11:24       ` Kalle Valo
2024-05-07 11:06         ` Lingbo Kong
2024-04-25 16:54   ` Kalle Valo
2024-04-26  6:41     ` Lingbo Kong
2024-04-26 11:21       ` Kalle Valo
2024-04-30 11:41         ` Lingbo Kong
2024-06-05  6:31         ` Lingbo Kong
2024-04-29  9:11   ` Karthikeyan Periyasamy
2024-04-29  9:29     ` Lingbo Kong [this message]
2024-04-19  3:21 ` [PATCH v4 2/3] wifi: ath12k: report station mode receive rate for IEEE 802.11be Lingbo Kong
2024-04-19  3:21 ` [PATCH v4 3/3] wifi: ath12k: report station mode signal strength Lingbo Kong
2024-04-25 17:03   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a6b96a1-cc02-4251-9d96-9684b25654d9@quicinc.com \
    --to=quic_lingbok@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_periyasa@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).