From patchwork Tue Jan 14 10:10:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayne Chen X-Patchwork-Id: 13938579 X-Patchwork-Delegate: nbd@nbd.name Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 3016522DC28 for ; Tue, 14 Jan 2025 10:11:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736849512; cv=none; b=n+aL5v+UQQDH9r/mi2sXNl74zU1hlgjJ5+ED2GhGOG7UqKm0X/dNLY84hm0lc/WC+hjJ7u0uP3J3OmjRz1HpGBXVHe559UvfzMTyb48qOqVBKkxUYmhuxfSOLczS4L4amhtac/IY0g77ekpXLvyNLiCILYjTpx0RL7lSF6q1BG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736849512; c=relaxed/simple; bh=OlBgG3uKDWR0E/e9HzB/nP1edbLPJr7pFlVbL6MtwVw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Qucm7t75w1qOvDlsfr7YW4qwHjXcwTBFRKjfHBrr9d4K0XYSC+b+Nd+nFjLGptnecK4mlyHVBbQbnsrTWy03roQvtmW2rOFZtJWbBPrygl7DyQjHhrfHEZxUudP0QGq7AT/1nOi3bVRz/qRML/U2xrSJ1Yf1oq2z44wCeK49e3E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=tK+l8yt4; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="tK+l8yt4" X-UUID: f32c4522d25f11ef99858b75a2457dd9-20250114 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=CJBPmqu7c9gkjW5+RWstFCLqCSp/THmWUdg0h4KWzIs=; b=tK+l8yt4DLx21sBfMuDJu6QoAyn47DYh5r0KGZjeoaHL+r+w98hc6HtPvcgJbghAsPlLy+AjpqWOGHxUrYofQLvhPgOvTH35YKrp5kGNBulgOiXxbc2tzFO2PHsTPxbIvH8Cw+SwwGOk2MoiGoSswUVmAVnidyfWYRzYlG9YCqY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.46,REQID:be3ae275-b015-424a-b740-95403d5ad555,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:60aa074,CLOUDID:bed9de0e-078a-483b-8929-714244d25c49,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102,TC:nil,Content:0|50,EDM:-3 ,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV :0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: f32c4522d25f11ef99858b75a2457dd9-20250114 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 413415673; Tue, 14 Jan 2025 18:11:41 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 14 Jan 2025 18:11:40 +0800 Received: from mtksitap99.mediatek.inc (10.233.130.16) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Tue, 14 Jan 2025 18:11:40 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Peter Chiu , Shayne Chen Subject: [PATCH 7/9] wifi: mt76: mt7996: fix ldpc setting Date: Tue, 14 Jan 2025 18:10:24 +0800 Message-ID: <20250114101026.3587702-7-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250114101026.3587702-1-shayne.chen@mediatek.com> References: <20250114101026.3587702-1-shayne.chen@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MTK: N From: Peter Chiu The non-AP interfaces would not use conf->vht_ldpc so they never set STA_CAP_VHT_LDPC even if peer-station support LDPC. Check conf->vht_ldpc only for AP interface. Without this patch, station only uses BCC to transmit packet in VHT mode. Fixes: dda423dd65c3 ("wifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps()") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c index 9fb54388d975..9879c108cd0e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -2066,7 +2066,7 @@ mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev, cap |= STA_CAP_VHT_TX_STBC; if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1) cap |= STA_CAP_VHT_RX_STBC; - if (vif->bss_conf.vht_ldpc && + if ((vif->type != NL80211_IFTYPE_AP || vif->bss_conf.vht_ldpc) && (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)) cap |= STA_CAP_VHT_LDPC;