wlan-ap-Telecominfraproject/feeds/qca/iw/patches/609-06-iw-add-support-for-rts-threshold-command-for-MLO.patch
John Crispin 008ca9618d
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00

76 lines
1.8 KiB
Diff

From f253847b35ea0d11526f27d7f4d931beab87d59f Mon Sep 17 00:00:00 2001
From: Aaradhana Sahu <quic_aarasahu@quicinc.com>
Date: Fri, 10 Feb 2023 15:47:48 +0530
Subject: [PATCH] iw: add support for rts threshold command for MLO
Add support for set rts threshold command according to
each link id for multi-link operation.
command:
iw dev wlan# set rts -l <link_id> <rts threshold|off>
Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
---
phy.c | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
--- a/phy.c
+++ b/phy.c
@@ -444,19 +444,40 @@ static int handle_rts(struct nl80211_sta
int argc, char **argv,
enum id_input id)
{
- unsigned int rts;
+ unsigned int rts, link_id;
+ int index = 0;
+ char *endptr;
- if (argc != 1)
+ if (!argc) {
return 1;
+ } else if (argc == 3) {
+ if (!strcmp(argv[0], "-l")) {
+ link_id = strtol(argv[1], &endptr, 10);
+
+ if (*endptr)
+ return 1;
+
+ if (link_id <= MAX_MLD_LINK) {
+ NLA_PUT_U8(msg, NL80211_ATTR_MLO_LINK_ID,
+ link_id);
+ index = 2;
+ }
+ } else {
+ printf("Invalid parameter: %s\n", argv[0]);
+ return 1;
+ }
+ }
- if (strcmp("off", argv[0]) == 0)
+ if (strcmp("off", argv[index]) == 0) {
rts = -1;
- else {
+ } else {
char *end;
- if (!*argv[0])
+ if (!*argv[index])
return 1;
- rts = strtoul(argv[0], &end, 10);
+
+ rts = strtoul(argv[index], &end, 10);
+
if (*end != '\0')
return 1;
}
@@ -470,6 +491,9 @@ static int handle_rts(struct nl80211_sta
COMMAND(set, rts, "<rts threshold|off>",
NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_rts,
"Set rts threshold.");
+COMMAND(set, rts, "[-l] <link_id> <rts threshold|off>",
+ NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_rts,
+ "Set rts threshold.");
static int handle_retry(struct nl80211_state *state,
struct nl_msg *msg,