mbox series

[V3,0/3] wifi: ath12k: report station mode stats

Message ID 20240414131008.71519-1-quic_lingbok@quicinc.com (mailing list archive)
Headers show
Series wifi: ath12k: report station mode stats | expand

Message

Lingbo Kong April 14, 2024, 1:10 p.m. UTC
Currently, the transmit rate, the receive rate and signal strength of
“iw dev xxx station dump” always show an invalid value.

This is because ath12k has no logic to handle this relevant information.

To solve this issue, ath12k parses the information passed by the firmware
and passes it to mac80211.

After that, "iw dev xxx station dump" show the correct value.
Such as:

Station 00:03:7f:12:03:03 (on wlo1)
        inactive time:  600 ms
        rx bytes:       4642228
        rx packets:     23796
        tx bytes:       933967
        tx packets:     8761
        tx retries:     66
        tx failed:      0
        beacon loss:    0
        beacon rx:      8925
        rx drop misc:   191
        signal:         -20 dBm
        beacon signal avg:      -18 dBm
        tx bitrate:     1441.1 MBit/s 80MHz EHT-MCS 13 EHT-NSS 2 EHT-GI 0
        tx duration:    0 us
        rx bitrate:     1801.4 MBit/s 80MHz EHT-MCS 11 EHT-NSS 3 EHT-GI 0
        rx duration:    0 us

v3:
1.change wmi_vdev_stats_event to wmi_vdev_stats_params

v2:
1.change copyright
2.change name according Naming conventions for structures

Lingbo Kong (3):
  wifi: ath12k: report station mode transmit rate
  wifi: ath12k: report station mode receive rate for IEEE 802.11be
  wifi: ath12k: report station mode signal strength

 drivers/net/wireless/ath/ath12k/core.h    |   5 +
 drivers/net/wireless/ath/ath12k/dp_rx.c   |  20 ++-
 drivers/net/wireless/ath/ath12k/dp_rx.h   |   3 +
 drivers/net/wireless/ath/ath12k/dp_tx.c   | 147 +++++++++++++++++-
 drivers/net/wireless/ath/ath12k/hal_tx.h  |   9 +-
 drivers/net/wireless/ath/ath12k/mac.c     | 180 +++++++++++++++++++++-
 drivers/net/wireless/ath/ath12k/mac.h     |   3 +
 drivers/net/wireless/ath/ath12k/rx_desc.h |   2 +
 drivers/net/wireless/ath/ath12k/wmi.c     | 130 ++++++++++++++++
 drivers/net/wireless/ath/ath12k/wmi.h     |  48 ++++++
 10 files changed, 538 insertions(+), 9 deletions(-)


base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9

Comments

Lingbo Kong April 15, 2024, 2:02 p.m. UTC | #1
On 2024/4/14 21:10, Lingbo Kong wrote:
> Currently, the transmit rate, the receive rate and signal strength of
> “iw dev xxx station dump” always show an invalid value.
> 
> This is because ath12k has no logic to handle this relevant information.
> 
> To solve this issue, ath12k parses the information passed by the firmware
> and passes it to mac80211.
> 
> After that, "iw dev xxx station dump" show the correct value.
> Such as:
> 
> Station 00:03:7f:12:03:03 (on wlo1)
>          inactive time:  600 ms
>          rx bytes:       4642228
>          rx packets:     23796
>          tx bytes:       933967
>          tx packets:     8761
>          tx retries:     66
>          tx failed:      0
>          beacon loss:    0
>          beacon rx:      8925
>          rx drop misc:   191
>          signal:         -20 dBm
>          beacon signal avg:      -18 dBm
>          tx bitrate:     1441.1 MBit/s 80MHz EHT-MCS 13 EHT-NSS 2 EHT-GI 0
>          tx duration:    0 us
>          rx bitrate:     1801.4 MBit/s 80MHz EHT-MCS 11 EHT-NSS 3 EHT-GI 0
>          rx duration:    0 us
> 
> v3:
> 1.change wmi_vdev_stats_event to wmi_vdev_stats_params
> 
> v2:
> 1.change copyright
> 2.change name according Naming conventions for structures
> 
> Lingbo Kong (3):
>    wifi: ath12k: report station mode transmit rate
>    wifi: ath12k: report station mode receive rate for IEEE 802.11be
>    wifi: ath12k: report station mode signal strength
> 
>   drivers/net/wireless/ath/ath12k/core.h    |   5 +
>   drivers/net/wireless/ath/ath12k/dp_rx.c   |  20 ++-
>   drivers/net/wireless/ath/ath12k/dp_rx.h   |   3 +
>   drivers/net/wireless/ath/ath12k/dp_tx.c   | 147 +++++++++++++++++-
>   drivers/net/wireless/ath/ath12k/hal_tx.h  |   9 +-
>   drivers/net/wireless/ath/ath12k/mac.c     | 180 +++++++++++++++++++++-
>   drivers/net/wireless/ath/ath12k/mac.h     |   3 +
>   drivers/net/wireless/ath/ath12k/rx_desc.h |   2 +
>   drivers/net/wireless/ath/ath12k/wmi.c     | 130 ++++++++++++++++
>   drivers/net/wireless/ath/ath12k/wmi.h     |  48 ++++++
>   10 files changed, 538 insertions(+), 9 deletions(-)
> 
> 
> base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9

