From patchwork Fri Aug 16 17:35:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 820053 Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC8DF1BE22D for ; Fri, 16 Aug 2024 18:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723831654; cv=none; b=L9lJO4kmEJm9jKGR/NvCa9xoBJTXPcFy6TnLCsUdwJC8Wryab90FDygD9sNLc3cTB//FJbD3o7LCdgmZnmuB5vVe4xlT12dJZYn6ysU4Fyx0nbSV9r6/B+SUgwIfgszyZy+ZnfIrP/s89H/Hm5mkZ/SlNwnFcmADObTtWkJKAg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723831654; c=relaxed/simple; bh=Jgixl80cqWUiH2DcZwoXE+59+gqz3WONPftW5OF360o=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LmyNtYNEcSQ3jVcjplGbOgLJxL6ndogyiPEU5cwci8yno3PT1kKFixxL11ec3f7hSF5LGFGWko6qU7eCgTXPu4YGH7OQxtn6Eu547AmKqepRKMZ5PX0fYYtFU1FIpB/Q2EW4rT1k8pmqs2XkZNF98AhfYbP6smC9+VhZr6mbcTg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=J+MMuAl/; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="J+MMuAl/" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/5aj2gW0+VEFkLWY1f1O0eygHkmpsa/sMMuAaZUSxw8=; b=J+MMuAl/CaJq0rvfZPqStF//V8 w4CrlXX7hz61iRVTOvfaQzGwTJVaAQGw2541T2E83Yy10XeOTX+R1CarC61Q3XHQq693xVN4u2l4G caf2bA898+SWN40jiVyA9en3sKZUj/2QA1IsY7ygIUQAMHkl9kJLEpsimGWFQHee8c3g=; Received: from p54ae95e7.dip0.t-ipconnect.de ([84.174.149.231] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.96) (envelope-from ) id 1sf0rT-000ObE-2J for linux-wireless@vger.kernel.org; Fri, 16 Aug 2024 19:35:39 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 16/16] wifi: mt76: mt7915: add dummy HW offload of IEEE 802.11 fragmentation Date: Fri, 16 Aug 2024 19:35:29 +0200 Message-ID: <20240816173529.17873-16-nbd@nbd.name> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240816173529.17873-1-nbd@nbd.name> References: <20240816173529.17873-1-nbd@nbd.name> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Benjamin Lin Currently, CONNAC2 series do not support encryption for fragmented Tx frames. Therefore, add dummy function mt7915_set_frag_threshold() to prevent SW IEEE 802.11 fragmentation. Signed-off-by: Benjamin Lin Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7915/main.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index a978f434dc5e..511e0d04eb95 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -398,6 +398,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy) ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD); ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID); ieee80211_hw_set(hw, WANT_MONITOR_VIF); + ieee80211_hw_set(hw, SUPPORTS_TX_FRAG); hw->max_tx_fragments = 4; diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index ac8924f9209c..b44d160de85b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -1594,6 +1594,12 @@ mt7915_twt_teardown_request(struct ieee80211_hw *hw, mutex_unlock(&dev->mt76.mutex); } +static int +mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val) +{ + return 0; +} + static int mt7915_set_radar_background(struct ieee80211_hw *hw, struct cfg80211_chan_def *chandef) @@ -1723,6 +1729,7 @@ const struct ieee80211_ops mt7915_ops = { .sta_set_decap_offload = mt7915_sta_set_decap_offload, .add_twt_setup = mt7915_mac_add_twt_setup, .twt_teardown_request = mt7915_twt_teardown_request, + .set_frag_threshold = mt7915_set_frag_threshold, CFG80211_TESTMODE_CMD(mt76_testmode_cmd) CFG80211_TESTMODE_DUMP(mt76_testmode_dump) #ifdef CONFIG_MAC80211_DEBUGFS