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

[Description]
bb1ab020 [MAC80211][WiFi6][mt76][Fix STA channel switch reason during auth/assoc for DFS channel]
e1340c0f [MAC80211][WiFi6][core][Fix STA channel switch reason during auth/assoc for DFS channel]
cf503970 [MAC80211][WiFi7][misc][Remove testmode default eeprom bin]
b37abd10 [MAC80211][WiFi6/7][Misc][Fix build fail because of mt76 version upgradation]
b7b7f0c4 [MAC80211][WiFi6][core][Fix build fail]
8097da40 [MAC80211][wifi6][MT76][Rebase mt76 to 2024-03-18]
c0f79602 [MAC80211][WiFi7][app][Add ibf ver2 command support in iwpriv wrapper]
36839dc7 [MAC80211][WiFi6][core][Sync wifi7 cert SQC fix to wifi6]
159f6fc1 [MAC82011][Wifi6][MT76][Fix power on sequence]
0e60d7d6 [MAC80211][wifi6][MT76][Add adie id and version in debugfs]
0dfc6240 [MAC80211][WiFi6][core][Refactor STA CSA paring flow]
d2f1ea53 [MAC80211][mt76][fix issue that when one phy is scanning and another phy occur packet loss]
eae6a6c1 [MAC80211][WED][Fix Eagle mlo tx T.P too low issue]
4c3ca8f0 [MAC80211][WiFi6][mt76][Fix HE Phy cap IE for station mode]
602ca651 [MAC80211][WiFi6][mt76][Add ZWDFS foolproof mechanism during radar trigger & detection]
df0ebcec [MAC80211][WiFi7][misc][Add WiFi7 MLO autobuild folder]
e318c6da [mac80211][wifi6][mt76][Remove unnecessary register settings]
c6a3c4c3 [MAC80211][WiFi6][mt76][Add background radar hw cap checking mechanism]
c25db7a0 [MAC80211][WiFi6][Misc][Fix default /etc/config/wireless setting and backport wpa_supp patch of CVE-2023-52160]
839f446d [MAC80211][WiFi6][Rebase Patches][Fix patch fail]
66194787 [MAC80211][wifi6][mt76][Add per-band token limits and debugfs]
85e8e415 [MAC80211][WiFi6][Misc][Change default WiFi 5GHz setting to BW160 expect for MT7915]
64256fee [MAC80211][WED][Fix kite RX T.P ~0 due to sync upstream]
6be2154a [MAC80211][WiFi6][core][fix AP mgmt not encrypted in WDS mode with PMF on]
92223c79 [MAC80211][mt76][sync SER patch.]
0c7cec54 [MAC80211][WiFi7][MT76][Sync internal patches to release build]
421f7b74 [MAC80211][WiFi6][mt76][Refactor backaward patch due to wed sync to upstream]
0471b20c [MAC80211][WED][Refactor and sync wed patches from upstream]
e0ab6314 [mac80211][wifi6][mt76][Fix unusual Tx/Rx airtime duration values]
632ed0a5 [MAC80211][WiFi7][core][Sync to backports-6.6.15]

[Release-log]

