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

[Description]
5b228d80 [MAC80211][WiFi6][mt76][Fix NULL pointer access when setting QoS map]
7d86a237 [MAC80211][WiFi6][mt76][Fix merlin 5g can't receive rx data at two pcie mode]
0ffd8c9d [MAC80211][WiFi6][mt76][Fix runtime change security mode to open issue]
e20ea87d [MAC80211][misc][Separate MT7992 & MT7996 firmware to reduce image size]
0d70c868 [MAC80211][WiFi6][hostapd][Fix failure of BSS-wise QoS-map setting]
ccf5e237 [MAC80211][Rebase Patch][Change QoS-map setting method to callback function]
81505830 [MAC80211][WiFi6][mt76][Change QoS-map setting method to callback function]
53322d00 [MAC80211][Rebase Patch][Add callback function to set QoS map in HW]
c36b2f81 [MAC80211][WiFi6][core][Add callback function to set QoS map in HW]
c544feaf [MAC80211][WiFi7][Misc][Fix build fail because of wifi-scripts package and iw version]
b471f43a [MAC80211][WiFi7][app][convert mwtcl cmd to mt76 internal debug cmd]
dbd53909 [MAC80211][WiFi6][Misc][Fix Cheetah build fail]
8e6f43e2 [MAC80211][WiFi7][misc][use repo to maintain wifi-scripts]
e497c9f7 [MAC80211][WiFi7][misc][Fix legacy non-EHT bss + MLD issue]
56c2223c [MAC80211][WiFi7][app][convert iwpriv/mwctl command with link_id]
8d1960db [MAC80211][WiFi7][misc][Fix wrong path for per-radio antenna config patch]
c587263f [MAC80211][WiFi7][misc][Add per-radio antenna config support]

[Release-log]

Change-Id: I4b068cc1b5717c4927daaeaac04dca6642454c97
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-callback-function-to-set-QoS-map-in.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-callback-function-to-set-QoS-map-in.patch
new file mode 100644
index 0000000..8dd492d
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-callback-function-to-set-QoS-map-in.patch
@@ -0,0 +1,95 @@
+From 843e2b25433dc6c3cbc2ff4a754bef091cabe54b Mon Sep 17 00:00:00 2001
+From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
+Date: Mon, 24 Jun 2024 17:50:08 +0800
+Subject: [PATCH] mac80211: mtk: add callback function to set QoS map in HW
+
+The mapping from IP DSCP to IEEE 802.11 user priority may be customized.
+Therefore, the mapping needs to be passed 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>
+---
+ include/net/mac80211.h    |  3 +++
+ net/mac80211/cfg.c        |  2 +-
+ net/mac80211/driver-ops.h | 16 ++++++++++++++++
+ net/mac80211/trace.h      |  6 ++++++
+ 4 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index 5c26752..b622c76 100644
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -3982,6 +3982,7 @@ struct ieee80211_prep_tx_info {
+  *	disable background CAC/radar detection.
+  * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
+  *	resolve a path for hardware flow offloading
++ * @set_qos_map: Set QoS mapping information to driver.
+  */
+ struct ieee80211_ops {
+ 	void (*tx)(struct ieee80211_hw *hw,
+@@ -4321,6 +4322,8 @@ struct ieee80211_ops {
+ 				     struct net_device_path_ctx *ctx,
+ 				     struct net_device_path *path);
+ #endif
++	int (*set_qos_map)(struct ieee80211_vif *vif,
++			   struct cfg80211_qos_map *qos_map);
+ };
+ 
+ /**
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
+index ffb60a2..80fba54 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4040,7 +4040,7 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy,
+ 	if (old_qos_map)
+ 		kfree_rcu(old_qos_map, rcu_head);
+ 
+-	return 0;
++	return drv_set_qos_map(sdata->local, sdata, qos_map);
+ }
+ 
+ static int ieee80211_set_ap_chanwidth(struct wiphy *wiphy,
+diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
+index 9e8003f..d4723dc 100644
+--- a/net/mac80211/driver-ops.h
++++ b/net/mac80211/driver-ops.h
+@@ -1525,4 +1525,20 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
+ }
+ #endif
+ 
++static inline int drv_set_qos_map(struct ieee80211_local *local,
++				  struct ieee80211_sub_if_data *sdata,
++				  struct cfg80211_qos_map *qos_map)
++{
++	int ret = -EOPNOTSUPP;
++
++	might_sleep();
++
++	trace_drv_set_qos_map(local, sdata);
++	if (local->ops->set_qos_map)
++		ret = local->ops->set_qos_map(&sdata->vif, qos_map);
++	trace_drv_return_int(local, ret);
++
++	return ret;
++}
++
+ #endif /* __MAC80211_DRIVER_OPS */
+diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
+index d15dadd..c6fc75e 100644
+--- a/net/mac80211/trace.h
++++ b/net/mac80211/trace.h
+@@ -2929,6 +2929,12 @@ TRACE_EVENT(bss_color_bitmap,
+ 	)
+ );
+ 
++DEFINE_EVENT(local_sdata_evt, drv_set_qos_map,
++	TP_PROTO(struct ieee80211_local *local,
++		 struct ieee80211_sub_if_data *sdata),
++	TP_ARGS(local, sdata)
++);
++
+ #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
+ 
+ #undef TRACE_INCLUDE_PATH
+-- 
+2.18.0
+
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-exported-function-for-SoftMAC-drive.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-exported-function-for-SoftMAC-drive.patch
deleted file mode 100644
index a26fc33..0000000
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0031-mac80211-mtk-add-exported-function-for-SoftMAC-drive.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From ac1e8443a250f418b6124e7b4f4ea65a03c4d02b Mon Sep 17 00:00:00 2001
-From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
-Date: Fri, 26 Apr 2024 09:29:39 +0800
-Subject: [PATCH] mac80211: mtk: add exported function for SoftMAC driver to
- get QoS map
-
-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>
----
- include/net/mac80211.h | 12 ++++++++++++
- net/mac80211/util.c    | 10 +++++++++-
- 2 files changed, 21 insertions(+), 1 deletion(-)
-
-diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 5c26752..420963f 100644
---- a/include/net/mac80211.h
-+++ b/include/net/mac80211.h
-@@ -6942,4 +6942,16 @@ static inline bool ieee80211_is_tx_data(struct sk_buff *skb)
-  * @hw: pointer as obtained from ieee80211_alloc_hw()
-  */
- unsigned long ieee80211_get_scanning(struct ieee80211_hw *hw);
-+
-+/**
-+ * ieee80211_get_qos_map - get QoS mapping information.
-+ *
-+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
-+ *
-+ * Return: Pointer to the QoS mapping information.
-+ *
-+ * Note that the return value is an RCU-protected pointer, so rcu_read_lock()
-+ * must be held when calling this function.
-+ */
-+struct cfg80211_qos_map *ieee80211_get_qos_map(struct ieee80211_vif *vif);
- #endif /* MAC80211_H */
-diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index e07fe73..865c4ac 100644
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -4643,4 +4643,12 @@ unsigned long ieee80211_get_scanning(struct ieee80211_hw *hw)
- 
- 	return local->scanning;
- }
--EXPORT_SYMBOL(ieee80211_get_scanning);
-\ No newline at end of file
-+EXPORT_SYMBOL(ieee80211_get_scanning);
-+
-+struct cfg80211_qos_map *ieee80211_get_qos_map(struct ieee80211_vif *vif)
-+{
-+	struct mac80211_qos_map *qos_map = rcu_dereference(vif_to_sdata(vif)->qos_map);
-+
-+	return qos_map ? &qos_map->qos_map : NULL;
-+}
-+EXPORT_SYMBOL(ieee80211_get_qos_map);
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
index e6288ed..fd446aa 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch
@@ -1,7 +1,7 @@
-From bad36168042569eb4c7ab6a549f7444a40e299c3 Mon Sep 17 00:00:00 2001
+From 026c9872e3460f1632b60324e062016887b31134 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Fri, 11 Mar 2022 11:34:11 +0800
-Subject: [PATCH 9900/9903] mac80211: mtk: mask kernel version limitation and
+Subject: [PATCH 9900/9902] mac80211: mtk: mask kernel version limitation and
  fill forward path in kernel 5.4
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -13,10 +13,10 @@
  4 files changed, 10 deletions(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 91affd5..42192cd 100644
+index b622c76..c6625c2 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -4307,13 +4307,11 @@ struct ieee80211_ops {
+@@ -4315,13 +4315,11 @@ struct ieee80211_ops {
  				     struct ieee80211_sta *sta, u8 flowid);
  	int (*set_radar_background)(struct ieee80211_hw *hw,
  				    struct cfg80211_chan_def *chandef);
@@ -27,11 +27,11 @@
  				     struct net_device_path_ctx *ctx,
  				     struct net_device_path *path);
 -#endif
+ 	int (*set_qos_map)(struct ieee80211_vif *vif,
+ 			   struct cfg80211_qos_map *qos_map);
  };
- 
- /**
 diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
-index 9e8003f..19e2ada 100644
+index d4723dc..91ea8b2 100644
 --- a/net/mac80211/driver-ops.h
 +++ b/net/mac80211/driver-ops.h
 @@ -1501,7 +1501,6 @@ static inline void drv_twt_teardown_request(struct ieee80211_local *local,
@@ -42,18 +42,19 @@
  static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
  					    struct ieee80211_sub_if_data *sdata,
  					    struct ieee80211_sta *sta,
-@@ -1523,6 +1522,5 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
+@@ -1523,7 +1522,6 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
  
  	return ret;
  }
 -#endif
  
- #endif /* __MAC80211_DRIVER_OPS */
+ static inline int drv_set_qos_map(struct ieee80211_local *local,
+ 				  struct ieee80211_sub_if_data *sdata,
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index 00b0443..a7169a5 100644
+index 138ad79..4b92867 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -853,7 +853,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
+@@ -875,7 +875,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
  
  };
  
@@ -61,7 +62,7 @@
  static int ieee80211_netdev_fill_forward_path(struct net_device_path_ctx *ctx,
  					      struct net_device_path *path)
  {
-@@ -911,7 +910,6 @@ out:
+@@ -933,7 +932,6 @@ out:
  
  	return ret;
  }
@@ -69,7 +70,7 @@
  
  static const struct net_device_ops ieee80211_dataif_8023_ops = {
  #if LINUX_VERSION_IS_LESS(4,10,0)
-@@ -930,9 +928,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
+@@ -952,9 +950,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
  #else
  	.ndo_get_stats64 = bp_ieee80211_get_stats64,
  #endif
@@ -80,7 +81,7 @@
  
  static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
 diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
-index d15dadd..8770033 100644
+index c6fc75e..6b7b46b 100644
 --- a/net/mac80211/trace.h
 +++ b/net/mac80211/trace.h
 @@ -2899,14 +2899,12 @@ TRACE_EVENT(drv_twt_teardown_request,
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
index 75abcb8..a87a9ea 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch
@@ -1,23 +1,23 @@
-From 0161154c18a464bbb350bcb5ef620bd255940640 Mon Sep 17 00:00:00 2001
+From e5612cde83ef67f8fa4633f7d364e05bac6e02a3 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Wed, 18 May 2022 15:10:22 +0800
-Subject: [PATCH 9901/9903] mac80211: mtk: add fill receive path ops to get wed
+Subject: [PATCH 9901/9902] mac80211: mtk: add fill receive path ops to get wed
  idx
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
  include/net/mac80211.h    | 12 ++++++++++++
- net/mac80211/driver-ops.h | 13 +++++++++++++
+ net/mac80211/driver-ops.h | 14 +++++++++++++-
  net/mac80211/iface.c      | 24 ++++++++++++++++++++++++
  net/mac80211/util.c       |  9 +++++++++
- 4 files changed, 58 insertions(+)
+ 4 files changed, 58 insertions(+), 1 deletion(-)
  mode change 100644 => 100755 include/net/mac80211.h
  mode change 100644 => 100755 net/mac80211/util.c
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
 old mode 100644
 new mode 100755
-index 42192cd..8a71026
+index c6625c2..cb8b28d
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
 @@ -1798,6 +1798,13 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
@@ -34,30 +34,30 @@
  /**
   * enum ieee80211_key_flags - key flags
   *
-@@ -3975,6 +3982,8 @@ struct ieee80211_prep_tx_info {
+@@ -3982,6 +3989,8 @@ struct ieee80211_prep_tx_info {
   *	disable background CAC/radar detection.
   * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
   *	resolve a path for hardware flow offloading
 + * @net_fill_receive_path: Called from .ndo_fill_receive_path in order to
 + *	get a path for hardware flow offloading
+  * @set_qos_map: Set QoS mapping information to driver.
   */
  struct ieee80211_ops {
- 	void (*tx)(struct ieee80211_hw *hw,
-@@ -4312,6 +4321,9 @@ struct ieee80211_ops {
+@@ -4320,6 +4329,9 @@ struct ieee80211_ops {
  				     struct ieee80211_sta *sta,
  				     struct net_device_path_ctx *ctx,
  				     struct net_device_path *path);
 +	int (*net_fill_receive_path)(struct ieee80211_hw *hw,
 +				     struct net_device_path_ctx *ctx,
 +				     struct net_device_path *path);
+ 	int (*set_qos_map)(struct ieee80211_vif *vif,
+ 			   struct cfg80211_qos_map *qos_map);
  };
- 
- /**
 diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
-index 19e2ada..88dedfc 100644
+index 91ea8b2..348f815 100644
 --- a/net/mac80211/driver-ops.h
 +++ b/net/mac80211/driver-ops.h
-@@ -1523,4 +1523,17 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
+@@ -1523,6 +1523,19 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
  	return ret;
  }
  
@@ -74,12 +74,20 @@
 +	return ret;
 +}
 +
+ static inline int drv_set_qos_map(struct ieee80211_local *local,
+ 				  struct ieee80211_sub_if_data *sdata,
+ 				  struct cfg80211_qos_map *qos_map)
+@@ -1538,5 +1551,4 @@ static inline int drv_set_qos_map(struct ieee80211_local *local,
+ 
+ 	return ret;
+ }
+-
  #endif /* __MAC80211_DRIVER_OPS */
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index a7169a5..8a4f4e1 100644
+index 4b92867..c08bfbe 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -911,6 +911,29 @@ out:
+@@ -933,6 +933,29 @@ out:
  	return ret;
  }
  
@@ -109,7 +117,7 @@
  static const struct net_device_ops ieee80211_dataif_8023_ops = {
  #if LINUX_VERSION_IS_LESS(4,10,0)
  	.ndo_change_mtu = __change_mtu,
-@@ -929,6 +952,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
+@@ -951,6 +974,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
  	.ndo_get_stats64 = bp_ieee80211_get_stats64,
  #endif
  	.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
@@ -120,7 +128,7 @@
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
 old mode 100644
 new mode 100755
-index 8d36b05..d26a2b8
+index e07fe73..809eb37
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
 @@ -898,6 +898,15 @@ struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch
index 414693e..ea8fde2 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch
@@ -1,7 +1,7 @@
-From fdc7f27785b716eae1e02df73c095ecfe2677d9f Mon Sep 17 00:00:00 2001
+From d62db23d46d1887aff58c76b0eb9960a46afb9bf Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 28 Mar 2023 10:53:31 +0800
-Subject: [PATCH 9902/9903] mac80211: mtk: add support for letting drivers
+Subject: [PATCH 9902/9902] mac80211: mtk: add support for letting drivers
  register tc offload support
 
 On newer MediaTek SoCs (e.g. MT7986), WLAN->WLAN or WLAN->Ethernet flows can
@@ -18,10 +18,10 @@
  5 files changed, 70 insertions(+), 1 deletion(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 8a71026..861bc9a 100755
+index cb8b28d..6104072 100755
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -3984,6 +3984,10 @@ struct ieee80211_prep_tx_info {
+@@ -3991,6 +3991,10 @@ struct ieee80211_prep_tx_info {
   *	resolve a path for hardware flow offloading
   * @net_fill_receive_path: Called from .ndo_fill_receive_path in order to
   *	get a path for hardware flow offloading
@@ -29,10 +29,10 @@
 + *	flow offloading for flows originating from the vif.
 + *	Note that the driver must not assume that the vif driver_data is valid
 + *	at this point, since the callback can be called during netdev teardown.
+  * @set_qos_map: Set QoS mapping information to driver.
   */
  struct ieee80211_ops {
- 	void (*tx)(struct ieee80211_hw *hw,
-@@ -4324,6 +4328,11 @@ struct ieee80211_ops {
+@@ -4332,6 +4336,11 @@ struct ieee80211_ops {
  	int (*net_fill_receive_path)(struct ieee80211_hw *hw,
  				     struct net_device_path_ctx *ctx,
  				     struct net_device_path *path);
@@ -41,14 +41,14 @@
 +			    struct net_device *dev,
 +			    enum tc_setup_type type,
 +			    void *type_data);
+ 	int (*set_qos_map)(struct ieee80211_vif *vif,
+ 			   struct cfg80211_qos_map *qos_map);
  };
- 
- /**
 diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
-index 88dedfc..3ceba5e 100644
+index 348f815..f56a71f 100644
 --- a/net/mac80211/driver-ops.h
 +++ b/net/mac80211/driver-ops.h
-@@ -1536,4 +1536,21 @@ static inline int drv_net_fill_receive_path(struct ieee80211_local *local,
+@@ -1536,6 +1536,23 @@ static inline int drv_net_fill_receive_path(struct ieee80211_local *local,
  	return ret;
  }
  
@@ -69,12 +69,14 @@
 +	return ret;
 +}
 +
- #endif /* __MAC80211_DRIVER_OPS */
+ static inline int drv_set_qos_map(struct ieee80211_local *local,
+ 				  struct ieee80211_sub_if_data *sdata,
+ 				  struct cfg80211_qos_map *qos_map)
 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 2519c14..fe7a03a 100644
+index bb5906d..b02ca21 100644
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1822,7 +1822,8 @@ void ieee80211_color_aging_work(struct work_struct *work);
+@@ -1824,7 +1824,8 @@ void ieee80211_color_aging_work(struct work_struct *work);
  /* interface handling */
  #define MAC80211_SUPPORTED_FEATURES_TX	(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
  					 NETIF_F_HW_CSUM | NETIF_F_SG | \
@@ -85,10 +87,10 @@
  #define MAC80211_SUPPORTED_FEATURES	(MAC80211_SUPPORTED_FEATURES_TX | \
  					 MAC80211_SUPPORTED_FEATURES_RX)
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index 8a4f4e1..f3bf837 100644
+index c08bfbe..ddeaa8f 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -773,6 +773,21 @@ static int __change_mtu(struct net_device *ndev, int new_mtu){
+@@ -795,6 +795,21 @@ static int __change_mtu(struct net_device *ndev, int new_mtu){
  }
  #endif
  
@@ -110,7 +112,7 @@
  static const struct net_device_ops ieee80211_dataif_ops = {
  #if LINUX_VERSION_IS_LESS(4,10,0)
  	.ndo_change_mtu = __change_mtu,
-@@ -790,6 +805,7 @@ static const struct net_device_ops ieee80211_dataif_ops = {
+@@ -812,6 +827,7 @@ static const struct net_device_ops ieee80211_dataif_ops = {
  #else
  	.ndo_get_stats64 = bp_ieee80211_get_stats64,
  #endif
@@ -118,7 +120,7 @@
  
  };
  
-@@ -953,6 +969,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
+@@ -975,6 +991,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
  #endif
  	.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
  	.ndo_fill_receive_path = ieee80211_netdev_fill_receive_path,
@@ -127,7 +129,7 @@
  
  static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
 diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
-index 8770033..78d9803 100644
+index 6b7b46b..5aea24a 100644
 --- a/net/mac80211/trace.h
 +++ b/net/mac80211/trace.h
 @@ -2906,6 +2906,31 @@ DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
index 54c4208..71e0e62 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
@@ -88,7 +88,7 @@
     file://mtk-0028-mac80211-mtk-backport-refactor-STA-CSA-paring-flow.patch \
     file://mtk-0029-mac80211-mtk-send-4-addr-nullfunc-after-drv_event_ca.patch \
     file://mtk-0030-mac80211-mtk-fix-incorrect-VIF-assignment-for-IEEE-8.patch \
-    file://mtk-0031-mac80211-mtk-add-exported-function-for-SoftMAC-drive.patch \
+    file://mtk-0031-mac80211-mtk-add-callback-function-to-set-QoS-map-in.patch \
     file://mtk-0032-mac80211-mtk-fix-inconsistent-QoS-mapping-between-AP.patch \
     file://mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fill.patch \
     file://mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch \