[][MAC80211][misc][rework hostapd and mac80211 patches]

[Description]
Fix missing subject of "mtk" in hostapd and mac80211 patches.

[Release-log]
N/A

iChange-Id: Ifcb9794269732be3a27c9b7cf031f0e0c3547064
Change-Id: I43591694c8dabec9f9bd8cf55e9017d62f09f8c4
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6836847
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-mac80211-mtk-check-twt-responder-when-setu-twt.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/900-mac80211-mtk-do-not-setup-twt-when-twt-responder-is-.patch
similarity index 65%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-mac80211-mtk-check-twt-responder-when-setu-twt.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/900-mac80211-mtk-do-not-setup-twt-when-twt-responder-is-.patch
index 92e853f..19bc6e0 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-mac80211-mtk-check-twt-responder-when-setu-twt.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/900-mac80211-mtk-do-not-setup-twt-when-twt-responder-is-.patch
@@ -1,7 +1,7 @@
-From 0f0d127d843c67f076af380d49e42bb2c3ea3f15 Mon Sep 17 00:00:00 2001
+From 38260391d30fee3500566e931a093089a223b552 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Tue, 18 Jan 2022 20:29:44 +0800
-Subject: [PATCH 901/914] mac80211: do not setup twt when twt responder is
+Subject: [PATCH 900/913] mac80211: mtk: do not setup twt when twt responder is
  false
 
 ---
@@ -9,10 +9,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 873daea..a92bd1a 100644
+index b991151..eb16838 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3281,6 +3281,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx)
+@@ -3283,6 +3283,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx)
  	if (sdata->vif.type != NL80211_IFTYPE_AP)
  		return false;
  
