Jelajahi Sumber

qcacld-3.0: Remove dead sme_configure_rxp_filter()

sme_configure_rxp_filter() sends a WMA message type that isn't being
handled, effectively making it dead code. Remove
sme_configure_rxp_filter and cleanup calling contexts as necessary.

Change-Id: I04190111e1c714cf93b42c9f17ea4d80049ee98d
CRs-Fixed: 1114226
Dustin Brown 8 tahun lalu
induk
melakukan
e94495c41d

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

@@ -160,7 +160,6 @@ enum suspend_resume_state {
 QDF_STATUS hdd_wlan_shutdown(void);
 QDF_STATUS hdd_wlan_shutdown(void);
 QDF_STATUS hdd_wlan_re_init(void);
 QDF_STATUS hdd_wlan_re_init(void);
 
 
-void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter);
 QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable);
 QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable);
 void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable);
 void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable);
 
 

+ 2 - 6
core/hdd/src/wlan_hdd_assoc.c

@@ -4777,14 +4777,10 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 		/* Check if Mcast/Bcast Filters are set, if yes clear the filters here */
 		/* Check if Mcast/Bcast Filters are set, if yes clear the filters here */
 		pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 		pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 		if (pHddCtx->hdd_mcastbcast_filter_set == true) {
 		if (pHddCtx->hdd_mcastbcast_filter_set == true) {
-			hdd_conf_mcastbcast_filter(pHddCtx, false);
-
-			if (true ==
-			    pHddCtx->sus_res_mcastbcast_filter_valid) {
+			if (pHddCtx->sus_res_mcastbcast_filter_valid) {
 				pHddCtx->configuredMcastBcastFilter =
 				pHddCtx->configuredMcastBcastFilter =
 					pHddCtx->sus_res_mcastbcast_filter;
 					pHddCtx->sus_res_mcastbcast_filter;
-				pHddCtx->
-				sus_res_mcastbcast_filter_valid =
+				pHddCtx->sus_res_mcastbcast_filter_valid =
 					false;
 					false;
 			}
 			}
 
 

+ 0 - 87
core/hdd/src/wlan_hdd_power.c

@@ -938,93 +938,6 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
 	}
 	}
 }
 }
 
 
