blob: e6288ed932fe13bd8ff04e3697c43529d7da623a [file] [log] [blame]
developerf9b00212023-07-31 12:27:06 +08001From bad36168042569eb4c7ab6a549f7444a40e299c3 Mon Sep 17 00:00:00 2001
developerf79ad452022-07-12 11:37:54 +08002From: Sujuan Chen <sujuan.chen@mediatek.com>
3Date: Fri, 11 Mar 2022 11:34:11 +0800
developerf9b00212023-07-31 12:27:06 +08004Subject: [PATCH 9900/9903] mac80211: mtk: mask kernel version limitation and
developer3609d782022-11-29 18:07:22 +08005 fill forward path in kernel 5.4
developerf79ad452022-07-12 11:37:54 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
9 include/net/mac80211.h | 2 --
10 net/mac80211/driver-ops.h | 2 --
11 net/mac80211/iface.c | 4 ----
12 net/mac80211/trace.h | 2 --
13 4 files changed, 10 deletions(-)
14
15diff --git a/include/net/mac80211.h b/include/net/mac80211.h
developerf9b00212023-07-31 12:27:06 +080016index 91affd5..42192cd 100644
developerf79ad452022-07-12 11:37:54 +080017--- a/include/net/mac80211.h
18+++ b/include/net/mac80211.h
developer8effbd32023-04-17 15:57:28 +080019@@ -4307,13 +4307,11 @@ struct ieee80211_ops {
developerf79ad452022-07-12 11:37:54 +080020 struct ieee80211_sta *sta, u8 flowid);
21 int (*set_radar_background)(struct ieee80211_hw *hw,
22 struct cfg80211_chan_def *chandef);
23-#if LINUX_VERSION_IS_GEQ(5,10,0)
24 int (*net_fill_forward_path)(struct ieee80211_hw *hw,
25 struct ieee80211_vif *vif,
26 struct ieee80211_sta *sta,
27 struct net_device_path_ctx *ctx,
28 struct net_device_path *path);
29-#endif
30 };
31
32 /**
33diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
developer8effbd32023-04-17 15:57:28 +080034index 9e8003f..19e2ada 100644
developerf79ad452022-07-12 11:37:54 +080035--- a/net/mac80211/driver-ops.h
36+++ b/net/mac80211/driver-ops.h
developer8effbd32023-04-17 15:57:28 +080037@@ -1501,7 +1501,6 @@ static inline void drv_twt_teardown_request(struct ieee80211_local *local,
developerf79ad452022-07-12 11:37:54 +080038 trace_drv_return_void(local);
39 }
40
41-#if LINUX_VERSION_IS_GEQ(5,10,0)
42 static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
43 struct ieee80211_sub_if_data *sdata,
44 struct ieee80211_sta *sta,
developer8effbd32023-04-17 15:57:28 +080045@@ -1523,6 +1522,5 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
developerf79ad452022-07-12 11:37:54 +080046
47 return ret;
48 }
49-#endif
50
51 #endif /* __MAC80211_DRIVER_OPS */
52diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
developer8effbd32023-04-17 15:57:28 +080053index 00b0443..a7169a5 100644
developerf79ad452022-07-12 11:37:54 +080054--- a/net/mac80211/iface.c
55+++ b/net/mac80211/iface.c
developer8effbd32023-04-17 15:57:28 +080056@@ -853,7 +853,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
developerf79ad452022-07-12 11:37:54 +080057
58 };
59
60-#if LINUX_VERSION_IS_GEQ(5,10,0)
61 static int ieee80211_netdev_fill_forward_path(struct net_device_path_ctx *ctx,
62 struct net_device_path *path)
63 {
developer8effbd32023-04-17 15:57:28 +080064@@ -911,7 +910,6 @@ out:
developerf79ad452022-07-12 11:37:54 +080065
66 return ret;
67 }
68-#endif
69
70 static const struct net_device_ops ieee80211_dataif_8023_ops = {
71 #if LINUX_VERSION_IS_LESS(4,10,0)
developer8effbd32023-04-17 15:57:28 +080072@@ -930,9 +928,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
developerf79ad452022-07-12 11:37:54 +080073 #else
74 .ndo_get_stats64 = bp_ieee80211_get_stats64,
75 #endif
76-#if LINUX_VERSION_IS_GEQ(5,10,0)
77 .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
78-#endif
79 };
80
81 static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
82diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
developer8effbd32023-04-17 15:57:28 +080083index d15dadd..8770033 100644
developerf79ad452022-07-12 11:37:54 +080084--- a/net/mac80211/trace.h
85+++ b/net/mac80211/trace.h
developer8effbd32023-04-17 15:57:28 +080086@@ -2899,14 +2899,12 @@ TRACE_EVENT(drv_twt_teardown_request,
developerf79ad452022-07-12 11:37:54 +080087 )
88 );
89
90-#if LINUX_VERSION_IS_GEQ(5,10,0)
91 DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
92 TP_PROTO(struct ieee80211_local *local,
93 struct ieee80211_sub_if_data *sdata,
94 struct ieee80211_sta *sta),
95 TP_ARGS(local, sdata, sta)
96 );
97-#endif
98
developer8effbd32023-04-17 15:57:28 +080099 TRACE_EVENT(bss_color_bitmap,
100 TP_PROTO(u8 color,
developerf79ad452022-07-12 11:37:54 +0800101--
developer8effbd32023-04-17 15:57:28 +08001022.18.0
developerf79ad452022-07-12 11:37:54 +0800103