[rdkb][common][bsp][Refactor and sync wifi from openwrt]

[Description]
387b6ecf [MAC80211][WiFi6][core][Add exported function for SoftMAC driver to get QoS map]
4e3cb5c0 [MAC80211][Rebase Patch][Fix inconsistent QoS mapping between SW and HW]
03f284d9 [MAC80211][WiFi6][mt76][Fix inconsistent QoS mapping between SW and HW]
cdd2ea74 [MAC80211][WiFi6][mt76][Fix rcu stall issue in testmode]
8f684af1 [MAC80211][Release][Add commit revision for Filogic 880/860 release]
bf9808d3 [MAC80211][WiFi6][mt76][Refactor add dummy HW offload of IEEE 802.11 fragmentation]
00b8ee9c [MAC80211][misc][Update Release Information v2]
efcc36f2 [MAC80211][misc][Update Release Information]
8249196d [MAC80211][WiFi7][misc][Add UCI radio disabled for testmode]

[Release-log]

Change-Id: I0e39f84703dc98e6f25cf7d59e98729d33cc6f12
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0031-mtk-hostapd-add-support-for-runtime-set-in-band-disc.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0031-mtk-hostapd-add-support-for-runtime-set-in-band-disc.patch
index 55286b8..b149bda 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0031-mtk-hostapd-add-support-for-runtime-set-in-band-disc.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0031-mtk-hostapd-add-support-for-runtime-set-in-band-disc.patch
@@ -16,7 +16,6 @@
 The mac80211 layer already has a new variable "update",
 so the redundant variable "disable" has been removed.
 
-CR-ID: WCNCR00240597
 Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 ---
  hostapd/ctrl_iface.c         | 66 ++++++++++++++++++++++++++++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0037-mtk-hostapd-Do-not-include-HE-capab-IE-if-associated.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0037-mtk-hostapd-Do-not-include-HE-capab-IE-if-associated.patch
index ade8550..03513eb 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0037-mtk-hostapd-Do-not-include-HE-capab-IE-if-associated.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0037-mtk-hostapd-Do-not-include-HE-capab-IE-if-associated.patch
@@ -8,9 +8,7 @@
 NULL check is necessary before access the 'sta'.
 Only one such check was missed in this function, and this patch fixs it.
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Change-Id: I028b7779acfbce5292a60c9f800a83c57c999943
 ---
  src/ap/ieee802_11.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0075-hostapd-mtk-ACS-remove-chan-freq-list-check-when-sca.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0075-hostapd-mtk-ACS-remove-chan-freq-list-check-when-sca.patch
index cfb3f3d..6a9f126 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0075-hostapd-mtk-ACS-remove-chan-freq-list-check-when-sca.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0075-hostapd-mtk-ACS-remove-chan-freq-list-check-when-sca.patch
@@ -4,7 +4,6 @@
 Subject: [PATCH 075/104] hostapd: mtk: ACS: remove chan/freq list check when
  scan request and factor calculation
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  src/ap/acs.c | 12 ------------
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0086-mtk-hostapd-add-mld_primary-option.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0086-mtk-hostapd-add-mld_primary-option.patch
index 3cf864d..4fa5b6f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0086-mtk-hostapd-add-mld_primary-option.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0086-mtk-hostapd-add-mld_primary-option.patch
@@ -3,7 +3,6 @@
 Date: Tue, 26 Dec 2023 08:05:41 +0800
 Subject: [PATCH 086/104] mtk: hostapd: add mld_primary option
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  hostapd/config_file.c | 2 ++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0087-mtk-wpa_supplicant-add-mld_allowed_phy-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0087-mtk-wpa_supplicant-add-mld_allowed_phy-configuration.patch
index 9634a0c..ac847f5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0087-mtk-wpa_supplicant-add-mld_allowed_phy-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0087-mtk-wpa_supplicant-add-mld_allowed_phy-configuration.patch
@@ -9,9 +9,7 @@
 Note that setting 'mld_allowed_phy' to 0 makes no phy allowed for MLO.
 In other word, the STA becomes a legacy STA.
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Change-Id: I5ad15d3748c6fef476aa067cc4901157a96f8804
 ---
  wpa_supplicant/config.c      |  1 +
  wpa_supplicant/config.h      |  1 +
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0088-mtk-hostapd-support-band_idx-option-for-set_mu-get_m.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0088-mtk-hostapd-support-band_idx-option-for-set_mu-get_m.patch
index a04abae..1ba9e75 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0088-mtk-hostapd-support-band_idx-option-for-set_mu-get_m.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0088-mtk-hostapd-support-band_idx-option-for-set_mu-get_m.patch
@@ -9,9 +9,7 @@
 1. get_mu: $ hostapd_cli -i <intf> get_mu <band_idx>
 2. set_mu: $ hostapd_cli -i <intf> set_mu <mu_onff>:<band_idx>
 
