From: Paulson Raja L IEEE 802.11be (EHT) extends the maximum BA buffer size from 256 MPDUs (HE) to 1024 MPDUs. EHT-capable links are currently limited to the HE maximum of 256. Add WMI_BA_MODE_BUFFER_SIZE_1024 and select the buffer size based on the negotiated mode: 1024 for EHT-capable links, 256 for HE-only. Also include the return code when reporting BA mode configuration failure to aid debugging. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Signed-off-by: Paulson Raja L Signed-off-by: Rameshkumar Sundaram --- drivers/net/wireless/ath/ath12k/mac.c | 14 +++++++++----- drivers/net/wireless/ath/ath12k/wmi.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 711acb32a6ca..0ad019fd4918 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -4889,14 +4889,18 @@ static void ath12k_mac_bss_info_changed(struct ath12k *ar, ath12k_control_beaconing(arvif, info); if (arvif->is_up && info->he_support) { - /* TODO: Extend to support 1024 BA Bitmap size */ + param_id = WMI_VDEV_PARAM_BA_MODE; + param_value = info->eht_support ? + WMI_BA_MODE_BUFFER_SIZE_1024 : + WMI_BA_MODE_BUFFER_SIZE_256; + ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, - WMI_VDEV_PARAM_BA_MODE, - WMI_BA_MODE_BUFFER_SIZE_256); + param_id, param_value); if (ret) ath12k_warn(ar->ab, - "failed to set BA BUFFER SIZE 256 for vdev: %d\n", - arvif->vdev_id); + "failed to set BA BUFFER SIZE %u for vdev %d: %d\n", + info->eht_support ? 1024 : 256, + arvif->vdev_id, ret); if (info->he_oper.params) { param_id = WMI_VDEV_PARAM_HEOPS_0_31; diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index 5d0afbf0bd0c..78f1ceaaf5ff 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -171,6 +171,7 @@ struct wmi_tlv { #define WMI_APPEND_TO_EXISTING_CHAN_LIST_FLAG 1 #define WMI_BA_MODE_BUFFER_SIZE_256 3 +#define WMI_BA_MODE_BUFFER_SIZE_1024 6 /* HW mode config type replicated from FW header * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active. -- 2.34.1