]> git.ipfire.org Git - thirdparty/iw.git/commit
iw: Add support to set per-radio RTS threshold in multi-radio wiphy
authorRoopni Devanathan <quic_rdevanat@quicinc.com>
Fri, 18 Jul 2025 10:26:59 +0000 (15:56 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Sep 2025 07:45:59 +0000 (09:45 +0200)
commitefaf7864a649ba9cdc9527bb1608c6cb5c1f6c33
tree9e7070bb462d6da03ef91c4442feef3e81eacf9f
parent009ad3b2ed9431dd9d8656b7b78940786a635969
iw: Add support to set per-radio RTS threshold in multi-radio wiphy

Currently, setting RTS threshold changes the threshold for all radios in a
multi-radio wiphy. But different radios in a multi-radio wiphy can have
different RTS threshold requirements. Modify the iw command to get radio
index from user to operate on per-radio attributes in a multi-radio wiphy.
Modify the command such that the legacy userspace will still interact with
traditional drivers as well as multi-radio wiphy drivers. Also, print the
RTS threshold along with other per-radio attributes for each radio under
the section - "Supported wiphy radios" in iw phy#XXX info command.

In order to be able to set RTS threshold for a particular radio from user
space, without disturbing the other radios in a wiphy, pass the radio
index for which RTS threshold needs to be changed as optional pair of
arguments, along with its corresponding RTS threshold value. The valid
radio index values can be checked in iw phy#XXX info, under "Supported
wiphy radios". If radio index is not available, i.e., in case of single
radio wiphy, passing radio index is not required. If the radio index is not
provided, then the current behavior of setting passed RTS threshold to all
radios will be retained.

Command Usage:
iw phyX set rts <rts threshold|off> [radio <radio index>]

Sample output:
root@buildroot:~# iw phyXXX info
Wiphy phy0
        wiphy index: 0
        max # scan SSIDs: 16
        max scan IEs length: 339 bytes
        RTS threshold: 536
        Retry short limit: 7
        Retry long limit: 4
.....
Supported wiphy radios:
                * Idx 0:
                        RTS Threshold: 536
                        Frequency Range: 5170 MHz - 5835 MHz
.....

                * Idx 1:
                        RTS Threshold: 231
                        Frequency Range: 2312 MHz - 2732 MHz
.....

                * Idx 2:
                        RTS Threshold: 425
                        Frequency Range: 5945 MHz - 7125 MHz
.....

Globally valid interface combinations:
.....

Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
Link: https://patch.msgid.link/20250718102659.111058-1-quic_rdevanat@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
info.c
phy.c