qcacmn: Realloc memory for wmi_service_ext_bitmap
Realloc memory for wmi_service_ext_bitmap when WMI_SERVICE_AVAILABLE_EVENTID event come, and the num of wmi_service_ext_bitmap large then previous num. Change-Id: I2800fe3274e5516369486ef065ce03ba121bd5b3 CRs-Fixed: 3346739
This commit is contained in:

committato da
Madan Koyyalamudi

parent
5a1cd48520
commit
58455ec078
@@ -3349,6 +3349,7 @@ struct wmi_soc {
|
||||
/* WMI service bitmap received from target */
|
||||
uint32_t *wmi_service_bitmap;
|
||||
uint32_t *wmi_ext_service_bitmap;
|
||||
uint32_t wmi_ext2_service_bitmap_len;
|
||||
uint32_t *wmi_ext2_service_bitmap;
|
||||
uint32_t services[wmi_services_max];
|
||||
uint16_t wmi_max_cmds;
|
||||
|
@@ -12219,12 +12219,21 @@ QDF_STATUS save_ext_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!soc->wmi_ext2_service_bitmap) {
|
||||
if (!soc->wmi_ext2_service_bitmap ||
|
||||
(param_buf->num_wmi_service_ext_bitmap >
|
||||
soc->wmi_ext2_service_bitmap_len)) {
|
||||
if (soc->wmi_ext2_service_bitmap) {
|
||||
qdf_mem_free(soc->wmi_ext2_service_bitmap);
|
||||
soc->wmi_ext2_service_bitmap = NULL;
|
||||
}
|
||||
soc->wmi_ext2_service_bitmap =
|
||||
qdf_mem_malloc(param_buf->num_wmi_service_ext_bitmap *
|
||||
sizeof(uint32_t));
|
||||
if (!soc->wmi_ext2_service_bitmap)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
soc->wmi_ext2_service_bitmap_len =
|
||||
param_buf->num_wmi_service_ext_bitmap;
|
||||
}
|
||||
|
||||
qdf_mem_copy(soc->wmi_ext2_service_bitmap,
|
||||
|
Fai riferimento in un nuovo problema
Block a user