[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/wpa-supplicant/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
index fa37f91..6354d3c 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
@@ -1,4 +1,4 @@
-From 011bf135a28d9e13fc27b72da4486d21c8c17e87 Mon Sep 17 00:00:00 2001
+From 78107269ba6f1ef6449e385e0182970ad85d7f43 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Sat, 3 Jun 2023 17:12:15 +0800
 Subject: [PATCH] hostapd: mtk: add connac3 PHY MURU manual mode config support
@@ -46,10 +46,10 @@
  8 files changed, 390 insertions(+), 43 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 274d079..663e6c8 100644
+index 972393e..b280a04 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3575,22 +3575,61 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
+@@ -3579,22 +3579,61 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
  	}
  }
  
@@ -118,7 +118,7 @@
  	value = pos;
  
  	if (os_strcmp(config, "onoff") == 0) {
-@@ -3600,24 +3639,167 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3604,24 +3643,167 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
  			return -1;
  		}
  		hapd->iconf->mu_onoff = (u8) mu;
@@ -186,7 +186,7 @@
 +		for (i = 0; i < dl->user_num; i++) {
 +			dl->usr[i].ru_alloc_seg = (val[2 * i] & 0x1);
 +			dl->usr[i].ru_allo_ps160 = ((val[2 * i] & 0x2) >> 1);
-+			dl->usr[i].ru_idx = (val[(2 * i) + 1] & 0x1);
++			dl->usr[i].ru_idx = val[(2 * i) + 1];
 +		}
 +		os_free(val);
 +		muru->cfg_dl |= host_to_le32(MURU_FIXED_USER_DL_RU_ALLOC);
@@ -200,7 +200,7 @@
 +		for (i = 0; i < ul->user_num; i++) {
 +			ul->usr[i].ru_alloc_seg = (val[2 * i] & 0x1);
 +			ul->usr[i].ru_allo_ps160 = ((val[2 * i] & 0x2) >> 1);
-+			ul->usr[i].ru_idx = (val[(2 * i) + 1] & 0x1);
++			ul->usr[i].ru_idx = val[(2 * i) + 1];
 +		}
 +		os_free(val);
 +		muru->cfg_ul |= host_to_le32(MURU_FIXED_USER_UL_RU_ALLOC);
@@ -300,7 +300,7 @@
  }
  
  
-@@ -4609,8 +4791,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4613,8 +4795,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_get_edcca(hapd, buf+10, reply,
  							  reply_size);
  	} else if (os_strncmp(buf, "SET_MU ", 7) == 0) {
@@ -310,7 +310,7 @@
  	} else if (os_strncmp(buf, "GET_MU", 6) == 0) {
  		reply_len = hostapd_ctrl_iface_get_mu(hapd, reply, reply_size);
  	} else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
-@@ -4636,6 +4817,14 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4640,6 +4821,14 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  	} else if (os_strncmp(buf, "DUMP_AMNT", 9) == 0) {
  		reply_len = hostapd_ctrl_iface_dump_amnt(hapd, buf+10,
  							reply, reply_size);
@@ -326,10 +326,10 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 9df0b2c..74dfce7 100644
+index 1eb871f..4e38e67 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1190,6 +1190,7 @@ struct hostapd_config {
+@@ -1201,6 +1201,7 @@ struct hostapd_config {
  	u8 ibf_enable;
  	u8 dfs_detect_mode;
  	u8 amsdu;
@@ -338,10 +338,10 @@
  
  enum three_wire_mode {
 diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index d5c7b15..fa369c8 100644
+index 0aec9e9..721bfa0 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);
  }
  
@@ -356,7 +356,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 82283e6..33faba5 100644
+index 5dd701e..741fdab 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);
@@ -369,10 +369,10 @@
  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 6fd5947..535f62b 100644
+index c684d7e..52d04d6 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -2398,7 +2398,7 @@ dfs_offload:
+@@ -2568,7 +2568,7 @@ dfs_offload:
  	if (hostapd_drv_configure_edcca_threshold(hapd,
  						  hapd->iconf->edcca_threshold) < 0)
  		goto fail;
@@ -382,10 +382,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 7dd2fc4..6de8596 100644
+index 99371bf..e140de6 100644
 --- a/src/common/mtk_vendor.h
 +++ b/src/common/mtk_vendor.h
-@@ -197,8 +197,11 @@ enum mtk_vendor_attr_mu_ctrl {
+@@ -199,8 +199,11 @@ enum mtk_vendor_attr_mu_ctrl {
  
  	MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
  	MTK_VENDOR_ATTR_MU_CTRL_DUMP,
@@ -399,7 +399,7 @@
  
  	/* keep last */
  	NUM_MTK_VENDOR_ATTRS_MU_CTRL,
-@@ -273,8 +276,163 @@ struct amnt_resp_data {
+@@ -275,8 +278,163 @@ struct amnt_resp_data {
  };
  
  enum {
@@ -566,10 +566,10 @@
 +
  #endif /* MTK_VENDOR_H */
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 6cd4dc9..bc7dcca 100644
+index 84387a6..9ec0e96 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5021,7 +5021,7 @@ struct wpa_driver_ops {
+@@ -5100,7 +5100,7 @@ struct wpa_driver_ops {
  	 * @priv: Private driver interface data
  	 *
  	 */
@@ -579,10 +579,10 @@
  
  	/**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index ccfc2d0..dd6580f 100644
+index ab121ca..fdd8505 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -13296,12 +13296,13 @@ fail:
+@@ -13566,12 +13566,13 @@ fail:
  
  
  #ifdef CONFIG_IEEE80211AX
@@ -597,7 +597,7 @@
  	int ret = -ENOBUFS;
  
  	if (!drv->mtk_mu_vendor_cmd_avail) {
-@@ -13318,17 +13319,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13588,17 +13589,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
  
  	switch (mode) {
  	case MU_CTRL_ONOFF:
@@ -622,7 +622,7 @@
  		ret = -EINVAL;
  		goto fail;
  	}
-@@ -13336,9 +13336,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13606,9 +13606,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
  	nla_nest_end(msg, data);
  
  	ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);