-/**
- * hdd_mcbc_filter_modification() - MCBC Filter Modifier
- * @pHddCtx: Global Hdd Context
- * @pMcBcFilter: Multicast/Broadcast filter to be modified
- *
- * This function is called before setting mcbc filters
- * to modify filter value considering different offloads
- *
- * Return: None.
- */
-static void hdd_mcbc_filter_modification(hdd_context_t *pHddCtx,
-					 uint8_t *pMcBcFilter)
-{
-	if (NULL == pHddCtx) {
-		hdd_err("NULL HDD context passed");
-		return;
-	}
-
-	*pMcBcFilter = pHddCtx->configuredMcastBcastFilter;
-	if (pHddCtx->config->fhostArpOffload) {
-		/* ARP offload is enabled, do not block bcast packets at RXP
-		 * Will be using Bitmasking to reset the filter. As we have
-		 * disable Broadcast filtering, Anding with the negation
-		 * of Broadcast BIT
-		 */
-		*pMcBcFilter &= ~(HDD_MCASTBCASTFILTER_FILTER_ALL_BROADCAST);
-		hdd_info("ARP offload is enabled");
-	}
-#ifdef WLAN_NS_OFFLOAD
-	if (pHddCtx->config->fhostNSOffload) {
-		/* NS offload is enabled, do not block mcast packets at RXP
-		 * Will be using Bitmasking to reset the filter. As we have
-		 * disable Multicast filtering, Anding with the negation
-		 * of Multicast BIT
-		 */
-		hdd_info("NS offload is enabled");
-		*pMcBcFilter &= ~(HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST);
-	}
-#endif
-
-	pHddCtx->configuredMcastBcastFilter = *pMcBcFilter;
-}
-
-/**
- * hdd_conf_mcastbcast_filter() - Configure multicast/broadcast filter
- * @pHddCtx: Global HDD context
- * @setfilter: true if filter is being set, false if filter is being cleared
- *
- * Return: None.
- */
-void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter)
-{
-	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
-	tpSirWlanSetRxpFilters wlanRxpFilterParam =
-		qdf_mem_malloc(sizeof(tSirWlanSetRxpFilters));
-	if (NULL == wlanRxpFilterParam) {
-		hdd_alert("qdf_mem_malloc failed ");
-		return;
-	}
-	hdd_notice("Configuring Mcast/Bcast Filter Setting. setfilter %d", setfilter);
-	if (true == setfilter) {
-		hdd_mcbc_filter_modification(pHddCtx,
-					     &wlanRxpFilterParam->
-					     configuredMcstBcstFilterSetting);
-	} else {
-		/*Use the current configured value to clear */
-		wlanRxpFilterParam->configuredMcstBcstFilterSetting =
-			pHddCtx->configuredMcastBcastFilter;
-	}
-
-	wlanRxpFilterParam->setMcstBcstFilter = setfilter;
-	qdf_ret_status =
-		sme_configure_rxp_filter(pHddCtx->hHal, wlanRxpFilterParam);
-
-	if (setfilter && (QDF_STATUS_SUCCESS == qdf_ret_status))
-		pHddCtx->hdd_mcastbcast_filter_set = true;
-
-	hdd_notice("%s to post set/reset filter to lower mac with status %d configuredMcstBcstFilterSetting = %d setMcstBcstFilter = %d",
-		(QDF_STATUS_SUCCESS != qdf_ret_status) ? "Failed" : "Success",
-		qdf_ret_status,
-		wlanRxpFilterParam->configuredMcstBcstFilterSetting,
-		wlanRxpFilterParam->setMcstBcstFilter);
-
-	if (QDF_STATUS_SUCCESS != qdf_ret_status)
-		qdf_mem_free(wlanRxpFilterParam);
-}
-
 #ifdef WLAN_FEATURE_PACKET_FILTERING
 #ifdef WLAN_FEATURE_PACKET_FILTERING
 /**
 /**
  * wlan_hdd_set_mc_addr_list() - set MC address list in FW
  * wlan_hdd_set_mc_addr_list() - set MC address list in FW

+ 2 - 48
core/hdd/src/wlan_hdd_wext.c

@@ -9400,47 +9400,23 @@ static inline int iw_clear_mc_filter_list(hdd_adapter_t *adapter)
 static int iw_configure_mcbc_filter(hdd_adapter_t *adapter,
 static int iw_configure_mcbc_filter(hdd_adapter_t *adapter,
 				    struct pkt_filter_mc_addr_list *req)
 				    struct pkt_filter_mc_addr_list *req)
 {
 {
-	int exit_code;
-	QDF_STATUS status;
 	hdd_context_t *hdd_ctx;
 	hdd_context_t *hdd_ctx;
-	tSirWlanSetRxpFilters *req_params;
-	tHalHandle hal;
 
 
 	ENTER();
 	ENTER();
 
 
 	hdd_info("Configuring mc/bc filter; setting:%u",
 	hdd_info("Configuring mc/bc filter; setting:%u",
 		 req->mcbc_filter_setting);
 		 req->mcbc_filter_setting);
 
 
-	req_params = qdf_mem_malloc(sizeof(*req_params));
-	if (!req_params) {
-		hdd_err("Out of memory");
-		exit_code = -ENOMEM;
-		goto exit_with_code;
-	}
-
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	hdd_ctx->configuredMcastBcastFilter = req->mcbc_filter_setting;
 	hdd_ctx->configuredMcastBcastFilter = req->mcbc_filter_setting;
-	hdd_conf_hostoffload(adapter, true);
 
 
-	req_params->configuredMcstBcstFilterSetting = req->mcbc_filter_setting;
-	req_params->setMcstBcstFilter = true;
-
-	hal = WLAN_HDD_GET_HAL_CTX(adapter);
-	status = sme_configure_rxp_filter(hal, req_params);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		hdd_err("Failed to configure HW MC/BC filter");
-		qdf_mem_free(req_params);
-		return -EINVAL;
-	}
+	hdd_conf_hostoffload(adapter, true);
 
 
 	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
 	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
 		hdd_ctx->sus_res_mcastbcast_filter = req->mcbc_filter_setting;
 		hdd_ctx->sus_res_mcastbcast_filter = req->mcbc_filter_setting;
 
 
-	exit_code = 0;
-
-exit_with_code:
 	EXIT();
 	EXIT();
-	return exit_code;
+	return 0;
 }
 }
 
 
 /**
 /**
@@ -9527,11 +9503,8 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
 					  char *extra)
 					  char *extra)
 {
 {
 	int exit_code;
 	int exit_code;
-	QDF_STATUS status;
 	hdd_adapter_t *adapter;
 	hdd_adapter_t *adapter;
 	hdd_context_t *hdd_ctx;
 	hdd_context_t *hdd_ctx;
-	tHalHandle hal;
-	tSirWlanSetRxpFilters *set_params;
 	uint8_t ini_filter_setting;
 	uint8_t ini_filter_setting;
 
 
 	ENTER();
 	ENTER();
@@ -9542,13 +9515,6 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
 		goto exit_with_code;
 		goto exit_with_code;
 	}
 	}
 
 
-	set_params = qdf_mem_malloc(sizeof(*set_params));
-	if (!set_params) {
-		hdd_err("Out of memory");
-		exit_code = -ENOMEM;
-		goto exit_with_code;
-	}
-
 	/* clear basically means: reset to ini filter settings */
 	/* clear basically means: reset to ini filter settings */
 	adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@@ -9557,18 +9523,6 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
 	hdd_ctx->configuredMcastBcastFilter = ini_filter_setting;
 	hdd_ctx->configuredMcastBcastFilter = ini_filter_setting;
 	hdd_conf_hostoffload(adapter, true);
 	hdd_conf_hostoffload(adapter, true);
 
 
-	set_params->configuredMcstBcstFilterSetting = ini_filter_setting;
-	set_params->setMcstBcstFilter = true;
-
-	hal = WLAN_HDD_GET_HAL_CTX(adapter);
-	status = sme_configure_rxp_filter(hal, set_params);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		hdd_err("Failed to clear HW mc/bc filter");
-		qdf_mem_free(set_params);
-		exit_code = -EINVAL;
-		goto exit_with_code;
-	}
-
 	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
 	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
 		hdd_ctx->sus_res_mcastbcast_filter = ini_filter_setting;
 		hdd_ctx->sus_res_mcastbcast_filter = ini_filter_setting;
 
 

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

@@ -2845,12 +2845,6 @@ typedef struct {
 } tSirAppType2Params, *tpSirAppType2Params;
 } tSirAppType2Params, *tpSirAppType2Params;
 #endif
 #endif
 
 
-typedef struct sSirWlanSetRxpFilters {
-	uint8_t configuredMcstBcstFilterSetting;
-	uint8_t setMcstBcstFilter;
-} tSirWlanSetRxpFilters, *tpSirWlanSetRxpFilters;
-
-
 #define ANI_MAX_IBSS_ROUTE_TABLE_ENTRY   100
 #define ANI_MAX_IBSS_ROUTE_TABLE_ENTRY   100
 
 
 typedef struct sAniDestIpNextHopMacPair {
 typedef struct sAniDestIpNextHopMacPair {

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

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
  *
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
  *
@@ -414,7 +414,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_ENTER_PS_REQ);
 		CASE_RETURN_STRING(WMA_ENTER_PS_REQ);
 		CASE_RETURN_STRING(WMA_MISSED_BEACON_IND);
 		CASE_RETURN_STRING(WMA_MISSED_BEACON_IND);
 
 
-		CASE_RETURN_STRING(WMA_CFG_RXP_FILTER_REQ);
 		CASE_RETURN_STRING(WMA_SWITCH_CHANNEL_RSP);
 		CASE_RETURN_STRING(WMA_SWITCH_CHANNEL_RSP);
 		CASE_RETURN_STRING(WMA_P2P_NOA_ATTR_IND);
 		CASE_RETURN_STRING(WMA_P2P_NOA_ATTR_IND);
 		CASE_RETURN_STRING(WMA_P2P_NOA_START_IND);
 		CASE_RETURN_STRING(WMA_P2P_NOA_START_IND);

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

@@ -483,8 +483,6 @@ QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
 QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
 QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
 		uint16_t frameType, uint8_t *matchData,
 		uint16_t frameType, uint8_t *matchData,
 		uint16_t matchLen);
 		uint16_t matchLen);
