]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP/driver: Add link id to the set_tx_queue_params() callback
authorIlan Peer <ilan.peer@intel.com>
Mon, 22 May 2023 19:33:56 +0000 (22:33 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 12 Jun 2023 13:34:08 +0000 (16:34 +0300)
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/ap_drv_ops.c
src/drivers/driver.h
src/drivers/driver_nl80211.c

index 6a5734852d93d5f851e2726b21300e497f02ee58..38c83c7e88eaa9721f5ab1370d5c77fa94a63435 100644 (file)
@@ -659,10 +659,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);
 }
 
 
index b3043da33373d158d89940e24e1f76bee7761149..cd82e65015ee73751a3e69faa3bd638b56553363 100644 (file)
@@ -3740,9 +3740,10 @@ 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
index e157fb3f3a2b155ffb48191958fe407f1b35dc96..dc512c8565d1ebb0307196c334b08f2eaca12112 100644 (file)
@@ -7959,7 +7959,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;
@@ -8011,6 +8012,10 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
 
        nla_nest_end(msg, txq);
 
+       if (link_id != NL80211_DRV_LINK_ID_NA &&
+           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",