From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>,
Muna Sinada <quic_msinada@quicinc.com>
Subject: [PATCH v2 03/10] wifi: ath12k: push EHT MU-MIMO params from hostapd to hardware
Date: Wed, 27 Mar 2024 10:09:03 -0700 [thread overview]
Message-ID: <20240327170910.23975-4-quic_pradeepc@quicinc.com> (raw)
In-Reply-To: <20240327170910.23975-1-quic_pradeepc@quicinc.com>
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 <quic_msinada@quicinc.com>
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
---
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 9921303dc5fa..6465dc11a92e 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -2508,6 +2508,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)
@@ -2892,6 +2936,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 055b1d65bff0..752fc2d53d8f 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -1135,6 +1135,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 {
@@ -2962,6 +2963,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
next prev parent reply other threads:[~2024-03-27 17:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 17:09 [PATCH v2 00/10] wifi: ath12k: add MU-MIMO and 160 MHz bandwidth support Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 01/10] wifi: mac80211: Add EHT UL MU-MIMO flag in ieee80211_bss_conf Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 02/10] wifi: ath12k: push HE MU-MIMO params from hostapd to hardware Pradeep Kumar Chitrapu
2024-03-27 17:09 ` Pradeep Kumar Chitrapu [this message]
2024-03-27 17:09 ` [PATCH v2 04/10] wifi: ath12k: move HE MCS mapper to a separate function Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 05/10] wifi: ath12k: generate rx and tx mcs maps for supported HE mcs Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 06/10] wifi: ath12k: fix TX and RX MCS rate configurations in HE mode Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 07/10] wifi: ath12k: add support for setting fixed HE rate/GI/LTF Pradeep Kumar Chitrapu
2024-03-29 21:34 ` Jeff Johnson
2024-04-01 18:08 ` Pradeep Kumar Chitrapu
2024-04-02 11:41 ` Kalle Valo
2024-03-27 17:09 ` [PATCH v2 08/10] wifi: ath12k: clean up 80P80 support Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 09/10] wifi: ath12k: add support for 160 MHz bandwidth Pradeep Kumar Chitrapu
2024-03-27 17:09 ` [PATCH v2 10/10] wifi: ath12k: add extended NSS bandwidth support for 160 MHz Pradeep Kumar Chitrapu
2024-03-29 17:45 ` [PATCH v2 00/10] wifi: ath12k: add MU-MIMO and 160 MHz bandwidth support Pradeep Kumar Chitrapu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240327170910.23975-4-quic_pradeepc@quicinc.com \
--to=quic_pradeepc@quicinc.com \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_msinada@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).