[PATCH v2 28/44] AP/driver: Add link id to the set_tx_queue_params() callback
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Mon May 22 12:33:56 PDT 2023
From: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/ap/ap_drv_ops.c | 11 ++++++++++-
src/drivers/driver.h | 4 +++-
src/drivers/driver_nl80211.c | 7 ++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 014a140efc..cf4ff3ddd8 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -657,10 +657,19 @@ int hostapd_set_country(struct hostapd_data *hapd, const char *country)
int hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
int cw_min, int cw_max, int burst_time)
{
+ int link_id = -1;
+
if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL)
return 0;
+
+#ifdef CONFIG_IEEE80211BE
+ if (hapd->conf->mld_ap)
+ link_id = hapd->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs,
- cw_min, cw_max, burst_time);
+ cw_min, cw_max, burst_time,
+ link_id);
}
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 41b39e7fc8..97f270fa83 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3727,9 +3727,11 @@ struct wpa_driver_ops {
* @cw_min: cwMin
* @cw_max: cwMax
* @burst_time: Maximum length for bursting in 0.1 msec units
+ * @link_id: Link ID to use, or -1 for non MLD.
*/
int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
- int cw_max, int burst_time);
+ int cw_max, int burst_time,
+ int link_id);
/**
* if_add - Add a virtual interface
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1b4abe6158..7bacdd3f50 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7952,7 +7952,8 @@ static int i802_read_sta_data(struct i802_bss *bss,
static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
- int cw_min, int cw_max, int burst_time)
+ int cw_min, int cw_max, int burst_time,
+ int link_id)
{
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
@@ -8004,6 +8005,10 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
nla_nest_end(msg, txq);
+ if (link_id >= 0 &&
+ nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link_id))
+ goto fail;
+
res = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG,
"nl80211: TX queue param set: queue=%d aifs=%d cw_min=%d cw_max=%d burst_time=%d --> res=%d",
--
2.38.1
More information about the Hostap
mailing list