[][MAC80211][misc][refactor hostapd mtk patches]

[Description]
Fix git am patch fail

[Release-log]
N/A

Change-Id: I39db73e88cc687b6f0fbb527a9f6d1cbbce6b1fa
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7296193
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
index 9bbbf87..a0065f3 100644
--- a/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
@@ -1,7 +1,7 @@
-From e7790a1bceca6b7612f29b00c429cf23f5dd9e3a Mon Sep 17 00:00:00 2001
+From 46c88d8e3c513c04891913c77de179de9e7f36cd Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Thu, 26 Jan 2023 09:16:00 +0800
-Subject: [PATCH] hostapd: mtk: Add available color bitmap
+Subject: [PATCH 22/24] hostapd: mtk: Add available color bitmap
 
 Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 ---
@@ -17,10 +17,10 @@
  9 files changed, 192 insertions(+), 1 deletion(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 0ad8451..b0d5ded 100644
+index 9ba6992..e1e9270 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3635,6 +3635,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
+@@ -3645,6 +3645,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
  	return ret;
  }
  
@@ -97,7 +97,7 @@
  
  static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  					      char *buf, char *reply,
-@@ -4202,6 +4272,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4212,6 +4282,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_set_offchan_ctrl(hapd, buf + 16, reply, reply_size);
  	} else if (os_strncmp(buf, "GET_AMSDU", 9) == 0) {
  		reply_len = hostapd_ctrl_iface_get_amsdu(hapd, reply, reply_size);
@@ -109,7 +109,7 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 30b3392..b6cf52e 100644
+index 6231e51..aad7aa5 100644
 --- a/hostapd/hostapd_cli.c
 +++ b/hostapd/hostapd_cli.c
 @@ -1578,6 +1578,20 @@ static int hostapd_cli_cmd_reload_wpa_psk(struct wpa_ctrl *ctrl, int argc,
@@ -145,7 +145,7 @@
  	{ "driver", hostapd_cli_cmd_driver, NULL,
  	  "<driver sub command> [<hex formatted data>] = send driver command data" },
 diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 1a82f23..decffdd 100644
+index 342a7a8..40b9a20 100644
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
 @@ -1091,4 +1091,12 @@ int hostapd_drv_amsdu_dump(struct hostapd_data *hapd, u8 *amsdu)
@@ -164,7 +164,7 @@
 +	return hapd->driver->get_aval_color_bmp(hapd->drv_priv, aval_color_bmp);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 4406666..61c1360 100644
+index 79fef71..136a3ac 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -149,6 +149,8 @@ int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
@@ -177,7 +177,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 0999ea9..f2afb2e 100644
+index 62d79cb..a99e6f2 100644
 --- a/src/common/mtk_vendor.h
 +++ b/src/common/mtk_vendor.h
 @@ -15,6 +15,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -188,7 +188,7 @@
  };
  
  enum mtk_vendor_attr_edcca_ctrl {
-@@ -252,6 +253,16 @@ ibf_dump_policy[NUM_MTK_VENDOR_ATTRS_IBF_DUMP] = {
+@@ -253,6 +254,16 @@ ibf_dump_policy[NUM_MTK_VENDOR_ATTRS_IBF_DUMP] = {
  	[MTK_VENDOR_ATTR_IBF_DUMP_ENABLE] = { .type = NLA_U8 },
  };
  
@@ -206,10 +206,10 @@
  #define CSI_MAX_COUNT 256
  #define ETH_ALEN 6
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index b07aaf3..266c630 100644
+index 36f465c..7f6392f 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4736,6 +4736,14 @@ struct wpa_driver_ops {
+@@ -4771,6 +4771,14 @@ struct wpa_driver_ops {
  	 */
  	int (*amsdu_ctrl)(void *priv, u8 amsdu);
  	int (*amsdu_dump)(void *priv, u8 *amsdu);
@@ -225,10 +225,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 6702384..c8771f7 100644
+index 3753409..f9a8763 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12433,6 +12433,71 @@ static int nl80211_dpp_listen(void *priv, bool enable)
+@@ -12485,6 +12485,71 @@ static int nl80211_dpp_listen(void *priv, bool enable)
  }
  #endif /* CONFIG_DPP */
  
@@ -300,14 +300,14 @@
  
  #ifdef CONFIG_TESTING_OPTIONS
  
-@@ -13073,4 +13138,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- 	.start_disabled = nl80211_start_disabled,
+@@ -13096,4 +13161,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+ 	.ibf_dump = nl80211_ibf_dump,
  	.amsdu_ctrl = nl80211_enable_amsdu,
  	.amsdu_dump = nl80211_dump_amsdu,
 +	.get_aval_color_bmp = nl80211_get_aval_color_bmp,
  };
 diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index e570224..b90c8fa 100644
+index 21d48cc..72c7abd 100644
 --- a/src/drivers/driver_nl80211.h
 +++ b/src/drivers/driver_nl80211.h
 @@ -186,6 +186,7 @@ struct wpa_driver_nl80211_data {
@@ -319,10 +319,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 fcfa68b..c3c7b41 100644
+index d8078bc..e7c6f39 100644
 --- a/src/drivers/driver_nl80211_capa.c
 +++ b/src/drivers/driver_nl80211_capa.c
-@@ -1068,6 +1068,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1092,6 +1092,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
  				case MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL:
  					drv->mtk_wireless_vendor_cmd_avail = 1;
  					break;
@@ -333,5 +333,5 @@
  			}
  
 -- 
-2.39.0
+2.18.0