Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Howard Hsu <howard-yh.hsu@mediatek.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	linux-mediatek <linux-mediatek@lists.infradead.org>,
	Howard Hsu <howard-yh.hsu@mediatek.com>
Subject: [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface
Date: Thu, 15 Sep 2022 16:19:17 +0800	[thread overview]
Message-ID: <20220915081917.3409-1-howard-yh.hsu@mediatek.com> (raw)

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



             reply	other threads:[~2022-09-15  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  8:19 Howard Hsu [this message]
2022-09-15 14:34 ` [PATCH] wifi: mac80211: fix decapsulation offload flag for WDS interface Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220915081917.3409-1-howard-yh.hsu@mediatek.com \
    --to=howard-yh.hsu@mediatek.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox