From a93fa6f44253ff0fcc71166f81f220f5a2ca2df7 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Thu, 25 Jan 2018 10:17:20 -0800 Subject: [PATCH] qcacld-3.0: Cleanup eWNI_SME_SET_BCN_FILTER_REQ Currently, SME sends a eWNI_SME_SET_BCN_FILTER_REQ message to PE which in turn builds a beacon filter request using lim_send_beacon_filter_info and sends down a message to WMA using WMA_BEACON_FILTER_IND. But, this message does not have a handler in WMA. So, cleanup all these messages. The beacon filtering is currently happening through hdd_add_beacon_filter. Change-Id: Id235d6303ce7c740f907147afc7248d833772067 CRs-Fixed: 2177429 --- core/mac/inc/sir_api.h | 7 -- core/mac/inc/wni_api.h | 1 - .../src/pe/lim/lim_process_message_queue.c | 15 --- core/mac/src/pe/lim/lim_send_messages.c | 96 +------------------ core/mac/src/pe/lim/lim_send_messages.h | 5 +- core/mac/src/pe/lim/lim_utils.c | 2 - .../src/sys/legacy/src/utils/src/mac_trace.c | 2 - core/sme/src/csr/csr_api_roam.c | 15 --- core/sme/src/csr/csr_neighbor_roam.c | 13 --- core/wma/inc/wma_types.h | 1 - 10 files changed, 2 insertions(+), 155 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index a01e17621370..99a5413a15cd 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3656,13 +3656,6 @@ typedef struct sSirTdlsEventnotify { } tSirTdlsEventnotify; #endif /* FEATURE_WLAN_TDLS */ -typedef struct sSirActiveModeSetBcnFilterReq { - uint16_t messageType; - uint16_t length; - uint8_t seesionId; - struct qdf_mac_addr bssid; -} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq; - /* Reset AP Caps Changed */ typedef struct sSirResetAPCapsChange { uint16_t messageType; diff --git a/core/mac/inc/wni_api.h b/core/mac/inc/wni_api.h index bd0053da543f..d0587e6f652c 100644 --- a/core/mac/inc/wni_api.h +++ b/core/mac/inc/wni_api.h @@ -146,7 +146,6 @@ enum eWniMsgTypes { /* SIR_LIM_MSG_TYPES_BEGIN+0xB0 = 12B0 (which means max of 176 messages and */ /* eWNI_SME_TDLS_DEL_STA_RSP = 175. */ /* Should fix above issue to enable TDLS_INTERNAL */ - eWNI_SME_SET_BCN_FILTER_REQ, eWNI_SME_RESET_AP_CAPS_CHANGED, #ifdef WLAN_FEATURE_11W eWNI_SME_UNPROT_MGMT_FRM_IND, diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index b7e3b18552bd..3c8e7d2d26e6 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -1345,8 +1345,6 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx, tSirTdlsInd *tdls_ind = NULL; tpDphHashNode sta_ds = NULL; #endif - tSirSetActiveModeSetBncFilterReq *bcn_filter_req = NULL; - if (ANI_DRIVER_TYPE(mac_ctx) == QDF_DRIVER_TYPE_MFG) { qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; @@ -1817,19 +1815,6 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx, qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; - case eWNI_SME_SET_BCN_FILTER_REQ: - bcn_filter_req = - (tSirSetActiveModeSetBncFilterReq *) msg->bodyptr; - session_entry = pe_find_session_by_bssid(mac_ctx, - bcn_filter_req->bssid.bytes, &session_id); - if ((session_entry != NULL) && - (lim_send_beacon_filter_info(mac_ctx, session_entry) != - eSIR_SUCCESS)) - pe_err("Failied to send Beacon Filter Info"); - qdf_mem_free((void *)(msg->bodyptr)); - msg->bodyptr = NULL; - break; - case WMA_RX_CHN_STATUS_EVENT: lim_process_rx_channel_status_event(mac_ctx, msg->bodyptr); break; diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c index e7bcec98fe04..38c7fa28f9e9 100644 --- a/core/mac/src/pe/lim/lim_send_messages.c +++ b/core/mac/src/pe/lim/lim_send_messages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -45,31 +45,6 @@ #endif /* FEATURE_WLAN_DIAG_SUPPORT */ #include "lim_utils.h" -/* When beacon filtering is enabled, firmware will - * analyze the selected beacons received during BMPS, - * and monitor any changes in the IEs as listed below. - * The format of the table is: - * - EID - * - Check for IE presence - * - Byte offset - * - Byte value - * - Bit Mask - * - Byte refrence - */ -static tBeaconFilterIe beacon_filter_table[] = { - {SIR_MAC_DS_PARAM_SET_EID, 0, {0, 0, DS_PARAM_CHANNEL_MASK, 0} }, - {SIR_MAC_ERP_INFO_EID, 0, {0, 0, ERP_FILTER_MASK, 0} }, - {SIR_MAC_EDCA_PARAM_SET_EID, 0, {0, 0, EDCA_FILTER_MASK, 0} }, - {SIR_MAC_QOS_CAPABILITY_EID, 0, {0, 0, QOS_FILTER_MASK, 0} }, - {SIR_MAC_CHNL_SWITCH_ANN_EID, 1, {0, 0, 0, 0} }, - {SIR_MAC_HT_INFO_EID, 0, {0, 0, HT_BYTE0_FILTER_MASK, 0} }, - {SIR_MAC_HT_INFO_EID, 0, {2, 0, HT_BYTE2_FILTER_MASK, 0} }, - {SIR_MAC_HT_INFO_EID, 0, {5, 0, HT_BYTE5_FILTER_MASK, 0} }, - {SIR_MAC_PWR_CONSTRAINT_EID, 0, {0, 0, 0, 0} }, - {SIR_MAC_VHT_OPMODE_EID, 0, {0, 0, 0, 0} }, - {SIR_MAC_VHT_OPERATION_EID, 0, {0, 0, VHTOP_CHWIDTH_MASK, 0} } -}; - /** * lim_send_cf_params() * @@ -553,75 +528,6 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState return retCode; } -/** --------------------------------------------------------- - \fn lim_send_beacon_filter_info - \brief LIM sends beacon filtering info to WMA - \param tpAniSirGlobal pMac - \return None - -----------------------------------------------------------*/ -tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac, - tpPESession psessionEntry) -{ - tpBeaconFilterMsg pBeaconFilterMsg = NULL; - tSirRetStatus retCode = eSIR_SUCCESS; - struct scheduler_msg msgQ = {0}; - uint8_t *ptr; - uint32_t i; - uint32_t msgSize; - tpBeaconFilterIe pIe; - - if (psessionEntry == NULL) { - pe_err("Fail to find the right session"); - retCode = eSIR_FAILURE; - return retCode; - } - msgSize = sizeof(tBeaconFilterMsg) + sizeof(beacon_filter_table); - pBeaconFilterMsg = qdf_mem_malloc(msgSize); - if (NULL == pBeaconFilterMsg) { - pe_err("Fail to allocate memory for beaconFiilterMsg"); - retCode = eSIR_MEM_ALLOC_FAILED; - return retCode; - } - /* Fill in capability Info and mask */ - /* Don't send this message if no active Infra session is found. */ - pBeaconFilterMsg->capabilityInfo = psessionEntry->limCurrentBssCaps; - pBeaconFilterMsg->capabilityMask = CAPABILITY_FILTER_MASK; - pBeaconFilterMsg->beaconInterval = - (uint16_t) psessionEntry->beaconParams.beaconInterval; - /* Fill in number of IEs in beacon_filter_table */ - pBeaconFilterMsg->ieNum = - (uint16_t) (sizeof(beacon_filter_table) / sizeof(tBeaconFilterIe)); - /* Fill the BSSIDX */ - pBeaconFilterMsg->bssIdx = psessionEntry->bssIdx; - - /* Fill message with info contained in the beacon_filter_table */ - ptr = (uint8_t *) pBeaconFilterMsg + sizeof(tBeaconFilterMsg); - for (i = 0; i < (pBeaconFilterMsg->ieNum); i++) { - pIe = (tpBeaconFilterIe) ptr; - pIe->elementId = beacon_filter_table[i].elementId; - pIe->checkIePresence = beacon_filter_table[i].checkIePresence; - pIe->byte.offset = beacon_filter_table[i].byte.offset; - pIe->byte.value = beacon_filter_table[i].byte.value; - pIe->byte.bitMask = beacon_filter_table[i].byte.bitMask; - pIe->byte.ref = beacon_filter_table[i].byte.ref; - ptr += sizeof(tBeaconFilterIe); - } - msgQ.type = WMA_BEACON_FILTER_IND; - msgQ.reserved = 0; - msgQ.bodyptr = pBeaconFilterMsg; - msgQ.bodyval = 0; - pe_debug("Sending WMA_BEACON_FILTER_IND"); - MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type)); - retCode = wma_post_ctrl_msg(pMac, &msgQ); - if (eSIR_SUCCESS != retCode) { - qdf_mem_free(pBeaconFilterMsg); - pe_err("Posting WMA_BEACON_FILTER_IND failed, reason=%X", - retCode); - return retCode; - } - return retCode; -} - tSirRetStatus lim_send_mode_update(tpAniSirGlobal pMac, tUpdateVHTOpMode *pTempParam, tpPESession psessionEntry) diff --git a/core/mac/src/pe/lim/lim_send_messages.h b/core/mac/src/pe/lim/lim_send_messages.h index 0173f7217f68..58c155025857 100644 --- a/core/mac/src/pe/lim/lim_send_messages.h +++ b/core/mac/src/pe/lim/lim_send_messages.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -98,9 +98,6 @@ void lim_set_active_edca_params(tpAniSirGlobal pMac, #define DS_PARAM_CHANNEL_MASK 0x0 #define VHTOP_CHWIDTH_MASK 0xFC -tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac, - tpPESession psessionEntry); - #ifdef WLAN_FEATURE_11W tSirRetStatus lim_send_exclude_unencrypt_ind(tpAniSirGlobal pMac, bool excludeUnenc, diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index d2311159641d..f68984b9b035 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -416,8 +416,6 @@ char *lim_msg_str(uint32_t msgType) return "eWNI_PMC_EXIT_BMPS_RSP"; case eWNI_PMC_EXIT_BMPS_IND: return "eWNI_PMC_EXIT_BMPS_IND"; - case eWNI_SME_SET_BCN_FILTER_REQ: - return "eWNI_SME_SET_BCN_FILTER_REQ"; #ifdef FEATURE_WLAN_ESE case eWNI_SME_GET_TSM_STATS_REQ: return "eWNI_SME_GET_TSM_STATS_REQ"; diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index bf5bf50616a5..86e81e7a93d7 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -335,7 +335,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg) CASE_RETURN_STRING (eWNI_SME_TDLS_CONNECTION_TRACKER_NOTIFICATION); #endif - CASE_RETURN_STRING(eWNI_SME_SET_BCN_FILTER_REQ); CASE_RETURN_STRING(eWNI_SME_RESET_AP_CAPS_CHANGED); #ifdef WLAN_FEATURE_11W CASE_RETURN_STRING(eWNI_SME_UNPROT_MGMT_FRM_IND); @@ -471,7 +470,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg) CASE_RETURN_STRING(WMA_TRANSMISSION_CONTROL_IND); CASE_RETURN_STRING(WMA_ENABLE_UAPSD_REQ); CASE_RETURN_STRING(WMA_DISABLE_UAPSD_REQ); - CASE_RETURN_STRING(WMA_BEACON_FILTER_IND); CASE_RETURN_STRING(WMA_WOW_ADD_PTRN); CASE_RETURN_STRING(WMA_WOW_DEL_PTRN); CASE_RETURN_STRING(WMA_WOWL_ENTER_REQ); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 11348a19cb8a..25db519e0790 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -12201,21 +12201,6 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) * after PTK and before GTK. */ if (qdf_is_macaddr_broadcast(&pRsp->peer_macaddr)) { - tpSirSetActiveModeSetBncFilterReq pMsg; - - pMsg = qdf_mem_malloc( - sizeof(tSirSetActiveModeSetBncFilterReq)); - if (NULL == pMsg) { - sme_err("Malloc failed"); - return; - } - pMsg->messageType = eWNI_SME_SET_BCN_FILTER_REQ; - pMsg->length = sizeof(tSirSetActiveModeSetBncFilterReq); - pMsg->seesionId = sessionId; - qdf_copy_macaddr(&pMsg->bssid, - &session->connectedProfile.bssid); - - status = umac_send_mb_message_to_mac(pMsg); /* * OBSS SCAN Indication will be sent to Firmware * to start OBSS Scan diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index f743660fedf4..6f4408155db6 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -1091,7 +1091,6 @@ QDF_STATUS csr_neighbor_roam_indicate_connect( struct csr_roam_session *session = &pMac->roam.roamSession[session_id]; #ifdef WLAN_FEATURE_ROAM_OFFLOAD struct csr_roam_info roamInfo; - tpSirSetActiveModeSetBncFilterReq msg; #endif QDF_STATUS status = QDF_STATUS_SUCCESS; @@ -1127,18 +1126,6 @@ QDF_STATUS csr_neighbor_roam_indicate_connect( session->roam_synch_data->authStatus)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "LFR3:csr_neighbor_roam_indicate_connect"); - msg = qdf_mem_malloc(sizeof(tSirSetActiveModeSetBncFilterReq)); - if (msg == NULL) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - "LFR3:Mem Alloc failed for beacon Filter Req"); - return QDF_STATUS_E_NOMEM; - } - msg->messageType = eWNI_SME_SET_BCN_FILTER_REQ; - msg->length = sizeof(tSirSetActiveModeSetBncFilterReq); - msg->seesionId = session_id; - qdf_copy_macaddr(&msg->bssid, - &session->connectedProfile.bssid); - status = umac_send_mb_message_to_mac(msg); qdf_copy_macaddr(&roamInfo.peerMac, &session->connectedProfile.bssid); roamInfo.roamSynchInProgress = diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index 473cfd134d5b..c1586659e0fd 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -216,7 +216,6 @@ /* Messages to support transmit_halt and transmit_resume */ #define WMA_TRANSMISSION_CONTROL_IND SIR_HAL_TRANSMISSION_CONTROL_IND -#define WMA_BEACON_FILTER_IND SIR_HAL_BEACON_FILTER_IND #define WMA_ENABLE_UAPSD_REQ SIR_HAL_ENABLE_UAPSD_REQ #define WMA_DISABLE_UAPSD_REQ SIR_HAL_DISABLE_UAPSD_REQ