-QDF_STATUS sme_configure_rxp_filter(tHalHandle hHal,
-		tpSirWlanSetRxpFilters wlanRxpFilterParam);
 QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
 QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
 QDF_STATUS sme_configure_suspend_ind(tHalHandle hHal,
 QDF_STATUS sme_configure_suspend_ind(tHalHandle hHal,
 		uint32_t conn_state_mask,
 		uint32_t conn_state_mask,

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

@@ -7029,56 +7029,6 @@ QDF_STATUS sme_p2p_set_ps(tHalHandle hHal, tP2pPsConfig *data)
 	return status;
 	return status;
 }
 }
 
 
-/* ---------------------------------------------------------------------------
-
-   \fn    sme_configure_rxp_filter
-
-   \brief
-    SME will pass this request to lower mac to set/reset the filter on RXP for
-    multicast & broadcast traffic.
-
-   \param
-
-    hHal - The handle returned by mac_open.
-
-    filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
-    Basically to enable/disable the filter (to filter "all" mcbc traffic) based
-    on this param. In future we can use this as a mask to set various types of
-    filters as suggested below:
-    FILTER_ALL_MULTICAST:
-    FILTER_ALL_BROADCAST:
-    FILTER_ALL_MULTICAST_BROADCAST:
-
-   \return QDF_STATUS
-
-   --------------------------------------------------------------------------- */
-QDF_STATUS sme_configure_rxp_filter(tHalHandle hHal,
-				    tpSirWlanSetRxpFilters wlanRxpFilterParam)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-	struct scheduler_msg message;
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_CONFIG_RXPFIL, NO_SESSION, 0));
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		/* serialize the req through MC thread */
-		message.bodyptr = wlanRxpFilterParam;
-		message.type = WMA_CFG_RXP_FILTER_REQ;
-		MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_TX_WMA_MSG,
-				 NO_SESSION, message.type));
-		qdf_status = scheduler_post_msg(QDF_MODULE_ID_WMA,
-						 &message);
-		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			status = QDF_STATUS_E_FAILURE;
-		}
-		sme_release_global_lock(&pMac->sme);
-	}
-	return status;
-}
-
 /* ---------------------------------------------------------------------------
 /* ---------------------------------------------------------------------------
 
 
    \fn    sme_configure_suspend_ind
    \fn    sme_configure_suspend_ind

+ 0 - 2
core/wma/inc/wma_types.h

@@ -175,8 +175,6 @@
 #define WMA_ENTER_PS_REQ               SIR_HAL_ENTER_PS_REQ
 #define WMA_ENTER_PS_REQ               SIR_HAL_ENTER_PS_REQ
 #define WMA_EXIT_PS_REQ                SIR_HAL_EXIT_PS_REQ
 #define WMA_EXIT_PS_REQ                SIR_HAL_EXIT_PS_REQ
 
 
-#define WMA_CFG_RXP_FILTER_REQ         SIR_HAL_CFG_RXP_FILTER_REQ
-
 #define WMA_SWITCH_CHANNEL_RSP         SIR_HAL_SWITCH_CHANNEL_RSP
 #define WMA_SWITCH_CHANNEL_RSP         SIR_HAL_SWITCH_CHANNEL_RSP
 #define WMA_P2P_NOA_ATTR_IND           SIR_HAL_P2P_NOA_ATTR_IND
 #define WMA_P2P_NOA_ATTR_IND           SIR_HAL_P2P_NOA_ATTR_IND
 #define WMA_P2P_NOA_START_IND          SIR_HAL_P2P_NOA_START_IND
 #define WMA_P2P_NOA_START_IND          SIR_HAL_P2P_NOA_START_IND