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

[Description]
8719319c [MAC80211][hostapd][Fix wpa_supplicant configuration parsing error]
0ef5b371 [MAC80211][Rebase Patches][Fix WiFi6 build error]
4f47e260 [MAC80211][core][Fix kernel warning of cfg80211_bss_color_notify]
4b3f08e9 [MAC80211][Rebase Patches][Fix WiFi6 build error]
9d44e5de [MAC80211][mt76][Fix tlv length of mt7915_mcu_get_chan_mib_info]
b63d160d [MAC80211][misc][Remove duplicate group cipher setting in wpa_supplicant]
7a5de8c1 [MAC80211][mt76][Refactor txpower table dump and fix change channel not update]
a0e1acfa [MAC80211][app][Add atenl eeprom ibf cal sync command]
af3af140 [mac80211][mt76][Set station mode TXOP to 0]
9740ca99 [MAC80211][led][report tx and rx byte to tpt_led]
793674de [MAC80211][misc][Rebase hostapd patches]
25a39b5e [MAC80211][hostapd][Fix extender mode issues]
da19c3b2 [MAC80211][mt76][Add Eagle default bin for sku 404]
476c7e8d [MAC80211][mt76][Add mt7996_eeprom_dual_404.bin to mt76 makefile]
beeb6f42 [MT76][hostapd][add extension IE list for non-inherit IE]
5ef327e8 [MAC80211][Core][Enable RNR in 2.4G/5G by default]
10f3f90e [MAC80211][misc][Fix uci not set group cipher]
aa3efcbb [MAC80211][hostapd][Update MU EDCA Parameter update count]
d698fe08 [MAC80211][hnat][Add UL/DL HQoS support]
95f59a1a [MAC80211][misc][Add mediatek external reference release information]
e9c4b56d [mac80211][Rebase Patches][mt76 build fail]

[Release-log]

Change-Id: I2c9d4deafa9d865f40af64d75b9e56da74a88b11
diff --git a/recipes-wifi/linux-mt76/files/patches/1033-wifi-mt76-mt7915-add-txpower-info-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1033-wifi-mt76-mt7915-add-txpower-info-dump-support.patch
new file mode 100644
index 0000000..92c5528
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/1033-wifi-mt76-mt7915-add-txpower-info-dump-support.patch
@@ -0,0 +1,147 @@
+From 338c73d96368002a889639c9b4d8af8ce5248dfe 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 1033/1034] 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 ae291a3..2bf907c 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)
+ {
+@@ -1347,6 +1432,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 a542031..d2e3e82 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -3473,6 +3473,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 583caca..6e6f320 100644
+--- a/mt7915/mcu.h
++++ b/mt7915/mcu.h
+@@ -510,7 +510,8 @@ enum {
+ };
+ 
+ enum {
+-	TX_POWER_INFO_PATH = 1,
++	TX_POWER_INFO_BASIC,
++	TX_POWER_INFO_PATH,
+ 	TX_POWER_INFO_RATE,
+ };
+ 
+-- 
+2.18.0
+