qcacld-3.0: Reduce stack frame size while clearing mc filter
Reduce stack frame size of target_if_pmo_clear_multiple_mc_filter_req() by allocating dynamic memory to struct pmo_mcast_filter_params. Change-Id: I0078ef0c84b33de209551dccd91aff70699eca80 CRs-Fixed: 2864938
This commit is contained in:
@@ -171,7 +171,7 @@ QDF_STATUS target_if_pmo_clear_multiple_mc_filter_req(
|
||||
{
|
||||
uint8_t vdev_id;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct pmo_mcast_filter_params filter_params;
|
||||
struct pmo_mcast_filter_params *filter_params;
|
||||
QDF_STATUS status;
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
@@ -187,25 +187,34 @@ QDF_STATUS target_if_pmo_clear_multiple_mc_filter_req(
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
filter_params.multicast_addr_cnt = mc_list->mc_cnt;
|
||||
qdf_mem_copy(filter_params.multicast_addr,
|
||||
filter_params = qdf_mem_malloc(sizeof(*filter_params));
|
||||
if (!filter_params) {
|
||||
target_if_err("memory alloc failed for filter_params");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
filter_params->multicast_addr_cnt = mc_list->mc_cnt;
|
||||
qdf_mem_copy(filter_params->multicast_addr,
|
||||
mc_list->mc_addr,
|
||||
mc_list->mc_cnt * ATH_MAC_LEN);
|
||||
/* delete one/multiple mc list */
|
||||
filter_params.action = 0;
|
||||
filter_params->action = 0;
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
qdf_mem_free(filter_params);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = wmi_unified_multiple_add_clear_mcbc_filter_cmd(wmi_handle,
|
||||
vdev_id,
|
||||
&filter_params);
|
||||
filter_params);
|
||||
if (status)
|
||||
target_if_err("Failed to send add/clear mcbc filter cmd");
|
||||
|
||||
qdf_mem_free(filter_params);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user