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

[Description]
387b6ecf [MAC80211][WiFi6][core][Add exported function for SoftMAC driver to get QoS map]
4e3cb5c0 [MAC80211][Rebase Patch][Fix inconsistent QoS mapping between SW and HW]
03f284d9 [MAC80211][WiFi6][mt76][Fix inconsistent QoS mapping between SW and HW]
cdd2ea74 [MAC80211][WiFi6][mt76][Fix rcu stall issue in testmode]
8f684af1 [MAC80211][Release][Add commit revision for Filogic 880/860 release]
bf9808d3 [MAC80211][WiFi6][mt76][Refactor add dummy HW offload of IEEE 802.11 fragmentation]
00b8ee9c [MAC80211][misc][Update Release Information v2]
efcc36f2 [MAC80211][misc][Update Release Information]
8249196d [MAC80211][WiFi7][misc][Add UCI radio disabled for testmode]

[Release-log]

Change-Id: I0e39f84703dc98e6f25cf7d59e98729d33cc6f12
diff --git a/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch b/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch
new file mode 100644
index 0000000..d4d3d2e
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch
@@ -0,0 +1,103 @@
+From 9c6e5082d5552ac2cefe5b4857da4b29b0c76685 Mon Sep 17 00:00:00 2001
+From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
+Date: Thu, 25 Apr 2024 17:17:13 +0800
+Subject: [PATCH] wifi: mt76: mt7915: fix inconsistent QoS mapping between SW
+ and HW
+
+The mapping from IP DSCP to IEEE 802.11 user priority may be customized.
+Therefore, driver needs to pass the mapping to HW, so that the QoS type of traffic can be mapped in a consistent manner for both SW and HW paths.
+
+Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
+---
+ mt76_connac_mcu.h |  1 +
+ mt7915/main.c     |  3 +++
+ mt7915/mcu.c      | 37 +++++++++++++++++++++++++++++++++++++
+ mt7915/mt7915.h   |  1 +
+ 4 files changed, 42 insertions(+)
+
+diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
+index 1dd8244..0936c1c 100644
+--- a/mt76_connac_mcu.h
++++ b/mt76_connac_mcu.h
+@@ -1236,6 +1236,7 @@ enum {
+ 	MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
+ 	MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
+ 	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
++	MCU_EXT_CMD_SET_QOS_MAP = 0xb4,
+ };
+ 
+ enum {
+diff --git a/mt7915/main.c b/mt7915/main.c
+index 5ed84bc..26f9a5a 100644
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -646,6 +646,9 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
+ 		}
+ 	}
+ 
++	if (changed & BSS_CHANGED_QOS)
++		mt7915_mcu_set_qos_map(dev, vif);
++
+ 	/* ensure that enable txcmd_mode after bss_info */
+ 	if (changed & (BSS_CHANGED_QOS | BSS_CHANGED_BEACON_ENABLED))
+ 		mt7915_mcu_set_tx(dev, vif);
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 446c512..3d7fc6d 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -4212,3 +4212,40 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
+ 
+ 	return 0;
+ }
++
++int mt7915_mcu_set_qos_map(struct mt7915_dev *dev, struct ieee80211_vif *vif)
++{
++#define IP_DSCP_NUM	64
++	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
++	struct {
++		u8 bss_idx;
++		u8 qos_map_enable;
++		u8 __rsv[2];
++		s8 qos_map[IP_DSCP_NUM];
++	} __packed req = {
++		.bss_idx = mvif->mt76.idx,
++		.qos_map_enable = false,
++	};
++	struct cfg80211_qos_map *qos_map;
++
++	rcu_read_lock();
++	qos_map = ieee80211_get_qos_map(vif);
++	if (qos_map) {
++		struct cfg80211_dscp_range *dscp_range = qos_map->up;
++		s8 up;
++
++		req.qos_map_enable = true;
++		for (up = 0; up < IEEE80211_NUM_UPS; ++up) {
++			u8 low = dscp_range[up].low, high = dscp_range[up].high;
++
++			if (low >= IP_DSCP_NUM || high >= IP_DSCP_NUM || low > high)
++				continue;
++
++			memset(req.qos_map + low, up, high - low + 1);
++		}
++	}
++	rcu_read_unlock();
++
++	return mt76_mcu_send_msg(&dev->mt76, MCU_WA_EXT_CMD(SET_QOS_MAP), &req,
++				 sizeof(req), true);
++}
+diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
+index 74cd8ca..66d87d7 100644
+--- a/mt7915/mt7915.h
++++ b/mt7915/mt7915.h
+@@ -521,6 +521,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
+ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
+ void mt7915_mcu_exit(struct mt7915_dev *dev);
+ void mt7915_mcu_wmm_pbc_work(struct work_struct *work);
++int mt7915_mcu_set_qos_map(struct mt7915_dev *dev, struct ieee80211_vif *vif);
+ 
+ static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
+ {
+-- 
+2.18.0
+