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

[Description]
b9da0eba [MAC80211][misc][Fix duplicate mac address issue]
a5027f97 [mac80211][mt76][move temperature margin check to mt7915_thermal_temp_store()]
89c51e81 [MAC80211][hostapd][Fix per-user ru index in muru manual mode config commands]
c79eef80 [MAC80211][app][Add ATERUINFO wrap support]
11e7f687 [MAC80211][hostapd][Fix wds AP interface adding issue]
73f5c596 [MAC80211][misc][Set AP and STA BE TXOP to 2 ms]
6efe3657 [MAC80211][hostapd][rebase to the latest codebase]
8a84e107 [MAC80211][mt76][Add txpower info dump support]
02d01027 [MAC80211][hostapd][Fix no BSS load update issue]
ecd77be0 [MAC80211][core][Add dfs state check before extending CAC time for weather radar]
e28c8d9b [MAC80211][hostapd][Fix hostapd_dfs_start_cac log]
178e1786 [MAC80211][hostapd][rebase to the latest codebase]
3bc1e09e [mac80211][wed][add per-bss counter in mt76]

[Release-log]

Change-Id: Ia83661954b75bc6e339198125a7e60982b10e4f1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index 46077c5..4f85cf2 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,7 +1,7 @@
-From ed079151f73c1a0acb6fe071434db64d3850a5e3 Mon Sep 17 00:00:00 2001
+From 68bb1314767dfb84656385e38a1c05862312d76e 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 02/30] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/32] hostapd: mtk: Support EDCCA hostapd configuration
 
 edcca_enable and edcca_compensation and implement edcca related handlers.
 ---
@@ -20,12 +20,12 @@
  12 files changed, 428 insertions(+), 6 deletions(-)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 11a3a1a..92a0ab7 100644
