]> git.ipfire.org Git - thirdparty/iw.git/commit
iw: add support to print link level information in station dump
authorSarika Sharma <quic_sarishar@quicinc.com>
Fri, 22 Aug 2025 05:39:18 +0000 (11:09 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Sep 2025 07:46:25 +0000 (09:46 +0200)
commitc5bfa2a3a9720ae3af84d20ad561c8a46e6173a1
treeefde4ac19c2b0fbbdf6b7ef667e2c83ad871eefa
parentefaf7864a649ba9cdc9527bb1608c6cb5c1f6c33
iw: add support to print link level information in station dump

Currently, the iw station dump displays the overall statistics of
associated MLO (multi-link operation) station. While it provides a
overall summary view, it does not reflect the individual link-level
statistics.

Extend iw to parse and display nested per-link attributes for MLO
station, incorporating recent kernel support for reporting per-link
statistics. This allows users to view detailed statistics for each
link, along with overall statistics which improving visibility and
debugging capabilities for MLO stations.

Sample output:

For MLO client: iw dev wlan0 station dump -v
Station xx:xx:xx:xx:xx:xx (on wlan0)
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        inactive time:  328 ms
        rx bytes:       11319
        rx packets:     98
        tx bytes:       1496
        tx packets:     9
        tx retries:     3
        tx failed:      0
        rx drop misc:   0
        signal:         -33 dBm
        signal avg:     -28 dBm
        tx bitrate:     6.0 MBit/s
        tx duration:    3989 us
        rx bitrate:     576.4 MBit/s 80MHz EHT-MCS 5 EHT-NSS 2 EHT-GI 0
        rx duration:    0 us
        last ack signal:-35 dBm
        avg ack signal: -33 dBm
        MSDU:
        TID     rx      tx      tx retries      tx failed
        0       88      3       0               0
        1       0       0       0               0
        2       0       0       0               0
        3       0       0       0               0
        4       0       0       0               0
        5       0       0       0               0
        6       2       0       0               0
        7       0       2       0               0
        8       0       0       0               0
        9       0       0       0               0
        10      0       0       0               0
        11      0       0       0               0
        12      0       0       0               0
        13      0       0       0               0
        14      0       0       0               0
        15      0       0       0               0
        16      0       4       0               0
        TXQs:
                TID     qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       3       0       0       0       0       186             3
                1       0       0       0       0       0       0       0       0               0
                2       0       0       0       0       0       0       0       0               0
                3       0       0       0       0       0       0       0       0               0
                4       0       0       0       0       0       0       0       0               0
                5       0       0       0       0       0       0       0       0               0
                6       0       0       0       0       0       0       0       0               0
                7       0       0       2       0       0       0       0       580             2
                8       0       0       0       0       0       0       0       0               0
                9       0       0       0       0       0       0       0       0               0
                10      0       0       0       0       0       0       0       0               0
                11      0       0       0       0       0       0       0       0               0
                12      0       0       0       0       0       0       0       0               0
                13      0       0       0       0       0       0       0       0               0
                14      0       0       0       0       0       0       0       0               0
                15      0       0       0       0       0       0       0       0               0
        DTIM period:    2
        beacon interval:100
        connected time: 188 seconds
        associated at [boottime]:       659.536s
        associated at:  659536 ms
        current time:   847264 ms
        Link 0:
                address: xx:xx:xx:xx:xx:xx
                inactive time:  5324 ms
                rx bytes:       7838
                rx packets:     69
                tx bytes:       0
                tx packets:     0
                tx retries:     0
                tx failed:      0
                rx drop misc:   0
                signal:         -33 dBm
                signal avg:     -28 dBm
                tx bitrate:     6.0 MBit/s
                tx duration:    1264 us
                rx bitrate:     576.4 MBit/s 80MHz EHT-MCS 5 EHT-NSS 2 EHT-GI 0
                rx duration:    0 us
                MSDU:
                TID     rx      tx      tx retries      tx failed
                0       65      0       0               0
                1       0       0       0               0
                2       0       0       0               0
                3       0       0       0               0
                4       0       0       0               0
                5       0       0       0               0
                6       0       0       0               0
                7       0       0       0               0
                8       0       0       0               0
                9       0       0       0               0
                10      0       0       0               0
                11      0       0       0               0
                12      0       0       0               0
                13      0       0       0               0
                14      0       0       0               0
                15      0       0       0               0
                16      0       0       0               0
                DTIM period:    2
                beacon interval:100
        Link 1:
                address: xx:xx:xx:xx:xx:xx
                inactive time:  328 ms
                rx bytes:       3481
                rx packets:     29
                tx bytes:       1496
                tx packets:     9
                tx retries:     3
                tx failed:      0
                rx drop misc:   0
                signal:         -33 dBm
                signal avg:     -32 dBm
                tx bitrate:     6.0 MBit/s
                tx duration:    2725 us
                rx bitrate:     864.8 MBit/s 80MHz EHT-MCS 8 EHT-NSS 2 EHT-GI 0
                rx duration:    0 us
                last ack signal:-35 dBm
                avg ack signal: -33 dBm
                MSDU:
                TID     rx      tx      tx retries      tx failed
                0       23      3       0               0
                1       0       0       0               0
                2       0       0       0               0
                3       0       0       0               0
                4       0       0       0               0
                5       0       0       0               0
                6       2       0       0               0
                7       0       2       0               0
                8       0       0       0               0
                9       0       0       0               0
                10      0       0       0               0
                11      0       0       0               0
                12      0       0       0               0
                13      0       0       0               0
                14      0       0       0               0
                15      0       0       0               0
                16      0       4       0               0
                DTIM period:    2
                beacon interval:100

For non-ML client: iw dev wlan0 station dump
Station xx:xx:xx:xx:xx:xx (on wlan0)
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        inactive time:  540 ms
        rx bytes:       2944
        rx packets:     27
        tx bytes:       2156
        tx packets:     18
        tx retries:     34
        tx failed:      0
        rx drop misc:   0
        signal:         -95 dBm
        tx bitrate:     344.1 MBit/s HE-MCS 7 HE-NSS 4 HE-GI 0 HE-DCM
        tx duration:    3695 us
        rx bitrate:     1441.3 MBit/s 80MHz HE-MCS 7 HE-NSS 4 HE-GI 0 HE-DCM 0
        rx duration:    0 us
        DTIM period:    2
        beacon interval:100
        connected time: 128 seconds
        associated at [boottime]:       10850.471s
        associated at: 10850467 ms
        current time:   10978261 ms

Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Link: https://patch.msgid.link/20250822053918.528306-1-quic_sarishar@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
station.c