Browse Source

qcacld-3.0: Send p2p ack indication directly to HDD from PE

qcacld-2.0 to qcacld-3.0 propagation

During P2P functionality, Host will send GO NEG REQ and
receives ACK completion from firmware which will be queued
to indicate HDD. Meanwhile if host receives GO-NEG RESP it
will be sent directly to HDD via function callback. In HDD as
we got  GO NEG RESP before ACK completion for GO-NEG REQ, HDD
will generate pkt completion for GO NEG Request.
Now GO NEG CONFORMATION frame will be sent and driver will be
expecting completion for this. The GO NEG REQ ACK completion
which got buffered in PE will be delivered to Supplicant and
Supplicant assumes that this is the ACK for GO NEG CONF frame.
This causes early termination of remain on channel due to which
firmware may drop the GO NEG CONF frame and may not retry as ROC
is terminated.
Fix this by making ACK Completion indication to HDD via function
callback.

Git-commit: 32ddf4196f423b8eaea7ec6c0816e2961aa7fc45
Change-Id: I0dd3acb236b270839649d2becfdc007e7aae9fdd
CRs-Fixed: 1012547
(cherry picked from commit a3996d421de7f55d5a6f7da19d7ff4b568ce7c50)
(cherry picked from commit 42405db3bd3f4b10800cde8cdcd14f521461a5a7)
Selvaraj, Sridhar 8 years ago
parent
commit
4577a9b955

+ 1 - 0
core/hdd/inc/wlan_hdd_p2p.h

@@ -119,6 +119,7 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter,
 	uint32_t scan_id);
 void hdd_send_action_cnf(hdd_adapter_t *pAdapter, bool actionSendSuccess);
 int wlan_hdd_check_remain_on_channel(hdd_adapter_t *pAdapter);
+void hdd_send_action_cnf_cb(uint32_t session_id, bool status);
 void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter);
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))

+ 0 - 5
core/hdd/src/wlan_hdd_assoc.c

@@ -4893,11 +4893,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 	case eCSR_ROAM_REMAIN_CHAN_READY:
 		hdd_remain_chan_ready_handler(pAdapter, pRoamInfo->roc_scan_id);
 		break;
-	case eCSR_ROAM_SEND_ACTION_CNF:
-		hdd_send_action_cnf(pAdapter,
-				    (roamResult ==
-				     eCSR_ROAM_RESULT_NONE) ? true : false);
-		break;
 #ifdef FEATURE_WLAN_TDLS
 	case eCSR_ROAM_TDLS_STATUS_UPDATE:
 		qdf_ret_status =

+ 3 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -8186,6 +8186,9 @@ void wlan_hdd_cfg80211_register_frames(hdd_adapter_t *pAdapter)
 	/* Register frame indication call back */
 	sme_register_mgmt_frame_ind_callback(hHal, hdd_indicate_mgmt_frame);
 
+	/* Register for p2p ack indication */
+	sme_register_p2p_ack_ind_callback(hHal, hdd_send_action_cnf_cb);
+
 	/* Right now we are registering these frame when driver is getting
 	   initialized. Once we will move to 2.6.37 kernel, in which we have
 	   frame register ops, we will move this code as a part of that */

+ 0 - 6
core/hdd/src/wlan_hdd_hostapd.c

@@ -1772,12 +1772,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		hdd_remain_chan_ready_handler(pHostapdAdapter,
 			pSapEvent->sapevt.sap_roc_ind.scan_id);
 		return QDF_STATUS_SUCCESS;
-	case eSAP_SEND_ACTION_CNF:
-		hdd_send_action_cnf(pHostapdAdapter,
-				    (eSAP_STATUS_SUCCESS ==
-				     pSapEvent->sapevt.sapActionCnf.
-				     actionSendSuccess) ? true : false);
-		return QDF_STATUS_SUCCESS;
 	case eSAP_UNKNOWN_STA_JOIN:
 		snprintf(unknownSTAEvent, IW_CUSTOM_MAX,
 			 "JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x",

+ 34 - 0
core/hdd/src/wlan_hdd_p2p.c

@@ -1709,6 +1709,40 @@ void hdd_send_action_cnf(hdd_adapter_t *pAdapter, bool actionSendSuccess)
 	complete(&pAdapter->tx_action_cnf_event);
 }
 
+/**
+ * hdd_send_action_cnf_cb - action confirmation callback
+ * @session_id: SME session ID
+ * @tx_completed: ack status
+ *
+ * This function invokes hdd_sendActionCnf to update ack status to
+ * supplicant.
+ */
+void hdd_send_action_cnf_cb(uint32_t session_id, bool tx_completed)
+{
+	hdd_context_t *hdd_ctx;
+	hdd_adapter_t *adapter;
+
+	ENTER();
+
+	/* Get the HDD context.*/
+	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+	if (0 != wlan_hdd_validate_context(hdd_ctx))
+		return;
+
+	adapter = hdd_get_adapter_by_sme_session_id(hdd_ctx, session_id);
+	if (NULL == adapter) {
+		hddLog(LOGE, FL("adapter not found"));
+		return;
+	}
+
+	if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) {
+		hddLog(LOGE, FL("adapter has invalid magic"));
+		return;
+	}
+
+	hdd_send_action_cnf(adapter, tx_completed);
+}
+
 /**
  * hdd_set_p2p_noa
  *

+ 1 - 0
core/mac/inc/ani_global.h

@@ -973,6 +973,7 @@ typedef struct sAniSirGlobal {
 
 	uint32_t dual_mac_feature_disable;
 	sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
+	sir_p2p_ack_ind_callback p2p_ack_ind_cb;
 	bool first_scan_done;
 	int8_t first_scan_bucket_threshold;
 	enum auth_tx_ack_status auth_ack_status;

+ 15 - 0
core/mac/inc/sir_api.h

@@ -2672,6 +2672,21 @@ struct sir_sme_mgmt_frame_cb_req {
 	sir_mgmt_frame_ind_callback callback;
 };
 
+typedef void (*sir_p2p_ack_ind_callback)(uint32_t session_id,
+		bool tx_completion_status);
+
+/**
+ * struct sir_p2p_ack_ind_cb_req - Register a p2p ack ind callback req
+ * @message_type: message id
+ * @length: msg length
+ * @callback: callback for p2p ack indication
+ */
+struct sir_sme_p2p_ack_ind_cb_req {
+	uint16_t message_type;
+	uint16_t length;
+	sir_p2p_ack_ind_callback callback;
+};
+
 #ifdef WLAN_FEATURE_11W
 typedef struct sSirSmeUnprotMgmtFrameInd {
 	uint8_t sessionId;

+ 1 - 1
core/mac/inc/wni_api.h

@@ -104,7 +104,6 @@ enum eWniMsgTypes {
 	eWNI_SME_REMAIN_ON_CHN_RSP,
 	eWNI_SME_REMAIN_ON_CHN_RDY_IND,
 	eWNI_SME_SEND_ACTION_FRAME_IND,
-	eWNI_SME_ACTION_FRAME_SEND_CNF,
 	eWNI_SME_ABORT_REMAIN_ON_CHAN_IND,
 	eWNI_SME_UPDATE_NOA,
 	eWNI_SME_CLEAR_DFS_CHANNEL_LIST,
@@ -261,6 +260,7 @@ enum eWniMsgTypes {
 	eWNI_SME_NDP_END_RSP,
 	eWNI_SME_NDP_PEER_DEPARTED_IND,
 	eWNI_SME_NDP_END_IND,
+	eWNI_SME_REGISTER_P2P_ACK_CB,
 	eWNI_SME_MSG_TYPES_END
 };
 

+ 9 - 15
core/mac/src/pe/lim/lim_p2p.c

@@ -70,8 +70,6 @@ extern tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state
 					tpSetLinkStateCallback callback,
 					void *callbackArg);
 
-QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t txCompleteSuccess);
-
 /*------------------------------------------------------------------
  *
  * Below function is called if hdd requests a remain on channel.
@@ -364,7 +362,7 @@ void lim_remain_on_chn_rsp(tpAniSirGlobal pMac, QDF_STATUS status, uint32_t *dat
 	/* If remain on channel timer expired and action frame is pending then
 	 * indicaiton confirmation with status failure */
 	if (pMac->lim.mgmtFrameSessionId != 0xff) {
-		lim_p2p_action_cnf(pMac, 0);
+		lim_p2p_action_cnf(pMac, false);
 	}
 
 	return;
