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

[Description]
a05cc330 [MAC80211][WiFi6][mt76][rebase patches]
4bd6fb05 [MAC80211][WiFi6][mt76][Support spatial reuse debug commands]
f59fb1fe [MAC80211][WiFi7][misc][Add wifi-scripts packages]
52ac14cd [MAC80211][WiFi6][hostapd][Fix DFS radar trigger issue during first setup CAC]
7e33638a [MAC80211][WiFi6][Rebase Patches][Fix patch fail on mt76-2024-02-04]
b81d400b [MAC80211][Rebase Patches][Add support for WMM PBC configuration]
6e1f46b8 [MAC80211][WiFi6][mt76][Add support for WMM PBC configuration]
4a12d531 [mac80211][wifi6][mt76][Remove revert patch and add sanity check]
46c5e65d [mac80211][wifi6][mt76][Fix tx statistics]
d9b7c50d [MAC80211][WiFi6][mt76][Fix patch fail]
c8c49a13 [MAC80211][WiFi6][mt76][Add no_beacon vendor command for cert]
620200d9 [MAC80211][WiFi6][mt76][Remove redundant argument in add_beacon function]
f5fe56a6 [MAC80211][WiFi6][hostapd][New support for single BSS operations]
ff6e20a8 [MAC80211][WiFi6][hostapd][ACS: remove chan/freq list check when scan request and factor calculation]
3f25a0e5 [MAC80211][WiFi6][mt76][Fix bug in VoW DebugFS command]
33cb7faf [MAC80211][WiFi6][core][Sync wifi7 cert SQC fix to wifi6]
3a1c492a [MAC80211][WiFi6][core][Add support for scan dwell time customization]
7e7a47e4 [mac80211][wifi6][mt76][Fix patch fail]
5fc4c9d6 [MAC80211][misc][Fix external build fail of MAC80211]
b5d42444 [mac80211][wifi6][mt76][add support for realtime Rx rate updates]
638298f6 [mac80211][WiFi7][misc][Fix patch fail]
5c710bc2 [MAC80211][WiFi6][mt76][Add efuse content dump for cal free data verification]

[Release-log]

Change-Id: Ia86a987807efb6f1ef119e2e46232ce08afca96e
diff --git a/recipes-wifi/linux-mt76/files/patches/1045-wifi-mt76-mt7915-support-scs-feature.patch b/recipes-wifi/linux-mt76/files/patches/1045-wifi-mt76-mt7915-support-scs-feature.patch
index 4cb13d3..550a3f3 100644
--- a/recipes-wifi/linux-mt76/files/patches/1045-wifi-mt76-mt7915-support-scs-feature.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1045-wifi-mt76-mt7915-support-scs-feature.patch
@@ -1,7 +1,7 @@
-From 775a9c8aa928a43fd4eaf8d252c5691dcce8fd08 Mon Sep 17 00:00:00 2001
+From fd47d976d0dc1c2bc11bfabcb6f7c7a6920a46be Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Wed, 6 Dec 2023 08:53:03 +0800
-Subject: [PATCH] wifi: mt76: mt7915: support scs feature
+Subject: [PATCH 1045/1048] wifi: mt76: mt7915: support scs feature
 
 Add support scs feature for connac2 codebase. This commit includes three
 parts.
@@ -24,15 +24,15 @@
  mt7915/main.c        |  13 +++++
  mt7915/mcu.c         | 118 +++++++++++++++++++++++++++++++++++++++++++
  mt7915/mcu.h         |   4 ++
- mt7915/mt7915.h      |  13 +++++
+ mt7915/mt7915.h      |  14 +++++
  mt7915/mtk_debugfs.c |  24 +++++++++
- 9 files changed, 187 insertions(+)
+ 9 files changed, 188 insertions(+)
 
 diff --git a/mt76.h b/mt76.h
