From 7d1d5361c54cceecad2f573fca33449bd74581aa Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Thu, 19 Jul 2018 17:00:18 +0800 Subject: [PATCH] qcacld-3.0: update rx nss per num_rf_chains The host will update the rx nss after it gets the rx nss info from the operating mode notification IE. Currently, it does not check the num rf chains of the dut. It causes the difference between software and hardware. Change-Id: I5d6852f8e2928cc99fc88ccface3bc4abe97f273 CRs-Fixed: 2280003 --- core/wma/src/wma_mgmt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index c10a310cc7e9..3987699fbb2b 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -3172,12 +3172,21 @@ void wma_process_update_opmode(tp_wma_handle wma_handle, void wma_process_update_rx_nss(tp_wma_handle wma_handle, tUpdateRxNss *update_rx_nss) { + struct target_psoc_info *tgt_hdl; struct wma_txrx_node *intr = &wma_handle->interfaces[update_rx_nss->smesessionId]; int rx_nss = update_rx_nss->rxNss; + int num_rf_chains; - if (rx_nss > WMA_MAX_NSS) - rx_nss = WMA_MAX_NSS; + tgt_hdl = wlan_psoc_get_tgt_if_handle(wma_handle->psoc); + if (!tgt_hdl) { + WMA_LOGE("%s: target psoc info is NULL", __func__); + return; + } + + num_rf_chains = target_if_get_num_rf_chains(tgt_hdl); + if (rx_nss > num_rf_chains || rx_nss > WMA_MAX_NSS) + rx_nss = QDF_MIN(num_rf_chains, WMA_MAX_NSS); intr->nss = (uint8_t)rx_nss; update_rx_nss->rxNss = (uint32_t)rx_nss;