mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
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
|
|
|