diff options
| author | Masti, Narayanraddi <c_nmasti@qti.qualcomm.com> | 2016-05-06 16:35:17 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-10 17:59:19 +0530 |
| commit | 32ddf4196f423b8eaea7ec6c0816e2961aa7fc45 (patch) | |
| tree | be7a6fa1eb8f96c795a873f17cd455d7850c6c71 | |
| parent | ee45e2bbc5e9d3a6a79323fb970d183257706763 (diff) | |
qcacld-2.0: Send p2p ack indication directly to HDD from PE
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.
Change-Id: I0dd3acb236b270839649d2becfdc007e7aae9fdd
CRs-Fixed: 1012547
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_p2p.h | 1 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 4 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_early_suspend.c | 4 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 6 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_p2p.c | 42 | ||||
| -rw-r--r-- | CORE/MAC/inc/aniGlobal.h | 1 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 15 | ||||
| -rw-r--r-- | CORE/MAC/inc/wniApi.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limP2P.c | 25 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMessageQueue.c | 1 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 29 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.h | 2 | ||||
| -rw-r--r-- | CORE/SAP/inc/sapApi.h | 3 | ||||
| -rw-r--r-- | CORE/SAP/src/sapApiLinkCntl.c | 10 | ||||
| -rw-r--r-- | CORE/SAP/src/sapFsm.c | 7 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 1 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 2 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrUtil.c | 1 | ||||
| -rw-r--r-- | CORE/SME/src/p2p/p2p_Api.c | 20 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 53 | ||||
| -rw-r--r-- | CORE/SYS/legacy/src/utils/src/macTrace.c | 2 |
23 files changed, 155 insertions, 83 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_p2p.h b/CORE/HDD/inc/wlan_hdd_p2p.h index cfafdca3695a..c4443a8716a0 100644 --- a/CORE/HDD/inc/wlan_hdd_p2p.h +++ b/CORE/HDD/inc/wlan_hdd_p2p.h @@ -134,6 +134,7 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, void hdd_remainChanReadyHandler( hdd_adapter_t *pAdapter ); void hdd_sendActionCnf( hdd_adapter_t *pAdapter, tANI_BOOLEAN actionSendSuccess ); +void hdd_send_action_cnf_cb(uint32_t session_id, bool status); int wlan_hdd_check_remain_on_channel(hdd_adapter_t *pAdapter); void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter); diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 7443c2660928..3e5814a34e07 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -4086,10 +4086,6 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, case eCSR_ROAM_REMAIN_CHAN_READY: hdd_remainChanReadyHandler( pAdapter ); break; - case eCSR_ROAM_SEND_ACTION_CNF: - hdd_sendActionCnf( pAdapter, - (roamResult == eCSR_ROAM_RESULT_NONE) ? TRUE : FALSE ); - break; #ifdef FEATURE_WLAN_TDLS case eCSR_ROAM_TDLS_STATUS_UPDATE: halStatus = hdd_RoamTdlsStatusUpdateHandler( pAdapter, pRoamInfo, diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index c679e9bae199..d427b5aa77e4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11841,6 +11841,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 */ diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index cbf51899b763..9b9f21c98123 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -74,6 +74,7 @@ #include <wlan_hdd_ipa.h> #endif #include <wlan_logging_sock_svc.h> +#include <wlan_hdd_p2p.h> /**----------------------------------------------------------------------------- * Preprocessor definitions and constants @@ -2321,6 +2322,9 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) sme_register_mgmt_frame_ind_callback(pHddCtx->hHal, hdd_indicate_mgmt_frame); + /* Register for p2p ack indication */ + sme_register_p2p_ack_ind_callback(pHddCtx->hHal, hdd_send_action_cnf_cb); + #ifdef FEATURE_WLAN_EXTSCAN sme_ExtScanRegisterCallback(pHddCtx->hHal, wlan_hdd_cfg80211_extscan_callback); diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index e004de69be22..53d82a8eecc9 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -2059,12 +2059,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa case eSAP_REMAIN_CHAN_READY: hdd_remainChanReadyHandler( pHostapdAdapter ); return VOS_STATUS_SUCCESS; - case eSAP_SEND_ACTION_CNF: - hdd_sendActionCnf( pHostapdAdapter, - ( eSAP_STATUS_SUCCESS == - pSapEvent->sapevt.sapActionCnf.actionSendSuccess ) ? - TRUE : FALSE ); - return VOS_STATUS_SUCCESS; case eSAP_UNKNOWN_STA_JOIN: snprintf(unknownSTAEvent, IW_CUSTOM_MAX, "JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x", pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[0], diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c index 9d03f00dea52..d2df4b827adc 100644 --- a/CORE/HDD/src/wlan_hdd_p2p.c +++ b/CORE/HDD/src/wlan_hdd_p2p.c @@ -1892,6 +1892,48 @@ void hdd_sendActionCnf( hdd_adapter_t *pAdapter, tANI_BOOLEAN actionSendSuccess } /** + * 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) +{ + v_CONTEXT_t vos_context; + hdd_context_t *hdd_ctx; + hdd_adapter_t *adapter; + + ENTER(); + + /* Get the global VOSS context */ + vos_context = vos_get_global_context(VOS_MODULE_ID_SYS, NULL); + if (!vos_context) { + hddLog(LOGE, FL("Global VOS context is Null")); + return; + } + + /* Get the HDD context.*/ + hdd_ctx = vos_get_context(VOS_MODULE_ID_HDD, vos_context); + 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_sendActionCnf(adapter, tx_completed) ; +} + +/** * hdd_setP2pNoa * *FUNCTION: diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 609054461c9f..af55de9950a1 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1268,6 +1268,7 @@ typedef struct sAniSirGlobal bool first_scan_done; int8_t first_scan_bucket_threshold; sir_mgmt_frame_ind_callback mgmt_frame_ind_cb; + sir_p2p_ack_ind_callback p2p_ack_ind_cb; } tAniSirGlobal; typedef enum diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index c5d054301246..e73e4754d35b 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -3551,6 +3551,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 { diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h index 29c1f5ac2a7a..3fc70f4f59f0 100644 --- a/CORE/MAC/inc/wniApi.h +++ b/CORE/MAC/inc/wniApi.h @@ -205,7 +205,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, @@ -418,6 +417,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 }; diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c index b3af825c60bd..3f124e8b3688 100644 --- a/CORE/MAC/src/pe/lim/limP2P.c +++ b/CORE/MAC/src/pe/lim/limP2P.c @@ -80,7 +80,6 @@ extern tSirRetStatus limSetLinkState( tpSetLinkStateCallback callback, void *callbackArg); static tSirRetStatus limCreateSessionForRemainOnChn(tpAniSirGlobal pMac, tPESession **ppP2pSession); -eHalStatus limP2PActionCnf(tpAniSirGlobal pMac, tANI_U32 txCompleteSuccess); /*------------------------------------------------------------------ * * Below function is callback function, it is called when @@ -603,7 +602,7 @@ void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data) * indicaiton confirmation with status failure */ if (pMac->lim.mgmtFrameSessionId != 0xff) { - limP2PActionCnf(pMac, 0); + limP2PActionCnf(pMac, false); } return; @@ -725,9 +724,9 @@ eHalStatus limP2PActionCnf(tpAniSirGlobal pMac, tANI_U32 txCompleteSuccess) { /* The session entry might be invalid(0xff) action confirmation received after * remain on channel timer expired */ - limSendSmeRsp(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; } @@ -769,8 +768,7 @@ void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg) { limLog(pMac, LOGE, FL("Remain on channel is not running")); - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, - eHAL_STATUS_FAILURE, pMbMsg->sessionId, 0); + limP2PActionCnf(pMac, false); return; } smeSessionId = pMbMsg->sessionId; @@ -807,8 +805,7 @@ void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg) } if( !isSessionActive ) { - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, - eHAL_STATUS_FAILURE, pMbMsg->sessionId, 0); + limP2PActionCnf(pMac, false); return; } } @@ -966,8 +963,7 @@ send_action_frame: { limLog(pMac, LOGE, FL("Failed to Send Action frame")); - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, - eHAL_STATUS_FAILURE, pMbMsg->sessionId, 0); + limP2PActionCnf(pMac, false); return; } } @@ -1048,8 +1044,8 @@ send_frame1: if (!pMbMsg->noack) { - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, - halstatus, pMbMsg->sessionId, 0); + limP2PActionCnf(pMac, (HAL_STATUS_SUCCESS(halstatus)) ? + true : false); } pMac->lim.mgmtFrameSessionId = 0xff; } @@ -1064,8 +1060,7 @@ send_frame1: if ( ! HAL_STATUS_SUCCESS ( halstatus ) ) { limLog( pMac, LOGE, FL("could not send action frame!" )); - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, halstatus, - pMbMsg->sessionId, 0); + limP2PActionCnf(pMac, false); pMac->lim.mgmtFrameSessionId = 0xff; } else diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c index 930e7281a6eb..2b7eb3f7830e 100644 --- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c +++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c @@ -1467,6 +1467,7 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg) 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 limProcessNormalHddMsg(pMac, limMsg, false); //no need to response to hdd break; diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c index 4af824983398..6df6229e675e 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c @@ -5087,9 +5087,7 @@ void limProcessRxScanEvent(tpAniSirGlobal pMac, void *buf) * pending then indicate confirmation with status failure */ if (pMac->lim.mgmtFrameSessionId != 0xff) { - limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, - eSIR_SME_SEND_ACTION_FAIL, - pMac->lim.mgmtFrameSessionId, 0); + limP2PActionCnf(pMac, false); pMac->lim.mgmtFrameSessionId = 0xff; } diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index ca029e7894ce..61fb63a11f16 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -5755,6 +5755,32 @@ __limProcessSmeResetApCapsChange(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) } /** + * 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) { + limLog(mac_ctx, LOGE, FL("msg_buf is null")); + return; + } + if (sme_req->callback) + mac_ctx->p2p_ack_ind_cb = + sme_req->callback; + else + limLog(mac_ctx, LOGE, FL("sme_req->callback is null")); +} + +/** * lim_register_mgmt_frame_ind_cb() - Save the Management frame * indication callback in PE. * @mac_ctx: Mac pointer @@ -6194,6 +6220,9 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) case eWNI_SME_NDP_END_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: vos_mem_free((v_VOID_t*)pMsg->bodyptr); pMsg->bodyptr = NULL; diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index e9d760975575..7c9635653462 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -672,5 +672,7 @@ void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx, uint16_t *caps, uint16_t bss_caps); void lim_parse_beacon_for_tim(tpAniSirGlobal mac_ctx, uint8_t* rx_packet_info, tpPESession session); +eHalStatus limP2PActionCnf(tpAniSirGlobal mac_ctx, + uint32_t tx_complete_success); #endif /* __LIM_UTILS_H */ diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h index dd37c2ecca1c..c3ce85ac3791 100644 --- a/CORE/SAP/inc/sapApi.h +++ b/CORE/SAP/inc/sapApi.h @@ -174,7 +174,6 @@ typedef enum { eSAP_GET_WPSPBC_SESSION_EVENT, /* Event send when user call WLANSAP_getWpsSessionOverlap */ eSAP_WPS_PBC_PROBE_REQ_EVENT, /* Event send on WPS PBC probe request is received */ eSAP_REMAIN_CHAN_READY, - eSAP_SEND_ACTION_CNF, eSAP_DISCONNECT_ALL_P2P_CLIENT, eSAP_MAC_TRIG_STOP_BSS_EVENT, eSAP_UNKNOWN_STA_JOIN, /* Event send when a STA in neither white list or black list tries to associate in softap mode */ @@ -412,7 +411,7 @@ typedef struct sap_Event_s { tSap_AssocStaListEvent sapAssocStaListEvent; /*SAP_ASSOC_STA_CALLBACK_EVENT */ tSap_GetWPSPBCSessionEvent sapGetWPSPBCSessionEvent; /*SAP_GET_WPSPBC_SESSION_EVENT */ tSap_WPSPBCProbeReqEvent sapPBCProbeReqEvent; /*eSAP_WPS_PBC_PROBE_REQ_EVENT */ - tSap_SendActionCnf sapActionCnf; /* eSAP_SEND_ACTION_CNF */ + tSap_SendActionCnf sapActionCnf; tSap_UnknownSTAJoinEvent sapUnknownSTAJoin; /* eSAP_UNKNOWN_STA_JOIN */ tSap_MaxAssocExceededEvent sapMaxAssocExceeded; /* eSAP_MAX_ASSOC_EXCEEDED */ tSap_DfsNolInfo sapDfsNolInfo; /*eSAP_DFS_NOL_XXX */ diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c index 0f258668e840..71b5432b6335 100644 --- a/CORE/SAP/src/sapApiLinkCntl.c +++ b/CORE/SAP/src/sapApiLinkCntl.c @@ -691,16 +691,6 @@ WLANSAP_RoamCallback eSAP_REMAIN_CHAN_READY, (v_PVOID_t) eSAP_STATUS_SUCCESS); break; - case eCSR_ROAM_SEND_ACTION_CNF: - VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, - FL("CSR roamStatus = %s (%d)"), - "eCSR_ROAM_SEND_ACTION_CNF", roamStatus); - sapSignalHDDevent(sapContext, pCsrRoamInfo, - eSAP_SEND_ACTION_CNF, - (v_PVOID_t)((eSapStatus)((roamResult == eCSR_ROAM_RESULT_NONE) - ? eSAP_STATUS_SUCCESS : eSAP_STATUS_FAILURE))); - break; - case eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS: VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, FL("CSR roamStatus = %s (%d)"), diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c index 8d549448f615..1c85a2665b3e 100644 --- a/CORE/SAP/src/sapFsm.c +++ b/CORE/SAP/src/sapFsm.c @@ -2946,13 +2946,6 @@ sapSignalHDDevent "eSAP_REMAIN_CHAN_READY"); sapApAppEvent.sapHddEventCode = eSAP_REMAIN_CHAN_READY; break; - case eSAP_SEND_ACTION_CNF: - VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, - FL("SAP event callback event = %s"), - "eSAP_SEND_ACTION_CNF"); - sapApAppEvent.sapHddEventCode = eSAP_SEND_ACTION_CNF; - sapApAppEvent.sapevt.sapActionCnf.actionSendSuccess = (eSapStatus)context; - break; case eSAP_DISCONNECT_ALL_P2P_CLIENT: VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 151cd393d260..0fe9739937d3 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -499,7 +499,6 @@ typedef enum #endif eCSR_ROAM_FT_START, eCSR_ROAM_REMAIN_CHAN_READY, - eCSR_ROAM_SEND_ACTION_CNF, //this mean error happens before association_start or roaming_start is called. eCSR_ROAM_SESSION_OPENED, eCSR_ROAM_FT_REASSOC_FAILED, diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index 72828571d3f4..fad5c7fe15b8 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -4573,4 +4573,6 @@ eHalStatus sme_update_sta_roam_policy(tHalHandle hal_handle, enum sta_roam_policy_dfs_mode dfs_mode, bool skip_unsafe_channels, uint8_t session_id); +eHalStatus sme_register_p2p_ack_ind_callback(tHalHandle hal, + sir_p2p_ack_ind_callback callback); #endif //#if !defined( __SME_API_H ) diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index 409aaf1bc8ac..87cdfee1d7f0 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -456,7 +456,6 @@ get_eRoamCmdStatus_str(eRoamCmdStatus val) #endif 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); #ifdef FEATURE_WLAN_LFR diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c index 7bee2bde0ce4..b86fbb841235 100644 --- a/CORE/SME/src/p2p/p2p_Api.c +++ b/CORE/SME/src/p2p/p2p_Api.c @@ -221,26 +221,6 @@ eHalStatus sme_remainOnChnReady( tHalHandle hHal, tANI_U8* pMsg) return status; } - -eHalStatus sme_sendActionCnf( tHalHandle hHal, tANI_U8* pMsg) -{ - tpAniSirGlobal pMac = PMAC_STRUCT( hHal ); - eHalStatus status = eHAL_STATUS_SUCCESS; - tCsrRoamInfo RoamInfo; - tSirSmeRsp* pSmeRsp = (tSirSmeRsp*)pMsg; - - /* forward the indication to HDD */ - //RoamInfo can be passed as NULL....todo - csrRoamCallCallback(pMac, pSmeRsp->sessionId, &RoamInfo, 0, - eCSR_ROAM_SEND_ACTION_CNF, - (pSmeRsp->statusCode == eSIR_SME_SUCCESS) ? 0: - eCSR_ROAM_RESULT_SEND_ACTION_FAIL); - return status; -} - - - - eHalStatus sme_p2pOpen( tHalHandle hHal ) { tpAniSirGlobal pMac = PMAC_STRUCT(hHal); diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 559622b0b43d..30eb9d09794d 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -96,7 +96,6 @@ extern void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx); extern eHalStatus p2pProcessRemainOnChannelCmd(tpAniSirGlobal pMac, tSmeCmd *p2pRemainonChn); extern eHalStatus sme_remainOnChnRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg); extern eHalStatus sme_remainOnChnReady( tHalHandle hHal, tANI_U8* pMsg); -extern eHalStatus sme_sendActionCnf( tHalHandle hHal, tANI_U8* pMsg); extern eHalStatus p2pProcessNoAReq(tpAniSirGlobal pMac, tSmeCmd *pNoACmd); static eHalStatus initSmeCmdList(tpAniSirGlobal pMac); @@ -2927,17 +2926,6 @@ eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg) smsLog( pMac, LOGE, "Empty rsp message for meas (eWNI_SME_REMAIN_ON_CHN_RDY_IND), nothing to process"); } break; - case eWNI_SME_ACTION_FRAME_SEND_CNF: - if(pMsg->bodyptr) - { - status = sme_sendActionCnf(pMac, pMsg->bodyptr); - vos_mem_free(pMsg->bodyptr); - } - else - { - smsLog( pMac, LOGE, "Empty rsp message for meas (eWNI_SME_ACTION_FRAME_SEND_CNF), nothing to process"); - } - break; case eWNI_SME_COEX_IND: MTRACE(vos_trace(VOS_MODULE_ID_SME, TRACE_CODE_SME_RX_WDA_MSG, NO_SESSION, pMsg->type)); @@ -7855,6 +7843,47 @@ eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 return eHAL_STATUS_FAILURE; }// sme_GetOperationChannel 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. + */ +eHalStatus 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; + eHalStatus status = eHAL_STATUS_SUCCESS; + + smsLog(mac_ctx, LOG1, FL(": ENTER")); + + if (eHAL_STATUS_SUCCESS == + sme_AcquireGlobalLock(&mac_ctx->sme)) { + msg = vos_mem_malloc(sizeof(*msg)); + if (NULL == msg) { + smsLog(mac_ctx, LOGE, + FL("Failed to allocate memory")); + sme_ReleaseGlobalLock(&mac_ctx->sme); + return eHAL_STATUS_FAILURE; + } + vos_mem_set(msg, sizeof(*msg), 0); + msg->message_type = eWNI_SME_REGISTER_P2P_ACK_CB; + msg->length = sizeof(*msg); + + msg->callback = callback; + status = palSendMBMessage(mac_ctx->hHdd, msg); + sme_ReleaseGlobalLock(&mac_ctx->sme); + return status; + } + return eHAL_STATUS_FAILURE; +} + /** * sme_register_mgmt_frame_ind_callback() - Register a callback for * management frame indication to PE. diff --git a/CORE/SYS/legacy/src/utils/src/macTrace.c b/CORE/SYS/legacy/src/utils/src/macTrace.c index 7dc98daf3187..6258e6309002 100644 --- a/CORE/SYS/legacy/src/utils/src/macTrace.c +++ b/CORE/SYS/legacy/src/utils/src/macTrace.c @@ -432,7 +432,6 @@ tANI_U8* macTraceGetSmeMsgString(tANI_U16 smeMsg) 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); @@ -585,6 +584,7 @@ tANI_U8* macTraceGetSmeMsgString(tANI_U16 smeMsg) #ifdef WLAN_FEATURE_NAN CASE_RETURN_STRING(eWNI_SME_NAN_EVENT); #endif + CASE_RETURN_STRING(eWNI_SME_REGISTER_P2P_ACK_CB); CASE_RETURN_STRING(eWNI_SME_MSG_TYPES_END); default: return((tANI_U8*)"UNKNOWN"); |
