wlan-ap-Telecominfraproject/feeds/ipq95xx/iw/patches/613-iw-add-sawf-uplink-configuration-paramters-support.patch
John Crispin 460050a114 ipq50xx: add CIF WF-198 support
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

185 lines
7.7 KiB
Diff

From d5b3cb26d97cca6bbd816087aa292d5ed46b6b7f Mon Sep 17 00:00:00 2001
From: Ganesh Babu Jothiram <quic_gjothira@quicinc.com>
Date: Mon, 3 Apr 2023 16:33:24 +0530
Subject: [PATCH] iw: sawf: add uplink configuration parameters in the service
class
configuration structure.
add uplink configuration related parameters into service class structure and
update service class configure, and view to extend support for uplink configuration.
Below is the command to configure a service class
- iw phy <phyname> service_class create <service_id> <app_name>
[min_tput <min_thruput_rate>] [max_tput <max_thruput_rate>]
[burst_size <burst_size>] [service_interval <service_interval>]
[delay_bound <delay_bound>] [msdu_ttl <msdu_ttl>] [priority <priority>]
[tid <tid>] [msdu_loss <msdu_rate_loss>] [ul_service_interval <ul_service_interval>]
[ul_min_tput <ul_min_tput>] [ul_max_latency <ul_max_latency>]
[ul_burst_size <ul_burst_size>] [ul_ofdma_disable <ul_ofdma_disable>]
[ul_mu_mimo_disable <ul_mu_mimo_disable>]
Below is the command to disable a service class
- iw phy <phyname> service_class delete <service_id>
Below is the command to view a specific service class
- iw phy <phyname> service_class view <service_id>
Below is the command to view all service classes
- iw phy <phyname> service_class view
Signed-off-by: Ganesh Babu Jothiram <quic_gjothira@quicinc.com>
---
iw.h | 6 +++++
sawf.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/iw.h b/iw.h
index 1b327c3..64769d7 100644
--- a/iw.h
+++ b/iw.h
@@ -114,6 +114,12 @@ enum qca_wlan_vendor_sawf_attr_config {
QCA_WLAN_VENDOR_ATTR_SAWF_SVC_PRIO,
QCA_WLAN_VENDOR_ATTR_SAWF_SVC_TID,
QCA_WLAN_VENDOR_ATTR_SAWF_SVC_MSDU_RATE_LOSS,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE,
+ QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE,
/* keep last */
QCA_WLAN_VENDOR_SAWF_ATTR_CONFIG_AFTER_LAST,
diff --git a/sawf.c b/sawf.c
index da88e52..2fe2be0 100644
--- a/sawf.c
+++ b/sawf.c
@@ -31,11 +31,11 @@
#include "iw.h"
#define OUI_QCA 0x001374
-#define MAX_OPTIONAL_STRINGS 9
+#define MAX_OPTIONAL_STRINGS 15
#define MAX_STRING_SIZE 60
#define MAX_RANGE(type) pow(2, 8 * sizeof(type)) - 1
#define SVC_CREATE_MIN_ARGUMENTS 2
-#define SVC_CREATE_MAX_ARGUMENTS 20
+#define SVC_CREATE_MAX_ARGUMENTS 32
#define SVC_DISABLE_MAX_ARGUMENTS 1
#define SVC_VIEW_MAX_ARGUMENTS 1
#define APP_NAME_MAX_BYTES 64
@@ -63,7 +63,13 @@ static int handle_service_class_create(struct nl80211_state *state,
"msdu_ttl",
"priority",
"tid",
- "msdu_loss"};
+ "msdu_loss",
+ "ul_service_interval",
+ "ul_min_tput",
+ "ul_max_latency",
+ "ul_burst_size",
+ "ul_ofdma_disable",
+ "ul_mu_mimo_disable"};
if (argc < SVC_CREATE_MIN_ARGUMENTS || argc > SVC_CREATE_MAX_ARGUMENTS ||
(argc % SVC_CREATE_MIN_ARGUMENTS) != 0)
@@ -133,6 +139,30 @@ static int handle_service_class_create(struct nl80211_state *state,
nla_put_u32(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_MSDU_RATE_LOSS,
value);
break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL:
+ nla_put_u32(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL,
+ value);
+ break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT:
+ nla_put_u32(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT,
+ value);
+ break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY:
+ nla_put_u32(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY,
+ value);
+ break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE:
+ nla_put_u32(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE,
+ value);
+ break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE:
+ nla_put_u8(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE,
+ value);
+ break;
+ case QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE:
+ nla_put_u8(msg, QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE,
+ value);
+ break;
}
}
@@ -145,6 +175,12 @@ err:
printf("[burst_size <burst_size>] [service_interval <service_interval>] ");
printf("[delay_bound <delay_bound>] [msdu_ttl <msdu_ttl>] ");
printf("[priority <priority>] [tid <tid>] [msdu_loss <msdu_rate_loss>]\n");
+ printf("[ul_service_interval <ul_service_interval>]\n");
+ printf("[ul_min_tput <ul_min_tput>]\n");
+ printf("[ul_max_latency <ul_max_latency>]\n");
+ printf("[ul_burst_size <ul_burst_size>]\n");
+ printf("[ul_ofdma_disable <ul_ofdma_disable>]\n");
+ printf("[ul_mu_mimo_disable <ul_mu_mimo_disable>]\n");
return -EINVAL;
}
@@ -153,7 +189,11 @@ COMMAND(service_class, create, "<service_id> <app_name> [min_tput <min_thruput_r
" [max_tput <max_thruput_rate>] [burst_size <burst_size>]"
" [service_interval <service_interval>] [delay_bound <delay_bound>]"
" [msdu_ttl <msdu_ttl>] [priority <priority>] [tid <tid>]"
- " [msdu_loss <msdu_rate_loss>]", NL80211_CMD_VENDOR, 0, CIB_PHY,
+ " [msdu_loss <msdu_rate_loss>] [ul_service_interval <ul_service_interval>]"
+ " [ul_min_tput <ul_min_tput>] [ul_max_latency <ul_max_latency>]"
+ " [ul_burst_size <ul_burst_size>] [ul_ofdma_disable <ul_ofdma_disable>]"
+ " [ul_mu_mimo_disable <ul_mu_mimo_disable>]", NL80211_CMD_VENDOR, 0, CIB_PHY,
+
handle_service_class_create, ".");
static int handle_service_class_disable(struct nl80211_state *state,
@@ -215,6 +255,12 @@ static int print_sawf_service_classes(struct nl_msg *msg, void *arg)
[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_PRIO] = {.type = NLA_U32},
[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_TID] = {.type = NLA_U32},
[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_MSDU_RATE_LOSS] = {.type = NLA_U32},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL] = {.type = NLA_U32},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT] = {.type = NLA_U32},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY] = {.type = NLA_U32},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE] = {.type = NLA_U32},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE] = {.type = NLA_U8},
+ [QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE] = {.type = NLA_U8},
};
nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
@@ -271,6 +317,24 @@ static int print_sawf_service_classes(struct nl_msg *msg, void *arg)
if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_MSDU_RATE_LOSS])
printf("MSDU Loss Rate\t: %u\n",
nla_get_u32(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_MSDU_RATE_LOSS]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL])
+ printf("UL service interval\t: %u\n",
+ nla_get_u32(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_SVC_INTERVAL]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT])
+ printf("UL min throughput\t: %u\n",
+ nla_get_u32(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MIN_TPUT]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY])
+ printf("UL max latency\t: %u\n",
+ nla_get_u32(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MAX_LATENCY]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE])
+ printf("UL burst size\t: %u\n",
+ nla_get_u32(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_BURST_SIZE]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE])
+ printf("UL ofdma disable\t: %u\n",
+ nla_get_u8(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_OFDMA_DISABLE]));
+ if (attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE])
+ printf("UL mu mimo disable\t: %u\n",
+ nla_get_u8(attrs[QCA_WLAN_VENDOR_ATTR_SAWF_SVC_UL_MU_MIMO_DISABLE]));
}
return NL_SKIP;
}
--
2.17.1