mt76: mt7921: drop offload_flags overwritten
authorSean Wang <sean.wang@mediatek.com>
Thu, 28 Oct 2021 22:29:58 +0000 (06:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:41 +0000 (11:03 +0100)
[ Upstream commit 2363b6a646b65a207345b9a9024dff0eff3fec44 ]

offload_flags have to be dropped for mt7921 because mt76.omac_idx 0 would
always run as station mode that would cause Tx encapsulation setting
is not applied to mac80211.

Also, drop IEEE80211_OFFLOAD_ENCAP_4ADDR too because it is not really
being supported.

Fixes: e0f9fdda81bd ("mt76: mt7921: add ieee80211_ops")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7921/main.c

index 63ec140c9c372f74388125a6585a13a0032f4a85..9eb90e6f01031e4c255975289a32b1d05d091b44 100644 (file)
@@ -285,12 +285,6 @@ static int mt7921_add_interface(struct ieee80211_hw *hw,
                mtxq->wcid = &mvif->sta.wcid;
        }
 
-       if (vif->type != NL80211_IFTYPE_AP &&
-           (!mvif->mt76.omac_idx || mvif->mt76.omac_idx > 3))
-               vif->offload_flags = 0;
-
-       vif->offload_flags |= IEEE80211_OFFLOAD_ENCAP_4ADDR;
-
 out:
        mt7921_mutex_release(dev);