Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2370787lqp; Sun, 24 Mar 2024 16:15:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1wV99egnb8dgwjA/7xGgVDQOidvRTKhuG+SRHZ9Cy+GrNFwoR9VIUpObNMcT2HYkTTJ+rmsGf4ja292hmtYt0Mv1hbalh2sxwFCxWJQ== X-Google-Smtp-Source: AGHT+IG7awJxLU1XYs1Nk926dCeXE5PvXjcHpOQPfHJRDSrBo1y+l2i9xA4Fc8l65E6supDkhVGB X-Received: by 2002:a05:6a00:c90:b0:6e6:89a4:60ff with SMTP id a16-20020a056a000c9000b006e689a460ffmr5710517pfv.29.1711322139796; Sun, 24 Mar 2024 16:15:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322139; cv=pass; d=google.com; s=arc-20160816; b=bn/IJUaFjyoYdc5OwgJX92STpL+kZmBVwJRWSlgdY/YncTPidl0pTKupmySbxisqUj 4R/AFlAXCKEG3iDnPkYuffufNW0jqE2jD2uDxaw1x7lbJqsGqfeOgPfFkaYBRLfMKXCg WaPT7gGq8yvsNqKJzljlTFs1xi/10KDE5TNR03PXWDU+puORQRfwmu6pLVTEytED01YD pD382rUMxsC4CZYTkjLAXTw+RJITMe1kYJOOl6ILrqw8vym5OpXVI6UUOlJJWePx9WF9 2y7IZi8naTkXfDjQGoe/u9nnuF86Pm3KMGA+b4MTRoVOijA4DTp2TBEPCTrRoFgUnw+2 dmXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZksrYRp00BMWqztioTdkWWxtosimgcSgX8QYfJM/+6o=; fh=xpy1ipauoWoZ1He5TVzeA0pcKjf/LXhZK9URn+u039Y=; b=LZ+MtyhqG7UIL2d5UnI4pPN0b6Rb18txVAtRbgPpu7278wwg2QrE8h4tJLc6BTLg2Z pyk0aEHYYAl9me51R27iQR9XK9cgqFQtn381q0pf9x5x6sPi0HshTqFApHAK+V5KZbwM 1uNNkRO2SH3SNnqG0rGoCsb5BY4l32pCzq0ri+fCpxXklzDKvrkRKn04KuOJ0guhEBJe 9C0y8XBY9TkTDyrBDVMl3mTNXx/afDO8xW40UOyRCzCulzNhJyctflFVCBj5Wm3kni2J rtF/sArGT1h79Cin/XhhiDq/3QVmk0n6bksGlgwF0mEvdHKjBsFs8PRCT985TG24fNGn kc1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXFHXH2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e12-20020aa7824c000000b006ea8ed74f58si3957990pfn.317.2024.03.24.16.15.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:15:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXFHXH2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 63CD9B2345E for ; Sun, 24 Mar 2024 23:03:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17218132489; Sun, 24 Mar 2024 22:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BXFHXH2U" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2BF21131E3D; Sun, 24 Mar 2024 22:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319821; cv=none; b=p4bgB+DKUn9pKy/xYrzGZxaKBpAEJD/T6/RRd6GlraAlbxS1QBvkb8QwOkui49Q+7aGuWBYeCCZ/iKe6OaAKlV3rcwLeayldcuCsM+e6Bpjaqxnurbtl6YyrFZUviQU9yVf7ZVEue/Tdk7K15tYCjmsoIqMajJgGETqrynYGrL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319821; c=relaxed/simple; bh=/lZFRa509+d8US95VkuY8rBTEAwtCvjx3GyeNYLjDC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XcVJPqcQz8iy3HEo4SnM8sLk5p+qUTAhWZvQ3jShnx8FxeTj/Ek26MwaB0RoHEQl4IPfGbxPNYuUZFt7C7c7yzuB3+cKRI8MYZ1brBTMMo7Nf6YQBY8HwKarpIXc8Y/uO2dNVYNrqxAG06eEH3RYWwoZ0aD5ZGk+RPuLzivXCks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BXFHXH2U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4268EC433F1; Sun, 24 Mar 2024 22:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319821; bh=/lZFRa509+d8US95VkuY8rBTEAwtCvjx3GyeNYLjDC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BXFHXH2UK/N/7rFGI2HlTKRTVgPWuAXLsl7xG0ob15e8kxwJxaJm/wjVDlxGtKpvr yrc7ll4z37Ae3O0RNcGy+4YHg5rmR1K+3uD/9mVzGEkZnQEc1LtF5r+yPk63But6SB RvijN8N9ZX+2TJ2lfQZYSpdlev6g27BISGECT3g4hChCbPOsgLnnft7Cskyg4HzLUo 5DP6+n5ITFPhEY5HDsqyz6ez7iPFUlA44RisffF6guOVRstIjCxNAcu6KQ3SPYO9fw ZZ8Wf3lG5mrgtXXssnNyt/6ofGmA8ZxocF4o6lfoRAPDjrtI3QkPI5jDrpw1NDNmpZ eGeeZp5qxFhKQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wen Gong , Baochen Qiang , Jeff Johnson , Kalle Valo , Sasha Levin Subject: [PATCH 6.8 123/715] wifi: ath11k: change to move WMI_VDEV_PARAM_SET_HEMU_MODE before WMI_PEER_ASSOC_CMDID Date: Sun, 24 Mar 2024 18:25:02 -0400 Message-ID: <20240324223455.1342824-124-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Wen Gong [ Upstream commit 413e20e82ee78f142cb5194fd317db514f012602 ] Currently when connecting to an AP with 11AX-HE phy mode, host sends WMI_VDEV_PARAM_SET_HEMU_MODE parameter to firmware after WMI_PEER_ASSOC_CMDID command. This results in TXBF not working, because firmware calculates TXBF values while handling WMI_PEER_ASSOC_CMDID, however at that time WMI_VDEV_PARAM_SET_HEMU_MODE has not been sent yet. See below log: AP sends "VHT/HE/EHT NDP Announcement" to station, and station sends "Action no Ack" of category code HE to AP, the "Nc Index" and "Codebook Information" are wrong: Issued action: IEEE 802.11 Action No Ack, Flags: ........ IEEE 802.11 wireless LAN Fixed parameters Category code: HE (30) HE Action: HE Compressed Beamforming And CQI (0) Total length: 152 HE MIMO Control: 0x0004008018 .... .... .... .... .... .... .... .... .... .000 = Nc Index: 1 Column (0) .... .... .... .... .... .... .... ..0. .... .... = Codebook Information: 0 Change to send WMI_VDEV_PARAM_SET_HEMU_MODE before WMI_PEER_ASSOC_CMDID, then firmware will calculate the TXBF values with valid parameters instead of empty values. TXBF works well and throughput performance is improved from 80 Mbps to 130 Mbps with this patch. Good action after this patch: IEEE 802.11 Action No Ack, Flags: ........ IEEE 802.11 wireless LAN Fixed parameters Category code: HE (30) HE Action: HE Compressed Beamforming And CQI (0) Total length: 409 HE MIMO Control: 0x0004008219 .... .... .... .... .... .... .... .... .... .001 = Nc Index: 2 Columns (1) .... .... .... .... .... .... .... ..1. .... .... = Codebook Information: 1 This change applies to all chipsets. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Fixes: 38dfe775d0ab ("wifi: ath11k: push MU-MIMO params from hostapd to hardware") Signed-off-by: Wen Gong Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240131021832.17298-1-quic_bqiang@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index b13525bbbb808..b6b474a7f1c9c 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3026,7 +3026,14 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw, rcu_read_unlock(); + if (!ath11k_mac_vif_recalc_sta_he_txbf(ar, vif, &he_cap)) { + ath11k_warn(ar->ab, "failed to recalc he txbf for vdev %i on bss %pM\n", + arvif->vdev_id, bss_conf->bssid); + return; + } + peer_arg.is_assoc = true; + ret = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg); if (ret) { ath11k_warn(ar->ab, "failed to run peer assoc for %pM vdev %i: %d\n", @@ -3049,12 +3056,6 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw, return; } - if (!ath11k_mac_vif_recalc_sta_he_txbf(ar, vif, &he_cap)) { - ath11k_warn(ar->ab, "failed to recalc he txbf for vdev %i on bss %pM\n", - arvif->vdev_id, bss_conf->bssid); - return; - } - WARN_ON(arvif->is_up); arvif->aid = vif->cfg.aid; -- 2.43.0