Parcourir la source

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
Mahesh Kumar Kalikot Veetil il y a 9 ans
Parent
commit
d43e165149
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      core/wma/src/wma_utils.c

+ 5 - 0
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);