developer | 4eb49d9 | 2022-12-05 11:29:56 +0800 | [diff] [blame] | 1 | From d364b3a664a76fdb9b0e95e84e092d41d4f2ddd5 Mon Sep 17 00:00:00 2001 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 2 | From: Sujuan Chen <sujuan.chen@mediatek.com> |
| 3 | Date: Fri, 11 Mar 2022 11:34:11 +0800 |
developer | 4eb49d9 | 2022-12-05 11:29:56 +0800 | [diff] [blame] | 4 | Subject: [PATCH 99900/99901] mac80211: mtk: mask kernel version limitation and |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 5 | fill forward path in kernel 5.4 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 6 | |
| 7 | Signed-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 | |
| 15 | diff --git a/include/net/mac80211.h b/include/net/mac80211.h |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 16 | index 66fedf6..95e5e66 100644 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 17 | --- a/include/net/mac80211.h |
| 18 | +++ b/include/net/mac80211.h |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 19 | @@ -4292,13 +4292,11 @@ struct ieee80211_ops { |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 20 | 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 | /** |
| 33 | diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 34 | index 2df420b..d2b68ef 100644 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 35 | --- a/net/mac80211/driver-ops.h |
| 36 | +++ b/net/mac80211/driver-ops.h |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 37 | @@ -1486,7 +1486,6 @@ static inline void drv_twt_teardown_request(struct ieee80211_local *local, |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 38 | 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, |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 45 | @@ -1508,6 +1507,5 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local, |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 46 | |
| 47 | return ret; |
| 48 | } |
| 49 | -#endif |
| 50 | |
| 51 | #endif /* __MAC80211_DRIVER_OPS */ |
| 52 | diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 53 | index 717dfda..455791f 100644 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 54 | --- a/net/mac80211/iface.c |
| 55 | +++ b/net/mac80211/iface.c |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 56 | @@ -852,7 +852,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = { |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 57 | |
| 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 | { |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 64 | @@ -910,7 +909,6 @@ out: |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 65 | |
| 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) |
developer | 18dec8f | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 72 | @@ -929,9 +927,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = { |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 73 | #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) |
| 82 | diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h |
| 83 | index bbda9e9..d91498f 100644 |
| 84 | --- a/net/mac80211/trace.h |
| 85 | +++ b/net/mac80211/trace.h |
| 86 | @@ -2892,14 +2892,12 @@ TRACE_EVENT(drv_twt_teardown_request, |
| 87 | ) |
| 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 | |
| 99 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
| 100 | |
| 101 | -- |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 102 | 2.36.1 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 103 | |