[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
ac60b1ff [MAC80211][misc][Add Filogic 880/860/830/820/630 Release Information]
7eb946a0 [MAC80211][WiFi7][hostapd][sync hostapd patches]
91638fc9 [MAC80211][WiFi7][mac80211][sync backports code]
8e45746b [MAC80211][WiFi7][mt76][sync mt76 patches]
1c564afa [MAC80211][WiFi7][mt76][Add Eagle BE19000 ifem default bin]
[Release-log]
Change-Id: I1d4218d3b1211700acb5937fe310cbd0bf219968
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0062-mtk-hostapd-Set-STA-TX-queue-parameters-configuratio.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0062-mtk-hostapd-Set-STA-TX-queue-parameters-configuratio.patch
new file mode 100644
index 0000000..502da4c
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0062-mtk-hostapd-Set-STA-TX-queue-parameters-configuratio.patch
@@ -0,0 +1,78 @@
+From eaf45cd7a14dac2d5d601653792d2bc101118585 Mon Sep 17 00:00:00 2001
+From: Michael Lee <michael-cy.lee@mediatek.com>
+Date: Fri, 7 Jul 2023 17:16:11 +0800
+Subject: [PATCH 062/104] mtk: hostapd: Set STA TX queue parameters
+ configuration after association
+
+This patch adds the way for wpa_supplicant to set driver's TX queue
+parameters.
+Since STA parses and apply TX queue parameters from AP beacon's WMM IE
+during association, wpa_supplicant set driver's TX queue parameters
+after the association.
+
+Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
+---
+ wpa_supplicant/driver_i.h | 12 ++++++++++++
+ wpa_supplicant/events.c | 16 ++++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
+index d01b52bb1..663e16053 100644
+--- a/wpa_supplicant/driver_i.h
++++ b/wpa_supplicant/driver_i.h
+@@ -321,6 +321,18 @@ static inline int wpa_drv_set_country(struct wpa_supplicant *wpa_s,
+ return 0;
+ }
+
++static inline int wpa_drv_set_tx_queue_params(struct wpa_supplicant *wpa_s,
++ int q, int aifs, int cw_min,
++ int cw_max, int burst_time)
++{
++ int link_id = -1;
++ if (wpa_s->driver->set_tx_queue_params)
++ return wpa_s->driver->set_tx_queue_params(wpa_s->drv_priv, q,
++ aifs, cw_min, cw_max,
++ burst_time, link_id);
++ return 0;
++}
++
+ static inline int wpa_drv_send_mlme(struct wpa_supplicant *wpa_s,
+ const u8 *data, size_t data_len, int noack,
+ unsigned int freq, unsigned int wait)
+diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
+index 2a9342318..8fd2f2049 100644
+--- a/wpa_supplicant/events.c
++++ b/wpa_supplicant/events.c
+@@ -4070,6 +4070,20 @@ out:
+ return wpa_sm_set_mlo_params(wpa_s->wpa, &wpa_mlo);
+ }
+
++static void wpa_supplicant_tx_queue_params(struct wpa_supplicant *wpa_s){
++ struct hostapd_tx_queue_params *p;
++
++ for (int i = 0; i < NUM_TX_QUEUES; i++){
++ p = &wpa_s->conf->tx_queue[i];
++ if(wpa_drv_set_tx_queue_params(wpa_s, i, p->aifs,
++ p->cwmin, p->cwmax,
++ p->burst)) {
++ wpa_printf(MSG_DEBUG, "Failed to set TX queue "
++ "parameters for queue %d.", i);
++ /* Continue anyway */
++ }
++ }
++}
+
+ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
+ union wpa_event_data *data)
+@@ -4399,6 +4413,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
+
+ if (wpa_s->current_ssid && wpa_s->current_ssid->enable_4addr_mode)
+ wpa_supplicant_set_4addr_mode(wpa_s);
++
++ wpa_supplicant_tx_queue_params(wpa_s);
+ }
+
+
+--
+2.39.2
+