Эх сурвалжийг харах

qcacld-3.0: Dynamic antenna selection request/response messages

Add support to request for antenna mode to FW to switch from
1x1 to 2x2 and vice versa dynamically and process the response
status of whether the request was sent successfully.

Change-Id: Ie4b0b36981423f9325c48c7ebad445d5cc1f2a21
CRs-Fixed: 931250
Archana Ramachandran 9 жил өмнө
parent
commit
a20ef8127d

+ 26 - 0
core/hdd/src/wlan_hdd_main.c

@@ -5235,6 +5235,8 @@ hdd_context_t *hdd_init_context(struct device *dev, void *hif_sc)
 	hdd_tdls_pre_init(hdd_ctx);
 	hdd_tdls_pre_init(hdd_ctx);
 	mutex_init(&hdd_ctx->dfs_lock);
 	mutex_init(&hdd_ctx->dfs_lock);
 
 
+	init_completion(&hdd_ctx->set_antenna_mode_cmpl);
+
 	hdd_ctx->target_type = tgt_info->target_type;
 	hdd_ctx->target_type = tgt_info->target_type;
 
 
 	hdd_init_offloaded_packets_ctx(hdd_ctx);
 	hdd_init_offloaded_packets_ctx(hdd_ctx);
@@ -6765,6 +6767,30 @@ end:
 }
 }
 #endif
 #endif
 
 
+/**
+ * wlan_hdd_soc_set_antenna_mode_cb() - Callback for set dual
+ * mac scan config
+ * @status: Status of set antenna mode
+ *
+ * Callback on setting the dual mac configuration
+ *
+ * Return: None
+ */
+void wlan_hdd_soc_set_antenna_mode_cb(
+	enum set_antenna_mode_status status)
+{
+	hdd_context_t *hdd_ctx;
+
+	hdd_info("Status: %d", status);
+
+	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+	if (0 != wlan_hdd_validate_context(hdd_ctx))
+		return;
+
+	/* Signal the completion of set dual mac config */
+	complete(&hdd_ctx->set_antenna_mode_cmpl);
+}
+
 /**
 /**
  * hdd_get_fw_version() - Get FW version
  * hdd_get_fw_version() - Get FW version
  * @hdd_ctx:     pointer to HDD context.
  * @hdd_ctx:     pointer to HDD context.

+ 57 - 0
core/mac/src/pe/lim/lim_process_message_queue.c

@@ -188,6 +188,58 @@ static void lim_process_set_hw_mode_resp(tpAniSirGlobal mac, void *body)
 	return;
 	return;
 }
 }
 
 
+/**
+ * lim_process_antenna_mode_resp() - Process set antenna mode
+ * response
+ * @mac: Global MAC pointer
+ * @body: Set antenna mode response in sir_antenna_mode_resp
+ * format
+ *
+ * Process the set antenna mode response and post the message
+ * to SME to process this further and release the active
+ * command list
+ *
+ * Return: None
+ */
+static void lim_process_set_antenna_resp(tpAniSirGlobal mac, void *body)
+{
+	struct sir_antenna_mode_resp *resp, *param;
+	bool fail_resp = false;
+	tSirMsgQ msg;
+
+	resp = (struct sir_antenna_mode_resp *)body;
+	if (!resp) {
+		lim_log(mac, LOGE, FL("Set antenna mode resp is NULL"));
+		fail_resp = true;
+		/* Not returning here. If possible, let us proceed
+		 * and send fail response to SME
+		 */
+	}
+
+	param = qdf_mem_malloc(sizeof(*param));
+	if (!param) {
+		lim_log(mac, LOGE, FL("Fail to allocate memory"));
+		/* Memory allocation for param failed.
+		 * Cannot send fail status back to SME
+		 */
+		return;
+	}
+
+	if (fail_resp) {
+		lim_log(mac, LOGE, FL("Send fail status to SME"));
+		param->status = SET_ANTENNA_MODE_STATUS_ECANCELED;
+	} else {
+		param->status = resp->status;
+	}
+
+	msg.type = eWNI_SME_SET_ANTENNA_MODE_RESP;
+	msg.bodyptr = param;
+	msg.bodyval = 0;
+	lim_log(mac, LOG1, FL("Send eWNI_SME_SET_ANTENNA_MODE_RESP to SME"));
+	lim_sys_process_mmh_msg_api(mac, &msg, ePROT);
+	return;
+}
+
 /**
 /**
  * lim_process_hw_mode_trans_ind() - Process set HW mode transition indication
  * lim_process_hw_mode_trans_ind() - Process set HW mode transition indication
  * @mac: Global MAC pointer
  * @mac: Global MAC pointer
@@ -1491,6 +1543,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
 	case eWNI_SME_RESET_AP_CAPS_CHANGED:
 	case eWNI_SME_RESET_AP_CAPS_CHANGED:
 	case eWNI_SME_SET_HW_MODE_REQ:
 	case eWNI_SME_SET_HW_MODE_REQ:
 	case eWNI_SME_SET_DUAL_MAC_CFG_REQ:
 	case eWNI_SME_SET_DUAL_MAC_CFG_REQ:
+	case eWNI_SME_SET_ANTENNA_MODE_REQ:
 		/* These messages are from HDD. Need to respond to HDD */
 		/* These messages are from HDD. Need to respond to HDD */
 		lim_process_normal_hdd_msg(mac_ctx, msg, true);
 		lim_process_normal_hdd_msg(mac_ctx, msg, true);
 		break;
 		break;
@@ -2008,6 +2061,10 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
 	case eWNI_SME_HT40_OBSS_SCAN_IND:
 	case eWNI_SME_HT40_OBSS_SCAN_IND:
 		lim_process_sme_obss_scan_ind(mac_ctx, msg);
 		lim_process_sme_obss_scan_ind(mac_ctx, msg);
 		qdf_mem_free(msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
+		break;
+	case SIR_HAL_SOC_ANTENNA_MODE_RESP:
+		lim_process_set_antenna_resp(mac_ctx, msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		msg->bodyptr = NULL;
 		break;
 		break;
 	default:
 	default:

+ 69 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -266,6 +266,72 @@ fail:
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }
 
 
+/**
+ * lim_process_set_antenna_mode_req() - Set antenna mode command
+ * to WMA
+ * @mac: Global MAC pointer
+ * @msg: Message containing the antenna mode parameter
+ *
+ * Send the set antenna mode command to WMA
+ *
+ * Return: QDF_STATUS_SUCCESS if message posting is successful
+ */
+static QDF_STATUS lim_process_set_antenna_mode_req(tpAniSirGlobal mac,
+		uint32_t *msg)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	cds_msg_t cds_message;
+	struct sir_antenna_mode_param *req_msg;
+	struct sir_set_antenna_mode *buf;
+	tSirMsgQ resp_msg;
+	struct sir_antenna_mode_resp *param;
+
+	buf = (struct sir_set_antenna_mode *) msg;
+	if (!buf) {
+		lim_log(mac, LOGE, FL("Set antenna mode is NULL"));
+		/* To free the active command list */
+		goto fail;
+	}
+
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
+	if (!req_msg) {
+		lim_log(mac, LOGE, FL("qdf_mem_malloc failed"));
+		return QDF_STATUS_E_NOMEM;
+	}
+
+	req_msg->num_rx_chains = buf->set_antenna_mode.num_rx_chains;
+	req_msg->num_tx_chains = buf->set_antenna_mode.num_tx_chains;
+
+	cds_message.bodyptr = req_msg;
+	cds_message.type    = SIR_HAL_SOC_ANTENNA_MODE_REQ;
+
+	lim_log(mac, LOG1,
+		FL("Post SIR_HAL_SOC_ANTENNA_MODE_REQ to WMA: %d %d"),
+		req_msg->num_rx_chains,
+		req_msg->num_tx_chains);
+	status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
+		lim_log(mac, LOGE,
+				FL("vos_mq_post_message failed!(err=%d)"),
+				status);
+		qdf_mem_free(req_msg);
+		goto fail;
+	}
+	return status;
+fail:
+	param = qdf_mem_malloc(sizeof(*param));
+	if (!param) {
+		lim_log(mac, LOGE, FL("antenna mode resp failed"));
+		return QDF_STATUS_E_NOMEM;
+	}
+	param->status = SET_ANTENNA_MODE_STATUS_ECANCELED;
+	resp_msg.type = eWNI_SME_SET_ANTENNA_MODE_RESP;
+	resp_msg.bodyptr = param;
+	resp_msg.bodyval = 0;
+	lim_sys_process_mmh_msg_api(mac, &resp_msg, ePROT);
+	return QDF_STATUS_SUCCESS;
+}
+
 /**
 /**
  * __lim_fresh_scan_reqd() - determine if a fresh scan request must be issued.
  * __lim_fresh_scan_reqd() - determine if a fresh scan request must be issued.
  * @mac_ctx: Pointer to Global MAC structure
  * @mac_ctx: Pointer to Global MAC structure
@@ -4909,6 +4975,9 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
 	case eWNI_SME_EXT_CHANGE_CHANNEL:
 	case eWNI_SME_EXT_CHANGE_CHANNEL:
 		lim_process_ext_change_channel(pMac, pMsgBuf);
 		lim_process_ext_change_channel(pMac, pMsgBuf);
 		break;
 		break;
+	case eWNI_SME_SET_ANTENNA_MODE_REQ:
+		lim_process_set_antenna_mode_req(pMac, pMsgBuf);
+		break;
 	default:
 	default:
 		qdf_mem_free((void *)pMsg->bodyptr);
 		qdf_mem_free((void *)pMsg->bodyptr);
 		pMsg->bodyptr = NULL;
 		pMsg->bodyptr = NULL;

+ 132 - 0
core/sme/src/common/sme_api.c

@@ -1028,6 +1028,10 @@ sme_process_cmd:
 		csr_ll_unlock(&pMac->sme.smeCmdActiveList);
 		csr_ll_unlock(&pMac->sme.smeCmdActiveList);
 		csr_process_set_dual_mac_config(pMac, pCommand);
 		csr_process_set_dual_mac_config(pMac, pCommand);
 		break;
 		break;
+	case e_sme_command_set_antenna_mode:
+		csr_ll_unlock(&pMac->sme.smeCmdActiveList);
+		csr_process_set_antenna_mode(pMac, pCommand);
+		break;
 	default:
 	default:
 		/* something is wrong */
 		/* something is wrong */
 		/* remove it from the active list */
 		/* remove it from the active list */
