Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1183057pxb; Sun, 11 Apr 2021 10:11:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR/tQ6TjlqXk2wPZbMg+Lvc+yulyZ7iD32k6yHthKcxLOEWqfKB4IvAkr6mWD6UicwY5Yc X-Received: by 2002:a17:902:8344:b029:ea:fc89:fa72 with SMTP id z4-20020a1709028344b02900eafc89fa72mr861276pln.45.1618161086248; Sun, 11 Apr 2021 10:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618161086; cv=none; d=google.com; s=arc-20160816; b=dWpiDlugLZPZV6M3oeCWmy8Dvfv5+0wSW+h3roonYMR1bAAlti6hv3UQw7aI8ZxpLe vkc/fIZRuLJnZYelJMj1yDz1MMClQh9/dEEgBFsc8aeDVIZtUlD73XORsZJqj1cEK+G+ UUTYMbKm/JGMXr9RSkhTSMsuksS25S0eQ/IfXrq5HDqS6U0A+CSU3h5s86N3FoM2/mBF OaIOeTZDlZdGd7dfy+sGAg88LQV1lsj1GHoCl2yV7klJr6EPd3TcHL0qFTkXatKKkO7+ FdScoUi+1dKMqlZJ84ldAFUq37PBkUmMifi5CN+y98eNlN725sCZN4xfpWcDXOHq4fvj BPbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=EVFNlqwbFUI2iwHRuS4SVBBse8+jODOsGmpvhoxHXno=; b=FZ4+2HRqKtjdt0jIHd/B53eq7+oo67krrs3utwXNcdonuSh0LVG6UKiKzzoKe8WR1L i/mLaIP/ViWamCZc5aqUHgD7kmvhUL8FQzpP8SG+Ky5gxIf+iBADaMbgGH4bYfOC1Cmk YF6EWaZiZ6rpGUlPwym75r8kJx9jdbzzFBxA1xGEYi3cozenYRCl8hrpqQ9sCnoxxxeB G1VNkIW2aU1YgSDKTXbOYt5PSiM2VZrbocx2dS9o6zLw4yhi+VsXCdvn7C7AGNgC3y2B qjCUCRCpRe6e2KX5ktiPUPjzlJEY0Y2SGwOcyhT/IpgH8KfEUCc3pxHpbGOipLdxZL0d hn2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=mSINvmO5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si10644327plg.355.2021.04.11.10.11.00; Sun, 11 Apr 2021 10:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=mSINvmO5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235878AbhDKPDO (ORCPT + 99 others); Sun, 11 Apr 2021 11:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233822AbhDKPDO (ORCPT ); Sun, 11 Apr 2021 11:03:14 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C5FC061574 for ; Sun, 11 Apr 2021 08:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EVFNlqwbFUI2iwHRuS4SVBBse8+jODOsGmpvhoxHXno=; b=mSINvmO5TQHSAUYn9jJQuRTFSv NFFUbHoi27YbQPDNkFso1MZNAYgFzauxJiErllgxdEGseihnBiFSHmpY37YM1i7EQhzVpQMFtQq6P xXLzadS6ivQbWGuMAZ/E6RlOWjUJeOhavzkkSB9otf161AD23S06IjiDyGVPhVMn7U/o=; Received: from p4ff13c8d.dip0.t-ipconnect.de ([79.241.60.141] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lVbc0-0000R9-4d for linux-wireless@vger.kernel.org; Sun, 11 Apr 2021 17:02:56 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH] mt76: mt7615: always add rx header translation tlv when adding stations Date: Sun, 11 Apr 2021 17:02:54 +0200 Message-Id: <20210411150254.9348-1-nbd@nbd.name> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Ensures that header translation is disabled for interfaces that do not support it. Fixes: bb1262e7199b ("mt76: mt7615: add support for rx decapsulation offload") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +++- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 6 +----- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 6ca9e9840399..9b9f8d88e9bb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -1008,6 +1008,8 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif, if (sta) mt76_connac_mcu_wtbl_ht_tlv(&dev->mt76, wskb, sta, NULL, wtbl_hdr); + mt76_connac_mcu_wtbl_hdr_trans_tlv(wskb, &msta->wcid, NULL, + wtbl_hdr); } cmd = enable ? MCU_EXT_CMD_WTBL_UPDATE : MCU_EXT_CMD_STA_REC_UPDATE; @@ -1136,7 +1138,7 @@ int mt7615_mcu_sta_update_hdr_trans(struct mt7615_dev *dev, if (IS_ERR(wtbl_hdr)) return PTR_ERR(wtbl_hdr); - mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, vif, sta, NULL, wtbl_hdr); + mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, &msta->wcid, NULL, wtbl_hdr); return mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_EXT_CMD_WTBL_UPDATE, true); diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 4892728ad9bb..443ec0a8bb7d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -393,11 +393,9 @@ mt76_connac_mcu_sta_uapsd(struct sk_buff *skb, struct ieee80211_vif *vif, } void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, + struct mt76_wcid *wcid, void *sta_wtbl, void *wtbl_tlv) { - struct mt76_wcid *wcid; struct wtbl_hdr_trans *htr; struct tlv *tlv; @@ -405,8 +403,6 @@ void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb, sizeof(*htr), wtbl_tlv, sta_wtbl); htr = (struct wtbl_hdr_trans *)tlv; - - wcid = (struct mt76_wcid *)sta->drv_priv; htr->no_rx_trans = !test_bit(MT_WCID_FLAG_HDR_TRANS, &wcid->flags); } EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_hdr_trans_tlv); diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h index 6f9b7807305a..587097450416 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h @@ -937,8 +937,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev, struct sk_buff *skb, struct ieee80211_sta *sta, void *sta_wtbl, void *wtbl_tlv); void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, + struct mt76_wcid *wcid, void *sta_wtbl, void *wtbl_tlv); void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, struct ieee80211_sta *sta, -- 2.30.1