Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp144391lqo; Wed, 15 May 2024 09:53:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwF99dFgFjP3D5l1+pu4jLUxeXd3ulpmJyxsw18SKLkZRjqzNrgAihZlUfl7O28IbYLFigUnjxvCixTphiyRYqtCnlVYkzzqr5rFo2GA== X-Google-Smtp-Source: AGHT+IFNiGRdRkfz7w3Oo6ZwQ5exGwzMkvW2xOAp+SCmXQDTC9qBud4KitJ1bIT9OXtKWPwr2GwW X-Received: by 2002:a05:6a20:431a:b0:1a7:7505:ac97 with SMTP id adf61e73a8af0-1afde0a98a3mr21768262637.11.1715791996019; Wed, 15 May 2024 09:53:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715791996; cv=pass; d=google.com; s=arc-20160816; b=Cz+7abS0Tfk338Um2Y/2s9ECbkx4GoBbKUfjRCa5rGcdTrU0TE2s7Knyev4UOZ1HZe BVitb2jffxE7KVBnTOLxAnG9YBciDZuBoR54TjJEBk0qAr2trDE0/YGK+qZ+hAesV8fq lavLzjXoj/8lh1yClXpnxldr3eOpEVZkq7ImCYP2NPDyYVhQp6ps7jCKQlq5qhn/ClXB N1VkbAybtSzJQ+eyRwr4Kl8TuQS1yem42LF3Zh+I8Em4f/GbqedRmmo+6drU0MgCBNJd ym2FX7Qq/m2KxqT6Og3ywy4VB3O/+LQ4YPea06Yix6OWicvr/RK2HjF/dgFumDk2grWB chQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XmCydjMmsAv68yoorcfiyfAZw3LbdbQgz1JNaVnKL78=; fh=pGsTab+RUH+9r/6ZhhJeRz+N0kJvd4lyVG0vuCruCFU=; b=zHlwsh21fTTaoLixCvP7lDJ+lEiygHwxZ1F2ESai89Oqrn0PED/Oktf2z7yIEfttvt 1zWFYFA1J6cZ9EcGrdNujZLJtpX7nf4YfgKzVkweC6lt+LmVPj/EPxbLq39epSc/Oq4/ q7ugHxbDMDkspg58/AM1/bfXmdFPJwlwDER3h7MTOCLsO8+4F+rqldjAta6/w3An2GKt eHMQiphdmofF1YNQd3DgVoYBwQemE6i/bjFM0R1LiUjzeYigNvkHFkNsX2LJ4o2anelP rKWPWNlby3tnDOltcEGGkk5LQcjTTz3UxDkPt8xJoTcJwwrSv73PE3npoy0dDikK3bZW lHZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nUka0W1F; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-7696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6341030119dsi13343429a12.371.2024.05.15.09.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:53:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nUka0W1F; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-7696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 55E79281423 for ; Wed, 15 May 2024 16:53:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63E8B482DB; Wed, 15 May 2024 16:52:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nUka0W1F" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 CD85D2574F for ; Wed, 15 May 2024 16:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715791973; cv=none; b=SwABhHRhkOM5T+ArWtHfar+UavrdMHo2KlQN2+OouqhAgBh9wGZSoklA2NaiBhKc2gOFeoN8H+O6ATcp3XJxeB6gFsuYI15CtXrvx6KSf5SWm8rQegwICK6QpBJyvnNqUodPkNzYcV0ZjG03DR787ltYd/MbdFNAM0akSWnUYvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715791973; c=relaxed/simple; bh=HMgeoZuy2eKBa5AGWEEw/EcbFYByBYn9GvpTnPZ78uE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W/7HSvPCUqU1Tq9TSHagTprY2YUg2RE2jT72GA9a3G9RZTcHWqK9bt2SCNCXipJkq7cGxpFKrNks6wwdxPpaormB+EO1/0MG4UAvB7DfS3Da7GymA8nL1D/JPyp0YzKddsuINJT+8dMNxFC+hYUmhqbT4TYGxPaWoGNSvvGb53M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=nUka0W1F; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44F90YhU014218; Wed, 15 May 2024 16:52:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=XmCydjMmsAv68yoorcfi yfAZw3LbdbQgz1JNaVnKL78=; b=nUka0W1FNJX+cWx6zJQK10lFamiklFCWKgoK qf6QgSUtFlsDPNNjpjTe43HlsQhkGhHaeSMTeu5Sm9HK6RxxIRm0Ykm0JdE8VEJl 3TOQjB9XUmLsH6+3Fd6OyraT9Wh2fE9ZSXyNSGOV+Pa7FCgvfSg8IQ4d/fToJUMt F5f/18+odUh9nPDUjO/OpVqGv9GNPesIwesrRby97akoD7HTG2TJtdLr/ZXhujb1 FqWIPjbqALE+16tQWyobAMduAxP+XgIP2S1OHBBBZZj0asFyycevSgLyJRYc0qxc 1bV8fwnISXg1pltfQ1LG0Bs1RWA9rQMfT/kCQgqoIOd0qXC1Sw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y20w21gug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 May 2024 16:52:42 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44FGqgvg009186 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 May 2024 16:52:42 GMT Received: from pradeepc-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 15 May 2024 09:52:41 -0700 From: Pradeep Kumar Chitrapu To: CC: , Pradeep Kumar Chitrapu , Muna Sinada Subject: [PATCH V5 03/10] wifi: ath12k: push EHT MU-MIMO params to hardware Date: Wed, 15 May 2024 09:52:24 -0700 Message-ID: <20240515165231.12114-4-quic_pradeepc@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240515165231.12114-1-quic_pradeepc@quicinc.com> References: <20240515165231.12114-1-quic_pradeepc@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 0DBMs1oVoSLJTAytfGhrModGdRD5QUSE X-Proofpoint-GUID: 0DBMs1oVoSLJTAytfGhrModGdRD5QUSE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-15_10,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405150119 Currently, only the EHT IE in management frames is updated with respect to MU-MIMO configurations, but this change is not reflected in the hardware. Add support to propagate MU-MIMO configurations to the hardware as well for AP mode. Similar support for STA mode will be added in future. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Co-developed-by: Muna Sinada Signed-off-by: Muna Sinada Signed-off-by: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 50 +++++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/wmi.h | 21 +++++++++++ 2 files changed, 71 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 5e3b7894d4f4..f58558a52eef 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -2630,6 +2630,50 @@ static int ath12k_mac_vif_recalc_sta_he_txbf(struct ath12k *ar, return 0; } +static int ath12k_mac_set_eht_txbf_conf(struct ath12k_vif *arvif) +{ + u32 param = WMI_VDEV_PARAM_SET_EHT_MU_MODE; + struct ath12k *ar = arvif->ar; + u32 value = 0; + int ret; + + if (!arvif->vif->bss_conf.eht_support) + return 0; + + if (arvif->vif->bss_conf.eht_su_beamformer) { + value |= u32_encode_bits(EHT_SU_BFER_ENABLE, EHT_MODE_SU_TX_BFER); + if (arvif->vif->bss_conf.eht_mu_beamformer && + arvif->vdev_type == WMI_VDEV_TYPE_AP) + value |= u32_encode_bits(EHT_MU_BFER_ENABLE, + EHT_MODE_MU_TX_BFER) | + u32_encode_bits(EHT_DL_MUOFDMA_ENABLE, + EHT_MODE_DL_OFDMA_MUMIMO) | + u32_encode_bits(EHT_UL_MUOFDMA_ENABLE, + EHT_MODE_UL_OFDMA_MUMIMO); + } + + if (arvif->vif->type != NL80211_IFTYPE_MESH_POINT) { + value |= u32_encode_bits(EHT_DL_MUOFDMA_ENABLE, EHT_MODE_DL_OFDMA) | + u32_encode_bits(EHT_UL_MUOFDMA_ENABLE, EHT_MODE_UL_OFDMA); + + if (arvif->vif->bss_conf.eht_80mhz_full_bw_ul_mumimo) + value |= u32_encode_bits(EHT_UL_MUMIMO_ENABLE, EHT_MODE_MUMIMO); + + if (arvif->vif->bss_conf.eht_su_beamformee) + value |= u32_encode_bits(EHT_SU_BFEE_ENABLE, + EHT_MODE_SU_TX_BFEE); + } + + ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, value); + if (ret) { + ath12k_warn(ar->ab, "failed to set vdev %d EHT MU mode: %d\n", + arvif->vdev_id, ret); + return ret; + } + + return 0; +} + static void ath12k_bss_assoc(struct ath12k *ar, struct ath12k_vif *arvif, struct ieee80211_bss_conf *bss_conf) @@ -3015,6 +3059,12 @@ static void ath12k_mac_bss_info_changed(struct ath12k *ar, ath12k_warn(ar->ab, "failed to set HE TXBF config for vdev: %d\n", arvif->vdev_id); + + ret = ath12k_mac_set_eht_txbf_conf(arvif); + if (ret) + ath12k_warn(ar->ab, + "failed to set EHT TXBF config for vdev: %d\n", + arvif->vdev_id); } ath12k_control_beaconing(arvif, info); diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index 03aab0531aa4..161e0ab5efe8 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -1138,6 +1138,7 @@ enum wmi_tlv_vdev_param { WMI_VDEV_PARAM_BSS_COLOR, WMI_VDEV_PARAM_SET_HEMU_MODE, WMI_VDEV_PARAM_HEOPS_0_31 = 0x8003, + WMI_VDEV_PARAM_SET_EHT_MU_MODE = 0x8005, }; enum wmi_tlv_peer_flags { @@ -2985,6 +2986,26 @@ struct ath12k_wmi_rx_reorder_queue_remove_arg { #define HE_MU_BFER_ENABLE 1 #define HE_SU_BFER_ENABLE 1 +#define EHT_MODE_SU_TX_BFEE BIT(0) +#define EHT_MODE_SU_TX_BFER BIT(1) +#define EHT_MODE_MU_TX_BFEE BIT(2) +#define EHT_MODE_MU_TX_BFER BIT(3) +#define EHT_MODE_DL_OFDMA BIT(4) +#define EHT_MODE_UL_OFDMA BIT(5) +#define EHT_MODE_MUMIMO BIT(6) +#define EHT_MODE_DL_OFDMA_TXBF BIT(7) +#define EHT_MODE_DL_OFDMA_MUMIMO BIT(8) +#define EHT_MODE_UL_OFDMA_MUMIMO BIT(9) + +#define EHT_DL_MUOFDMA_ENABLE 1 +#define EHT_UL_MUOFDMA_ENABLE 1 +#define EHT_DL_MUMIMO_ENABLE 1 +#define EHT_UL_MUMIMO_ENABLE 1 +#define EHT_MU_BFEE_ENABLE 1 +#define EHT_SU_BFEE_ENABLE 1 +#define EHT_MU_BFER_ENABLE 1 +#define EHT_SU_BFER_ENABLE 1 + #define HE_VHT_SOUNDING_MODE_ENABLE 1 #define HE_SU_MU_SOUNDING_MODE_ENABLE 1 #define HE_TRIG_NONTRIG_SOUNDING_MODE_ENABLE 1 -- 2.17.1