From aa5e3f7476fb1a8f856e32bdd2295c60a4835d26 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Mon, 18 Sep 2017 19:08:01 +0800 Subject: [PATCH] qcacld-3.0: Remove legacy P2P codes in SAP To reduce code size, remove legacy P2P codes in SAP layer. Remove P2P files from Kbuild. Change-Id: I83a704d3f03e9cb9e6a7420f32d609a323799a12 CRs-Fixed: 2111575 --- Kbuild | 3 - core/sap/inc/sap_api.h | 52 ---------------- core/sap/src/sap_api_link_cntl.c | 7 --- core/sap/src/sap_fsm.c | 7 --- core/sap/src/sap_module.c | 102 ------------------------------- 5 files changed, 171 deletions(-) diff --git a/Kbuild b/Kbuild index 9b2a8bc9186c..ff8798f46603 100644 --- a/Kbuild +++ b/Kbuild @@ -715,8 +715,6 @@ SME_CMN_OBJS := $(SME_SRC_DIR)/common/sme_api.o \ $(SME_SRC_DIR)/common/sme_power_save.o \ $(SME_SRC_DIR)/common/sme_trace.o -SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_api.o - SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y) @@ -729,7 +727,6 @@ endif SME_OBJS := $(SME_CMN_OBJS) \ $(SME_CSR_OBJS) \ - $(SME_P2P_OBJS) \ $(SME_QOS_OBJS) \ $(SME_RRM_OBJS) \ $(SME_NAN_OBJS) \ diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 44d4fcad2ca2..6a7f04aa4f78 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -44,7 +44,6 @@ #include "cds_packet.h" #include "qdf_types.h" -#include "p2p_api.h" #include "sme_api.h" /*---------------------------------------------------------------------------- * Preprocessor Definitions and Constants @@ -152,7 +151,6 @@ typedef enum { eSAP_GET_WPSPBC_SESSION_EVENT, /* Event send on WPS PBC probe request is received */ eSAP_WPS_PBC_PROBE_REQ_EVENT, - eSAP_REMAIN_CHAN_READY, eSAP_DISCONNECT_ALL_P2P_CLIENT, eSAP_MAC_TRIG_STOP_BSS_EVENT, /* @@ -1158,56 +1156,6 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx, uint8_t *peer_sta_mac, eSapACLType list_type, eSapACLCmdType cmd); -/** - * wlansap_send_action() - send action frame - * @sap_ctx: Pointer to the SAP context - * @pBuf: Pointer of the action frame to be transmitted - * @len: Length of the action frame in @pBuf - * @wait: Unused - * @channel_freq: Channel upon which to send the frame - * - * This api function provides to send action frame sent by upper layer. - * - * Return: The QDF_STATUS code associated with performing the operation -* QDF_STATUS_SUCCESS: Success and error code otherwise - */ -QDF_STATUS wlansap_send_action(struct sap_context *sap_ctx, - const uint8_t *pBuf, uint32_t len, - uint16_t wait, uint16_t channel_freq); - -/** - * wlansap_remain_on_channel() - set remain on channel - * @sap_ctx: Pointer to the SAP context - * @channel: Channel on which driver has to listen - * @duration: Duration for which driver has to listen on specified channel - * @callback: Callback function to be called once Listen is done. - * @pContext: Context needs to be called in callback function. - * @scan_id: scan identifier - * - * This api function provides to set Remain On channel on specified channel - * for specified duration. - * - * Return: The QDF_STATUS code associated with performing the operation - * QDF_STATUS_SUCCESS: Success and error code otherwise - */ -QDF_STATUS wlansap_remain_on_channel(struct sap_context *sap_ctx, - uint8_t channel, uint32_t duration, - remainOnChanCallback callback, - void *pContext, uint32_t *scan_id); - -/** - * wlansap_cancel_remain_on_channel() - cancel remain on channel - * @sap_ctx: Pointer to the SAP context - * @scan_id: Scan ID returned by wlansap_remain_on_channel() - * - * This api cancel previous remain on channel request. - * - * Return: The QDF_STATUS code associated with performing the operation - * QDF_STATUS_SUCCESS: Success and error code otherwise - */ -QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *sap_ctx, - uint32_t scan_id); - /** * wlansap_register_mgmt_frame() - register management frame * @sap_ctx: Pointer to SAP context diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 830b4c7fd03b..bff1d3d8acd2 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -981,13 +981,6 @@ wlansap_roam_callback(void *ctx, tCsrRoamInfo *csr_roam_info, uint32_t roamId, FL("CSR roam_status = eCSR_ROAM_WPS_PBC_PROBE_REQ_IND (%d)"), roam_status); break; - case eCSR_ROAM_REMAIN_CHAN_READY: - /* roamId contains scan identifier */ - sap_ctx->roc_ind_scan_id = csr_roam_info->roc_scan_id; - sap_signal_hdd_event(sap_ctx, csr_roam_info, - eSAP_REMAIN_CHAN_READY, - (void *) eSAP_STATUS_SUCCESS); - break; case eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS: sap_signal_hdd_event(sap_ctx, csr_roam_info, eSAP_DISCONNECT_ALL_P2P_CLIENT, diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index db0972b7ddd3..305cc64843ac 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -849,7 +849,6 @@ static uint8_t *sap_hdd_event_to_string(eSapHddEvent event) CASE_RETURN_STRING(eSAP_ASSOC_STA_CALLBACK_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_DISCONNECT_ALL_P2P_CLIENT); CASE_RETURN_STRING(eSAP_MAC_TRIG_STOP_BSS_EVENT); CASE_RETURN_STRING(eSAP_UNKNOWN_STA_JOIN); @@ -2571,12 +2570,6 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx, sizeof(tSirWPSPBCProbeReq)); break; - case eSAP_REMAIN_CHAN_READY: - sap_ap_event.sapHddEventCode = eSAP_REMAIN_CHAN_READY; - sap_ap_event.sapevt.sap_roc_ind.scan_id = - sap_ctx->roc_ind_scan_id; - break; - case eSAP_DISCONNECT_ALL_P2P_CLIENT: sap_ap_event.sapHddEventCode = eSAP_DISCONNECT_ALL_P2P_CLIENT; sap_ap_event.sapevt.sapActionCnf.actionSendSuccess = diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 0c618d1ceae6..ccbf7c1b2bca 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1489,108 +1489,6 @@ QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx, return qdf_status; } -QDF_STATUS wlansap_send_action(struct sap_context *sap_ctx, - const uint8_t *pBuf, uint32_t len, - uint16_t wait, uint16_t channel_freq) -{ - void *hHal = NULL; - QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; - - if (NULL == sap_ctx) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "%s: Invalid SAP pointer", - __func__); - return QDF_STATUS_E_FAULT; - } - hHal = CDS_GET_HAL_CB(); - if (NULL == hHal) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - FL("NULL hal pointer")); - return QDF_STATUS_E_FAULT; - } - - qdf_ret_status = - sme_send_action(hHal, sap_ctx->sessionId, pBuf, len, 0, - 0, channel_freq); - - if (QDF_STATUS_SUCCESS == qdf_ret_status) { - return QDF_STATUS_SUCCESS; - } - - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "Failed to Send Action Frame"); - - return QDF_STATUS_E_FAULT; -} - -QDF_STATUS wlansap_remain_on_channel(struct sap_context *sap_ctx, - uint8_t channel, uint32_t duration, - remainOnChanCallback callback, - void *pContext, uint32_t *scan_id) -{ - void *hHal = NULL; - QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; - - if (NULL == sap_ctx) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "%s: Invalid SAP pointer", - __func__); - return QDF_STATUS_E_FAULT; - } - hHal = CDS_GET_HAL_CB(); - if (NULL == hHal) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - FL("NULL hal pointer")); - return QDF_STATUS_E_FAULT; - } - - qdf_ret_status = sme_remain_on_channel(hHal, sap_ctx->sessionId, - channel, duration, callback, pContext, - true, scan_id); - - if (QDF_STATUS_SUCCESS == qdf_ret_status) { - return QDF_STATUS_SUCCESS; - } - - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "Failed to Set Remain on Channel"); - - return QDF_STATUS_E_FAULT; -} - -QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *sap_ctx, - uint32_t scan_id) -{ - void *hHal = NULL; - QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; - - if (NULL == sap_ctx) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "%s: Invalid SAP pointer", - __func__); - return QDF_STATUS_E_FAULT; - } - hHal = CDS_GET_HAL_CB(); - if (NULL == hHal) { - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - FL("HAL pointer is null")); - return QDF_STATUS_E_FAULT; - } - - qdf_ret_status = - sme_cancel_remain_on_channel(hHal, sap_ctx->sessionId, - scan_id); - - if (QDF_STATUS_SUCCESS == qdf_ret_status) { - return QDF_STATUS_SUCCESS; - } - - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "Failed to Cancel Remain on Channel"); - - return QDF_STATUS_E_FAULT; -} - QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx, uint8_t channel, enum phy_ch_width chan_bw)