* [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface
@ 2022-09-15 8:19 Howard Hsu
2022-09-15 14:34 ` Felix Fietkau
0 siblings, 1 reply; 2+ messages in thread
From: Howard Hsu @ 2022-09-15 8:19 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Evelyn Tsai, linux-mediatek, Howard Hsu
The WDS interface whose iftype is NL80211_IFTYPE_AP_VLAN can not be
enabled rx decap offload because its offload_flags is not configured.
The offload_flags of wds interface shall be configured by checking
hardware information.
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
---
net/mac80211/iface.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 41531478437c..ea35a7cabd1a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -865,6 +865,7 @@ static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
/* P2P GO and client are mapped to AP/STATION types */
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_STATION:
+ case NL80211_IFTYPE_AP_VLAN:
return true;
default:
return false;
@@ -2120,6 +2121,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
/* setup type-dependent data */
ieee80211_setup_sdata(sdata, type);
+ ieee80211_set_sdata_offload_flags(sdata);
if (ndev) {
ndev->ieee80211_ptr->use_4addr = params->use_4addr;
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface
2022-09-15 8:19 [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface Howard Hsu
@ 2022-09-15 14:34 ` Felix Fietkau
0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2022-09-15 14:34 UTC (permalink / raw)
To: Howard Hsu, Johannes Berg
Cc: linux-wireless, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Evelyn Tsai, linux-mediatek
On 15.09.22 10:19, Howard Hsu wrote:
> The WDS interface whose iftype is NL80211_IFTYPE_AP_VLAN can not be
> enabled rx decap offload because its offload_flags is not configured.
> The offload_flags of wds interface shall be configured by checking
> hardware information.
>
> Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
> ---
> net/mac80211/iface.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
> index 41531478437c..ea35a7cabd1a 100644
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -865,6 +865,7 @@ static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
> /* P2P GO and client are mapped to AP/STATION types */
> case NL80211_IFTYPE_AP:
> case NL80211_IFTYPE_STATION:
> + case NL80211_IFTYPE_AP_VLAN:
> return true;
> default:
> return false;
> @@ -2120,6 +2121,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
>
> /* setup type-dependent data */
> ieee80211_setup_sdata(sdata, type);
> + ieee80211_set_sdata_offload_flags(sdata);
This approach does not look right to me. The flags are typically
computed by calling ieee80211_set_sdata_offload_flags for a vif before a
drv_add_interface or drv_update_vif_offload call, which allows the
driver to set the offload flags to their final state.
I think the right approach for fixing this is to change
ieee80211_check_fast_rx to make it check the vif offload flag for the
bss sdata instead of the AP_VLAN vif.
- Felix
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-15 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-15 8:19 [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface Howard Hsu
2022-09-15 14:34 ` Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox