From e2611f7d6976aa9a8427e7de238d590b228b1fb3 Mon Sep 17 00:00:00 2001 From: Sathish Kumar Date: Sat, 27 Aug 2016 21:32:28 +0530 Subject: [PATCH] qcacmn: Fix issues in mcast_group_update and fips WMI cmd Fix following issues in wmi_unified_non_tlv.c file ->Move allocation of WMI buffer in FIPS WMI cmd ->Change dummymask variable to static in mcast_group_update cmd Change-Id: I0a0d0e68820905ad543175abed1a812639b3dbf1 CRs-Fixed: 1069863 --- wmi_unified_non_tlv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wmi_unified_non_tlv.c b/wmi_unified_non_tlv.c index 49e4d3bf9a..6a76ffe2b7 100644 --- a/wmi_unified_non_tlv.c +++ b/wmi_unified_non_tlv.c @@ -4054,7 +4054,6 @@ send_pdev_fips_cmd_non_tlv(wmi_unified_t wmi_handle, int len = sizeof(wmi_pdev_fips_cmd) + param->data_len; int retval = 0; - buf = wmi_buf_alloc(wmi_handle, len); /* Data length must be multiples of 16 bytes - checked against 0xF - * and must be less than WMI_SVC_MSG_SIZE - static size of * wmi_pdev_fips_cmd structure @@ -4064,9 +4063,11 @@ send_pdev_fips_cmd_non_tlv(wmi_unified_t wmi_handle, ((param->data_len > 0) && (param->data_len < (WMI_HOST_MAX_BUFFER_SIZE - sizeof(wmi_pdev_fips_cmd)))))) { - wmi_buf_free(buf); return QDF_STATUS_E_INVAL; } + + buf = wmi_buf_alloc(wmi_handle, len); + if (!buf) { qdf_print("%s:wmi_buf_alloc failed\n", __func__); return QDF_STATUS_E_FAILURE; @@ -4274,7 +4275,7 @@ send_mcast_group_update_cmd_non_tlv(wmi_unified_t wmi_handle, wmi_buf_t buf; int len; int offset = 0; - char dummymask[4] = { 0xFF, 0xFF, 0xFF, 0xFF}; + static char dummymask[4] = { 0xFF, 0xFF, 0xFF, 0xFF}; len = sizeof(wmi_peer_mcast_group_cmd); buf = wmi_buf_alloc(wmi_handle, len);