@@ -23,5 +23,5 @@
  		return false;
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-mtk-internal-extend-CAC-time-for-weather-radar-c.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-nl80211-mtk-extend-CAC-time-for-weather-radar-channe.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-mtk-internal-extend-CAC-time-for-weather-radar-c.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-nl80211-mtk-extend-CAC-time-for-weather-radar-channe.patch
index 7a5c812..faf709a 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-mtk-internal-extend-CAC-time-for-weather-radar-c.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/901-nl80211-mtk-extend-CAC-time-for-weather-radar-channe.patch
@@ -1,7 +1,7 @@
-From 16266ba15b8f0de668d45f9b15cc379d38d09b0f Mon Sep 17 00:00:00 2001
+From f840d129394d1d563f14f3802f4591242794c56c Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Tue, 29 Mar 2022 16:06:30 +0800
-Subject: [PATCH 902/914] nl80211: internal: extend CAC time for weather radar
+Subject: [PATCH 901/913] nl80211: mtk: extend CAC time for weather radar
  channels
 
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
@@ -28,5 +28,5 @@
  	if (!err) {
  		wdev->chandef = chandef;
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-it-s-invalid-case-when-frag_threshold-is-gr.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-mac80211-mtk-it-s-invalid-case-when-frag_threshold-i.patch
old mode 100755
new mode 100644
similarity index 78%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-it-s-invalid-case-when-frag_threshold-is-gr.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-mac80211-mtk-it-s-invalid-case-when-frag_threshold-i.patch
index 86c46d6..148adaa
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-it-s-invalid-case-when-frag_threshold-is-gr.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-mac80211-mtk-it-s-invalid-case-when-frag_threshold-i.patch
@@ -1,8 +1,8 @@
-From 44c44546d83d2711a84dc5456f4cb0c34bf544dc Mon Sep 17 00:00:00 2001
+From f778353f05e1d333c5b88b0e006b4737a0069bfb Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Fri, 1 Apr 2022 09:15:21 +0800
-Subject: [PATCH 903/914] mac80211: it's invalid case when frag_threshold is
- greater than 2346
+Subject: [PATCH 902/913] mac80211: mtk: it's invalid case when frag_threshold
+ is greater than 2346
 
 Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
 ---
@@ -24,5 +24,5 @@
  			/*
  			 * Fragments (apart from the last one) are required to
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-correct-legacy-rates-check-in-ieee80211_cal.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-correct-legacy-rates-check-in-ieee80211.patch
similarity index 86%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-correct-legacy-rates-check-in-ieee80211_cal.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-correct-legacy-rates-check-in-ieee80211.patch
index 7981d52..f5d8954 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-correct-legacy-rates-check-in-ieee80211_cal.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/903-mac80211-mtk-correct-legacy-rates-check-in-ieee80211.patch
@@ -1,7 +1,7 @@
-From c837634171320f2cb39f43153208538683ac5fdb Mon Sep 17 00:00:00 2001
+From 43a6f5ea706ca390d094c2e6e2c69483d329d794 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 Date: Mon, 7 Mar 2022 15:18:00 +0800
-Subject: [PATCH 904/914] mac80211: correct legacy rates check in
+Subject: [PATCH 903/913] mac80211: mtk: correct legacy rates check in
  ieee80211_calc_rx_airtime
 
 There are no legacy rates on 60GHz or sub-1Ghz band, so modify the check.
@@ -28,5 +28,5 @@
  
  		sband = hw->wiphy->bands[status->band];
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FE.patch
similarity index 86%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FE.patch
index ea2fa77..ffb994d 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/904-mac80211-mtk-airtime_flags-depends-on-NL80211_EXT_FE.patch
@@ -1,7 +1,7 @@
-From f85db6e56ba3b559d3affffc3baad9f21d60c5f6 Mon Sep 17 00:00:00 2001
+From 7f64e9daee959b3ffd219ced0b3899fba4b3d6c9 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 19 Oct 2022 13:42:43 +0800
-Subject: [PATCH 905/914] mac80211: airtime_flags depends on
+Subject: [PATCH 904/913] mac80211: mtk: airtime_flags depends on
  NL80211_EXT_FEATURE
 
 Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
@@ -26,5 +26,5 @@
  	atomic_set(&local->aql_total_pending_airtime, 0);
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-support-for-runtime-set-inband-discovery.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-add-support-for-runtime-set-inband-disc.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-support-for-runtime-set-inband-discovery.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-add-support-for-runtime-set-inband-disc.patch
index 86f3931..4283cd9 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-support-for-runtime-set-inband-discovery.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-mtk-add-support-for-runtime-set-inband-disc.patch
@@ -1,7 +1,7 @@
-From b4551b622d6a57b6613200bee2f83729e64ba64e Mon Sep 17 00:00:00 2001
+From d354d01045b432d2dcb26c3aba26b3f6864dc796 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Wed, 19 Oct 2022 13:45:42 +0800
-Subject: [PATCH 906/914] mac80211: add support for runtime set inband
+Subject: [PATCH 905/913] mac80211: mtk: add support for runtime set inband
  discovery
 
 Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
@@ -14,7 +14,7 @@
  5 files changed, 61 insertions(+), 5 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index ab83553..f594914 100644
+index 8e05f55..ae2af09 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -1158,6 +1158,7 @@ struct cfg80211_fils_discovery {
@@ -26,7 +26,7 @@
  
  /**
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index edcad3b..bde3495 100644
+index 4d3cfb1..66fedf6 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
 @@ -505,6 +505,7 @@ struct ieee80211_ftm_responder_params {
@@ -50,7 +50,7 @@
  	/* keep last */
  	__NL80211_FILS_DISCOVERY_ATTR_LAST,
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index b582730..1328827 100644
+index abe7318..bf71594 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
 @@ -906,6 +906,7 @@ static int ieee80211_set_fils_discovery(struct ieee80211_sub_if_data *sdata,
@@ -177,5 +177,5 @@
  }
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robust_mg.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robus.patch
similarity index 73%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robust_mg.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robus.patch
index 541f25e..8c1a106 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robust_mg.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/906-mac80211-mtk-add-s1g-category-to-_ieee80211_is_robus.patch
@@ -1,7 +1,7 @@
-From de6defeb50a0b5eab25eedffd6f54f495c6ecf78 Mon Sep 17 00:00:00 2001
+From 943e7ae7d48101a676f7804b1962fb8c9ff43b68 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Wed, 8 Jun 2022 10:26:39 +0800
-Subject: [PATCH 907/914] mac80211: add s1g category to
+Subject: [PATCH 906/913] mac80211: mtk: add s1g category to
  _ieee80211_is_robust_mgmt_frame
 
 Unprotected S1G with code 22 is not robust mgmt frame.
@@ -10,10 +10,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
-index 6942645..195835f 100644
+index 00ed7c1..59de3dc 100644
 --- a/include/linux/ieee80211.h
 +++ b/include/linux/ieee80211.h
-@@ -3696,6 +3696,7 @@ static inline bool _ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
+@@ -3700,6 +3700,7 @@ static inline bool _ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
  			*category != WLAN_CATEGORY_SELF_PROTECTED &&
  			*category != WLAN_CATEGORY_UNPROT_DMG &&
  			*category != WLAN_CATEGORY_VHT &&
@@ -22,5 +22,5 @@
  	}
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-mask-kernel-version-limitation-and-fill-for.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-mask-kernel-version-limitation-and-fill-for.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
index 5ac1559..709d9df 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-mask-kernel-version-limitation-and-fill-for.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/907-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
@@ -1,8 +1,8 @@
-From bb2d81974833d5ee908efc2a2cb033304cff1f51 Mon Sep 17 00:00:00 2001
+From 80f2272f822c0df59885ec78fbec78ee99c086c9 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Fri, 11 Mar 2022 11:34:11 +0800
-Subject: [PATCH 908/914] mac80211: mask kernel version limitation and fill
- forward path in kernel 5.4
+Subject: [PATCH 907/913] mac80211: mtk: mask kernel version limitation and
+ fill forward path in kernel 5.4
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -13,10 +13,10 @@
  4 files changed, 10 deletions(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index bde3495..35dbf62 100644
+index 66fedf6..95e5e66 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -4294,13 +4294,11 @@ struct ieee80211_ops {
+@@ -4292,13 +4292,11 @@ struct ieee80211_ops {
  				     struct ieee80211_sta *sta, u8 flowid);
  	int (*set_radar_background)(struct ieee80211_hw *hw,
  				    struct cfg80211_chan_def *chandef);
@@ -50,7 +50,7 @@
  
  #endif /* __MAC80211_DRIVER_OPS */
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index b777921..e7c85ce 100644
+index 717dfda..455791f 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
 @@ -852,7 +852,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
@@ -99,5 +99,5 @@
  #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-idx.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-idx.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
index 7129a3f..a775793 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-idx.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
@@ -1,7 +1,8 @@
-From 670b284d0098d142aa5144dfdc8fa57ac4a6c23f Mon Sep 17 00:00:00 2001
+From b3588468a5db1cad433658a7d9be76f91bb56f51 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Wed, 18 May 2022 15:10:22 +0800
-Subject: [PATCH 909/914] mac80211: add fill receive path ops to get wed idx
+Subject: [PATCH 908/913] mac80211: mtk: add fill receive path ops to get wed
+ idx
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -16,10 +17,10 @@
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
 old mode 100644
 new mode 100755
-index 35dbf62..43a4ddb
+index 95e5e66..9a38b9f
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -1791,6 +1791,13 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
+@@ -1796,6 +1796,13 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
   */
  struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif);
  
@@ -33,7 +34,7 @@
  /**
   * enum ieee80211_key_flags - key flags
   *
-@@ -3964,6 +3971,8 @@ struct ieee80211_prep_tx_info {
+@@ -3962,6 +3969,8 @@ struct ieee80211_prep_tx_info {
   *	disable background CAC/radar detection.
   * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
   *	resolve a path for hardware flow offloading
@@ -42,7 +43,7 @@
   */
  struct ieee80211_ops {
  	void (*tx)(struct ieee80211_hw *hw,
-@@ -4299,6 +4308,9 @@ struct ieee80211_ops {
+@@ -4297,6 +4306,9 @@ struct ieee80211_ops {
  				     struct ieee80211_sta *sta,
  				     struct net_device_path_ctx *ctx,
  				     struct net_device_path *path);
@@ -75,7 +76,7 @@
 +
  #endif /* __MAC80211_DRIVER_OPS */
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index e7c85ce..c222348 100644
+index 455791f..98b2369 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
 @@ -910,6 +910,29 @@ out:
@@ -119,7 +120,7 @@
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
 old mode 100644
 new mode 100755
-index fb9d0a0..f799e63
+index 8d36b05..d26a2b8
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
 @@ -898,6 +898,15 @@ struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
@@ -139,5 +140,5 @@
   * Nothing should have been stuffed into the workqueue during
   * the suspend->resume cycle. Since we can't check each caller
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-make-4addr-null-frames-using-min_rate-.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-make-4addr-null-frames-using-min_rate-f.patch
similarity index 81%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-make-4addr-null-frames-using-min_rate-.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-make-4addr-null-frames-using-min_rate-f.patch
index ec81394..81e7f9e 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-make-4addr-null-frames-using-min_rate-.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-make-4addr-null-frames-using-min_rate-f.patch
@@ -1,7 +1,7 @@
-From e7f4d518cdecfce077b4cf7a68678e1781dfe974 Mon Sep 17 00:00:00 2001
+From bd1494ce4b7b37130b989839a0f516346c237ae4 Mon Sep 17 00:00:00 2001
 From: Lian Chen <lian.chen@mediatek.com>
 Date: Thu, 14 Jul 2022 16:33:58 +0800
-Subject: [PATCH 910/914] wifi: mac80211: make 4addr null frames using min_rate
+Subject: [PATCH 909/913] mac80211: mtk: make 4addr null frames using min_rate
  for WDS
 
 WDS needs 4addr packets to trigger AP for wlan0.sta creation.
@@ -15,7 +15,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
-index 1548f53..4d6d469 100644
+index cc6d38a..f97bf2b 100644
 --- a/net/mac80211/mlme.c
 +++ b/net/mac80211/mlme.c
 @@ -1133,6 +1133,7 @@ void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
@@ -27,5 +27,5 @@
  }
  
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-mac80211-mtk-remove-timerout-handle-for-ax210-iot-issue.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-remove-timerout-handle-for-ax210-iot-is.patch
similarity index 85%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-mac80211-mtk-remove-timerout-handle-for-ax210-iot-issue.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-remove-timerout-handle-for-ax210-iot-is.patch
index acbd4c8..a48b09f 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-mac80211-mtk-remove-timerout-handle-for-ax210-iot-issue.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/910-mac80211-mtk-remove-timerout-handle-for-ax210-iot-is.patch
@@ -1,7 +1,8 @@
-From 1219001aaad2726e02f4b23e33cad3ae51806cd1 Mon Sep 17 00:00:00 2001
+From d92235daff095ce30d865d1b809059b5fa02a28d Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 19 Oct 2022 13:49:21 +0800
-Subject: [PATCH 911/914] mac80211: remove timerout handle for ax210 iot issue
+Subject: [PATCH 910/913] mac80211: mtk: remove timerout handle for ax210 iot
+ issue
 
 Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
 ---
@@ -30,5 +31,5 @@
  	ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n",
  	       sta->sta.addr, tid);
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-skip-.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-skip-.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
index d60e8d8..56b0d63 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-skip-.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/911-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
@@ -1,8 +1,8 @@
-From 3ff7c67f8b03762e096ed9ac6eaa5d9d6c80bb65 Mon Sep 17 00:00:00 2001
+From 1f7f93c72eb98c299f6ac000a9add3fe04087ef3 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 22 Sep 2022 14:27:41 +0800
-Subject: [PATCH 912/914] cfg80211: implement DFS status show, cac and nop skip
- command via debugfs
+Subject: [PATCH 911/913] cfg80211: mtk: implement DFS status show, cac and nop
+ skip command via debugfs
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -16,7 +16,7 @@
  7 files changed, 318 insertions(+), 7 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index f594914..7d20b98 100644
+index ae2af09..b97ddbd 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -4401,6 +4401,7 @@ struct cfg80211_ops {
@@ -28,10 +28,10 @@
  
  /*
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 1328827..d1fc54d 100644
+index bf71594..97c5e5d 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -4517,6 +4517,24 @@ ieee80211_set_radar_background(struct wiphy *wiphy,
+@@ -4504,6 +4504,24 @@ ieee80211_set_radar_background(struct wiphy *wiphy,
  	return local->ops->set_radar_background(&local->hw, chandef);
  }
  
@@ -56,7 +56,7 @@
  const struct cfg80211_ops mac80211_config_ops = {
  	.add_virtual_intf = ieee80211_add_iface,
  	.del_virtual_intf = ieee80211_del_iface,
-@@ -4623,4 +4641,5 @@ const struct cfg80211_ops mac80211_config_ops = {
+@@ -4610,4 +4628,5 @@ const struct cfg80211_ops mac80211_config_ops = {
  	.set_sar_specs = ieee80211_set_sar_specs,
  	.color_change = ieee80211_color_change,
  	.set_radar_background = ieee80211_set_radar_background,
@@ -77,7 +77,7 @@
  	struct work_struct background_cac_abort_wk;
  
 diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
-index aab4346..517e09f 100644
+index 0878b16..ea50cc7 100644
 --- a/net/wireless/debugfs.c
 +++ b/net/wireless/debugfs.c
 @@ -9,6 +9,7 @@
@@ -88,7 +88,7 @@
  
  #define DEBUGFS_READONLY_FILE(name, buflen, fmt, value...)		\
  static ssize_t name## _read(struct file *file, char __user *userbuf,	\
-@@ -95,16 +96,271 @@ static const struct file_operations ht40allow_map_ops = {
+@@ -96,16 +97,271 @@ static const struct file_operations ht40allow_map_ops = {
  	.llseek = default_llseek,
  };
  
@@ -454,5 +454,5 @@
  
  #undef TRACE_INCLUDE_PATH
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-as-1.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-.patch
similarity index 72%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-as-1.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-.patch
index a5d1de6..6d2768c 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-as-1.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-.patch
@@ -1,10 +1,10 @@
-From 4b13f8c000233eaca0dfb184724ff787148fc2bc Mon Sep 17 00:00:00 2001
+From 2ab83ae18c82ad410bc9eab8c49d8f1718c9f7b2 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Tue, 4 Oct 2022 10:47:05 +0800
-Subject: [PATCH 913/914] mac80211: Set TWT Information Frame Disabled bit as
- 1. This modification means that current implementation do not support twt
- information frame.
+Subject: [PATCH 912/913] mac80211: mtk: Set TWT Information Frame Disabled bit
+ as 1.
 
+This modification means that current implementation do not support twt information frame.
 ---
  net/mac80211/s1g.c | 1 +
  1 file changed, 1 insertion(+)
@@ -22,5 +22,5 @@
  	/* broadcast TWT not supported yet */
  	if (twt->control & IEEE80211_TWT_CONTROL_NEG_TYPE_BROADCAST) {
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/914-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on-DFS.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/914-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on-DFS.patch
rename to autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on.patch
index 8022163..9cacdfb 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/914-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on-DFS.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-mtk-fix-the-issue-of-AP-and-STA-starting-on.patch
@@ -1,8 +1,8 @@
-From 4cd2b159ef1f560721a830d6c0e0ae69169521b4 Mon Sep 17 00:00:00 2001
+From af85a4c0624897cb92ba6f543b322bb1fcbe9845 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 5 Oct 2022 19:13:43 +0800
-Subject: [PATCH 914/914] mac80211: fix the issue of AP and STA starting on DFS
- channel concurrently
+Subject: [PATCH 913/913] mac80211: mtk: fix the issue of AP and STA starting
+ on DFS channel concurrently
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -17,7 +17,7 @@
  8 files changed, 109 insertions(+), 5 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 7d20b98..defce1e 100644
+index b97ddbd..c4c0926 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -800,6 +800,24 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
@@ -76,10 +76,10 @@
  	NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
  	NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index d1fc54d..c40256d 100644
+index 97c5e5d..d726410 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -4535,6 +4535,49 @@ ieee80211_skip_cac(struct wireless_dev *wdev)
+@@ -4522,6 +4522,49 @@ ieee80211_skip_cac(struct wireless_dev *wdev)
  	}
  }
  
@@ -129,7 +129,7 @@
  const struct cfg80211_ops mac80211_config_ops = {
  	.add_virtual_intf = ieee80211_add_iface,
  	.del_virtual_intf = ieee80211_del_iface,
-@@ -4642,4 +4685,5 @@ const struct cfg80211_ops mac80211_config_ops = {
+@@ -4629,4 +4672,5 @@ const struct cfg80211_ops mac80211_config_ops = {
  	.color_change = ieee80211_color_change,
  	.set_radar_background = ieee80211_set_radar_background,
  	.skip_cac = ieee80211_skip_cac,
@@ -254,5 +254,5 @@
  
  #undef TRACE_INCLUDE_PATH
 -- 
-2.18.0
+2.36.1
 
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-hostapd_neighbor_count-and-hostapd_neighbor_ins.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-hostapd_neighbor_count-and-hostapd_neighbor_ins.patch
deleted file mode 100644
index e8e8b8c..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-hostapd_neighbor_count-and-hostapd_neighbor_ins.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 194a2405c98852358de25d96cb9d1c7c56ea4bdc Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 19:18:07 +0800
-Subject: [PATCH 99900/99917] Add hostapd_neighbor_count() and
- hostapd_neighbor_insert_buffer ()
-
-The first function can count the number of neighbor report in neighbore report
-database. The second can iterate neighbor report database to build up neighbor
-report data.
----
- src/ap/neighbor_db.c | 32 ++++++++++++++++++++++++++++++++
- src/ap/neighbor_db.h |  3 +++
- 2 files changed, 35 insertions(+)
-
-diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
-index 52f25eb..c121390 100644
---- a/src/ap/neighbor_db.c
-+++ b/src/ap/neighbor_db.c
-@@ -89,6 +89,38 @@ int hostapd_neighbor_show(struct hostapd_data *hapd, char *buf, size_t buflen)
- }
- 
- 
-+int hostapd_neighbor_count(struct hostapd_data *hapd)
-+{
-+	struct hostapd_neighbor_entry *nr;
-+	int count = 0;
-+
-+	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
-+			 list) {
-+		count++;
-+	}
-+	return count;
-+}
-+
-+
-+int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
-+        size_t buflen)
-+{
-+	struct hostapd_neighbor_entry *nr;
-+	char *pos = buf;
-+
-+	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
-+			 list) {
-+		/* For neighbor report IE, we only need bssid and nr*/
-+		*pos++ = WLAN_EID_NEIGHBOR_REPORT;
-+		*pos++ = wpabuf_len(nr->nr);
-+		os_memcpy(pos, wpabuf_head(nr->nr), wpabuf_len(nr->nr));
-+		pos += wpabuf_len(nr->nr);
-+	}
-+
-+	return pos - buf;
-+}
-+
-+
- static void hostapd_neighbor_clear_entry(struct hostapd_neighbor_entry *nr)
- {
- 	wpabuf_free(nr->nr);
-diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
-index 992671b..1ae194d 100644
---- a/src/ap/neighbor_db.h
-+++ b/src/ap/neighbor_db.h
-@@ -24,4 +24,7 @@ int hostapd_neighbor_remove(struct hostapd_data *hapd, const u8 *bssid,
- 			    const struct wpa_ssid_value *ssid);
- void hostapd_free_neighbor_db(struct hostapd_data *hapd);
- 
-+int hostapd_neighbor_count(struct hostapd_data *hapd);
-+int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
-+        size_t buflen);
- #endif /* NEIGHBOR_DB_H */
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch
new file mode 100644
index 0000000..28af8ef
--- /dev/null
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch
@@ -0,0 +1,475 @@
+From af1bd5256cc764fb222f9809996851ff3d879699 Mon Sep 17 00:00:00 2001
+From: "howard.hsu" <howard-yh.hsu@mediatek.com>
+Date: Wed, 19 Jan 2022 19:18:07 +0800
+Subject: [PATCH 99900/99909] hostapd: mtk: Add neighbor report and BSS
+ Termination for MBO certification
+
+1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
+The first function can count the number of neighbor report in neighbore report
+database. The second can iterate neighbor report database to build up neighbor
+report data.
+
+2. Support including neighbor report elements in ANQP response
+3. Support including neignbor report elements in BTM response
+4. Support configuring BSS Termination TSF by using hostapd_cli command
+5. Disable interface if BSS Termination TSF is set
+6. Add set_send_disassoc_frame_timer() to send disassociate frame
+Function set_disassoc_timer() may fail if key was deleted first. This new
+function will not ask to delete key as set_disassoc_timer() did.
+7. Support including neighbor report elements in BTM request
+8. Add hostapd_neighbor_set_own_report_pref()
+9. Add hostapd_neighbor_set_pref_by_non_pref_chan()
+---
+ hostapd/ctrl_iface.c   |   5 ++
+ src/ap/ap_config.c     |   1 +
+ src/ap/ap_config.h     |   1 +
+ src/ap/ctrl_iface_ap.c |  19 ++++++-
+ src/ap/gas_serv.c      |  29 ++++++++++
+ src/ap/gas_serv.h      |   2 +
+ src/ap/neighbor_db.c   | 119 +++++++++++++++++++++++++++++++++++++++++
+ src/ap/neighbor_db.h   |   9 ++++
+ src/ap/wnm_ap.c        |  72 +++++++++++++++++++++++--
+ 9 files changed, 252 insertions(+), 5 deletions(-)
+
+diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
+index a258492..c2a2822 100644
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -1338,6 +1338,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
+ #endif /* CONFIG_DPP */
+ 	} else if (os_strcasecmp(cmd, "setband") == 0) {
+ 		ret = hostapd_ctrl_iface_set_band(hapd, value);
++	} else if (os_strcasecmp(cmd, "bss_termination_tsf") == 0) {
++		int termination_sec = atoi(value);
++		hapd->conf->bss_termination_tsf = termination_sec;
++		wpa_printf(MSG_DEBUG, "BSS Termination TSF: value = %d",
++                termination_sec);
+ 	} else {
+ 		ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
+ 		if (ret)
+diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
+index d7a0c7c..4a20eb4 100644
+--- a/src/ap/ap_config.c
++++ b/src/ap/ap_config.c
+@@ -170,6 +170,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
+ 	/* comeback after 10 TUs */
+ 	bss->pasn_comeback_after = 10;
+ #endif /* CONFIG_PASN */
++	bss->bss_termination_tsf = 0;
+ }
+ 
+ 
+diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
+index ed3bec7..3f68e76 100644
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -557,6 +557,7 @@ struct hostapd_bss_config {
+ 	int wnm_sleep_mode;
+ 	int wnm_sleep_mode_no_keys;
+ 	int bss_transition;
++	unsigned int bss_termination_tsf;
+ 
+ 	/* IEEE 802.11u - Interworking */
+ 	int interworking;
+diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
+index 96209ce..18bae5c 100644
+--- a/src/ap/ctrl_iface_ap.c
++++ b/src/ap/ctrl_iface_ap.c
+@@ -1203,6 +1203,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
+ 			wpa_printf(MSG_DEBUG, "Invalid bss_term data");
+ 			return -1;
+ 		}
++		if (hapd->conf->bss_termination_tsf) {
++			WPA_PUT_LE64(&bss_term_dur[2], hapd->conf->bss_termination_tsf);
++		}
++
+ 		end++;
+ 		WPA_PUT_LE16(&bss_term_dur[10], atoi(end));
+ 	}
+@@ -1229,14 +1233,25 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
+ 		req_mode |= WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT;
+ 	}
+ 
+-	if (os_strstr(cmd, " pref=1"))
++	if (os_strstr(cmd, " pref=1")) {
+ 		req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
++		if (nei_len == 0) {
++			// Add neigibor report from neighbor report db to nei_rep buffer
++			nei_len = hostapd_neighbor_insert_buffer (hapd, nei_rep, 1000);
++		}
++	}
+ 	if (os_strstr(cmd, " abridged=1"))
+ 		req_mode |= WNM_BSS_TM_REQ_ABRIDGED;
+-	if (os_strstr(cmd, " disassoc_imminent=1"))
++	if (os_strstr(cmd, " disassoc_imminent=1")) {
+ 		req_mode |= WNM_BSS_TM_REQ_DISASSOC_IMMINENT;
++		/* Set own BSS neighbor report preference value as 0 */
++		hostapd_neighbor_set_own_report_pref(hapd, nei_rep, nei_len, 0);
++	}
++
+ 
+ #ifdef CONFIG_MBO
++	hostapd_neighbor_set_pref_by_non_pref_chan(hapd, sta, nei_rep, nei_len);
++
+ 	pos = os_strstr(cmd, "mbo=");
+ 	if (pos) {
+ 		unsigned int mbo_reason, cell_pref, reassoc_delay;
+diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c
+index 90f1577..5845ff8 100644
+--- a/src/ap/gas_serv.c
++++ b/src/ap/gas_serv.c
+@@ -19,6 +19,7 @@
+ #include "dpp_hostapd.h"
+ #include "sta_info.h"
+ #include "gas_serv.h"
++#include "neighbor_db.h"
+ 
+ 
+ #ifdef CONFIG_DPP
+@@ -369,6 +370,24 @@ static void anqp_add_network_auth_type(struct hostapd_data *hapd,
+ 	}
+ }
+ 
++static void anqp_add_neighbor_report(struct hostapd_data *hapd,
++				       struct wpabuf *buf)
++{
++	struct hostapd_neighbor_entry *nr;
++	u8 *len_pos = gas_anqp_add_element(buf, ANQP_NEIGHBOR_REPORT);
++	if (dl_list_empty(&hapd->nr_db)) {
++		wpabuf_put_le16(buf, 0);
++	}
++	else {
++		dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, list ) {
++			wpabuf_put_u8(buf, WLAN_EID_NEIGHBOR_REPORT);
++			wpabuf_put_u8(buf, wpabuf_len(nr->nr));
++			wpabuf_put_buf(buf, nr->nr);
++		}
++	}
++	gas_anqp_set_element_len(buf, len_pos);
++}
++
+ 
+ static void anqp_add_roaming_consortium(struct hostapd_data *hapd,
+ 					struct wpabuf *buf)
+@@ -986,6 +1005,9 @@ gas_serv_build_gas_resp_payload(struct hostapd_data *hapd,
+ 		len += 1000;
+ 	if (request & ANQP_REQ_ICON_REQUEST)
+ 		len += 65536;
++    if (request & ANQP_REQ_NEIGHBOR_REPORT) {
++        len += (40 * hostapd_neighbor_count(hapd));
++    }
+ #ifdef CONFIG_FILS
+ 	if (request & ANQP_FILS_REALM_INFO)
+ 		len += 2 * dl_list_len(&hapd->conf->fils_realms);
+@@ -1028,6 +1050,8 @@ gas_serv_build_gas_resp_payload(struct hostapd_data *hapd,
+ 		anqp_add_elem(hapd, buf, ANQP_TDLS_CAPABILITY);
+ 	if (request & ANQP_REQ_EMERGENCY_NAI)
+ 		anqp_add_elem(hapd, buf, ANQP_EMERGENCY_NAI);
++	if (request & ANQP_REQ_NEIGHBOR_REPORT)
++		anqp_add_neighbor_report(hapd, buf);
+ 
+ 	for (i = 0; i < num_extra_req; i++) {
+ #ifdef CONFIG_FILS
+@@ -1172,6 +1196,11 @@ static void rx_anqp_query_list_id(struct hostapd_data *hapd, u16 info_id,
+ 			     "Emergency NAI",
+ 			     get_anqp_elem(hapd, info_id) != NULL, qi);
+ 		break;
++	case ANQP_NEIGHBOR_REPORT:
++		set_anqp_req(ANQP_REQ_NEIGHBOR_REPORT,
++			     "Neighbor Report",
++			     get_anqp_elem(hapd, info_id) != NULL, qi);
++		break;
+ 	default:
+ #ifdef CONFIG_FILS
+ 		if (info_id == ANQP_FILS_REALM_INFO &&
+diff --git a/src/ap/gas_serv.h b/src/ap/gas_serv.h
+index 1528af4..d0241f2 100644
+--- a/src/ap/gas_serv.h
++++ b/src/ap/gas_serv.h
+@@ -40,6 +40,8 @@
+ 	(1 << (ANQP_TDLS_CAPABILITY - ANQP_QUERY_LIST))
+ #define ANQP_REQ_EMERGENCY_NAI \
+ 	(1 << (ANQP_EMERGENCY_NAI - ANQP_QUERY_LIST))
++#define ANQP_REQ_NEIGHBOR_REPORT \
++	(1 << (ANQP_NEIGHBOR_REPORT - ANQP_QUERY_LIST))
+ /*
+  * First 15 Hotspot 2.0 vendor specific ANQP-elements can be included in the
+  * optimized bitmap.
+diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
+index 52f25eb..9254d09 100644
+--- a/src/ap/neighbor_db.c
++++ b/src/ap/neighbor_db.c
+@@ -89,6 +89,38 @@ int hostapd_neighbor_show(struct hostapd_data *hapd, char *buf, size_t buflen)
+ }
+ 
+ 
++int hostapd_neighbor_count(struct hostapd_data *hapd)
++{
++	struct hostapd_neighbor_entry *nr;
++	int count = 0;
++
++	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
++			 list) {
++		count++;
++	}
++	return count;
++}
++
++
++int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
++        size_t buflen)
++{
++	struct hostapd_neighbor_entry *nr;
++	char *pos = buf;
++
++	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
++			 list) {
++		/* For neighbor report IE, we only need bssid and nr*/
++		*pos++ = WLAN_EID_NEIGHBOR_REPORT;
++		*pos++ = wpabuf_len(nr->nr);
++		os_memcpy(pos, wpabuf_head(nr->nr), wpabuf_len(nr->nr));
++		pos += wpabuf_len(nr->nr);
++	}
++
++	return pos - buf;
++}
++
++
+ static void hostapd_neighbor_clear_entry(struct hostapd_neighbor_entry *nr)
+ {
+ 	wpabuf_free(nr->nr);
+@@ -325,3 +357,90 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd)
+ 	wpabuf_free(nr);
+ #endif /* NEED_AP_MLME */
+ }
++
++
++void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_buf,
++			 size_t buflen, const int pref)
++{
++	struct hostapd_neighbor_entry *nr;
++	char *pos, *next_nr;
++
++	pos = nei_buf;
++	next_nr = nei_buf;
++
++	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
++			 list) {
++		pos = next_nr;
++		next_nr = pos + 2 + wpabuf_len(nr->nr);
++		/* Shift 2 bytes for Element ID and Neighbor report length */
++		pos = pos + 2;
++		if(os_memcmp(pos, hapd->own_addr, ETH_ALEN) == 0) {
++			/* Shift for BSSID + BSSID info + Op_class + channel num + PHY type */
++			pos = pos + 6 + 4 + 1 + 1 + 1;
++
++			/* Iterate Subelement */
++			while (next_nr - pos > 0) {
++				if (*pos == 3) {
++					pos = pos + 2;
++					*pos = pref;
++					return;
++				} else {
++					pos++;
++					int shift_len = *pos++;
++					pos = pos + shift_len;
++				}
++			}
++		}
++	}
++}
++
++#ifdef CONFIG_MBO
++void hostapd_neighbor_set_pref_by_non_pref_chan(struct hostapd_data *hapd,
++			 struct sta_info* sta, char *nei_buf, size_t buflen)
++{
++	struct hostapd_neighbor_entry *nr;
++	struct mbo_non_pref_chan_info *info;
++	u8 i;
++
++	for(info = sta->non_pref_chan; info; info = info->next) {
++		/* Check OP_Class and Channel num */
++		for(i = 0; i < info->num_channels; i++) {
++			char *pos, *next_nr;
++
++			pos = nei_buf;
++			next_nr = nei_buf;
++
++			/* Iterate Neighbor report database */
++			dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
++					 list) {
++				pos = next_nr;
++				next_nr = pos + 2 + wpabuf_len(nr->nr);
++				/**
++				 * Shift 12 bytes for Element ID, Neighbor report length,
++				 * BSSID and BSSID info.
++				 */
++				pos = pos + 12;
++				int nr_op_class = *pos++;
++				int nr_channel = *pos;
++				if(info->op_class == nr_op_class && info->channels[i] == nr_channel) {
++					/* Shift for Channel Num + PHY type */
++					pos = pos + 1 + 1;
++
++					// Iterate Subelement
++					while(next_nr - pos > 0) {
++						if(*pos == 3) {
++							pos = pos + 2;
++							*pos = info->pref;
++							break;
++						}else {
++							pos++;
++							int shift_len = *pos++;
++							pos = pos + shift_len;
++						}
++					}
++				}
++			}
++		}
++	}
++}
++#endif
+diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
+index 992671b..a1ddc07 100644
+--- a/src/ap/neighbor_db.h
++++ b/src/ap/neighbor_db.h
+@@ -24,4 +24,13 @@ int hostapd_neighbor_remove(struct hostapd_data *hapd, const u8 *bssid,
+ 			    const struct wpa_ssid_value *ssid);
+ void hostapd_free_neighbor_db(struct hostapd_data *hapd);
+ 
++int hostapd_neighbor_count(struct hostapd_data *hapd);
++int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
++        size_t buflen);
++void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_buf,
++			 size_t buflen, const int pref);
++#ifdef CONFIG_MBO
++void hostapd_neighbor_set_pref_by_non_pref_chan(struct hostapd_data *hapd,
++			 struct sta_info* sta, char *nei_buf, size_t buflen);
++#endif
+ #endif /* NEIGHBOR_DB_H */
+diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
+index 3ea92af..4349e1d 100644
+--- a/src/ap/wnm_ap.c
++++ b/src/ap/wnm_ap.c
+@@ -20,6 +20,7 @@
+ #include "ap/wpa_auth.h"
+ #include "mbo_ap.h"
+ #include "wnm_ap.h"
++#include "ap/neighbor_db.h"
+ 
+ #define MAX_TFS_IE_LEN  1024
+ 
+@@ -370,9 +371,21 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
+ 	u8 *pos;
+ 	int res;
+ 
+-	mgmt = os_zalloc(sizeof(*mgmt));
+-	if (mgmt == NULL)
++	int nr_num = hostapd_neighbor_count(hapd);
++	int nr_size = ETH_ALEN + 4 + 1 + 1 + 1 + 5;
++	int total_nr_size = nr_num * nr_size;
++	u8 *nr_data = os_malloc(total_nr_size);
++	int nr_data_len = 0;
++	if(nr_data == NULL) {
++		wpa_printf (MSG_ERROR, "Failed to allocate memory");
++	} else {
++	    nr_data_len = hostapd_neighbor_insert_buffer(hapd, nr_data, total_nr_size);
++	}
++	mgmt = os_zalloc(sizeof(*mgmt) + nr_data_len);
++	if (mgmt == NULL) {
++		wpa_printf (MSG_ERROR, "Failed to allocate memory for mgmt frame");
+ 		return -1;
++	}
+ 	os_memcpy(mgmt->da, addr, ETH_ALEN);
+ 	os_memcpy(mgmt->sa, hapd->own_addr, ETH_ALEN);
+ 	os_memcpy(mgmt->bssid, hapd->own_addr, ETH_ALEN);
+@@ -382,10 +395,18 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
+ 	mgmt->u.action.u.bss_tm_req.action = WNM_BSS_TRANS_MGMT_REQ;
+ 	mgmt->u.action.u.bss_tm_req.dialog_token = dialog_token;
+ 	mgmt->u.action.u.bss_tm_req.req_mode = 0;
++	if(nr_num) {
++		mgmt->u.action.u.bss_tm_req.req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
++	}
+ 	mgmt->u.action.u.bss_tm_req.disassoc_timer = host_to_le16(0);
+ 	mgmt->u.action.u.bss_tm_req.validity_interval = 1;
+ 	pos = mgmt->u.action.u.bss_tm_req.variable;
+ 
++	if(nr_num) {
++		os_memcpy(pos, nr_data, nr_data_len);
++		pos += nr_data_len;
++	}
++
+ 	hapd->openwrt_stats.wnm.bss_transition_request_tx++;
+ 	wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
+ 		   MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
+@@ -759,6 +780,50 @@ static void set_disassoc_timer(struct hostapd_data *hapd, struct sta_info *sta,
+ }
+ 
+ 
++static void set_send_disassoc_frame_timer(struct hostapd_data *hapd, struct sta_info *sta,
++			       int disassoc_timer)
++{
++	int timeout, beacon_int;
++
++	/*
++	 * Prevent STA from reconnecting using cached PMKSA to force
++	 * full authentication with the authentication server (which may
++	 * decide to reject the connection),
++	 */
++	wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
++
++	beacon_int = hapd->iconf->beacon_int;
++	if (beacon_int < 1)
++		beacon_int = 100; /* best guess */
++	/* Calculate timeout in ms based on beacon_int in TU */
++	timeout = disassoc_timer * beacon_int * 128 / 125;
++	wpa_printf(MSG_DEBUG, "Disassociation timer for " MACSTR
++		   " set to %d ms", MAC2STR(sta->addr), timeout);
++
++	u16 reason = WLAN_REASON_PREV_AUTH_NOT_VALID;
++
++	hostapd_drv_sta_disassoc(hapd, sta->addr, reason);
++	if (sta)
++		ap_sta_disassociate(hapd, sta, reason);
++}
++
++
++void bss_termination_disable_iface(void *eloop_ctx, void *timeout_ctx)
++{
++	struct hostapd_data *hapd = eloop_ctx;
++	hostapd_disable_iface(hapd->iface);
++}
++
++
++static void set_disable_iface_timer(struct hostapd_data *hapd, struct sta_info *sta,
++			       int disable_iface_timer)
++{
++	wpa_printf(MSG_DEBUG, "Disable interface timer set to %d secs", disable_iface_timer);
++	eloop_register_timeout(disable_iface_timer, 0,
++			       bss_termination_disable_iface, hapd, NULL);
++}
++
++
+ int wnm_send_ess_disassoc_imminent(struct hostapd_data *hapd,
+ 				   struct sta_info *sta, const char *url,
+ 				   int disassoc_timer)
+@@ -848,6 +913,7 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
+ 	    bss_term_dur) {
+ 		os_memcpy(pos, bss_term_dur, 12);
+ 		pos += 12;
++		set_disable_iface_timer(hapd, sta, hapd->conf->bss_termination_tsf);
+ 	}
+ 
+ 	if (url) {
+@@ -884,7 +950,7 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
+ 	hapd->openwrt_stats.wnm.bss_transition_request_tx++;
+ 	if (disassoc_timer) {
+ 		/* send disassociation frame after time-out */
+-		set_disassoc_timer(hapd, sta, disassoc_timer);
++		set_send_disassoc_frame_timer(hapd, sta, disassoc_timer);
+ 	}
+ 
+ 	return 0;
+-- 
+2.36.1
+
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-Support-including-neighbor-report-elements-in-ANQP-.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-Support-including-neighbor-report-elements-in-ANQP-.patch
deleted file mode 100644
index 752584b..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-Support-including-neighbor-report-elements-in-ANQP-.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 0a4f464da1089e59eb5155b5479ceff785697881 Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 19:25:05 +0800
-Subject: [PATCH 99901/99917] Support including neighbor report elements in
- ANQP response
-
----
- src/ap/gas_serv.c | 29 +++++++++++++++++++++++++++++
- src/ap/gas_serv.h |  2 ++
- 2 files changed, 31 insertions(+)
-
-diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c
-index 90f1577..5845ff8 100644
---- a/src/ap/gas_serv.c
-+++ b/src/ap/gas_serv.c
-@@ -19,6 +19,7 @@
- #include "dpp_hostapd.h"
- #include "sta_info.h"
- #include "gas_serv.h"
-+#include "neighbor_db.h"
- 
- 
- #ifdef CONFIG_DPP
-@@ -369,6 +370,24 @@ static void anqp_add_network_auth_type(struct hostapd_data *hapd,
- 	}
- }
- 
-+static void anqp_add_neighbor_report(struct hostapd_data *hapd,
-+				       struct wpabuf *buf)
-+{
-+	struct hostapd_neighbor_entry *nr;
-+	u8 *len_pos = gas_anqp_add_element(buf, ANQP_NEIGHBOR_REPORT);
-+	if (dl_list_empty(&hapd->nr_db)) {
-+		wpabuf_put_le16(buf, 0);
-+	}
-+	else {
-+		dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, list ) {
-+			wpabuf_put_u8(buf, WLAN_EID_NEIGHBOR_REPORT);
-+			wpabuf_put_u8(buf, wpabuf_len(nr->nr));
-+			wpabuf_put_buf(buf, nr->nr);
-+		}
-+	}
-+	gas_anqp_set_element_len(buf, len_pos);
-+}
-+
- 
- static void anqp_add_roaming_consortium(struct hostapd_data *hapd,
- 					struct wpabuf *buf)
-@@ -986,6 +1005,9 @@ gas_serv_build_gas_resp_payload(struct hostapd_data *hapd,
- 		len += 1000;
- 	if (request & ANQP_REQ_ICON_REQUEST)
- 		len += 65536;
-+    if (request & ANQP_REQ_NEIGHBOR_REPORT) {
-+        len += (40 * hostapd_neighbor_count(hapd));
-+    }
- #ifdef CONFIG_FILS
- 	if (request & ANQP_FILS_REALM_INFO)
- 		len += 2 * dl_list_len(&hapd->conf->fils_realms);
-@@ -1028,6 +1050,8 @@ gas_serv_build_gas_resp_payload(struct hostapd_data *hapd,
- 		anqp_add_elem(hapd, buf, ANQP_TDLS_CAPABILITY);
- 	if (request & ANQP_REQ_EMERGENCY_NAI)
- 		anqp_add_elem(hapd, buf, ANQP_EMERGENCY_NAI);
-+	if (request & ANQP_REQ_NEIGHBOR_REPORT)
-+		anqp_add_neighbor_report(hapd, buf);
- 
- 	for (i = 0; i < num_extra_req; i++) {
- #ifdef CONFIG_FILS
-@@ -1172,6 +1196,11 @@ static void rx_anqp_query_list_id(struct hostapd_data *hapd, u16 info_id,
- 			     "Emergency NAI",
- 			     get_anqp_elem(hapd, info_id) != NULL, qi);
- 		break;
-+	case ANQP_NEIGHBOR_REPORT:
-+		set_anqp_req(ANQP_REQ_NEIGHBOR_REPORT,
-+			     "Neighbor Report",
-+			     get_anqp_elem(hapd, info_id) != NULL, qi);
-+		break;
- 	default:
- #ifdef CONFIG_FILS
- 		if (info_id == ANQP_FILS_REALM_INFO &&
-diff --git a/src/ap/gas_serv.h b/src/ap/gas_serv.h
-index 1528af4..d0241f2 100644
---- a/src/ap/gas_serv.h
-+++ b/src/ap/gas_serv.h
-@@ -40,6 +40,8 @@
- 	(1 << (ANQP_TDLS_CAPABILITY - ANQP_QUERY_LIST))
- #define ANQP_REQ_EMERGENCY_NAI \
- 	(1 << (ANQP_EMERGENCY_NAI - ANQP_QUERY_LIST))
-+#define ANQP_REQ_NEIGHBOR_REPORT \
-+	(1 << (ANQP_NEIGHBOR_REPORT - ANQP_QUERY_LIST))
- /*
-  * First 15 Hotspot 2.0 vendor specific ANQP-elements can be included in the
-  * optimized bitmap.
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
similarity index 86%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index 12e0e36..054dfb0 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
@@ -1,7 +1,7 @@
-From b7a74dbae4ff2bdbc5c84d0299bc18020fe86d13 Mon Sep 17 00:00:00 2001
+From f5c37c459c33bb8e228a88ba8efdea68bb75abd3 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Tue, 20 Sep 2022 19:33:45 +0800
-Subject: [PATCH 99909/99917] print sae groups by hostapd ctrl
+Subject: [PATCH 99901/99909] hostapd: mtk: print sae groups by hostapd ctrl
 
 ---
  hostapd/ctrl_iface.c | 13 +++++++++++++
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-Support-including-neignbor-report-elements-in-BTM-r.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-Support-including-neignbor-report-elements-in-BTM-r.patch
deleted file mode 100644
index 99bea80..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-Support-including-neignbor-report-elements-in-BTM-r.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From d283e4c84ece2f6b6dc21889b6b326ea3de11545 Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 19:49:09 +0800
-Subject: [PATCH 99902/99917] Support including neignbor report elements in BTM
- response
-
----
- src/ap/wnm_ap.c | 25 +++++++++++++++++++++++--
- 1 file changed, 23 insertions(+), 2 deletions(-)
-
-diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
-index 3ea92af..532d9db 100644
---- a/src/ap/wnm_ap.c
-+++ b/src/ap/wnm_ap.c
-@@ -20,6 +20,7 @@
- #include "ap/wpa_auth.h"
- #include "mbo_ap.h"
- #include "wnm_ap.h"
-+#include "ap/neighbor_db.h"
- 
- #define MAX_TFS_IE_LEN  1024
- 
-@@ -370,9 +371,21 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
- 	u8 *pos;
- 	int res;
- 
--	mgmt = os_zalloc(sizeof(*mgmt));
--	if (mgmt == NULL)
-+	int nr_num = hostapd_neighbor_count(hapd);
-+	int nr_size = ETH_ALEN + 4 + 1 + 1 + 1 + 5;
-+	int total_nr_size = nr_num * nr_size;
-+	u8 *nr_data = os_malloc(total_nr_size);
-+	int nr_data_len = 0;
-+	if(nr_data == NULL) {
-+		wpa_printf (MSG_ERROR, "Failed to allocate memory");
-+	} else {
-+	    nr_data_len = hostapd_neighbor_insert_buffer(hapd, nr_data, total_nr_size);
-+	}
-+	mgmt = os_zalloc(sizeof(*mgmt) + nr_data_len);
-+	if (mgmt == NULL) {
-+		wpa_printf (MSG_ERROR, "Failed to allocate memory for mgmt frame");
- 		return -1;
-+	}
- 	os_memcpy(mgmt->da, addr, ETH_ALEN);
- 	os_memcpy(mgmt->sa, hapd->own_addr, ETH_ALEN);
- 	os_memcpy(mgmt->bssid, hapd->own_addr, ETH_ALEN);
-@@ -382,10 +395,18 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
- 	mgmt->u.action.u.bss_tm_req.action = WNM_BSS_TRANS_MGMT_REQ;
- 	mgmt->u.action.u.bss_tm_req.dialog_token = dialog_token;
- 	mgmt->u.action.u.bss_tm_req.req_mode = 0;
-+	if(nr_num) {
-+		mgmt->u.action.u.bss_tm_req.req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
-+	}
- 	mgmt->u.action.u.bss_tm_req.disassoc_timer = host_to_le16(0);
- 	mgmt->u.action.u.bss_tm_req.validity_interval = 1;
- 	pos = mgmt->u.action.u.bss_tm_req.variable;
- 
-+	if(nr_num) {
-+		os_memcpy(pos, nr_data, nr_data_len);
-+		pos += nr_data_len;
-+	}
-+
- 	hapd->openwrt_stats.wnm.bss_transition_request_tx++;
- 	wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
- 		   MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99910-hostapd-mtk-hostapd-add-support-for-runtime-set-in-band-discove.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
similarity index 97%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99910-hostapd-mtk-hostapd-add-support-for-runtime-set-in-band-discove.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
index 2af1d8e..6fa23c0 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99910-hostapd-mtk-hostapd-add-support-for-runtime-set-in-band-discove.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
@@ -1,7 +1,7 @@
-From 7a7b2284ad75cd20c788dad6e253bc2940203ff9 Mon Sep 17 00:00:00 2001
+From ce684a1adac0b5b699482924eb86f8f1b8205e57 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Tue, 31 May 2022 21:15:54 +0800
-Subject: [PATCH 99910/99917] hostapd: add support for runtime set in-band
+Subject: [PATCH 99902/99909] hostapd: mtk: add support for runtime set in-band
  discovery
 
 Usage:
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99911-hostapd-mtk-Add-mtk_vendor.h.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch
similarity index 97%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99911-hostapd-mtk-Add-mtk_vendor.h.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch
index ff4d232..a15287e 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99911-hostapd-mtk-Add-mtk_vendor.h.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch
@@ -1,7 +1,7 @@
-From f5ba1e7e33d0736602957f8131540202cec1c7ad Mon Sep 17 00:00:00 2001
+From e4b9b5847090d25009a4cf104052ba0490e95ffe Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Mon, 30 May 2022 15:04:57 +0800
-Subject: [PATCH 99911/99917] Add mtk_vendor.h
+Subject: [PATCH 99903/99909] hostapd: mtk: Add mtk_vendor.h
 
 ---
  src/common/mtk_vendor.h | 195 ++++++++++++++++++++++++++++++++++++++++
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Support-configuring-BSS-Termination-TSF-by-using-ho.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Support-configuring-BSS-Termination-TSF-by-using-ho.patch
deleted file mode 100644
index cac4092..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99903-hostapd-mtk-Support-configuring-BSS-Termination-TSF-by-using-ho.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From de13e08cb3e1210bfed2de824c6a19e8dbed057e Mon Sep 17 00:00:00 2001
-From: Howard Hsu <howard-yh.hsu@mediatek.com>
-Date: Thu, 9 Jun 2022 19:56:18 +0800
-Subject: [PATCH 99903/99917] Support configuring BSS Termination TSF by using
- hostapd_cli command
-
----
- hostapd/ctrl_iface.c   | 5 +++++
- src/ap/ap_config.c     | 1 +
- src/ap/ap_config.h     | 1 +
- src/ap/ctrl_iface_ap.c | 4 ++++
- 4 files changed, 11 insertions(+)
-
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index a258492..c2a2822 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -1338,6 +1338,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
- #endif /* CONFIG_DPP */
- 	} else if (os_strcasecmp(cmd, "setband") == 0) {
- 		ret = hostapd_ctrl_iface_set_band(hapd, value);
-+	} else if (os_strcasecmp(cmd, "bss_termination_tsf") == 0) {
-+		int termination_sec = atoi(value);
-+		hapd->conf->bss_termination_tsf = termination_sec;
-+		wpa_printf(MSG_DEBUG, "BSS Termination TSF: value = %d",
-+                termination_sec);
- 	} else {
- 		ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
- 		if (ret)
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index d7a0c7c..4a20eb4 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -170,6 +170,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
- 	/* comeback after 10 TUs */
- 	bss->pasn_comeback_after = 10;
- #endif /* CONFIG_PASN */
-+	bss->bss_termination_tsf = 0;
- }
- 
- 
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index ed3bec7..3f68e76 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -557,6 +557,7 @@ struct hostapd_bss_config {
- 	int wnm_sleep_mode;
- 	int wnm_sleep_mode_no_keys;
- 	int bss_transition;
-+	unsigned int bss_termination_tsf;
- 
- 	/* IEEE 802.11u - Interworking */
- 	int interworking;
-diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 96209ce..46a8609 100644
---- a/src/ap/ctrl_iface_ap.c
-+++ b/src/ap/ctrl_iface_ap.c
-@@ -1203,6 +1203,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
- 			wpa_printf(MSG_DEBUG, "Invalid bss_term data");
- 			return -1;
- 		}
-+		if (hapd->conf->bss_termination_tsf) {
-+			WPA_PUT_LE64(&bss_term_dur[2], hapd->conf->bss_termination_tsf);
-+		}
-+
- 		end++;
- 		WPA_PUT_LE16(&bss_term_dur[10], atoi(end));
- 	}
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Disable-interface-if-BSS-Termination-TSF-is-set.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Disable-interface-if-BSS-Termination-TSF-is-set.patch
deleted file mode 100644
index 7334217..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Disable-interface-if-BSS-Termination-TSF-is-set.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From cdd0a088a13000d67a5bd821a609546f8b79c7e0 Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 21:03:38 +0800
-Subject: [PATCH 99904/99917] Disable interface if BSS Termination TSF is set
-
----
- src/ap/wnm_ap.c | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
-index 532d9db..f6761ab 100644
---- a/src/ap/wnm_ap.c
-+++ b/src/ap/wnm_ap.c
-@@ -780,6 +780,22 @@ static void set_disassoc_timer(struct hostapd_data *hapd, struct sta_info *sta,
- }
- 
- 
-+void bss_termination_disable_iface(void *eloop_ctx, void *timeout_ctx)
-+{
-+	struct hostapd_data *hapd = eloop_ctx;
-+	hostapd_disable_iface(hapd->iface);
-+}
-+
-+
-+static void set_disable_iface_timer(struct hostapd_data *hapd, struct sta_info *sta,
-+			       int disable_iface_timer)
-+{
-+	wpa_printf(MSG_DEBUG, "Disable interface timer set to %d secs", disable_iface_timer);
-+	eloop_register_timeout(disable_iface_timer, 0,
-+			       bss_termination_disable_iface, hapd, NULL);
-+}
-+
-+
- int wnm_send_ess_disassoc_imminent(struct hostapd_data *hapd,
- 				   struct sta_info *sta, const char *url,
- 				   int disassoc_timer)
-@@ -869,6 +885,7 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
- 	    bss_term_dur) {
- 		os_memcpy(pos, bss_term_dur, 12);
- 		pos += 12;
-+		set_disable_iface_timer(hapd, sta, hapd->conf->bss_termination_tsf);
- 	}
- 
- 	if (url) {
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99912-hostapd-mtk-Support-new-hostapd-configuration-edcca_enable-and-.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
similarity index 98%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99912-hostapd-mtk-Support-new-hostapd-configuration-edcca_enable-and-.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index e1161f8..40dded6 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99912-hostapd-mtk-Support-new-hostapd-configuration-edcca_enable-and-.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,9 +1,9 @@
-From 27645d8206ad1a0276f05faa175f2ed4ffb8202e Mon Sep 17 00:00:00 2001
+From cef7f515eafeeaa99933cc9e66c79b705e3ab065 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Mon, 30 May 2022 16:31:34 +0800
-Subject: [PATCH 99912/99917] Support new hostapd configuration, edcca_enable
- and edcca_compensation and implement edcca related handlers.
+Subject: [PATCH 99904/99909] hostapd: mtk: Support EDCCA hostapd configuration
 
+edcca_enable and edcca_compensation and implement edcca related handlers.
 ---
  hostapd/config_file.c             |  32 ++++++
  hostapd/ctrl_iface.c              | 125 ++++++++++++++++++++++
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99913-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
similarity index 98%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99913-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
index 572cdd1..18617be 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99913-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
@@ -1,7 +1,7 @@
-From fe664c759cb79e130d35f6dd0236e9cb33320f70 Mon Sep 17 00:00:00 2001
+From a288f97e708bc579e285b509f7c0655c2f27a76c Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Tue, 9 Aug 2022 10:23:44 -0700
-Subject: [PATCH 99913/99917] Add hostapd HEMU SET/GET control
+Subject: [PATCH 99905/99909] hostapd: mtk: Add hostapd HEMU SET/GET control
 
 ---
  hostapd/config_file.c             |   9 +++
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-set_send_disassoc_frame_timer-to-send-disassoci.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-set_send_disassoc_frame_timer-to-send-disassoci.patch
deleted file mode 100644
index 83d9814..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99905-hostapd-mtk-Add-set_send_disassoc_frame_timer-to-send-disassoci.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From bd1816cb396a071cc5ae2fe13992362fcbf45fe9 Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 21:15:07 +0800
-Subject: [PATCH 99905/99917] Add set_send_disassoc_frame_timer() to send
- disassociate frame
-
-Function set_disassoc_timer() may fail if key was deleted first. This new
-function will not ask to delete key as set_disassoc_timer() did.
----
- src/ap/wnm_ap.c | 30 +++++++++++++++++++++++++++++-
- 1 file changed, 29 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
-index f6761ab..4349e1d 100644
---- a/src/ap/wnm_ap.c
-+++ b/src/ap/wnm_ap.c
-@@ -780,6 +780,34 @@ static void set_disassoc_timer(struct hostapd_data *hapd, struct sta_info *sta,
- }
- 
- 
-+static void set_send_disassoc_frame_timer(struct hostapd_data *hapd, struct sta_info *sta,
-+			       int disassoc_timer)
-+{
-+	int timeout, beacon_int;
-+
-+	/*
-+	 * Prevent STA from reconnecting using cached PMKSA to force
-+	 * full authentication with the authentication server (which may
-+	 * decide to reject the connection),
-+	 */
-+	wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
-+
-+	beacon_int = hapd->iconf->beacon_int;
-+	if (beacon_int < 1)
-+		beacon_int = 100; /* best guess */
-+	/* Calculate timeout in ms based on beacon_int in TU */
-+	timeout = disassoc_timer * beacon_int * 128 / 125;
-+	wpa_printf(MSG_DEBUG, "Disassociation timer for " MACSTR
-+		   " set to %d ms", MAC2STR(sta->addr), timeout);
-+
-+	u16 reason = WLAN_REASON_PREV_AUTH_NOT_VALID;
-+
-+	hostapd_drv_sta_disassoc(hapd, sta->addr, reason);
-+	if (sta)
-+		ap_sta_disassociate(hapd, sta, reason);
-+}
-+
-+
- void bss_termination_disable_iface(void *eloop_ctx, void *timeout_ctx)
- {
- 	struct hostapd_data *hapd = eloop_ctx;
-@@ -922,7 +950,7 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
- 	hapd->openwrt_stats.wnm.bss_transition_request_tx++;
- 	if (disassoc_timer) {
- 		/* send disassociation frame after time-out */
--		set_disassoc_timer(hapd, sta, disassoc_timer);
-+		set_send_disassoc_frame_timer(hapd, sta, disassoc_timer);
- 	}
- 
- 	return 0;
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99914-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
similarity index 97%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99914-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
index ca64eb8..fc81ed1 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99914-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
@@ -1,7 +1,8 @@
-From 4707ed85884be2ffe7860e28de80df5a6e479824 Mon Sep 17 00:00:00 2001
+From 26c6be11e7597490ccc4d7704542c78dec6c4cd1 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Fri, 2 Sep 2022 01:03:23 +0800
-Subject: [PATCH 99914/99917] Add three wire PTA ctrl hostapd vendor command
+Subject: [PATCH 99906/99909] hostapd: mtk: Add three wire PTA ctrl hostapd
+ vendor command
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Support-including-neighbor-report-elements-in-BTM-r.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Support-including-neighbor-report-elements-in-BTM-r.patch
deleted file mode 100644
index 174d8a9..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99906-hostapd-mtk-Support-including-neighbor-report-elements-in-BTM-r.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 99665874b76ccacd85e56ea8767ebb0b8d4b3b1e Mon Sep 17 00:00:00 2001
-From: Howard Hsu <howard-yh.hsu@mediatek.com>
-Date: Thu, 9 Jun 2022 19:58:57 +0800
-Subject: [PATCH 99906/99917] Support including neighbor report elements in BTM
- request
-
----
- src/ap/ctrl_iface_ap.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 46a8609..1cbec53 100644
---- a/src/ap/ctrl_iface_ap.c
-+++ b/src/ap/ctrl_iface_ap.c
-@@ -1233,8 +1233,13 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
- 		req_mode |= WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT;
- 	}
- 
--	if (os_strstr(cmd, " pref=1"))
-+	if (os_strstr(cmd, " pref=1")) {
- 		req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
-+		if (nei_len == 0) {
-+			// Add neigibor report from neighbor report db to nei_rep buffer
-+			nei_len = hostapd_neighbor_insert_buffer (hapd, nei_rep, 1000);
-+		}
-+	}
- 	if (os_strstr(cmd, " abridged=1"))
- 		req_mode |= WNM_BSS_TM_REQ_ABRIDGED;
- 	if (os_strstr(cmd, " disassoc_imminent=1"))
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99915-hostapd-mtk-Add-hostapd-iBF-control.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
similarity index 98%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99915-hostapd-mtk-Add-hostapd-iBF-control.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
index a50cb9e..50a08ba 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99915-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From e177f5069ff7e8f024676cf9d0e4af135cfea95b Mon Sep 17 00:00:00 2001
+From 1f60afd21c6dd7dfe3d504dee7507654a981033b Mon Sep 17 00:00:00 2001
 From: mtk27835 <shurong.wen@mediatek.com>
 Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 99915/99917] Add hostapd iBF control
+Subject: [PATCH 99907/99909] hostapd: mtk: Add hostapd iBF control
 
 Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
 ---
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd_neighbor_set_own_report_pref.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd_neighbor_set_own_report_pref.patch
deleted file mode 100644
index 63658c9..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99907-hostapd-mtk-Add-hostapd_neighbor_set_own_report_pref.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From bc2244e766d863c35369cc1641b058d062681abe Mon Sep 17 00:00:00 2001
-From: Howard Hsu <howard-yh.hsu@mediatek.com>
-Date: Thu, 9 Jun 2022 20:00:49 +0800
-Subject: [PATCH 99907/99917] Add hostapd_neighbor_set_own_report_pref()
-
----
- src/ap/ctrl_iface_ap.c |  6 +++++-
- src/ap/neighbor_db.c   | 36 ++++++++++++++++++++++++++++++++++++
- src/ap/neighbor_db.h   |  2 ++
- 3 files changed, 43 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 1cbec53..274b435 100644
---- a/src/ap/ctrl_iface_ap.c
-+++ b/src/ap/ctrl_iface_ap.c
-@@ -1242,8 +1242,12 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
- 	}
- 	if (os_strstr(cmd, " abridged=1"))
- 		req_mode |= WNM_BSS_TM_REQ_ABRIDGED;
--	if (os_strstr(cmd, " disassoc_imminent=1"))
-+	if (os_strstr(cmd, " disassoc_imminent=1")) {
- 		req_mode |= WNM_BSS_TM_REQ_DISASSOC_IMMINENT;
-+		/* Set own BSS neighbor report preference value as 0 */
-+		hostapd_neighbor_set_own_report_pref(hapd, nei_rep, nei_len, 0);
-+	}
-+
- 
- #ifdef CONFIG_MBO
- 	pos = os_strstr(cmd, "mbo=");
-diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
-index c121390..134ed4a 100644
---- a/src/ap/neighbor_db.c
-+++ b/src/ap/neighbor_db.c
-@@ -357,3 +357,39 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd)
- 	wpabuf_free(nr);
- #endif /* NEED_AP_MLME */
- }
-+
-+
-+void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_buf,
-+			 size_t buflen, const int pref)
-+{
-+	struct hostapd_neighbor_entry *nr;
-+	char *pos, *next_nr;
-+
-+	pos = nei_buf;
-+	next_nr = nei_buf;
-+
-+	dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
-+			 list) {
-+		pos = next_nr;
-+		next_nr = pos + 2 + wpabuf_len(nr->nr);
-+		/* Shift 2 bytes for Element ID and Neighbor report length */
-+		pos = pos + 2;
-+		if(os_memcmp(pos, hapd->own_addr, ETH_ALEN) == 0) {
-+			/* Shift for BSSID + BSSID info + Op_class + channel num + PHY type */
-+			pos = pos + 6 + 4 + 1 + 1 + 1;
-+
-+			/* Iterate Subelement */
-+			while (next_nr - pos > 0) {
-+				if (*pos == 3) {
-+					pos = pos + 2;
-+					*pos = pref;
-+					return;
-+				} else {
-+					pos++;
-+					int shift_len = *pos++;
-+					pos = pos + shift_len;
-+				}
-+			}
-+		}
-+	}
-+}
-diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
-index 1ae194d..2e16f72 100644
---- a/src/ap/neighbor_db.h
-+++ b/src/ap/neighbor_db.h
-@@ -27,4 +27,6 @@ void hostapd_free_neighbor_db(struct hostapd_data *hapd);
- int hostapd_neighbor_count(struct hostapd_data *hapd);
- int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
-         size_t buflen);
-+void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_buf,
-+			 size_t buflen, const int pref);
- #endif /* NEIGHBOR_DB_H */
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Add-hostapd_neighbor_set_pref_by_non_pref_chan.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Add-hostapd_neighbor_set_pref_by_non_pref_chan.patch
deleted file mode 100644
index 8d23b84..0000000
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Add-hostapd_neighbor_set_pref_by_non_pref_chan.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 952404e8327c98817a2d975b5595ca5d9a15e739 Mon Sep 17 00:00:00 2001
-From: Howard Hsu <howard-yh.hsu@mediatek.com>
-Date: Thu, 9 Jun 2022 20:02:06 +0800
-Subject: [PATCH 99908/99917] Add hostapd_neighbor_set_pref_by_non_pref_chan()
-
----
- src/ap/ctrl_iface_ap.c |  2 ++
- src/ap/neighbor_db.c   | 51 ++++++++++++++++++++++++++++++++++++++++++
- src/ap/neighbor_db.h   |  4 ++++
- 3 files changed, 57 insertions(+)
-
-diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 274b435..18bae5c 100644
---- a/src/ap/ctrl_iface_ap.c
-+++ b/src/ap/ctrl_iface_ap.c
-@@ -1250,6 +1250,8 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
- 
- 
- #ifdef CONFIG_MBO
-+	hostapd_neighbor_set_pref_by_non_pref_chan(hapd, sta, nei_rep, nei_len);
-+
- 	pos = os_strstr(cmd, "mbo=");
- 	if (pos) {
- 		unsigned int mbo_reason, cell_pref, reassoc_delay;
-diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
-index 134ed4a..9254d09 100644
---- a/src/ap/neighbor_db.c
-+++ b/src/ap/neighbor_db.c
-@@ -393,3 +393,54 @@ void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_b
- 		}
- 	}
- }
-+
-+#ifdef CONFIG_MBO
-+void hostapd_neighbor_set_pref_by_non_pref_chan(struct hostapd_data *hapd,
-+			 struct sta_info* sta, char *nei_buf, size_t buflen)
-+{
-+	struct hostapd_neighbor_entry *nr;
-+	struct mbo_non_pref_chan_info *info;
-+	u8 i;
-+
-+	for(info = sta->non_pref_chan; info; info = info->next) {
-+		/* Check OP_Class and Channel num */
-+		for(i = 0; i < info->num_channels; i++) {
-+			char *pos, *next_nr;
-+
-+			pos = nei_buf;
-+			next_nr = nei_buf;
-+
-+			/* Iterate Neighbor report database */
-+			dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry,
-+					 list) {
-+				pos = next_nr;
-+				next_nr = pos + 2 + wpabuf_len(nr->nr);
-+				/**
-+				 * Shift 12 bytes for Element ID, Neighbor report length,
-+				 * BSSID and BSSID info.
-+				 */
-+				pos = pos + 12;
-+				int nr_op_class = *pos++;
-+				int nr_channel = *pos;
-+				if(info->op_class == nr_op_class && info->channels[i] == nr_channel) {
-+					/* Shift for Channel Num + PHY type */
-+					pos = pos + 1 + 1;
-+
-+					// Iterate Subelement
-+					while(next_nr - pos > 0) {
-+						if(*pos == 3) {
-+							pos = pos + 2;
-+							*pos = info->pref;
-+							break;
-+						}else {
-+							pos++;
-+							int shift_len = *pos++;
-+							pos = pos + shift_len;
-+						}
-+					}
-+				}
-+			}
-+		}
-+	}
-+}
-+#endif
-diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
-index 2e16f72..a1ddc07 100644
---- a/src/ap/neighbor_db.h
-+++ b/src/ap/neighbor_db.h
-@@ -29,4 +29,8 @@ int hostapd_neighbor_insert_buffer(struct hostapd_data *hapd, char *buf,
-         size_t buflen);
- void hostapd_neighbor_set_own_report_pref(struct hostapd_data *hapd, char *nei_buf,
- 			 size_t buflen, const int pref);
-+#ifdef CONFIG_MBO
-+void hostapd_neighbor_set_pref_by_non_pref_chan(struct hostapd_data *hapd,
-+			 struct sta_info* sta, char *nei_buf, size_t buflen);
-+#endif
- #endif /* NEIGHBOR_DB_H */
--- 
-2.36.1
-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99916-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
similarity index 81%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99916-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
index b1769a1..9b96d98 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99916-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
@@ -1,8 +1,8 @@
-From dbd8120e47621784647deb776bf4b4d0a97fb49e Mon Sep 17 00:00:00 2001
+From 28228a96980512f30c8c8aac0f819c36f7241b68 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Thu, 22 Sep 2022 16:08:09 +0800
-Subject: [PATCH 99916/99917] Do not include HE capab IE if associated sta's HE
- capab IE is invalid
+Subject: [PATCH 99908/99909] hostapd: mtk: Do not include HE capab IE if
+ associated sta's HE capab IE is invalid
 
 ---
  src/ap/ieee802_11.c | 3 ++-
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/99917-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
similarity index 98%
rename from autobuild_mac80211_release/package/network/services/hostapd/patches/99917-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
rename to autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
index 83eac6e..8da9b5f 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/99917-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
@@ -1,7 +1,7 @@
-From 80ecd3e0398aa668e683ff582a0594f88b290f44 Mon Sep 17 00:00:00 2001
+From 737d21c64ab0ac49e9cce7185f1f79bb0b71f50e Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Fri, 7 Oct 2022 10:46:29 +0800
-Subject: [PATCH 99917/99917] Add DFS and ZWDFS support
+Subject: [PATCH 99909/99909] hostapd: mtk: Add DFS and ZWDFS support
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---