[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
8719319c [MAC80211][hostapd][Fix wpa_supplicant configuration parsing error]
0ef5b371 [MAC80211][Rebase Patches][Fix WiFi6 build error]
4f47e260 [MAC80211][core][Fix kernel warning of cfg80211_bss_color_notify]
4b3f08e9 [MAC80211][Rebase Patches][Fix WiFi6 build error]
9d44e5de [MAC80211][mt76][Fix tlv length of mt7915_mcu_get_chan_mib_info]
b63d160d [MAC80211][misc][Remove duplicate group cipher setting in wpa_supplicant]
7a5de8c1 [MAC80211][mt76][Refactor txpower table dump and fix change channel not update]
a0e1acfa [MAC80211][app][Add atenl eeprom ibf cal sync command]
af3af140 [mac80211][mt76][Set station mode TXOP to 0]
9740ca99 [MAC80211][led][report tx and rx byte to tpt_led]
793674de [MAC80211][misc][Rebase hostapd patches]
25a39b5e [MAC80211][hostapd][Fix extender mode issues]
da19c3b2 [MAC80211][mt76][Add Eagle default bin for sku 404]
476c7e8d [MAC80211][mt76][Add mt7996_eeprom_dual_404.bin to mt76 makefile]
beeb6f42 [MT76][hostapd][add extension IE list for non-inherit IE]
5ef327e8 [MAC80211][Core][Enable RNR in 2.4G/5G by default]
10f3f90e [MAC80211][misc][Fix uci not set group cipher]
aa3efcbb [MAC80211][hostapd][Update MU EDCA Parameter update count]
d698fe08 [MAC80211][hnat][Add UL/DL HQoS support]
95f59a1a [MAC80211][misc][Add mediatek external reference release information]
e9c4b56d [mac80211][Rebase Patches][mt76 build fail]
[Release-log]
Change-Id: I2c9d4deafa9d865f40af64d75b9e56da74a88b11
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
index 27d4416..af79b24 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
@@ -1,8 +1,8 @@
-From 9444dedd3f8bd97887c9cf274587b4c76f94d621 Mon Sep 17 00:00:00 2001
+From ff273381d463d82898df70cb7b43341405e3d943 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:21:28 +0800
-Subject: [PATCH 26/32] hostapd: mtk: avoid setting beacon after wpa_supplicant
- stop the AP
+Subject: [PATCH] hostapd: mtk: Avoid setting beacon after wpa_supplicant stop
+ the AP
Add a new variable 'stopped_by_supplicant' to indicate the AP
interface is currently stopped by co-locating STA interface.
@@ -10,16 +10,16 @@
will reload the co-locating AP interfaces and marks the
'stopped_by_supplicant' as 0.
---
- hostapd/ctrl_iface.c | 4 ++++
- src/ap/beacon.c | 4 ++++
- src/ap/bss_load.c | 3 ++-
- src/ap/ctrl_iface_ap.c | 4 +++-
- src/ap/hostapd.c | 2 ++
- src/ap/hostapd.h | 1 +
- 6 files changed, 16 insertions(+), 2 deletions(-)
+ hostapd/ctrl_iface.c | 4 ++++
+ src/ap/beacon.c | 5 ++++-
+ src/ap/bss_load.c | 10 +++++++---
+ src/ap/ctrl_iface_ap.c | 4 +++-
+ src/ap/hostapd.c | 4 +++-
+ src/ap/hostapd.h | 1 +
+ 6 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 9989a04ce..4952bef89 100644
+index 9989a04..4952bef 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -194,11 +194,15 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
@@ -39,19 +39,20 @@
iface->interfaces->config_read_cb = config_read_cb;
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index f26e5254c..24144feff 100644
+index f26e525..1aaeaa8 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -2247,6 +2247,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
+@@ -2246,7 +2246,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
+ continue;
for (i = 0; i < other->num_bss; i++) {
- if (other->bss[i] && other->bss[i]->started)
+- if (other->bss[i] && other->bss[i]->started)
+ if (other->bss[i] && other->bss[i]->started &&
+ !other->bss[i]->stopped_by_supplicant)
__ieee802_11_set_beacon(other->bss[i]);
}
}
-@@ -2262,6 +2264,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
+@@ -2262,6 +2263,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->started &&
@@ -59,7 +60,7 @@
ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
-@@ -2278,6 +2281,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
+@@ -2278,6 +2280,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->beacon_set_done && iface->bss[i]->started &&
@@ -68,21 +69,42 @@
ret = -1;
}
diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index 725d3cd34..ae5552140 100644
+index 725d3cd..f2a1a10 100644
--- a/src/ap/bss_load.c
+++ b/src/ap/bss_load.c
-@@ -46,7 +46,8 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- int err;
- struct hostapd_iface *iface = hapd->iface;
-
-- if (!(hapd->beacon_set_done && hapd->started))
-+ if (!(hapd->beacon_set_done && hapd->started &&
-+ !hapd->stopped_by_supplicant))
+@@ -49,6 +49,9 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ if (!(hapd->beacon_set_done && hapd->started))
return;
++ if(hapd->stopped_by_supplicant)
++ goto skip_update;
++
err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
+ if (err) {
+ wpa_printf(MSG_ERROR, "BSS Load: Failed to get survey data");
+@@ -57,9 +60,6 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+
+ ieee802_11_set_beacon(hapd);
+
+- if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
+- return;
+-
+ if (hapd->conf->chan_util_avg_period) {
+ iface->chan_util_samples_sum += iface->channel_utilization;
+ iface->chan_util_num_sample_periods +=
+@@ -75,6 +75,10 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ }
+ }
+
++skip_update:
++ if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
++ return;
++
+ eloop_register_timeout(sec, usec, update_channel_utilization, hapd,
+ NULL);
+ }
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index aab8a4665..d52188bb7 100644
+index aab8a46..d52188b 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -1028,8 +1028,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
@@ -98,7 +120,7 @@
return 0;
}
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index abadd1ad0..6e6ae77d7 100644
+index abadd1a..afe0611 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -508,6 +508,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
@@ -117,8 +139,17 @@
if (!first || first == -1) {
u8 *addr = hapd->own_addr;
+@@ -4285,7 +4287,7 @@ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap)
+ {
+ struct os_reltime now;
+
+- if (hapd->cca_in_progress)
++ if (hapd->cca_in_progress || hapd->stopped_by_supplicant)
+ return;
+
+ if (os_get_reltime(&now))
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
-index 072205c3c..4f1f98824 100644
+index 072205c..4f1f988 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -191,6 +191,7 @@ struct hostapd_data {
@@ -130,5 +161,5 @@
u8 own_addr[ETH_ALEN];
u8 mld_addr[ETH_ALEN];
--
-2.39.2
+2.25.1
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
new file mode 100644
index 0000000..295ce2b
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
@@ -0,0 +1,28 @@
+From 11c7b9e7b7d4dfef23b2f8f2d72591c1c3590fd5 Mon Sep 17 00:00:00 2001
+From: MeiChia Chiu <meichia.chiu@mediatek.com>
+Date: Fri, 14 Jul 2023 17:19:13 +0800
+Subject: [PATCH] hostapd: mtk: Update parameter_set_count in MU EDCA IE
+
+without this patch, MU EDCA Parameter update count not equal to
+WMM Parameter set count.
+---
+ src/ap/ieee802_11_he.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
+index 9407dd6..353e815 100644
+--- a/src/ap/ieee802_11_he.c
++++ b/src/ap/ieee802_11_he.c
+@@ -316,6 +316,9 @@ u8 * hostapd_eid_he_mu_edca_parameter_set(struct hostapd_data *hapd, u8 *eid)
+ edca = (struct ieee80211_he_mu_edca_parameter_set *) pos;
+ os_memcpy(edca, &hapd->iface->conf->he_mu_edca, sizeof(*edca));
+
++ if (hapd->conf->wmm_enabled)
++ edca->he_qos_info = hapd->parameter_set_count % 0xf;
++
+ wpa_hexdump(MSG_DEBUG, "HE: MU EDCA Parameter Set element",
+ pos, sizeof(*edca));
+
+--
+2.39.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch
new file mode 100644
index 0000000..45a340d
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch
@@ -0,0 +1,53 @@
+From d65c803ab5583dddc6574b09fee47ccfb39cb99b Mon Sep 17 00:00:00 2001
+From: mtk20656 <chank.chen@mediatek.com>
+Date: Mon, 24 Jul 2023 11:30:27 +0800
+Subject: [PATCH] hostapd: mtk: add extension IE list for non-inherit IE in
+ mbssid
+
+Certain clients do not scan all non tx profiles due to absence of
+element ID extension list which is mandatory field in non inheritance
+IE. Non inheritance Element ID is followed by extension element ID.
+Length is expected to be mentioned. Currently we do not support any
+extension element and hence filling length as 0.
+
+Signed-off-by: mtk20656 <chank.chen@mediatek.com>
+---
+ src/ap/ieee802_11.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+old mode 100644
+new mode 100755
+index 1bf5bea..d36798e
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -7639,7 +7639,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
+ else if (hapd->conf->xrates_supported)
+ ie_count++;
+ if (ie_count)
+- nontx_profile_len += 4 + ie_count;
++ nontx_profile_len += 5 + ie_count;
+
+ if (len + nontx_profile_len > 255)
+ break;
+@@ -7780,11 +7780,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
+ non_inherit_ie[ie_count++] = WLAN_EID_EXT_SUPP_RATES;
+ if (ie_count) {
+ *eid++ = WLAN_EID_EXTENSION;
+- *eid++ = 2 + ie_count;
++ *eid++ = 3 + ie_count;
+ *eid++ = WLAN_EID_EXT_NON_INHERITANCE;
+ *eid++ = ie_count;
+ os_memcpy(eid, non_inherit_ie, ie_count);
+ eid += ie_count;
++ /* Element ID extension list is mandatory part of non inheritance IE.
++ * It has a length field followed by extension IEs. Currently no
++ * extension IEs are supported so filling length as 0.
++ */
++ *eid++ = 0;
+ }
+
+ *eid_len_pos = (eid - eid_len_pos) - 1;
+--
+2.18.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
index e11b91d..78dae59 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
@@ -92,6 +92,8 @@
file://mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch \
file://mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch \
file://mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch \
+ file://mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch \
+ file://mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch \
file://mtk-1000-hostapd-mtk-update-eht-operation-element.patch \
file://mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
"