[][MAC80211][hostapd][rebase to the latest codebase]
[Description]
Refactor hostapd internal patches on top of the latest hostapd codebase.
2023-06-22-599d00be.
[Release-log]
N/A
Change-Id: I66ffe85a05cd4b18848e787e08f2bce8b0736895
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7723398
diff --git a/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
index 87e286e..27d4416 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
@@ -1,7 +1,7 @@
-From 1d5dfbffb750a0de15622265dc709524a330f059 Mon Sep 17 00:00:00 2001
+From 9444dedd3f8bd97887c9cf274587b4c76f94d621 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/28] hostapd: mtk: avoid setting beacon after wpa_supplicant
+Subject: [PATCH 26/32] hostapd: mtk: avoid setting beacon after wpa_supplicant
stop the AP
Add a new variable 'stopped_by_supplicant' to indicate the AP
@@ -11,15 +11,15 @@
'stopped_by_supplicant' as 0.
---
hostapd/ctrl_iface.c | 4 ++++
- src/ap/beacon.c | 5 ++++-
+ 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(+), 3 deletions(-)
+ 6 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 234b800..06d8345 100644
+index 9989a04ce..4952bef89 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,20 +39,19 @@
iface->interfaces->config_read_cb = config_read_cb;
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index ddb5d03..ffa27f3 100644
+index f26e5254c..24144feff 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -2169,7 +2169,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
- continue;
+@@ -2247,6 +2247,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
- for (i = 0; i < colocated->num_bss; i++) {
-- if (colocated->bss[i] && colocated->bss[i]->started)
-+ if (colocated->bss[i] && colocated->bss[i]->started &&
-+ !colocated->bss[i]->stopped_by_supplicant)
- __ieee802_11_set_beacon(colocated->bss[i]);
+ for (i = 0; i < other->num_bss; i++) {
+ 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]);
}
}
-@@ -2185,6 +2186,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
+@@ -2262,6 +2264,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->started &&
@@ -60,7 +59,7 @@
ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
-@@ -2201,6 +2203,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
+@@ -2278,6 +2281,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 &&
@@ -69,7 +68,7 @@
ret = -1;
}
diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index 725d3cd..ae55521 100644
+index 725d3cd34..ae5552140 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)
@@ -83,10 +82,10 @@
err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index fed5473..2a8ac9d 100644
+index aab8a4665..d52188bb7 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
-@@ -1013,8 +1013,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
+@@ -1028,8 +1028,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
struct hostapd_iface *iface = hapd->iface;
int i;
@@ -99,10 +98,10 @@
return 0;
}
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 88eb984..05ddb6f 100644
+index abadd1ad0..6e6ae77d7 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -488,6 +488,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
+@@ -508,6 +508,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
}
hapd->started = 0;
hapd->beacon_set_done = 0;
@@ -110,7 +109,7 @@
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
hostapd_ubus_free_bss(hapd);
-@@ -1290,6 +1291,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
+@@ -1316,6 +1317,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
return -1;
}
hapd->started = 1;
@@ -119,17 +118,17 @@
if (!first || first == -1) {
u8 *addr = hapd->own_addr;
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
-index c0b3a08..fb8566a 100644
+index 072205c3c..4f1f98824 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -190,6 +190,7 @@ struct hostapd_data {
+@@ -191,6 +191,7 @@ struct hostapd_data {
unsigned int started:1;
unsigned int disabled:1;
unsigned int reenable_beacon:1;
+ unsigned int stopped_by_supplicant:1;
u8 own_addr[ETH_ALEN];
-
+ u8 mld_addr[ETH_ALEN];
--
-2.18.0
+2.39.2