@@ -2210,6 +2214,75 @@ static QDF_STATUS sme_process_dual_mac_config_resp(tpAniSirGlobal mac,
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }
 
 
+/**
+ * sme_process_antenna_mode_resp() - Process set antenna mode
+ * response
+ * @mac: Global MAC pointer
+ * @msg: antenna mode response
+ *
+ * Processes the antenna mode response and invokes the HDD
+ * callback to process further
+ */
+static QDF_STATUS sme_process_antenna_mode_resp(tpAniSirGlobal mac,
+		uint8_t *msg)
+{
+	tListElem *entry;
+	tSmeCmd *command;
+	bool found;
+	antenna_mode_cb callback;
+	struct sir_antenna_mode_resp *param;
+
+	param = (struct sir_antenna_mode_resp *)msg;
+	if (!param) {
+		sms_log(mac, LOGE, FL("set antenna mode resp is NULL"));
+		/* Not returning. Need to check if active command list
+		 * needs to be freed
+		 */
+	}
+
+	entry = csr_ll_peek_head(&mac->sme.smeCmdActiveList,
+			LL_ACCESS_LOCK);
+	if (!entry) {
+		sms_log(mac, LOGE, FL("No cmd found in active list"));
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	command = GET_BASE_ADDR(entry, tSmeCmd, Link);
+	if (!command) {
+		sms_log(mac, LOGE, FL("Base address is NULL"));
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (e_sme_command_set_antenna_mode != command->command) {
+		sms_log(mac, LOGE, FL("Command mismatch!"));
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	callback =
+		command->u.set_antenna_mode_cmd.set_antenna_mode_resp;
+	if (callback) {
+		if (!param) {
+			sms_log(mac, LOGE,
+				FL("Set antenna mode call back is NULL"));
+		} else {
+			sms_log(mac, LOG1,
+				FL("HDD callback for set antenna mode"));
+			callback(param->status);
+		}
+	} else {
+		sms_log(mac, LOGE, FL("Callback does not exist"));
+	}
+
+	found = csr_ll_remove_entry(&mac->sme.smeCmdActiveList, entry,
+			LL_ACCESS_LOCK);
+	if (found)
+		/* Now put this command back on the available command list */
+		sme_release_command(mac, command);
+
+	sme_process_pending_queue(mac);
+	return QDF_STATUS_SUCCESS;
+}
+
 /*--------------------------------------------------------------------------
 /*--------------------------------------------------------------------------
 
 
    \brief sme_process_msg() - The main message processor for SME.
    \brief sme_process_msg() - The main message processor for SME.
@@ -2756,6 +2829,16 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg)
 		 status = sme_extended_change_channel_ind(pMac, pMsg->bodyptr);
 		 status = sme_extended_change_channel_ind(pMac, pMsg->bodyptr);
 		 qdf_mem_free(pMsg->bodyptr);
 		 qdf_mem_free(pMsg->bodyptr);
 		 break;
 		 break;
+	case eWNI_SME_SET_ANTENNA_MODE_RESP:
+		if (pMsg->bodyptr) {
+			status = sme_process_antenna_mode_resp(pMac,
+					pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
+		} else {
+			sms_log(pMac, LOGE, FL("Empty message for %d"),
+					pMsg->type);
+		}
+		break;
 	default:
 	default:
 
 
 		if ((pMsg->type >= eWNI_SME_MSG_TYPES_BEGIN)
 		if ((pMsg->type >= eWNI_SME_MSG_TYPES_BEGIN)
@@ -14941,6 +15024,55 @@ QDF_STATUS sme_gateway_param_update(tHalHandle Hal,
 }
 }
 #endif /* FEATURE_LFR_SUBNET_DETECTION */
 #endif /* FEATURE_LFR_SUBNET_DETECTION */
 
 
+/**
+ * sme_soc_set_antenna_mode() - set antenna mode
+ * @hal: Handle returned by macOpen
+ * @msg: Structure containing the antenna mode parameters
+ *
+ * Send the command to CSR to send
+ * WMI_SOC_SET_ANTENNA_MODE_CMDID to FW
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal,
+				struct sir_antenna_mode_param *msg)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	tpAniSirGlobal mac = PMAC_STRUCT(hal);
+	tSmeCmd *cmd;
+
+	if (NULL == msg) {
+		sms_log(mac, LOGE, FL("antenna mode mesg is NULL"));
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	status = sme_acquire_global_lock(&mac->sme);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
+		sms_log(mac, LOGE, FL("Failed to acquire lock"));
+		return QDF_STATUS_E_RESOURCES;
+	}
+
+	cmd = sme_get_command_buffer(mac);
+	if (!cmd) {
+		sme_release_global_lock(&mac->sme);
+		sms_log(mac, LOGE, FL("Get command buffer failed"));
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	cmd->command = e_sme_command_set_antenna_mode;
+	cmd->u.set_antenna_mode_cmd = *msg;
+
+	sms_log(mac, LOG1,
+		FL("Queuing e_sme_command_set_antenna_mode to CSR: %d %d"),
+		cmd->u.set_antenna_mode_cmd.num_rx_chains,
+		cmd->u.set_antenna_mode_cmd.num_tx_chains);
+
+	csr_queue_sme_command(mac, cmd, false);
+	sme_release_global_lock(&mac->sme);
+
+	return QDF_STATUS_SUCCESS;
+}
+
 /**
 /**
  * sme_set_peer_authorized() - call peer authorized callback
  * sme_set_peer_authorized() - call peer authorized callback
  * @peer_addr: peer mac address
  * @peer_addr: peer mac address

+ 69 - 0
core/sme/src/csr/csr_api_roam.c

@@ -18841,6 +18841,75 @@ fail:
 	sys_process_mmh_msg(mac, &msg);
 	sys_process_mmh_msg(mac, &msg);
 }
 }
 
 
+/**
+ * csr_process_set_antenna_mode() - Set antenna mode command to
+ * PE
+ * @mac: Global MAC pointer
+ * @command: Command received from SME
+ *
+ * Posts the set dual mac config command to PE.
+ *
+ * Return: None
+ */
+void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command)
+{
+	uint32_t len;
+	struct sir_set_antenna_mode *cmd;
+	QDF_STATUS status;
+	tSirMsgQ msg;
+	struct sir_antenna_mode_resp *param;
+
+	/* Setting MAC configuration is for the entire system.
+	 * So, no need to check session
+	 */
+
+	if (!command) {
+		sms_log(mac, LOGE, FL("Set antenna mode param is NULL"));
+		goto fail;
+	}
+
+	len = sizeof(*cmd);
+	cmd = qdf_mem_malloc(len);
+	if (!cmd) {
+		sms_log(mac, LOGE, FL("Memory allocation failed"));
+		goto fail;
+	}
+
+	cmd->message_type = eWNI_SME_SET_ANTENNA_MODE_REQ;
+	cmd->length = len;
+	cmd->set_antenna_mode = command->u.set_antenna_mode_cmd;
+
+	sms_log(mac, LOG1,
+		FL("Posting eWNI_SME_SET_ANTENNA_MODE_REQ to PE: %d %d"),
+		cmd->set_antenna_mode.num_rx_chains,
+		cmd->set_antenna_mode.num_tx_chains);
+
+	status = cds_send_mb_message_to_mac(cmd);
+	if (QDF_STATUS_SUCCESS != status) {
+		sms_log(mac, LOGE, FL("Posting to PE failed"));
+		/*
+		 * cds_send_mb_message_to_mac would've released the mem
+		 * allocated by cmd.
+		 */
+		goto fail;
+	}
+
+	return;
+fail:
+	param = qdf_mem_malloc(sizeof(*param));
+	if (!param) {
+		sms_log(mac, LOGE,
+			FL("Malloc fail: Fail to send response to SME"));
+		return;
+	}
+	sms_log(mac, LOGE, FL("Sending set dual mac fail response to SME"));
+	param->status = SET_ANTENNA_MODE_STATUS_ECANCELED;
+	msg.type = eWNI_SME_SET_ANTENNA_MODE_RESP;
+	msg.bodyptr = param;
+	msg.bodyval = 0;
+	sys_process_mmh_msg(mac, &msg);
+}
+
 /**
 /**
  * csr_process_nss_update_req() - Update nss command to PE
  * csr_process_nss_update_req() - Update nss command to PE
  * @mac: Globacl MAC pointer
  * @mac: Globacl MAC pointer

+ 85 - 0
core/wma/src/wma_main.c

@@ -5221,6 +5221,11 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg)
 			(struct vdev_ie_info *)msg->bodyptr);
 			(struct vdev_ie_info *)msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		break;
 		break;
+	case SIR_HAL_SOC_ANTENNA_MODE_REQ:
+		wma_send_pdev_set_antenna_mode(wma_handle,
+			(struct sir_antenna_mode_param *)msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
+		break;
 	case WMA_LRO_CONFIG_CMD:
 	case WMA_LRO_CONFIG_CMD:
 		wma_lro_config_cmd(wma_handle,
 		wma_lro_config_cmd(wma_handle,
 			(struct wma_lro_config_cmd_t *)msg->bodyptr);
 			(struct wma_lro_config_cmd_t *)msg->bodyptr);
@@ -5393,6 +5398,86 @@ QDF_STATUS wma_send_soc_set_dual_mac_config(tp_wma_handle wma_handle,
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }
 
 
+/**
+ * wma_send_pdev_set_antenna_mode() - Set antenna mode to FW
+ * @wma_handle: WMA handle
+ * @msg: Antenna mode parameters
+ *
+ * Send WMI_PDEV_SET_ANTENNA_MODE_CMDID to FW requesting to
+ * modify the number of TX/RX chains from host
+ *
+ * Return: QDF_STATUS. 0 on success.
+ */
+QDF_STATUS wma_send_pdev_set_antenna_mode(tp_wma_handle wma_handle,
+		struct sir_antenna_mode_param *msg)
+{
+	wmi_pdev_set_antenna_mode_cmd_fixed_param *cmd;
+	wmi_buf_t buf;
+	uint32_t len;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	struct sir_antenna_mode_resp *param;
+
+	if (!wma_handle) {
+		WMA_LOGE("%s: WMA handle is NULL. Cannot issue command",
+				__func__);
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!msg) {
+		WMA_LOGE("%s: Set antenna mode param is NULL", __func__);
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	len = sizeof(*cmd);
+
+	buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+	if (!buf) {
+		WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
+		status = QDF_STATUS_E_NOMEM;
+		goto resp;
+	}
+
+	cmd = (wmi_pdev_set_antenna_mode_cmd_fixed_param *) wmi_buf_data(buf);
+	WMITLV_SET_HDR(&cmd->tlv_header,
+		WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param,
+		WMITLV_GET_STRUCT_TLVLEN(
+			wmi_pdev_set_antenna_mode_cmd_fixed_param));
+
+	cmd->pdev_id = WMI_PDEV_ID_SOC;
+	/* Bits 0-15 is num of RX chains 16-31 is num of TX chains */
+	cmd->num_txrx_chains = msg->num_rx_chains;
+	cmd->num_txrx_chains |= (msg->num_tx_chains << 16);
+
+	WMA_LOGI("%s: Num of chains TX: %d RX: %d txrx_chains: 0x%x",
+		 __func__, msg->num_tx_chains,
+		 msg->num_rx_chains, cmd->num_txrx_chains);
+
+	if (wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
+				 WMI_PDEV_SET_ANTENNA_MODE_CMDID)) {
+		WMA_LOGE("%s: Failed to send WMI_PDEV_SET_ANTENNA_MODE_CMDID",
+				__func__);
+		wmi_buf_free(buf);
+		status = QDF_STATUS_E_FAILURE;
+		goto resp;
+	}
+	status = QDF_STATUS_SUCCESS;
+
+resp:
+	param = qdf_mem_malloc(sizeof(*param));
+	if (!param) {
+		WMA_LOGE("%s: Memory allocation failed", __func__);
+		return QDF_STATUS_E_NOMEM;
+	}
+	param->status = (status) ?
+		SET_ANTENNA_MODE_STATUS_ECANCELED :
+		SET_ANTENNA_MODE_STATUS_OK;
+	WMA_LOGE("%s: Send antenna mode resp to LIM status: %d",
+		 __func__, param->status);
+	wma_send_msg(wma_handle, SIR_HAL_SOC_ANTENNA_MODE_RESP,
+			(void *) param, 0);
+	return status;
+}
+
 /**
 /**
  * wma_crash_inject() - sends command to FW to simulate crash
  * wma_crash_inject() - sends command to FW to simulate crash
  * @wma_handle:         pointer of WMA context
  * @wma_handle:         pointer of WMA context