[][MAC80211][misc][Rebase hostapd patches]

[Description]
Refactor WiFi6 series hostapd patches and fix WiFi7 11vMBSS non-inherit IE issue

[Release-log]
N/A

Change-Id: Id5aade86269b78f5f7c3450701806b330b1e3b3c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7788734
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
new file mode 100644
index 0000000..060cd1d
--- /dev/null
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
@@ -0,0 +1,36 @@
+From 5ae87796b8e9d6836693ec0c70a5eba063b606b9 Mon Sep 17 00:00:00 2001
+From: Michael Lee <michael-cy.lee@mediatek.com>
+Date: Wed, 3 May 2023 16:10:57 +0800
+Subject: [PATCH 33/35] hostapd: mtk: Fix unexpected AP beacon state transition
+
+When AP fails to set the beacon, it assigns bss->beacon_set to 0 no
+matter what the error number is.
+However, in the case that the error number is -EBUSY, the driver might
+not free the beacon and expect a later beacon re-setting. If hostapd set
+a new beacon under this case, the driver will return -EALREADY.
+This patch checks the error number after hostapd fails to set the
+beacon. If the error number is -EBUSY, bss->beacon_set will not be
+assigned to 0.
+
+Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
+---
+ src/drivers/driver_nl80211.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index 3d71405..e744a18 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -4976,7 +4976,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
+ 			   ret, strerror(-ret));
+ 		if (!bss->beacon_set)
+ 			ret = 0;
+-		bss->beacon_set = 0;
++		if (ret != -EBUSY)
++			bss->beacon_set = 0;
+ 	} else {
+ 		bss->beacon_set = 1;
+ 		nl80211_set_bss(bss, params->cts_protect, params->preamble,
+-- 
+2.18.0
+