-index 4704c50..c0fdbd6 100644
+index aed47c8..1aa266f 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -310,6 +310,7 @@ struct mt76_sta_stats {
+@@ -311,6 +311,7 @@ struct mt76_sta_stats {
  	u64 tx_nss[4];		/* 1, 2, 3, 4 */
  	u64 tx_mcs[16];		/* mcs idx */
  	u64 tx_bytes;
@@ -40,7 +40,7 @@
  	/* WED TX */
  	u32 tx_packets;		/* unit: MSDU */
  	u32 tx_retries;
-@@ -319,6 +320,7 @@ struct mt76_sta_stats {
+@@ -320,6 +321,7 @@ struct mt76_sta_stats {
  	u32 rx_packets;
  	u32 rx_errors;
  	u32 rx_drops;
@@ -49,10 +49,10 @@
  
  enum mt76_wcid_flags {
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index bf5ab81..48874d1 100644
+index 1265401..5be93f6 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -1222,6 +1222,7 @@ enum {
+@@ -1228,6 +1228,7 @@ enum {
  	MCU_EXT_CMD_SET_RDD_PATTERN = 0x7d,
  	MCU_EXT_CMD_MWDS_SUPPORT = 0x80,
  	MCU_EXT_CMD_SET_SER_TRIGGER = 0x81,
@@ -61,10 +61,10 @@
  	MCU_EXT_CMD_FW_DBG_CTRL = 0x95,
  	MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 53dea70..cab711c 100644
+index 247d552..1a41282 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -1244,6 +1244,7 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1243,6 +1243,7 @@ int mt7915_register_device(struct mt7915_dev *dev)
  	spin_lock_init(&dev->phy.stats_lock);
  	INIT_WORK(&dev->rc_work, mt7915_mac_sta_rc_work);
  	INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7915_mac_work);
@@ -73,10 +73,10 @@
  	INIT_LIST_HEAD(&dev->twt_list);
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index e5480ee..0e8c64e 100644
+index 1691e6d..db25b2f 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1503,6 +1503,8 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
+@@ -1502,6 +1502,8 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
  	if (ext_phy)
  		cancel_delayed_work_sync(&ext_phy->mac_work);
  
@@ -85,7 +85,7 @@
  	mutex_lock(&dev->mt76.mutex);
  	for (i = 0; i < 10; i++) {
  		if (!mt7915_mac_restart(dev))
-@@ -1528,6 +1530,10 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
+@@ -1527,6 +1529,10 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
  		ieee80211_queue_delayed_work(ext_phy->hw,
  					     &ext_phy->mac_work,
  					     MT7915_WATCHDOG_TIME);
@@ -96,7 +96,7 @@
  }
  
  /* system error recovery */
-@@ -1592,6 +1598,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1585,6 +1591,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
  		set_bit(MT76_RESET, &phy2->mt76->state);
  		cancel_delayed_work_sync(&phy2->mt76->mac_work);
  	}
@@ -104,7 +104,7 @@
  	mt76_worker_disable(&dev->mt76.tx_worker);
  	mt76_for_each_q_rx(&dev->mt76, i)
  		napi_disable(&dev->mt76.napi[i]);
-@@ -1653,6 +1660,10 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1649,6 +1656,10 @@ void mt7915_mac_reset_work(struct work_struct *work)
  					     &phy2->mt76->mac_work,
  					     MT7915_WATCHDOG_TIME);
  
@@ -116,10 +116,10 @@
  		 wiphy_name(dev->mt76.hw->wiphy));
  }
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 0318254..5be931b 100644
+index acb4f44..5316225 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -95,12 +95,24 @@ int mt7915_run(struct ieee80211_hw *hw)
+@@ -89,12 +89,24 @@ int mt7915_run(struct ieee80211_hw *hw)
  	if (ret)
  		goto out;
  
@@ -144,7 +144,7 @@
  	if (!running)
  		mt7915_mac_reset_counters(phy);
  
-@@ -141,6 +153,7 @@ static void mt7915_stop(struct ieee80211_hw *hw)
+@@ -135,6 +147,7 @@ static void mt7915_stop(struct ieee80211_hw *hw)
  	}
  
  	if (!mt7915_dev_running(dev)) {
@@ -153,10 +153,10 @@
  		mt7915_mcu_set_mac(dev, dev->phy.mt76->band_idx, false, false);
  	}
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2b41feb..38679d2 100644
+index 6cee6b6..5672e44 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -5043,3 +5043,121 @@ int mt7915_mcu_sw_aci_set(struct mt7915_dev *dev, bool val)
+@@ -5245,3 +5245,121 @@ int mt7915_mcu_sw_aci_set(struct mt7915_dev *dev, bool val)
  	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SWLNA_ACI_CTRL), &req,
  				 sizeof(req), NULL);
  }
@@ -279,10 +279,10 @@
 +		ieee80211_queue_delayed_work(mt76_hw(dev), &dev->scs_work, HZ);
 +}
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 6e6f320..723f23e 100644
+index 3089fb6..742a785 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -1188,4 +1188,8 @@ struct mt7915_mcu_edcca_info {
+@@ -1200,4 +1200,8 @@ struct mt7915_mcu_edcca_info {
  };
  #endif
  
@@ -292,10 +292,10 @@
 +};
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 47349b9..464eb3f 100644
+index 45e04af..05a3bd5 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -233,6 +233,15 @@ struct mt7915_air_monitor_ctrl {
+@@ -270,6 +270,15 @@ struct mt7915_air_monitor_ctrl {
  };
  #endif
  
@@ -311,7 +311,7 @@
  struct mt7915_phy {
  	struct mt76_phy *mt76;
  	struct mt7915_dev *dev;
-@@ -306,6 +315,7 @@ struct mt7915_phy {
+@@ -344,6 +353,7 @@ struct mt7915_phy {
  
  	struct mt7915_air_monitor_ctrl amnt_ctrl;
  #endif
@@ -319,15 +319,16 @@
  };
  
  struct mt7915_dev {
-@@ -424,6 +434,7 @@ struct mt7915_dev {
- 	} dbg;
+@@ -463,6 +473,8 @@ struct mt7915_dev {
  	const struct mt7915_dbg_reg_desc *dbg_reg;
  #endif
+ 
 +	struct delayed_work scs_work;
++
+ 	bool wmm_pbc_enable;
+ 	struct work_struct wmm_pbc_work;
  };
- 
- enum {
-@@ -746,6 +757,8 @@ int mt7915_mcu_sw_aci_set(struct mt7915_dev *dev, bool val);
+@@ -788,6 +800,8 @@ 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);
  int mt7915_mcu_enable_obss_spr(struct mt7915_phy *phy, u8 action, u8 val);
@@ -337,10 +338,10 @@
  #ifdef MTK_DEBUG
  int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir);
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 49fd6c5..d8e7589 100644
+index 3802de8..64e9d59 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -3676,6 +3676,29 @@ mt7915_sr_enable_set(void *data, u64 val)
+@@ -3797,6 +3797,29 @@ mt7915_sr_enable_set(void *data, u64 val)
  DEFINE_DEBUGFS_ATTRIBUTE(fops_sr_enable, NULL,
  			 mt7915_sr_enable_set, "%llx\n");
  
@@ -370,7 +371,7 @@
  int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
  {
  	struct mt7915_dev *dev = phy->dev;
-@@ -3768,6 +3791,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3889,6 +3912,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
  	debugfs_create_file("sw_aci", 0600, dir, dev,
  			    &fops_sw_aci);
  	debugfs_create_file("sr_enable", 0200, dir, phy, &fops_sr_enable);