@@ -417,10 +415,9 @@ QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t txCompleteSuccess)
 	if (pMac->lim.mgmtFrameSessionId != 0xff) {
 		/* The session entry might be invalid(0xff) action confirmation received after
 		 * remain on channel timer expired */
-		lim_send_sme_rsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF,
-				 (txCompleteSuccess ? eSIR_SME_SUCCESS :
-				  eSIR_SME_SEND_ACTION_FAIL),
-				 pMac->lim.mgmtFrameSessionId, 0);
+		if (pMac->p2p_ack_ind_cb)
+			pMac->p2p_ack_ind_cb(pMac->lim.mgmtFrameSessionId,
+							txCompleteSuccess);
 		pMac->lim.mgmtFrameSessionId = 0xff;
 	}
 
@@ -466,9 +463,9 @@ static void lim_tx_action_frame(tpAniSirGlobal mac_ctx,
 			channel_freq);
 
 		if (!mb_msg->noack)
-			lim_send_sme_rsp(mac_ctx,
-				eWNI_SME_ACTION_FRAME_SEND_CNF,
-				qdf_status, mb_msg->sessionId, 0);
+			lim_p2p_action_cnf(mac_ctx,
+				(QDF_IS_STATUS_SUCCESS(qdf_status)) ?
+				true : false);
 		mac_ctx->lim.mgmtFrameSessionId = 0xff;
 	} else {
 		mac_ctx->lim.mgmtFrameSessionId = mb_msg->sessionId;
@@ -484,9 +481,7 @@ static void lim_tx_action_frame(tpAniSirGlobal mac_ctx,
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			lim_log(mac_ctx, LOGE,
 				FL("couldn't send action frame"));
-			lim_send_sme_rsp(mac_ctx,
-				eWNI_SME_ACTION_FRAME_SEND_CNF,
-				qdf_status, mb_msg->sessionId, 0);
+			lim_p2p_action_cnf(mac_ctx, false);
 			mac_ctx->lim.mgmtFrameSessionId = 0xff;
 		} else {
 			mac_ctx->lim.mgmtFrameSessionId = mb_msg->sessionId;
@@ -540,8 +535,7 @@ void lim_send_p2p_action_frame(tpAniSirGlobal mac_ctx,
 	if ((!mac_ctx->lim.gpLimRemainOnChanReq) && (0 != mb_msg->wait)) {
 		lim_log(mac_ctx, LOGE,
 			FL("RemainOnChannel is not running"));
-		lim_send_sme_rsp(mac_ctx, eWNI_SME_ACTION_FRAME_SEND_CNF,
-			QDF_STATUS_E_FAILURE, mb_msg->sessionId, 0);
+		lim_p2p_action_cnf(mac_ctx, false);
 		return;
 	}
 	sme_session_id = mb_msg->sessionId;

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

@@ -1416,6 +1416,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
 	case eWNI_SME_NDP_INITIATOR_REQ:
 	case eWNI_SME_NDP_RESPONDER_REQ:
 	case eWNI_SME_NDP_END_REQ:
+	case eWNI_SME_REGISTER_P2P_ACK_CB:
 		/* These messages are from HDD.No need to respond to HDD */
 		lim_process_normal_hdd_msg(mac_ctx, msg, false);
 		break;

+ 1 - 4
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -3279,10 +3279,7 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
 			 * failure.
 			 */
 			if (pMac->lim.mgmtFrameSessionId != 0xff) {
-				lim_send_sme_rsp(pMac,
-					eWNI_SME_ACTION_FRAME_SEND_CNF,
-					eSIR_SME_SEND_ACTION_FAIL,
-					pMac->lim.mgmtFrameSessionId, 0);
+				lim_p2p_action_cnf(pMac, false);
 				pMac->lim.mgmtFrameSessionId = 0xff;
 			}
 		} else if (PREAUTH_REQUESTOR_ID == pScanEvent->requestor) {

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

@@ -4680,6 +4680,32 @@ __lim_process_sme_reset_ap_caps_change(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 	return;
 }
 
+/**
+ * lim_register_p2p_ack_ind_cb() - Save the p2p ack indication callback.
+ * @mac_ctx: Mac pointer
+ * @msg_buf: Msg pointer containing the callback
+ *
+ * This function is used to save the p2p ack indication callback in PE.
+ *
+ * Return: None
+ */
+static void lim_register_p2p_ack_ind_cb(tpAniSirGlobal mac_ctx,
+		uint32_t *msg_buf)
+{
+	struct sir_sme_p2p_ack_ind_cb_req *sme_req =
+		(struct sir_sme_p2p_ack_ind_cb_req *)msg_buf;
+
+	if (NULL == msg_buf) {
+		lim_log(mac_ctx, LOGE, FL("msg_buf is null"));
+		return;
+	}
+	if (sme_req->callback)
+		mac_ctx->p2p_ack_ind_cb =
+			sme_req->callback;
+	else
+		lim_log(mac_ctx, LOGE, FL("sme_req->callback is null"));
+}
+
 /**
  * lim_register_mgmt_frame_ind_cb() - Save the Management frame
  * indication callback in PE.
@@ -5138,6 +5164,9 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
 	case eWNI_SME_NDP_RESPONDER_REQ:
 		lim_handle_ndp_request_message(pMac, pMsg);
 		break;
+	case eWNI_SME_REGISTER_P2P_ACK_CB:
+		lim_register_p2p_ack_ind_cb(pMac, pMsgBuf);
+		break;
 	default:
 		qdf_mem_free((void *)pMsg->bodyptr);
 		pMsg->bodyptr = NULL;

+ 2 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -617,4 +617,6 @@ static inline void lim_deactivate_and_change_timer_host_roam(
 
 bool lim_is_robust_mgmt_action_frame(uint8_t action_category);
 bool lim_is_ext_cap_ie_present (struct s_ext_cap *ext_cap);
+QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal mac_ctx,
+			uint32_t tx_complete_success);
 #endif /* __LIM_UTILS_H */

+ 1 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -281,7 +281,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
 		CASE_RETURN_STRING(eWNI_SME_REMAIN_ON_CHN_RSP);
 		CASE_RETURN_STRING(eWNI_SME_REMAIN_ON_CHN_RDY_IND);
 		CASE_RETURN_STRING(eWNI_SME_SEND_ACTION_FRAME_IND);
-		CASE_RETURN_STRING(eWNI_SME_ACTION_FRAME_SEND_CNF);
 		CASE_RETURN_STRING(eWNI_SME_ABORT_REMAIN_ON_CHAN_IND);
 		CASE_RETURN_STRING(eWNI_SME_UPDATE_NOA);
 		CASE_RETURN_STRING(eWNI_SME_CLEAR_DFS_CHANNEL_LIST);
@@ -372,6 +371,7 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
 		CASE_RETURN_STRING(eWNI_SME_FW_DUMP_IND);
 		CASE_RETURN_STRING(eWNI_SME_EXT_CHANGE_CHANNEL);
 		CASE_RETURN_STRING(eWNI_SME_EXT_CHANGE_CHANNEL_IND);
+		CASE_RETURN_STRING(eWNI_SME_REGISTER_P2P_ACK_CB);
 		CASE_RETURN_STRING(eWNI_SME_MSG_TYPES_END);
 	default:
 		return (uint8_t *) "UNKNOWN";

+ 0 - 2
core/sap/inc/sap_api.h

@@ -155,7 +155,6 @@ typedef enum {
 	/* Event send on WPS PBC probe request is received */
 	eSAP_WPS_PBC_PROBE_REQ_EVENT,
 	eSAP_REMAIN_CHAN_READY,
-	eSAP_SEND_ACTION_CNF,
 	eSAP_DISCONNECT_ALL_P2P_CLIENT,
 	eSAP_MAC_TRIG_STOP_BSS_EVENT,
 	/*
@@ -445,7 +444,6 @@ typedef struct sap_Event_s {
 		tSap_GetWPSPBCSessionEvent sapGetWPSPBCSessionEvent;
 		/*eSAP_WPS_PBC_PROBE_REQ_EVENT */
 		tSap_WPSPBCProbeReqEvent sapPBCProbeReqEvent;
-		/* eSAP_SEND_ACTION_CNF */
 		tSap_SendActionCnf sapActionCnf;
 		/* eSAP_UNKNOWN_STA_JOIN */
 		tSap_UnknownSTAJoinEvent sapUnknownSTAJoin;

+ 0 - 7
core/sap/src/sap_api_link_cntl.c

@@ -939,13 +939,6 @@ wlansap_roam_callback(void *ctx, tCsrRoamInfo *csr_roam_info, uint32_t roamId,
 				     eSAP_REMAIN_CHAN_READY,
 				     (void *) eSAP_STATUS_SUCCESS);
 		break;
-	case eCSR_ROAM_SEND_ACTION_CNF:
-		sap_signal_hdd_event(sap_ctx, csr_roam_info,
-			eSAP_SEND_ACTION_CNF,
-			(void *) ((eSapStatus)
-			((roam_result == eCSR_ROAM_RESULT_NONE) ?
-			eSAP_STATUS_SUCCESS : eSAP_STATUS_FAILURE)));
-		break;
 	case eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS:
 		sap_signal_hdd_event(sap_ctx, csr_roam_info,
 				     eSAP_DISCONNECT_ALL_P2P_CLIENT,

+ 0 - 6
core/sap/src/sap_fsm.c

@@ -819,7 +819,6 @@ static uint8_t *sap_hdd_event_to_string(eSapHddEvent event)
 	CASE_RETURN_STRING(eSAP_GET_WPSPBC_SESSION_EVENT);
 	CASE_RETURN_STRING(eSAP_WPS_PBC_PROBE_REQ_EVENT);
 	CASE_RETURN_STRING(eSAP_REMAIN_CHAN_READY);
-	CASE_RETURN_STRING(eSAP_SEND_ACTION_CNF);
 	CASE_RETURN_STRING(eSAP_DISCONNECT_ALL_P2P_CLIENT);
 	CASE_RETURN_STRING(eSAP_MAC_TRIG_STOP_BSS_EVENT);
 	CASE_RETURN_STRING(eSAP_UNKNOWN_STA_JOIN);
@@ -2865,11 +2864,6 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 		sap_ap_event.sapevt.sap_roc_ind.scan_id =
 				sap_ctx->roc_ind_scan_id;
 		break;
-	case eSAP_SEND_ACTION_CNF:
-		sap_ap_event.sapHddEventCode = eSAP_SEND_ACTION_CNF;
-		sap_ap_event.sapevt.sapActionCnf.actionSendSuccess =
-			(eSapStatus) context;
-		break;
 
 	case eSAP_DISCONNECT_ALL_P2P_CLIENT:
 		sap_ap_event.sapHddEventCode = eSAP_DISCONNECT_ALL_P2P_CLIENT;

+ 0 - 1
core/sme/inc/csr_api.h

@@ -465,7 +465,6 @@ typedef enum {
 	eCSR_ROAM_FT_RESPONSE,
 	eCSR_ROAM_FT_START,
 	eCSR_ROAM_REMAIN_CHAN_READY,
-	eCSR_ROAM_SEND_ACTION_CNF,
 	/* this mean error happens before assoc_start/roam_start is called. */
 	eCSR_ROAM_SESSION_OPENED,
 	eCSR_ROAM_FT_REASSOC_FAILED,

+ 2 - 0
core/sme/inc/sme_api.h

@@ -1157,4 +1157,6 @@ void sme_get_vdev_type_nss(tHalHandle hal, enum tQDF_ADAPTER_MODE dev_mode,
 		uint8_t *nss_2g, uint8_t *nss_5g);
 QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
 					  uint8_t default_idx);
+QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal,
+		sir_p2p_ack_ind_callback callback);
 #endif /* #if !defined( __SME_API_H ) */

+ 38 - 10
core/sme/src/common/sme_api.c

@@ -76,7 +76,6 @@ extern QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
 						    tSmeCmd *p2pRemainonChn);
 extern QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg);
 extern QDF_STATUS sme_remain_on_chn_ready(tHalHandle hHal, uint8_t *pMsg);
-extern QDF_STATUS sme_send_action_cnf(tHalHandle hHal, uint8_t *pMsg);
 
 static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac);
 static void sme_abort_command(tpAniSirGlobal pMac, tSmeCmd *pCommand,
@@ -2562,15 +2561,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg)
 				pMsg->type);
 		}
 		break;
