qcacmn: Add support to get reo qdesc size for li & be platforms

Bifurcate the hal_get_reo_qdesc_size to corresponding lithium
or Berillium platforms.
This can handle difference, if any between them and later enhance
to set the qdesc size based on peer negotiation.
Currently for NON_QOS_TID, the BA window size is hardcoded as
256 for Li and 1024 for Be.

Also modify hal_reo_cmd_update_queue_params to accommodate higher
Block-Ack Window size. For this steal bits from pn_size and use
pn_size values as macros PN_SIZE_XX which is only 3 bits,
instead of 8bits.

Change-Id: If310175da579aa3a47a8b031a1774c6c8982d4b2
CRs-Fixed: 3125986
This commit is contained in:
Vinay Adella
2022-02-02 21:30:05 +05:30
committed by Madan Koyyalamudi
parent fae0e38eb4
commit 381d67a7a2
8 changed files with 76 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -371,29 +371,13 @@ static inline
uint32_t hal_get_reo_qdesc_size(hal_soc_handle_t hal_soc_hdl,
uint32_t ba_window_size, int tid)
{
/* Return descriptor size corresponding to window size of 2 since
* we set ba_window_size to 2 while setting up REO descriptors as
* a WAR to get 2k jump exception aggregates are received without
* a BA session.
*/
if (ba_window_size <= 1) {
if (tid != HAL_NON_QOS_TID)
return sizeof(struct rx_reo_queue) +
sizeof(struct rx_reo_queue_ext);
else
return sizeof(struct rx_reo_queue);
}
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
if (ba_window_size <= 105)
return sizeof(struct rx_reo_queue) +
sizeof(struct rx_reo_queue_ext);
if (hal_soc->ops->hal_get_reo_qdesc_size)
return hal_soc->ops->hal_get_reo_qdesc_size(ba_window_size,
tid);
if (ba_window_size <= 210)
return sizeof(struct rx_reo_queue) +
(2 * sizeof(struct rx_reo_queue_ext));
return sizeof(struct rx_reo_queue) +
(3 * sizeof(struct rx_reo_queue_ext));
return sizeof(struct rx_reo_queue);
}
/**