qcacmn: Add sanity check for BA window size in DP

The original BA window size given from CP might > max DP supported,
add sanity check based on HAL target allowed.

Change-Id: Ibadaddeffe65165a89d580d8a5cbf5f7c724c809
CRs-Fixed: 3193852
This commit is contained in:
Jinwei Chen
2022-05-11 04:48:17 -07:00
committed by Madan Koyyalamudi
parent bf92ed7b61
commit a3585f6fe8
9 changed files with 60 additions and 10 deletions

View File

@@ -1641,6 +1641,11 @@ static inline uint8_t hal_get_first_wow_wakeup_packet_kiwi(uint8_t *buf)
}
#endif
static uint16_t hal_get_rx_max_ba_window_kiwi(int tid)
{
return HAL_RX_BA_WINDOW_1024;
}
/**
* hal_get_reo_qdesc_size_kiwi()- Get the reo queue descriptor size
* from the give Block-Ack window size
@@ -1652,7 +1657,7 @@ static uint32_t hal_get_reo_qdesc_size_kiwi(uint32_t ba_window_size, int tid)
* NON_QOS_TID until HW issues are resolved.
*/
if (tid != HAL_NON_QOS_TID)
ba_window_size = HAL_RX_MAX_BA_WINDOW_BE;
ba_window_size = hal_get_rx_max_ba_window_kiwi(tid);
/* Return descriptor size corresponding to window size of 2 since
* we set ba_window_size to 2 while setting up REO descriptors as
@@ -1696,6 +1701,7 @@ static void hal_hw_txrx_ops_attach_kiwi(struct hal_soc *hal_soc)
hal_soc->ops->hal_reo_enable_pn_in_dest =
hal_reo_enable_pn_in_dest_kiwi;
/* Overwrite the default BE ops */
hal_soc->ops->hal_get_rx_max_ba_window = hal_get_rx_max_ba_window_kiwi;
hal_soc->ops->hal_get_reo_qdesc_size = hal_get_reo_qdesc_size_kiwi;
/* tx */