[][MAC80211][hostapd][rebase to the latest codebase]

[Description]
Refactor hostapd internal patches on top of the latest hostapd codebase.
2023-06-22-599d00be.

[Release-log]
N/A

Change-Id: I66ffe85a05cd4b18848e787e08f2bce8b0736895
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7723398
diff --git a/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
index 26ea489..85cd75c 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
@@ -1,23 +1,23 @@
-From a90c24ae2b7558eac18cf92fee6cfaf480233ec2 Mon Sep 17 00:00:00 2001
+From b232336ca798430ca9d920d1fa58b1418999eeb0 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 12 May 2023 05:24:19 +0800
-Subject: [PATCH 28/28] hostapd: mtk: Add muru user number debug command
+Subject: [PATCH 28/32] hostapd: mtk: Add muru user number debug command
 
 ---
  hostapd/ctrl_iface.c         | 13 ++++++++++++-
  src/ap/ap_drv_ops.c          |  4 ++--
  src/ap/ap_drv_ops.h          |  2 +-
- src/ap/hostapd.c             |  4 ++--
+ src/ap/hostapd.c             |  3 ++-
  src/common/mtk_vendor.h      |  7 +++++++
  src/drivers/driver.h         |  4 ++--
  src/drivers/driver_nl80211.c | 37 ++++++++++++++++++++++++++++--------
- 7 files changed, 55 insertions(+), 16 deletions(-)
+ 7 files changed, 55 insertions(+), 15 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 06d8345..2d99647 100644
+index 4952bef89..972393e77 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3441,6 +3441,8 @@ hostapd_ctrl_iface_set_edcca(struct hostapd_data *hapd, char *cmd,
+@@ -3477,6 +3477,8 @@ hostapd_ctrl_iface_set_edcca(struct hostapd_data *hapd, char *cmd,
  					 char *buf, size_t buflen)
  {
  	char *pos, *config, *value;
@@ -26,7 +26,7 @@
  	config = cmd;
  	pos = os_strchr(config, ' ');
  	if (pos == NULL)
-@@ -3547,6 +3549,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3583,6 +3585,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
  					 char *buf, size_t buflen)
  {
  	char *pos, *config, *value;
@@ -35,7 +35,7 @@
  	config = cmd;
  	pos = os_strchr(config, ' ');
  	if (pos == NULL)
-@@ -3564,13 +3568,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3600,13 +3604,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
  			return -1;
  		}
  		hapd->iconf->mu_onoff = (u8) mu;
@@ -58,10 +58,10 @@
  	} else {
  		return -1;
 diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 0052a6d..d5c7b15 100644
+index b90dd5722..0aec9e925 100644
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
-@@ -1079,11 +1079,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
+@@ -1162,11 +1162,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
  	return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
  }
  
@@ -76,7 +76,7 @@
  
  int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 9d5a23b..82283e6 100644
+index 1e2a92acb..5dd701e10 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -148,7 +148,7 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -89,19 +89,18 @@
  int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
  int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 05ddb6f..9bd81d3 100644
+index 6e6ae77d7..c684d7e39 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -55,7 +55,7 @@
- #include "hs20.h"
- #include "airtime_policy.h"
+@@ -57,6 +57,7 @@
  #include "wpa_auth_kay.h"
--
+ #include "hw_features.h"
+ 
 +#include "common/mtk_vendor.h"
  
  static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason);
  #ifdef CONFIG_WEP
-@@ -2398,7 +2398,7 @@ dfs_offload:
+@@ -2567,7 +2568,7 @@ dfs_offload:
  	if (hostapd_drv_configure_edcca_threshold(hapd,
  						  hapd->iconf->edcca_threshold) < 0)
  		goto fail;
@@ -111,10 +110,10 @@
  	if (hostapd_drv_three_wire_ctrl(hapd) < 0)
  		goto fail;
 diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 74f467c..7dd2fc4 100644
+index dd1ca2164..99371bf73 100644
 --- a/src/common/mtk_vendor.h
 +++ b/src/common/mtk_vendor.h
-@@ -197,6 +197,8 @@ enum mtk_vendor_attr_mu_ctrl {
+@@ -199,6 +199,8 @@ enum mtk_vendor_attr_mu_ctrl {
  
  	MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
  	MTK_VENDOR_ATTR_MU_CTRL_DUMP,
@@ -123,7 +122,7 @@
  
  	/* keep last */
  	NUM_MTK_VENDOR_ATTRS_MU_CTRL,
-@@ -270,4 +272,9 @@ struct amnt_resp_data {
+@@ -272,4 +274,9 @@ struct amnt_resp_data {
  	struct amnt_data resp_data[0];
  };
  
@@ -134,10 +133,10 @@
 +};
  #endif /* MTK_VENDOR_H */
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index cb885f9..6cd4dc9 100644
+index 5c70ec78f..84387a6d7 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5017,11 +5017,11 @@ struct wpa_driver_ops {
+@@ -5096,11 +5096,11 @@ struct wpa_driver_ops {
  	int (*get_edcca)(void *priv, const u8 mode, u8 *value);
  
  	/**
@@ -152,10 +151,10 @@
  
  	/**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 088f625..8400e57 100644
+index b923e5c7e..0e7ee4306 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -13295,13 +13295,13 @@ fail:
+@@ -13565,13 +13565,13 @@ fail:
  
  
  #ifdef CONFIG_IEEE80211AX
@@ -171,7 +170,7 @@
  
  	if (!drv->mtk_mu_vendor_cmd_avail) {
  		wpa_printf(MSG_INFO,
-@@ -13312,17 +13312,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
+@@ -13582,17 +13582,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
  	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
  		nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
  		nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_MU_CTRL) ||
@@ -215,7 +214,7 @@
  }
  
  
-@@ -14454,7 +14475,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14734,7 +14755,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.update_connect_params = nl80211_update_connection_params,
  	.send_external_auth_status = nl80211_send_external_auth_status,
  	.set_4addr_mode = nl80211_set_4addr_mode,
@@ -225,5 +224,5 @@
  #ifdef CONFIG_DPP
  	.dpp_listen = nl80211_dpp_listen,
 -- 
-2.18.0
+2.39.2