From acc11e646ee14197bfc14cf9da3f196bc64f9b5b Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Wed, 13 Feb 2019 17:35:22 +0530 Subject: [PATCH] qcacmn: Return the correct error code for PEER UNMAP RESPONSE cmd In send_peer_unmap_conf_cmd_tlv() return the correct error code while sending PEER UNMAP RESPONSE command to FW. Change-Id: I3cc87101310a7f0c6e82dc91ac33d747f5282796 CRs-Fixed: 2398586 --- wmi/src/wmi_unified_sta_tlv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index c1cb59324491..9511e332274c 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -2409,6 +2409,7 @@ static QDF_STATUS send_peer_unmap_conf_cmd_tlv(wmi_unified_t wmi, wmi_peer_unmap_response_cmd_fixed_param *cmd; uint32_t peer_id_list_len; uint32_t len = sizeof(*cmd); + QDF_STATUS status; if (!peer_id_cnt || !peer_id_list) return QDF_STATUS_E_FAILURE; @@ -2447,12 +2448,13 @@ static QDF_STATUS send_peer_unmap_conf_cmd_tlv(wmi_unified_t wmi, WMI_LOGD("%s: vdev_id %d peer_id_cnt %d", __func__, vdev_id, peer_id_cnt); wmi_mtrace(WMI_PEER_UNMAP_RESPONSE_CMDID, vdev_id, 0); - if (wmi_unified_cmd_send(wmi, buf, len, - WMI_PEER_UNMAP_RESPONSE_CMDID)) { - WMI_LOGP("%s: Failed to send peer delete conf command", - __func__); + status = wmi_unified_cmd_send(wmi, buf, len, + WMI_PEER_UNMAP_RESPONSE_CMDID); + if (QDF_IS_STATUS_ERROR(status)) { + WMI_LOGE("%s: Failed to send peer unmap conf command: Err[%d]", + __func__, status); wmi_buf_free(buf); - return QDF_STATUS_E_FAILURE; + return status; } return QDF_STATUS_SUCCESS;