From d43e165149c5843abe17ca1f93594a41cbf82ddd Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Kalikot Veetil Date: Mon, 2 Nov 2015 15:35:10 -0800 Subject: [PATCH] qcacld-3.0: Add backward compatibiilty to older FW If DBS hwmode is not available from FW, return accrodingly in wma_get_hw_mode_from_idx. Change-Id: I603edd8a49bfd584300dcfc21c2b3c8c4c3c1892 CRs-Fixed: 934012 --- core/wma/src/wma_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 5ab134190a24..c7b0a621fd6e 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -2797,6 +2797,11 @@ CDF_STATUS wma_get_hw_mode_from_idx(uint32_t idx, return CDF_STATUS_E_FAILURE; } + if (!wma->num_dbs_hw_modes) { + WMA_LOGE("%s: No dbs hw modes available", __func__); + return CDF_STATUS_E_FAILURE; + } + param = wma->hw_mode.hw_mode_list[idx]; hw_mode->mac0_tx_ss = WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(param);