[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/1029-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch b/recipes-wifi/linux-mt76/files/patches/1029-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
new file mode 100644
index 0000000..f3036b6
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/1029-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
@@ -0,0 +1,104 @@
+From 278b557efab9c0a0144218f0a138eed5d7a21acc Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu@mediatek.com>
+Date: Fri, 24 Feb 2023 16:29:42 +0800
+Subject: [PATCH 1029/1034] wifi: mt76: mt7915: disable SW-ACI by default
+
+Support to enable/disable SW-ACI by module parameter "sw_aci_enable".
+SW-ACI feature is disable by default.
+---
+ mt7915/main.c        |  8 ++++++++
+ mt7915/mcu.c         | 15 +++++++++++++++
+ mt7915/mt7915.h      |  1 +
+ mt7915/mtk_debugfs.c | 14 +++++---------
+ 4 files changed, 29 insertions(+), 9 deletions(-)
+
+diff --git a/mt7915/main.c b/mt7915/main.c
+index 4833f64..1640c4b 100644
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -8,6 +8,10 @@
+ #include "mt7915.h"
+ #include "mcu.h"
+ 
++static bool sw_aci_enable = false;
++module_param(sw_aci_enable, bool, 0644);
++MODULE_PARM_DESC(sw_aci_enable, "Enable the feature of Adjacent Channel Interference Detection");
++
+ static bool mt7915_dev_running(struct mt7915_dev *dev)
+ {
+ 	struct mt7915_phy *phy;
+@@ -41,6 +45,10 @@ int mt7915_run(struct ieee80211_hw *hw)
+ 			goto out;
+ 
+ 		mt7915_mac_enable_nf(dev, dev->phy.mt76->band_idx);
++
++		ret = mt7915_mcu_sw_aci_set(dev, sw_aci_enable);
++		if (ret)
++			goto out;
+ 	}
+ 
+ 	if (phy != &dev->phy) {
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 15915c9..a542031 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -4963,3 +4963,18 @@ int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value)
+ 
+ 	return 0;
+ }
++
++int mt7915_mcu_sw_aci_set(struct mt7915_dev *dev, bool val)
++{
++#define SWLNA_ENABLE 6
++	struct {
++		u32 subcmd;
++		u8 enable;
++	} req = {
++		.subcmd = SWLNA_ENABLE,
++		.enable = val ? 1 : 0,
++	};
++
++	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SWLNA_ACI_CTRL), &req,
++				 sizeof(req), NULL);
++}
+diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
+index dc38b30..4ba57c6 100644
+--- a/mt7915/mt7915.h
++++ b/mt7915/mt7915.h
+@@ -720,6 +720,7 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
+ #endif
+ int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value, s8 compensation);
+ int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value);
++int mt7915_mcu_sw_aci_set(struct mt7915_dev *dev, bool val);
+ int mt7915_mcu_ipi_hist_ctrl(struct mt7915_phy *phy, void *data, u8 cmd, bool wait_resp);
+ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool wait_resp);
+ 
+diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
+index 9a42149..97eb072 100644
+--- a/mt7915/mtk_debugfs.c
++++ b/mt7915/mtk_debugfs.c
+@@ -3647,16 +3647,12 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
+ static int
+ mt7915_sw_aci_set(void *data, u64 val)
+ {
+-#define SWLNA_ENABLE 6
+ 	struct mt7915_dev *dev = data;
+-	struct {
+-		u32 subcmd;
+-		u8 enable;
+-	} req = {
+-		.subcmd = SWLNA_ENABLE,
+-		.enable = (u8) val,
+-	};
+-	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SWLNA_ACI_CTRL), &req, sizeof(req), NULL);
++
++	if (val > 1)
++		return -EINVAL;
++
++	return mt7915_mcu_sw_aci_set(dev, !!val);
+ }
+ 
+ 
+-- 
+2.18.0
+