-	case eWNI_SME_ACTION_FRAME_SEND_CNF:
-		if (pMsg->bodyptr) {
-			status = sme_send_action_cnf(pMac, pMsg->bodyptr);
-			qdf_mem_free(pMsg->bodyptr);
-		} else {
-			sms_log(pMac, LOGE, FL("Empty message for %d"),
-				pMsg->type);
-		}
-		break;
 #ifdef FEATURE_WLAN_SCAN_PNO
 	case eWNI_SME_PREF_NETWORK_FOUND_IND:
 		MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_WMA_MSG,
@@ -6495,6 +6485,44 @@ QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
 	return QDF_STATUS_E_FAILURE;
 } /* sme_get_operation_channel ends here */
 
+/**
+ * sme_register_p2p_ack_ind_callback() - p2p ack indication callback
+ * @hal: hal pointer
+ * @callback: callback pointer to be registered
+ *
+ * This function is used to register a callback to PE for p2p ack
+ * indication
+ *
+ * Return: Success if msg is posted to PE else Failure.
+ */
+QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal,
+				sir_p2p_ack_ind_callback callback)
+{
+	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+	struct sir_sme_p2p_ack_ind_cb_req *msg;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	sms_log(mac_ctx, LOG1, FL(": ENTER"));
+	status = sme_acquire_global_lock(&mac_ctx->sme);
+	if (QDF_IS_STATUS_SUCCESS(status)) {
+		msg = qdf_mem_malloc(sizeof(*msg));
+		if (NULL == msg) {
+			sms_log(mac_ctx, LOGE,
+				FL("Failed to allocate memory"));
+		sme_release_global_lock(&mac_ctx->sme);
+		return QDF_STATUS_E_NOMEM;
+		}
+		qdf_mem_zero(msg, sizeof(*msg));
+		msg->message_type = eWNI_SME_REGISTER_P2P_ACK_CB;
+		msg->length = sizeof(*msg);
+
+		msg->callback = callback;
+		status = cds_send_mb_message_to_mac(msg);
+		sme_release_global_lock(&mac_ctx->sme);
+		return status;
+	}
+	return status;
+}
+
 /**
  * sme_register_mgmt_frame_ind_callback() - Register a callback for
  * management frame indication to PE.

+ 0 - 1
core/sme/src/csr/csr_util.c

@@ -201,7 +201,6 @@ const char *get_e_roam_cmd_status_str(eRoamCmdStatus val)
 		CASE_RETURN_STR(eCSR_ROAM_FT_RESPONSE);
 		CASE_RETURN_STR(eCSR_ROAM_FT_START);
 		CASE_RETURN_STR(eCSR_ROAM_REMAIN_CHAN_READY);
-		CASE_RETURN_STR(eCSR_ROAM_SEND_ACTION_CNF);
 		CASE_RETURN_STR(eCSR_ROAM_SESSION_OPENED);
 		CASE_RETURN_STR(eCSR_ROAM_FT_REASSOC_FAILED);
 		CASE_RETURN_STR(eCSR_ROAM_PMK_NOTIFY);

+ 0 - 16
core/sme/src/p2p/p2p_api.c

@@ -173,22 +173,6 @@ QDF_STATUS sme_remain_on_chn_ready(tHalHandle hHal, uint8_t *pMsg)
 	return status;
 }
 
-QDF_STATUS sme_send_action_cnf(tHalHandle hHal, uint8_t *pMsg)
-{
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tCsrRoamInfo RoamInfo;
-	tSirSmeRsp *pSmeRsp = (tSirSmeRsp *) pMsg;
-
-	/* forward the indication to HDD */
-	/* RoamInfo can be passed as NULL....todo */
-	csr_roam_call_callback(pMac, pSmeRsp->sessionId, &RoamInfo, 0,
-			       eCSR_ROAM_SEND_ACTION_CNF,
-			       (pSmeRsp->statusCode == eSIR_SME_SUCCESS) ? 0 :
-			       eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
-	return status;
-}
-
 QDF_STATUS sme_p2p_open(tHalHandle hHal)
 {
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);