Please ignore this series. Need to change some commit message.
I will modify in v4.
Jeff Johnson April 15, 2024, 4:51 p.m. UTC | #2
On 4/14/2024 6:10 AM, Lingbo Kong wrote:
> Currently, the transmit rate, the receive rate and signal strength of
> “iw dev xxx station dump” always show an invalid value.
> 
> This is because ath12k has no logic to handle this relevant information.
> 
> To solve this issue, ath12k parses the information passed by the firmware
> and passes it to mac80211.
> 
> After that, "iw dev xxx station dump" show the correct value.
> Such as:
> 
> Station 00:03:7f:12:03:03 (on wlo1)
>         inactive time:  600 ms
>         rx bytes:       4642228
>         rx packets:     23796
>         tx bytes:       933967
>         tx packets:     8761
>         tx retries:     66
>         tx failed:      0
>         beacon loss:    0
>         beacon rx:      8925
>         rx drop misc:   191
>         signal:         -20 dBm
>         beacon signal avg:      -18 dBm
>         tx bitrate:     1441.1 MBit/s 80MHz EHT-MCS 13 EHT-NSS 2 EHT-GI 0
>         tx duration:    0 us
>         rx bitrate:     1801.4 MBit/s 80MHz EHT-MCS 11 EHT-NSS 3 EHT-GI 0
>         rx duration:    0 us
> 
> v3:
> 1.change wmi_vdev_stats_event to wmi_vdev_stats_params
> 
> v2:
> 1.change copyright
> 2.change name according Naming conventions for structures
> 
> Lingbo Kong (3):
>   wifi: ath12k: report station mode transmit rate
>   wifi: ath12k: report station mode receive rate for IEEE 802.11be
>   wifi: ath12k: report station mode signal strength
> 
>  drivers/net/wireless/ath/ath12k/core.h    |   5 +
>  drivers/net/wireless/ath/ath12k/dp_rx.c   |  20 ++-
>  drivers/net/wireless/ath/ath12k/dp_rx.h   |   3 +

My Qualcomm Innovation Center copyright checker reports:
drivers/net/wireless/ath/ath12k/dp_rx.h copyright missing 2024

However note that "wifi: ath12k: support suspend/resume" is modifying the same
file, so if you rebase on that you'll pick up the copyright change

>  drivers/net/wireless/ath/ath12k/dp_tx.c   | 147 +++++++++++++++++-
>  drivers/net/wireless/ath/ath12k/hal_tx.h  |   9 +-
>  drivers/net/wireless/ath/ath12k/mac.c     | 180 +++++++++++++++++++++-
>  drivers/net/wireless/ath/ath12k/mac.h     |   3 +
>  drivers/net/wireless/ath/ath12k/rx_desc.h |   2 +
>  drivers/net/wireless/ath/ath12k/wmi.c     | 130 ++++++++++++++++
>  drivers/net/wireless/ath/ath12k/wmi.h     |  48 ++++++
>  10 files changed, 538 insertions(+), 9 deletions(-)
Lingbo Kong April 16, 2024, 2:32 a.m. UTC | #3
On 2024/4/16 0:51, Jeff Johnson wrote:
> On 4/14/2024 6:10 AM, Lingbo Kong wrote:
>> Currently, the transmit rate, the receive rate and signal strength of
>> “iw dev xxx station dump” always show an invalid value.
>>
>> This is because ath12k has no logic to handle this relevant information.
>>
>> To solve this issue, ath12k parses the information passed by the firmware
>> and passes it to mac80211.
>>
>> After that, "iw dev xxx station dump" show the correct value.
>> Such as:
>>
>> Station 00:03:7f:12:03:03 (on wlo1)
>>          inactive time:  600 ms
>>          rx bytes:       4642228
>>          rx packets:     23796
>>          tx bytes:       933967
>>          tx packets:     8761
>>          tx retries:     66
>>          tx failed:      0
>>          beacon loss:    0
>>          beacon rx:      8925
>>          rx drop misc:   191
>>          signal:         -20 dBm
>>          beacon signal avg:      -18 dBm
>>          tx bitrate:     1441.1 MBit/s 80MHz EHT-MCS 13 EHT-NSS 2 EHT-GI 0
>>          tx duration:    0 us
>>          rx bitrate:     1801.4 MBit/s 80MHz EHT-MCS 11 EHT-NSS 3 EHT-GI 0
>>          rx duration:    0 us
>>
>> v3:
>> 1.change wmi_vdev_stats_event to wmi_vdev_stats_params
>>
>> v2:
>> 1.change copyright
>> 2.change name according Naming conventions for structures
>>
>> Lingbo Kong (3):
>>    wifi: ath12k: report station mode transmit rate
>>    wifi: ath12k: report station mode receive rate for IEEE 802.11be
>>    wifi: ath12k: report station mode signal strength
>>
>>   drivers/net/wireless/ath/ath12k/core.h    |   5 +
>>   drivers/net/wireless/ath/ath12k/dp_rx.c   |  20 ++-
>>   drivers/net/wireless/ath/ath12k/dp_rx.h   |   3 +
> 
> My Qualcomm Innovation Center copyright checker reports:
> drivers/net/wireless/ath/ath12k/dp_rx.h copyright missing 2024
> 
> However note that "wifi: ath12k: support suspend/resume" is modifying the same
> file, so if you rebase on that you'll pick up the copyright change
> 

Ok, thanks for pointing out.

Best regards
Lingbo Kong

>>   drivers/net/wireless/ath/ath12k/dp_tx.c   | 147 +++++++++++++++++-
>>   drivers/net/wireless/ath/ath12k/hal_tx.h  |   9 +-
>>   drivers/net/wireless/ath/ath12k/mac.c     | 180 +++++++++++++++++++++-
>>   drivers/net/wireless/ath/ath12k/mac.h     |   3 +
>>   drivers/net/wireless/ath/ath12k/rx_desc.h |   2 +
>>   drivers/net/wireless/ath/ath12k/wmi.c     | 130 ++++++++++++++++
>>   drivers/net/wireless/ath/ath12k/wmi.h     |  48 ++++++
>>   10 files changed, 538 insertions(+), 9 deletions(-)
>