[PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface

Howard Hsu howard-yh.hsu at mediatek.com
Thu Sep 15 01:19:17 PDT 2022


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 at 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




More information about the Linux-mediatek mailing list