[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]
[Description]
Refactor and sync kernel/wifi from Openwrt
1.kernel: filogic880 initial version
[Release-log]
N/A
diff --git a/recipes-connectivity/hostapd/files/patches/99915-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch b/recipes-connectivity/hostapd/files/patches/99915-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch
index a3183d7..bdc20dd 100644
--- a/recipes-connectivity/hostapd/files/patches/99915-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch
+++ b/recipes-connectivity/hostapd/files/patches/99915-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-command.patch
@@ -1,7 +1,7 @@
-From 476f2fe6698c32ddaca8e5f8c564b499f5dc4772 Mon Sep 17 00:00:00 2001
+From dac510add166575a332b46013346707bb1c2c2b0 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 99915/99916] Add three wire PTA ctrl hostapd vendor command
+Subject: [PATCH 99915/99920] Add three wire PTA ctrl hostapd vendor command
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -12,14 +12,14 @@
src/ap/ap_drv_ops.h | 1 +
src/ap/hostapd.c | 2 ++
src/common/mtk_vendor.h | 16 +++++++++++++++
- src/drivers/driver.h | 1 +
+ src/drivers/driver.h | 8 ++++++++
src/drivers/driver_nl80211.c | 33 +++++++++++++++++++++++++++++++
src/drivers/driver_nl80211.h | 1 +
src/drivers/driver_nl80211_capa.c | 3 +++
- 11 files changed, 86 insertions(+)
+ 11 files changed, 93 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0be53044a..0bf8b6c72 100644
+index 0be5304..0bf8b6c 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -4782,6 +4782,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
@@ -34,7 +34,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 8ce4d9a16..2d720095a 100644
+index 8ce4d9a..2d72009 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -297,6 +297,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -46,7 +46,7 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 4462f29b7..8b9e8873d 100644
+index 4462f29..8b9e887 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1156,6 +1156,19 @@ struct hostapd_config {
@@ -70,7 +70,7 @@
enum edcca_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 55452323d..77d5f8990 100644
+index 5545232..77d5f89 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1038,3 +1038,14 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff)
@@ -89,7 +89,7 @@
+ return hapd->driver->three_wire_ctrl(hapd->drv_priv, hapd->iconf->three_wire_enable);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 5bcb2251a..0a8bf0c7e 100644
+index 5bcb225..0a8bf0c 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -141,6 +141,7 @@ int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable);
@@ -101,7 +101,7 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 0f3691ba3..32b75dca7 100644
+index 0f3691b..32b75dc 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2299,6 +2299,8 @@ dfs_offload:
@@ -114,7 +114,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 5c8f1792e..99a4d7f94 100644
+index 5c8f179..99a4d7f 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,6 +13,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -148,19 +148,26 @@
MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 88b371d61..a137ffc14 100644
+index 88b371d..e725433 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -4691,6 +4691,7 @@ struct wpa_driver_ops {
+@@ -4691,6 +4691,14 @@ struct wpa_driver_ops {
*/
int (*hemu_ctrl)(void *priv, u8 hemu_onoff);
int (*hemu_dump)(void *priv, u8 *hemu_onoff);
++
++ /**
++ * three_wire_ctrl - set three_wire_ctrl mode
++ * @priv: Private driver interface data
++ * @three_wire_enable: three_wire_ctrl mode
++ *
++ */
+ int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
};
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index b06de0687..03babd8a2 100644
+index b06de06..03babd8 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12516,6 +12516,38 @@ static int nl80211_configure_edcca_threshold(void *priv,
@@ -209,7 +216,7 @@
+ .three_wire_ctrl = nl80211_enable_three_wire,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 57f02497e..9fe7811b9 100644
+index 57f0249..9fe7811 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -183,6 +183,7 @@ struct wpa_driver_nl80211_data {
@@ -221,7 +228,7 @@
u64 vendor_scan_cookie;
u64 remain_on_chan_cookie;
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
-index cc146d9fc..04bc54e77 100644
+index cc146d9..04bc54e 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1059,6 +1059,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -235,5 +242,5 @@
}
--
-2.25.1
+2.18.0
diff --git a/recipes-connectivity/hostapd/files/patches/99916-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-connectivity/hostapd/files/patches/99916-hostapd-mtk-Add-hostapd-iBF-control.patch
index 740afab..c9ea6b5 100644
--- a/recipes-connectivity/hostapd/files/patches/99916-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/recipes-connectivity/hostapd/files/patches/99916-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From 23b44ac3bf0c536873ce11d058a7ea7241f6ec95 Mon Sep 17 00:00:00 2001
+From e80a9ee61fc2f7a2e9de1cae3b81ee7be0e8a80b Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 99916/99916] Add hostapd iBF control
+Subject: [PATCH 99916/99920] Add hostapd iBF control
Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
---
@@ -21,7 +21,7 @@
13 files changed, 224 insertions(+), 1 deletion(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0bf8b6c72..9b79be198 100644
+index 0bf8b6c..9b79be1 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -4786,6 +4786,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
@@ -35,7 +35,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 60c1fb44e..a010e7fe8 100644
+index 60c1fb4..a010e7f 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3471,6 +3471,30 @@ hostapd_ctrl_iface_get_hemu(struct hostapd_data *hapd, char *buf,
@@ -79,7 +79,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 0d364773b..c2a123a8c 100644
+index 0d36477..c2a123a 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1586,6 +1586,13 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -106,7 +106,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 2d720095a..14b21cb46 100644
+index 2d72009..14b21cb 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -118,7 +118,7 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 8b9e8873d..2a74e09fe 100644
+index 8b9e887..2a74e09 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1157,6 +1157,7 @@ struct hostapd_config {
@@ -138,7 +138,7 @@
static inline enum oper_chan_width
hostapd_get_oper_chwidth(struct hostapd_config *conf)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 77d5f8990..0b9b4101c 100644
+index 77d5f89..0b9b410 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1049,3 +1049,17 @@ int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
@@ -161,7 +161,7 @@
+}
\ No newline at end of file
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 0a8bf0c7e..da8238249 100644
+index 0a8bf0c..da82382 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -142,6 +142,8 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd);
@@ -174,7 +174,7 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 32b75dca7..f095fe42f 100644
+index 32b75dc..f095fe4 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2301,6 +2301,8 @@ dfs_offload:
@@ -187,7 +187,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 99a4d7f94..d6d04de95 100644
+index 99a4d7f..d6d04de 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,7 +13,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -240,7 +240,7 @@
#define CSI_MAX_COUNT 256
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index a137ffc14..f9f29d8d1 100644
+index e725433..dab37f9 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1628,6 +1628,11 @@ struct wpa_driver_ap_params {
@@ -255,9 +255,9 @@
};
struct wpa_driver_mesh_bss_params {
-@@ -4692,6 +4697,20 @@ struct wpa_driver_ops {
- int (*hemu_ctrl)(void *priv, u8 hemu_onoff);
- int (*hemu_dump)(void *priv, u8 *hemu_onoff);
+@@ -4699,6 +4704,20 @@ struct wpa_driver_ops {
+ *
+ */
int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
+
+ /**
@@ -277,7 +277,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 03babd8a2..1c065d458 100644
+index 03babd8..1c065d4 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12549,6 +12549,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
@@ -401,7 +401,7 @@
+ .ibf_dump = nl80211_ibf_dump,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 9fe7811b9..607592ceb 100644
+index 9fe7811..607592c 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -184,6 +184,7 @@ struct wpa_driver_nl80211_data {
@@ -413,7 +413,7 @@
u64 vendor_scan_cookie;
u64 remain_on_chan_cookie;
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
-index 04bc54e77..9ecc0ff9a 100644
+index 04bc54e..9ecc0ff 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1062,6 +1062,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -427,5 +427,5 @@
}
--
-2.25.1
+2.18.0
diff --git a/recipes-connectivity/hostapd/files/patches/99917-hostapd-mtk-Add-hostapd-AMPDU-AMSDU-control.patch b/recipes-connectivity/hostapd/files/patches/99917-hostapd-mtk-Add-hostapd-AMPDU-AMSDU-control.patch
index b568620..c1f276c 100644
--- a/recipes-connectivity/hostapd/files/patches/99917-hostapd-mtk-Add-hostapd-AMPDU-AMSDU-control.patch
+++ b/recipes-connectivity/hostapd/files/patches/99917-hostapd-mtk-Add-hostapd-AMPDU-AMSDU-control.patch
@@ -1,7 +1,7 @@
-From b58c77a1500824465bb3eb003a7b9be5d35d06f4 Mon Sep 17 00:00:00 2001
+From 15784701fb4b10ac058ae41763c5d4bda15366f0 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Wed, 21 Sep 2022 15:14:11 -0700
-Subject: [PATCH][MAC80211][hostapd][add hostapd AMPDU and AMSDU control command]
+Subject: [PATCH 99917/99920] add hostapd AMPDU and AMSDU control command
---
hostapd/config_file.c | 18 ++++
@@ -20,10 +20,10 @@
13 files changed, 297 insertions(+), 1 deletion(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 50bb536..71d1a5a 100644
+index 9b79be1..310f97d 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4777,6 +4777,24 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4789,6 +4789,24 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "ibf_enable") == 0) { /*ibf setting is per device*/
int val = atoi(pos);
conf->ibf_enable = !!val;
@@ -49,10 +49,10 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 75bf6e6..41386ce 100644
+index a010e7f..0c40175 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3480,6 +3480,48 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
+@@ -3495,6 +3495,48 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
}
@@ -101,7 +101,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4027,6 +4069,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4055,6 +4097,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_get_hemu(hapd, reply, reply_size);
} else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
reply_len = hostapd_ctrl_iface_get_ibf(hapd, reply, reply_size);
@@ -111,10 +111,10 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index e98a0a4..aa0bf58 100644
+index c2a123a..9a5a6b1 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
-@@ -1584,6 +1584,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
+@@ -1593,6 +1593,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
}
@@ -128,7 +128,7 @@
struct hostapd_cli_cmd {
const char *cmd;
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
-@@ -1783,6 +1790,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
+@@ -1796,6 +1803,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"<tx type(0/1/2)> <interval> = runtime set inband discovery" },
{ "get_ibf", hostapd_cli_cmd_get_ibf, NULL,
" = show iBF state (enabled/disabled)"},
@@ -138,7 +138,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index f28aa65..6fc99b9 100644
+index 14b21cb..910231b 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -299,6 +299,8 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -151,10 +151,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 9c73e40..6f94fc6 100644
+index 2a74e09..01b051d 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1155,6 +1155,8 @@ struct hostapd_config {
+@@ -1158,6 +1158,8 @@ struct hostapd_config {
s8 edcca_compensation;
u8 three_wire_enable;
u8 ibf_enable;
@@ -164,10 +164,10 @@
enum three_wire_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 7b3af9c..48a6d71 100644
+index 0b9b410..be6dcb8 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1059,4 +1059,25 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
+@@ -1062,4 +1062,25 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
if (!hapd->driver || !hapd->driver->ibf_dump)
return 0;
return hapd->driver->ibf_dump(hapd->drv_priv, ibf_enable);
@@ -210,7 +210,7 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index c8a76b2..4adad23 100644
+index f095fe4..5fc998e 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2303,6 +2303,10 @@ dfs_offload:
@@ -254,10 +254,10 @@
MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 8ce11ba..449da42 100644
+index dab37f9..3286429 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -4708,6 +4708,17 @@ struct wpa_driver_ops {
+@@ -4718,6 +4718,17 @@ struct wpa_driver_ops {
*
*/
int (*ibf_dump)(void *priv, u8 *ibf_enable);
@@ -276,10 +276,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 8cac145..2e902e6 100644
+index 1c065d4..a06ac58 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -12639,6 +12639,163 @@ fail:
+@@ -12655,6 +12655,163 @@ fail:
return -ENOBUFS;
}
@@ -443,7 +443,7 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
-@@ -12791,4 +12948,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -12807,4 +12964,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.three_wire_ctrl = nl80211_enable_three_wire,
.ibf_ctrl = nl80211_ibf_enable,
.ibf_dump = nl80211_ibf_dump,
@@ -452,10 +452,10 @@
+ .aggregation_dump = nl80211_dump_aggregation,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 11dd93a..e5c151f 100644
+index 607592c..e570224 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -184,6 +184,7 @@ struct wpa_driver_nl80211_data {
+@@ -185,6 +185,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_hemu_vendor_cmd_avail:1;
unsigned int mtk_3wire_vendor_cmd_avail:1;
unsigned int mtk_ibf_vendor_cmd_avail:1;
@@ -464,10 +464,10 @@
u64 vendor_scan_cookie;
u64 remain_on_chan_cookie;
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
-index 8cf67fe..d97d64d 100644
+index 9ecc0ff..fcfa68b 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1059,6 +1059,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1065,6 +1065,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL:
drv->mtk_ibf_vendor_cmd_avail = 1;
break;
@@ -478,5 +478,5 @@
}
--
-2.32.0
+2.18.0
diff --git a/recipes-connectivity/hostapd/files/patches/99918-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch b/recipes-connectivity/hostapd/files/patches/99918-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
index a4fdea4..6544088 100644
--- a/recipes-connectivity/hostapd/files/patches/99918-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
+++ b/recipes-connectivity/hostapd/files/patches/99918-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
@@ -1,18 +1,18 @@
-From 539d31649861447af9c555d32e1b2c6559b549aa Mon Sep 17 00:00:00 2001
+From 52e2b550382387c45083982a900a9d6132710255 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] Do not include HE capab IE if associated sta's HE capab IE is
- invalid
+Subject: [PATCH 99918/99920] Do not include HE capab IE if associated sta's HE
+ capab IE is invalid
---
src/ap/ieee802_11.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-index a83194a..adf15d3 100644
+index d921783..098793e 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -5186,7 +5186,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
+@@ -5192,7 +5192,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
#endif /* CONFIG_IEEE80211AC */
#ifdef CONFIG_IEEE80211AX
diff --git a/recipes-connectivity/hostapd/files/patches/99919-hostapd-mtk-Add-DFS-disable-channel-switch-when-receive-radar.patch b/recipes-connectivity/hostapd/files/patches/99919-hostapd-mtk-Add-DFS-disable-channel-switch-when-receive-radar.patch
index 58e73b1..a1a4713 100644
--- a/recipes-connectivity/hostapd/files/patches/99919-hostapd-mtk-Add-DFS-disable-channel-switch-when-receive-radar.patch
+++ b/recipes-connectivity/hostapd/files/patches/99919-hostapd-mtk-Add-DFS-disable-channel-switch-when-receive-radar.patch
@@ -1,7 +1,7 @@
-From d9361b85b289804c9a69f4ca3d2747ca17aaf6d5 Mon Sep 17 00:00:00 2001
+From 0905060a7bfced9c8cad91a223991a7fa24c3d12 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] Add DFS disable channel switch when receive radar
+Subject: [PATCH 99919/99920] Add DFS disable channel switch when receive radar
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
diff --git a/recipes-connectivity/hostapd/files/patches/99920-hostapd-mtk-Fix-the-issue-of-AP-and-STA-starting-on-DFS-channel.patch b/recipes-connectivity/hostapd/files/patches/99920-hostapd-mtk-Fix-the-issue-of-AP-and-STA-starting-on-DFS-channel.patch
new file mode 100644
index 0000000..6e89adb
--- /dev/null
+++ b/recipes-connectivity/hostapd/files/patches/99920-hostapd-mtk-Fix-the-issue-of-AP-and-STA-starting-on-DFS-channel.patch
@@ -0,0 +1,107 @@
+From c0fbe6aea8d2d3f8aee0fd5f17643d52e0469fa8 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Fri, 7 Oct 2022 22:56:59 +0800
+Subject: [PATCH 99920/99920] Fix the issue of AP and STA starting on DFS
+ channel concurrently
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ src/ap/hostapd.c | 4 +++-
+ src/drivers/driver.h | 7 +++++++
+ src/drivers/driver_nl80211.c | 29 +++++++++++++++++++++++++++++
+ src/drivers/nl80211_copy.h | 1 +
+ 4 files changed, 40 insertions(+), 1 deletion(-)
+
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index 5fc998e..ed1dfdb 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -1463,7 +1463,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
+ return -1;
+ }
+
+- if (!conf->start_disabled && ieee802_11_set_beacon(hapd) < 0)
++ if (conf->start_disabled)
++ hapd->driver->start_disabled(hapd->drv_priv);
++ else if (ieee802_11_set_beacon(hapd) < 0)
+ return -1;
+
+ if (flush_old_stations && !conf->start_disabled &&
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index 3286429..3e8824c 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -4729,6 +4729,13 @@ struct wpa_driver_ops {
+ int (*ampdu_ctrl)(void *priv, u8 ampdu);
+ int (*amsdu_ctrl)(void *priv, u8 amsdu);
+ int (*aggregation_dump)(void *priv, u8 *aggr);
++
++ /**
++ * start_disabled - set start_disabled to cfg80211
++ * @priv: Private driver interface data
++ *
++ */
++ int (*start_disabled)(void *priv);
+ };
+
+ /**
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index a06ac58..af064c0 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -12812,6 +12812,34 @@ fail:
+ return -ENOBUFS;
+ }
+
++static int nl80211_start_disabled(void *priv)
++{
++ struct i802_bss *bss = priv;
++ struct wpa_driver_nl80211_data *drv = bss->drv;
++ struct nl_msg *msg;
++ struct nlattr *data;
++ int ret;
++
++ msg = nl80211_bss_msg(bss, 0, NL80211_CMD_NEW_BEACON);
++ if (!msg)
++ goto fail;
++
++ if (nla_put_flag(msg, NL80211_ATTR_START_DISABLED))
++ goto fail;
++
++ ret = send_and_recv_msgs_connect_handle(drv, msg, bss, 1);
++
++ if (ret)
++ wpa_printf(MSG_ERROR, "Failed to set start_disabled. ret=%d (%s)",
++ ret, strerror(-ret));
++
++ return ret;
++
++fail:
++ nlmsg_free(msg);
++ return ret;
++}
++
+ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+ .name = "nl80211",
+ .desc = "Linux nl80211/cfg80211",
+@@ -12967,4 +12995,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+ .ampdu_ctrl = nl80211_enable_ampdu,
+ .amsdu_ctrl = nl80211_enable_amsdu,
+ .aggregation_dump = nl80211_dump_aggregation,
++ .start_disabled = nl80211_start_disabled,
+ };
+diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
+index c4bf3ad..4c86340 100644
+--- a/src/drivers/nl80211_copy.h
++++ b/src/drivers/nl80211_copy.h
+@@ -3176,6 +3176,7 @@ enum nl80211_attrs {
+ NL80211_ATTR_EHT_CAPABILITY,
+
+ /* add attributes here, update the policy in nl80211.c */
++ NL80211_ATTR_START_DISABLED = 999,
+
+ __NL80211_ATTR_AFTER_LAST,
+ NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
+--
+2.18.0
+
diff --git a/recipes-connectivity/hostapd/files/patches/patches.inc b/recipes-connectivity/hostapd/files/patches/patches.inc
index d8693e4..b6f2f6b 100644
--- a/recipes-connectivity/hostapd/files/patches/patches.inc
+++ b/recipes-connectivity/hostapd/files/patches/patches.inc
@@ -73,4 +73,5 @@
file://99917-hostapd-mtk-Add-hostapd-AMPDU-AMSDU-control.patch \
file://99918-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch \
file://99919-hostapd-mtk-Add-DFS-disable-channel-switch-when-receive-radar.patch \
+ file://99920-hostapd-mtk-Fix-the-issue-of-AP-and-STA-starting-on-DFS-channel.patch \
"
diff --git a/recipes-connectivity/hostapd/files/src/src/ap/ubus.c b/recipes-connectivity/hostapd/files/src/src/ap/ubus.c
index 85281f4..b7b8343 100644
--- a/recipes-connectivity/hostapd/files/src/src/ap/ubus.c
+++ b/recipes-connectivity/hostapd/files/src/src/ap/ubus.c
@@ -2019,6 +2019,7 @@
blobmsg_add_macaddr(&b, "bssid", rep->bssid);
blobmsg_add_u16(&b, "antenna-id", rep->antenna_id);
blobmsg_add_u16(&b, "parent-tsf", rep->parent_tsf);
+ blobmsg_add_u16(&b, "rep-mode", rep_mode);
ubus_notify(ctx, &hapd->ubus.obj, "beacon-report", b.head, -1);
}