Re: [PATCH v4 05/14] mac80211: rework tx encapsulation offload API

Johannes Berg
2020-09-18T10:11:06Z

On Tue, 2020-09-08 at 14:36 +0200, Felix Fietkau wrote:
> The current API (which lets the driver turn on/off per vif directly) has a
> number of limitations:
> - it does not deal with AP_VLAN
> - conditions for enabling (no tkip, no monitor) are only checked at
> add_interface time
> - no way to indicate 4-addr support
>
> In order to address this, store offload flags in struct ieee80211_vif
> (easy to extend for decap offload later). mac80211 initially sets the enable
> flag, but gives the driver a chance to modify it before its settings are
> applied. In addition to the .add_interface op, a .update_vif_offload op is
> introduced, which can be used for runtime changes.
>
> If a driver can't disable encap offload at runtime, or if it has some extra
> limitations, it can simply override the flags within those ops.
>
> Support for encap offload with 4-address mode interfaces can be enabled
> by setting a flag from .add_interface or .update_vif_offload.
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/net/wireless/ath/ath11k/mac.c | 57 +++++----

There were some conflicts here with commit commit aa2092a9bab3 ("ath11k:
add raw mode and software crypto support"), I hope I've fixed that up
appropriately.

johannes