+index 45b4d457b..339d6915e 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4799,6 +4799,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- 		}
- 		conf->punct_acs_threshold = val;
+@@ -4805,6 +4805,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ 	} else if (os_strcmp(buf, "mld_id") == 0) {
+ 		bss->mld_id = atoi(pos);
  #endif /* CONFIG_IEEE80211BE */
 +	} else if (os_strcmp(buf, "edcca_threshold") == 0) {
 +		if (hostapd_parse_intlist(&conf->edcca_threshold, pos) ||
@@ -65,7 +65,7 @@
  		wpa_printf(MSG_ERROR,
  			   "Line %d: unknown configuration item '%s'",
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c4e344e..b132e54 100644
+index d4737958a..d8afba992 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
 @@ -599,6 +599,19 @@ static const char * pbc_status_str(enum pbc_status status)
@@ -88,7 +88,7 @@
  static int hostapd_ctrl_iface_wps_get_status(struct hostapd_data *hapd,
  					     char *buf, size_t buflen)
  {
-@@ -3397,6 +3410,112 @@ static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
+@@ -3432,6 +3445,112 @@ static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
  #endif /* ANDROID */
  
  
@@ -201,7 +201,7 @@
  static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  					      char *buf, char *reply,
  					      int reply_size,
-@@ -3952,6 +4071,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -3987,6 +4106,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_driver_cmd(hapd, buf + 7, reply,
  							  reply_size);
  #endif /* ANDROID */
@@ -215,10 +215,10 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 9f450f6..55c35c7 100644
+index 7d0de122d..35ea6b7f3 100644
 --- a/src/ap/ap_config.c
 +++ b/src/ap/ap_config.c
-@@ -294,6 +294,9 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -295,6 +295,9 @@ struct hostapd_config * hostapd_config_defaults(void)
  	conf->airtime_update_interval = AIRTIME_DEFAULT_UPDATE_INTERVAL;
  #endif /* CONFIG_AIRTIME_POLICY */
  
@@ -228,7 +228,7 @@
  	return conf;
  }
  
-@@ -1008,6 +1011,7 @@ void hostapd_config_free(struct hostapd_config *conf)
+@@ -1009,6 +1012,7 @@ void hostapd_config_free(struct hostapd_config *conf)
  #ifdef CONFIG_ACS
  	os_free(conf->acs_chan_bias);
  #endif /* CONFIG_ACS */
@@ -237,10 +237,10 @@
  	wpabuf_free(conf->civic);
  
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index af9bf92..acfe719 100644
+index dc6025279..9186fbda8 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1180,8 +1180,38 @@ struct hostapd_config {
+@@ -1191,8 +1191,38 @@ struct hostapd_config {
  		MBSSID_ENABLED = 1,
  		ENHANCED_MBSSID_ENABLED = 2,
  	} mbssid;
@@ -280,10 +280,10 @@
  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 ab84a63..af6944b 100644
+index 75ddfa15c..99ba973aa 100644
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
-@@ -1054,3 +1054,27 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
+@@ -1137,3 +1137,27 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
  	return hapd->driver->set_secure_ranging_ctx(hapd->drv_priv, &params);
  }
  #endif /* CONFIG_PASN */
@@ -312,7 +312,7 @@
 +	return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 93b2244..b89ad6e 100644
+index 331b0eaf4..8806217bb 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -144,6 +144,10 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
@@ -327,10 +327,10 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index f5da65a..cd0a0c9 100644
+index 0b7d2c1f4..b67698a72 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -2390,6 +2390,13 @@ dfs_offload:
+@@ -2559,6 +2559,13 @@ dfs_offload:
  	}
  #endif /* CONFIG_MESH */
  
@@ -345,7 +345,7 @@
  		   iface->bss[0]->conf->iface);
  	if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
 diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 4a19d2f..6121857 100644
+index 4a19d2fc9..6121857dd 100644
 --- a/src/common/mtk_vendor.h
 +++ b/src/common/mtk_vendor.h
 @@ -30,14 +30,22 @@ enum mtk_vendor_attr_edcca_ctrl {
@@ -378,10 +378,10 @@
  	[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE] = { .type = NLA_U8 },
  	[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL] = { .type = NLA_U8 },
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 2f91d30..73c7bb4 100644
+index 969cbda6b..443c4a79d 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5001,6 +5001,10 @@ struct wpa_driver_ops {
+@@ -5080,6 +5080,10 @@ struct wpa_driver_ops {
  			      const u8 *match, size_t match_len,
  			      bool multicast);
  #endif /* CONFIG_TESTING_OPTIONS */
@@ -393,7 +393,7 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index d79929b..72c50f2 100644
+index 37e156fc8..c4e0bc9fe 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -37,6 +37,8 @@
@@ -405,7 +405,7 @@
  
  
  #ifndef NETLINK_CAP_ACK
-@@ -13366,6 +13368,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
+@@ -13635,6 +13637,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
  
  #endif /* CONFIG_TESTING_OPTIONS */
  
@@ -580,7 +580,7 @@
  
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
-@@ -13519,4 +13689,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -13789,4 +13959,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.register_frame = testing_nl80211_register_frame,
  	.radio_disable = testing_nl80211_radio_disable,
  #endif /* CONFIG_TESTING_OPTIONS */
@@ -590,19 +590,19 @@
 +	.get_edcca = nl80211_get_edcca,
  };
 diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 8bfbdd5..55c29cc 100644
+index aee8c4512..51b3fbec8 100644
 --- a/src/drivers/driver_nl80211.h
 +++ b/src/drivers/driver_nl80211.h
-@@ -199,6 +199,7 @@ struct wpa_driver_nl80211_data {
- 	unsigned int uses_6ghz:1;
+@@ -202,6 +202,7 @@ struct wpa_driver_nl80211_data {
  	unsigned int secure_ranging_ctx_vendor_cmd_avail:1;
  	unsigned int puncturing:1;
+ 	unsigned int qca_ap_allowed_freqs:1;
 +	unsigned int mtk_edcca_vendor_cmd_avail:1;
  
  	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 27ab1d9..efe7ae4 100644
+index 5e6406885..5dadf2450 100644
 --- a/src/drivers/driver_nl80211_capa.c
 +++ b/src/drivers/driver_nl80211_capa.c
 @@ -18,6 +18,7 @@
@@ -613,7 +613,7 @@
  
  
  static int protocol_feature_handler(struct nl_msg *msg, void *arg)
-@@ -1099,6 +1100,12 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1107,6 +1108,12 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
  					break;
  				}
  #endif /* CONFIG_DRIVER_NL80211_BRCM */
@@ -627,5 +627,5 @@
  
  			wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u",
 -- 
-2.18.0
+2.39.2