diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-03-21 10:12:48 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-22 13:20:03 +0100 |
commit | 61587f1556fec39e8bafc40c8715f560639a4cf2 (patch) | |
tree | 0078446a015c7acd9394b6287859c060de510832 /include/net/mac80211.h | |
parent | 9457077df49e2a637a1f1c3be42c14af604fa920 (diff) |
wifi: mac80211: add support for letting drivers register tc offload support
On newer MediaTek SoCs (e.g. MT7986), WLAN->WLAN or WLAN->Ethernet flows can
be offloaded by the SoC. In order to support that, the .ndo_setup_tc op is
needed.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20230321091248.30947-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f12edca660ba..fcfe3e9aff3d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4227,6 +4227,10 @@ struct ieee80211_prep_tx_info { * @set_hw_timestamp: Enable/disable HW timestamping of TM/FTM frames. This is * not restored at HW reset by mac80211 so drivers need to take care of * that. + * @net_setup_tc: Called from .ndo_setup_tc in order to prepare hardware + * 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. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, @@ -4593,6 +4597,11 @@ struct ieee80211_ops { int (*set_hw_timestamp)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct cfg80211_set_hw_timestamp *hwts); + int (*net_setup_tc)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct net_device *dev, + enum tc_setup_type type, + void *type_data); }; /** |