Change-Id: I8731a065c32a92b78d3cb8ac6fc292f493d1be65
diff --git a/recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-add-txpower-info-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-add-txpower-info-dump-support.patch
new file mode 100644
index 0000000..8c716f1
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-add-txpower-info-dump-support.patch
@@ -0,0 +1,147 @@
+From 270d9e1edd8d2627612d3deaf59c6a630592fb46 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Tue, 11 Jul 2023 17:06:04 +0800
+Subject: [PATCH 1030/1051] wifi: mt76: mt7915: add txpower info dump support
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ mt7915/debugfs.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
+ mt7915/mcu.c     |  2 ++
+ mt7915/mcu.h     |  3 +-
+ 3 files changed, 91 insertions(+), 1 deletion(-)
+
+diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
+index 4c48b197..86cbef33 100644
+--- a/mt7915/debugfs.c
++++ b/mt7915/debugfs.c
+@@ -1258,6 +1258,91 @@ mt7915_txpower_path_show(struct seq_file *file, void *data)
+ 
+ DEFINE_SHOW_ATTRIBUTE(mt7915_txpower_path);
+ 
++static int
++mt7915_txpower_info_show(struct seq_file *file, void *data)
++{
++	struct mt7915_phy *phy = file->private;
++	struct {
++		u8 category;
++		u8 rsv1;
++
++		/* basic info */
++		u8 band_idx;
++		u8 band;
++
++		/* board type info */
++		bool is_epa;
++		bool is_elna;
++
++		/* power percentage info */
++		bool percentage_ctrl_enable;
++		s8 power_drop_level;
++
++		/* frond-end loss TX info */
++		s8 front_end_loss_tx[4];
++
++		/* frond-end loss RX info */
++		s8 front_end_loss_rx[4];
++
++		/* thermal info */
++		bool thermal_compensate_enable;
++		s8 thermal_compensate_value;
++		u8 rsv2;
++
++		/* TX power max/min limit info */
++		s8 max_power_bound;
++		s8 min_power_bound;
++
++		/* power limit info */
++		bool sku_enable;
++		bool bf_backoff_enable;
++
++		/* MU TX power info */
++		bool mu_tx_power_manual_enable;
++		s8 mu_tx_power_auto;
++		s8 mu_tx_power_manual;
++		u8 rsv3;
++	} __packed basic_info = {};
++	int ret;
++
++	ret = mt7915_mcu_get_txpower_sku(phy, (s8 *)&basic_info, sizeof(basic_info),
++					 TX_POWER_INFO_BASIC);
++	if (ret || basic_info.category != TX_POWER_INFO_BASIC)
++		goto out;
++
++	seq_puts(file, "======================== BASIC INFO ========================\n");
++	seq_printf(file, "    Band Index: %d, Channel Band: %d\n",
++		   basic_info.band_idx, basic_info.band);
++	seq_printf(file, "    PA Type: %s\n", basic_info.is_epa ? "ePA" : "iPA");
++	seq_printf(file, "    LNA Type: %s\n", basic_info.is_elna ? "eLNA" : "iLNA");
++	seq_puts(file, "------------------------------------------------------------\n");
++	seq_printf(file, "    SKU: %s\n", basic_info.sku_enable ? "enable" : "disable");
++	seq_printf(file, "    Percentage Control: %s\n",
++		   basic_info.percentage_ctrl_enable ? "enable" : "disable");
++	seq_printf(file, "    Power Drop: %d [dBm]\n", basic_info.power_drop_level >> 1);
++	seq_printf(file, "    Backoff: %s\n",
++		   basic_info.bf_backoff_enable ? "enable" : "disable");
++	seq_printf(file, "    TX Front-end Loss:  %d, %d, %d, %d\n",
++		   basic_info.front_end_loss_tx[0], basic_info.front_end_loss_tx[1],
++		   basic_info.front_end_loss_tx[2], basic_info.front_end_loss_tx[3]);
++	seq_printf(file, "    RX Front-end Loss:  %d, %d, %d, %d\n",
++		   basic_info.front_end_loss_rx[0], basic_info.front_end_loss_rx[1],
++		   basic_info.front_end_loss_rx[2], basic_info.front_end_loss_rx[3]);
++	seq_printf(file, "    MU TX Power Mode:  %s\n",
++		   basic_info.mu_tx_power_manual_enable ? "manual" : "auto");
++	seq_printf(file, "    MU TX Power (Auto / Manual): %d / %d [0.5 dBm]\n",
++		   basic_info.mu_tx_power_auto, basic_info.mu_tx_power_manual);
++	seq_printf(file, "    Thermal Compensation:  %s\n",
++		   basic_info.thermal_compensate_enable ? "enable" : "disable");
++	seq_printf(file, "    Theraml Compensation Value: %d\n",
++		   basic_info.thermal_compensate_value);
++
++out:
++	return ret;
++}
++
++DEFINE_SHOW_ATTRIBUTE(mt7915_txpower_info);
++
+ static int
+ mt7915_twt_stats(struct seq_file *s, void *data)
+ {
+@@ -1387,6 +1472,8 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+ 			    &mt7915_txpower_fops);
+ 	debugfs_create_file("txpower_path", 0400, dir, phy,
+ 			    &mt7915_txpower_path_fops);
++	debugfs_create_file("txpower_info", 0400, dir, phy,
++			    &mt7915_txpower_info_fops);
+ 	debugfs_create_devm_seqfile(dev->mt76.dev, "twt_stats", dir,
+ 				    mt7915_twt_stats);
+ 	debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 45b09072..b9beb4f6 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -3624,6 +3624,8 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len,
+ 			txpower[i] = res[i][req.band_idx];
+ 	} else if (category == TX_POWER_INFO_PATH) {
+ 		memcpy(txpower, skb->data + 4, len);
++	} else if (category == TX_POWER_INFO_BASIC) {
++		memcpy(txpower, skb->data, len);
+ 	}
+ 
+ 	dev_kfree_skb(skb);
+diff --git a/mt7915/mcu.h b/mt7915/mcu.h
+index 035ad97d..3089fb64 100644
+--- a/mt7915/mcu.h
++++ b/mt7915/mcu.h
+@@ -525,7 +525,8 @@ enum {
+ };
+ 
+ enum {
+-	TX_POWER_INFO_PATH = 1,
++	TX_POWER_INFO_BASIC,
++	TX_POWER_INFO_PATH,
+ 	TX_POWER_INFO_RATE,
+ };
+ 
+-- 
+2.18.0
+