diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-11-12 12:22:23 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-11-26 11:47:26 +0100 |
commit | d787a3e38f01bfc4566df4e85d432a29d192e637 (patch) | |
tree | bac4bc6aa1dcd73e775db9d2fd802ca513eb2648 /net/mac80211/driver-ops.h | |
parent | 71abf71e9e634a55b1156f4aaae6122207f4b8ef (diff) | |
download | linux-d787a3e38f01bfc4566df4e85d432a29d192e637.tar.bz2 |
mac80211: add support for .ndo_fill_forward_path
This allows drivers to provide a destination device + info for flow offload
Only supported in combination with 802.3 encap offload
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Tested-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20211112112223.1209-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index cd3731cbf6c6..50a0cdadceec 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1483,4 +1483,26 @@ static inline void drv_twt_teardown_request(struct ieee80211_local *local, trace_drv_return_void(local); } +static inline int drv_net_fill_forward_path(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_sta *sta, + struct net_device_path_ctx *ctx, + struct net_device_path *path) +{ + int ret = -EOPNOTSUPP; + + sdata = get_bss_sdata(sdata); + if (!check_sdata_in_driver(sdata)) + return -EIO; + + trace_drv_net_fill_forward_path(local, sdata, sta); + if (local->ops->net_fill_forward_path) + ret = local->ops->net_fill_forward_path(&local->hw, + &sdata->vif, sta, + ctx, path); + trace_drv_return_int(local, ret); + + return ret; +} + #endif /* __MAC80211_DRIVER_OPS */ |