-CR-Id: WCNCR00240772
 Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
-Change-Id: I58635e588225a8876a77346c417ec281f9b76e4c
 ---
  hostapd/config_file.c        |  9 +++++
  hostapd/ctrl_iface.c         | 78 ++++++++++++++++++++++++++++--------
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0089-mtk-hostapd-Handle-DFS-radar-detection-in-MLO.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0089-mtk-hostapd-Handle-DFS-radar-detection-in-MLO.patch
index fab4ef8..cbf05f5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0089-mtk-hostapd-Handle-DFS-radar-detection-in-MLO.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0089-mtk-hostapd-Handle-DFS-radar-detection-in-MLO.patch
@@ -9,13 +9,10 @@
 3. Only flush the old stations for the first BSS; otherwise, after DFS CAC
 stations would be flushed again.
 
-CR-Id: WCNCR00274293
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Change-Id: Idbeba92aeadd8b34f61202e4c3df52bae19d9b73
 
 Add background radar handling
 
-CR-Id: WCNCR00274293
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
  src/ap/ap_drv_ops.c                |  9 +++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0090-mtk-hostapd-add-link-id-to-hostapd-cli-chan-switch.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0090-mtk-hostapd-add-link-id-to-hostapd-cli-chan-switch.patch
index 8f3096b..129f54b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0090-mtk-hostapd-add-link-id-to-hostapd-cli-chan-switch.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0090-mtk-hostapd-add-link-id-to-hostapd-cli-chan-switch.patch
@@ -5,7 +5,6 @@
 
 temporary workaround for mlo channel switch
 
-CR-Id: WCNCR00274293
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
  hostapd/ctrl_iface.c   | 3 +--
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0091-mtk-wifi-hostapd-add-wds-mlo-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0091-mtk-wifi-hostapd-add-wds-mlo-support.patch
index 1ce57ff..4ee23cd 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0091-mtk-wifi-hostapd-add-wds-mlo-support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0091-mtk-wifi-hostapd-add-wds-mlo-support.patch
@@ -6,9 +6,7 @@
 1. Add mld_assoc_sta to get the primary sta_info.
 2. Find hapd according to mld address.
 
-CR-Id: WCNCR00240772
 Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
-Change-Id: Ic2d67c0623299dfc00021925296c54e25fe86959
 ---
  src/ap/drv_callbacks.c       |  3 ++-
  src/ap/ieee802_11.c          |  8 ++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0093-mtk-hostapd-prevent-getting-non-MLD-STA-for-other-li.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0093-mtk-hostapd-prevent-getting-non-MLD-STA-for-other-li.patch
