[PATCH v2] wifi: mac80211: fix decapsulation offload flag for WDS interface
Felix Fietkau
nbd at nbd.name
Fri Sep 16 08:28:38 PDT 2022
On 16.09.22 16:27, Howard Hsu wrote:
> Rx decapsulation offload cannot be enabled on WDS interface since its
> offload_flags is not configured. Its offload_flags shall be configured
> by checking hardware information.
>
> Signed-off-by: Howard Hsu <howard-yh.hsu at mediatek.com>
> ---
> v2:
> - Configure offload_flags in ieee80211_check_fast_rx
> - Update commit message
> ---
> net/mac80211/rx.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index a57811372027..0d8cfe34b088 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -4433,6 +4433,16 @@ void ieee80211_check_fast_rx(struct sta_info *sta)
> if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED))
> goto clear;
>
> + if (ieee80211_hw_check(&local->hw, SUPPORTS_RX_DECAP_OFFLOAD)) {
> + sdata->vif.offload_flags |= IEEE80211_OFFLOAD_DECAP_ENABLED;
> +
> + if (local->monitors &&
> + !ieee80211_hw_check(&local->hw, SUPPORTS_CONC_MON_RX_DECAP))
> + sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;
> + } else {
> + sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;
> + }
I don't think you should be messing with decap flags here.
Further down there's a piece of code that does:
offload = assign &&
(sdata->vif.offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED);
Please change the code so that it gets the sdata from sdata->bss and
check sdata_bss->vif.offload_flags.
- Felix
More information about the Linux-mediatek
mailing list