index 607e260..0cff032 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0093-mtk-hostapd-prevent-getting-non-MLD-STA-for-other-li.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0093-mtk-hostapd-prevent-getting-non-MLD-STA-for-other-li.patch
@@ -4,7 +4,6 @@
 Subject: [PATCH 093/104] mtk: hostapd: prevent getting non-MLD STA for other
  links
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  src/ap/sta_info.c | 3 ++-
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0094-mtk-hostapd-AP-MLD-specify-link-id-for-unicast-DEAUT.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0094-mtk-hostapd-AP-MLD-specify-link-id-for-unicast-DEAUT.patch
index a5e6812..c276024 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0094-mtk-hostapd-AP-MLD-specify-link-id-for-unicast-DEAUT.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0094-mtk-hostapd-AP-MLD-specify-link-id-for-unicast-DEAUT.patch
@@ -11,9 +11,7 @@
 (The original gerrit somehow disappears, so I commit it again)
 (https://gerrit.mediatek.inc/c/gateway/WiFi7/mac80211/hostapd/+/8715613)
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Change-Id: I938f0fb80862074b95fc33b3c4f566f92ae21de1
 ---
  src/ap/ap_drv_ops.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0095-mtk-hostapd-using-MLD-addr-as-SA-BSSID-for-broadcast.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0095-mtk-hostapd-using-MLD-addr-as-SA-BSSID-for-broadcast.patch
index 90da0fd..e31a05c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0095-mtk-hostapd-using-MLD-addr-as-SA-BSSID-for-broadcast.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0095-mtk-hostapd-using-MLD-addr-as-SA-BSSID-for-broadcast.patch
@@ -4,9 +4,7 @@
 Subject: [PATCH 095/104] mtk: hostapd: using MLD addr as SA/BSSID for
  broadcast DEAUTH
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Change-Id: I4ba7763a0f5c5a16174cf80393b5f1588a9ce42c
 ---
  src/ap/ap_drv_ops.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0096-mtk-hostapd-support-vht-bfee-sts-can-be-up-to-0x4.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0096-mtk-hostapd-support-vht-bfee-sts-can-be-up-to-0x4.patch
index 6fd7d62..f311581 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0096-mtk-hostapd-support-vht-bfee-sts-can-be-up-to-0x4.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0096-mtk-hostapd-support-vht-bfee-sts-can-be-up-to-0x4.patch
@@ -6,9 +6,7 @@
 Without this commit, the maximum vht bfee sts can only be 0x3. This commit
 support to read BF-ANTENNA-5 to set vht bfee sts capability as 4.
 
-CR-Id: WCNCR00240772
 Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
-Change-Id: I3ec1dc28149961bbb01c31a12cd4acd0fd77c2f4
 ---
  hostapd/config_file.c | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0098-mtk-hostapd-add-connac3-csi-control-interface.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0098-mtk-hostapd-add-connac3-csi-control-interface.patch
index 061f038..9c4c4e5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0098-mtk-hostapd-add-connac3-csi-control-interface.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0098-mtk-hostapd-add-connac3-csi-control-interface.patch
@@ -7,8 +7,6 @@
 2. add csi set/dump flow
 3. add csi raw data to json
 
-CR-Id: WCNCR00364748
-Change-Id: If16d4b39ebb7942e47ed4bf4459589d6191983ac
 Signed-off-by: mtk20656 <chank.chen@mediatek.com>
 ---
  hostapd/ctrl_iface.c              | 193 ++++++++++++++++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0099-fixup-mtk-wifi-hostapd-add-wds-mlo-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0099-fixup-mtk-wifi-hostapd-add-wds-mlo-support.patch
index a63f81a..c27e065 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0099-fixup-mtk-wifi-hostapd-add-wds-mlo-support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0099-fixup-mtk-wifi-hostapd-add-wds-mlo-support.patch
@@ -12,9 +12,7 @@
 Without this patch, wds mode cannot work and the AP would not be
 aware that station is using 4 address.
 
-CR-Id: WCNCR00240772
 Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
-Change-Id: I9661226ed0847abb1de0d8c808daf3ad8cd5dc99
 ---
  src/ap/drv_callbacks.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0100-mtk-hostapd-MLD-find-partner-links-by-BSSID-and-SSID.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0100-mtk-hostapd-MLD-find-partner-links-by-BSSID-and-SSID.patch
index e688a56..7e2c70b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0100-mtk-hostapd-MLD-find-partner-links-by-BSSID-and-SSID.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0100-mtk-hostapd-MLD-find-partner-links-by-BSSID-and-SSID.patch
@@ -4,7 +4,6 @@
 Subject: [PATCH 100/104] mtk: hostapd: MLD: find partner links by BSSID and
  SSID
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  wpa_supplicant/bss.c |  8 ++++++--
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0101-mtk-hostapd-MLD-hostapd-add-support-for-basic-MLD-Ex.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0101-mtk-hostapd-MLD-hostapd-add-support-for-basic-MLD-Ex.patch
index 27f986a..08814ed 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0101-mtk-hostapd-MLD-hostapd-add-support-for-basic-MLD-Ex.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0101-mtk-hostapd-MLD-hostapd-add-support-for-basic-MLD-Ex.patch
@@ -12,7 +12,6 @@
 
 Advanced support includes BW cynchronization and channel switch.
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  src/ap/ucode.c         | 52 ++++++++++++++++++++++++++++++++++++++----
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0102-mtk-hostapd-Refactor-static-PP-and-mld-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0102-mtk-hostapd-Refactor-static-PP-and-mld-support.patch
index 8881b72..c958591 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0102-mtk-hostapd-Refactor-static-PP-and-mld-support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0102-mtk-hostapd-Refactor-static-PP-and-mld-support.patch
@@ -5,8 +5,6 @@
 
 Add band_idx attribute in pp cmd for vendor cmd under mld setting.
 
-CR-Id: WCNCR00259302
-Change-Id: I3c4c7e9dff5eaa2ff48537dc0c5398006a305713
 ---
  hostapd/config_file.c        |  6 ++--
  hostapd/ctrl_iface.c         | 69 +++++++++++++++++++++++++-----------
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0103-mtk-hostapd-make-sure-all-links-are-set-before-enabl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0103-mtk-hostapd-make-sure-all-links-are-set-before-enabl.patch
index 9f5346e..cca2e9a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0103-mtk-hostapd-make-sure-all-links-are-set-before-enabl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0103-mtk-hostapd-make-sure-all-links-are-set-before-enabl.patch
@@ -19,9 +19,7 @@
 Note that in NL80211_CMD_NEW_BEACON, we also set beacon interval to 0,
 which helps to bypass some mac80211 beacon active checks, e.g., during ACS.
 
-CR-Id: WCNCR00238098
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
-Change-Id: I99320f7802041dc7d8e780041bb686ce3700c0b6
 ---
  hostapd/config_file.c |  2 ++
  src/ap/ap_config.h    |  2 ++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0104-mtk-hostapd-ucode-add-is_mld_finished-check.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0104-mtk-hostapd-ucode-add-is_mld_finished-check.patch
index 95be18f..e1c0274 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/0104-mtk-hostapd-ucode-add-is_mld_finished-check.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0104-mtk-hostapd-ucode-add-is_mld_finished-check.patch
@@ -7,7 +7,6 @@
 This function returns ture only if all links fromt all MLD APs are
 ready.
 
-CR-Id: WCNCR00289305
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
  src/ap/ucode.c | 18 ++++++++++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch
new file mode 100644
index 0000000..81b2015
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch
@@ -0,0 +1,43 @@
+From 95dcf88b68837221ad937fe7c675b169c8034384 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Mon, 22 Apr 2024 08:40:18 +0800
+Subject: [PATCH] mtk: hostapd: free station when hapd deinit
+
+Free all stations in the same MLD when a bss is deinit.
+Without this patch, the AP_VLAN interface may be free after
+stop ap and leads to kernel crash.
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ src/ap/hostapd.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index c31e0badd..62943c561 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -842,7 +842,21 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason)
+ 
+ void hostapd_bss_deinit_no_free(struct hostapd_data *hapd)
+ {
++#ifdef CONFIG_IEEE80211BE
++	struct hostapd_data *link;
++
++	/* FIXME: free all stations to remvoe AP_VLAN interface. Allocate */
++	/* per-link structures for AP_VLAN in mac80211 and only remove single */
++	/* link here. */
++	if (hostapd_is_mld_ap(hapd)) {
++		for_each_mld_link(link, hapd)
++			hostapd_free_stas(link);
++	} else {
++		hostapd_free_stas(hapd);
++	}
++#else
+ 	hostapd_free_stas(hapd);
++#endif
+ 	hostapd_flush_old_stations(hapd, WLAN_REASON_DEAUTH_LEAVING);
+ #ifdef CONFIG_WEP
+ 	hostapd_clear_wep(hapd);
+-- 
+2.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
index e7987dd..d61727b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -103,4 +103,5 @@
     file://0102-mtk-hostapd-Refactor-static-PP-and-mld-support.patch \
     file://0103-mtk-hostapd-make-sure-all-links-are-set-before-enabl.patch \
     file://0104-mtk-hostapd-ucode-add-is_mld_finished-check.patch \
+    file://0105-mtk-hostapd-free-station-when-hapd-deinit.patch \
     "