Selaa lähdekoodia

qcacld-3.0: Remove unused mcast/bcast filter setting

The global HDD context contains mc/bc filter setting fields that
ultimately go unused. Remove these fields and clean up call sites as
appropriate.

Change-Id: I51dcc45d7f2d5ac8a55574b0c6dc0b30458047b8
CRs-Fixed: 1116051
Dustin Brown 8 vuotta sitten
vanhempi
sitoutus
43992c232e

+ 0 - 13
core/hdd/inc/wlan_hdd_main.h

@@ -1364,9 +1364,6 @@ struct hdd_context_s {
 	bool is_ol_rx_thread_suspended;
 #endif
 
-	/* Track whether Mcast/Bcast Filter is enabled. */
-	bool hdd_mcastbcast_filter_set;
-
 	bool hdd_wlan_suspended;
 	bool suspended;
 
@@ -1420,16 +1417,6 @@ struct hdd_context_s {
 
 	void *hdd_ipa;
 
-	/* MC/BC Filter state variable
-	 * This always contains the value that is currently
-	 * configured
-	 */
-	uint8_t configuredMcastBcastFilter;
-
-	uint8_t sus_res_mcastbcast_filter;
-
-	bool sus_res_mcastbcast_filter_valid;
-
 	/* Use below lock to protect access to isSchedScanUpdatePending
 	 * since it will be accessed in two different contexts.
 	 */

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

@@ -4656,7 +4656,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 	hdd_wext_state_t *pWextState = NULL;
 	hdd_station_ctx_t *pHddStaCtx = NULL;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	hdd_context_t *pHddCtx = NULL;
 	struct cfg80211_bss *bss_status;
 
 	hdd_info("CSR Callback: status= %d result= %d roamID=%d",
@@ -4693,15 +4692,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 		qdf_ret_status =
 			hdd_dis_connect_handler(pAdapter, pRoamInfo, roamId,
 						roamStatus, roamResult);
-		/*
-		 * Check if Mcast/Bcast Filters are set, if yes
-		 * clear the filters here.
-		 */
-		if ((WLAN_HDD_GET_CTX(pAdapter))->hdd_mcastbcast_filter_set ==
-		    true) {
-			(WLAN_HDD_GET_CTX(pAdapter))->
-			hdd_mcastbcast_filter_set = false;
-		}
 		pHddStaCtx->ft_carrier_on = false;
 		pHddStaCtx->hdd_ReassocScenario = false;
 		hdd_info("hdd_ReassocScenario set to: %d, ReAssoc Failed, session: %d",
@@ -4765,23 +4755,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 		qdf_ret_status =
 			hdd_dis_connect_handler(pAdapter, pRoamInfo, roamId,
 						roamStatus, roamResult);
-		/* Check if Mcast/Bcast Filters are set, if yes clear the filters here */
-		pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-		if (pHddCtx->hdd_mcastbcast_filter_set == true) {
-			if (pHddCtx->sus_res_mcastbcast_filter_valid) {
-				pHddCtx->configuredMcastBcastFilter =
-					pHddCtx->sus_res_mcastbcast_filter;
-				pHddCtx->sus_res_mcastbcast_filter_valid =
-					false;
-			}
-
-			hdd_info("offload: disassociation happening, restoring configuredMcastBcastFilter");
-			hdd_info("McastBcastFilter = %d",
-				 pHddCtx->configuredMcastBcastFilter);
-			hdd_info("offload: already called mcastbcast filter");
-			(WLAN_HDD_GET_CTX(pAdapter))->
-			hdd_mcastbcast_filter_set = false;
-		}
 		/* Call to clear any MC Addr List filter applied after
 		 * successful connection.
 		 */

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

@@ -6721,9 +6721,6 @@ static hdd_context_t *hdd_context_create(struct device *dev)
 		goto err_free_config;
 	}
 
-	hdd_ctx->configuredMcastBcastFilter =
-		hdd_ctx->config->mcastBcastFilterSetting;
-
 	hdd_notice("Setting configuredMcastBcastFilter: %d",
 		   hdd_ctx->config->mcastBcastFilterSetting);
 

+ 5 - 68
core/hdd/src/wlan_hdd_power.c

@@ -421,7 +421,6 @@ static void hdd_enable_ns_offload(hdd_adapter_t *adapter)
 	uint8_t ipv6_addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
 					[SIR_MAC_IPV6_ADDR_LEN] = { {0,} };
 	uint8_t ipv6_addr_type[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA] = { 0 };
-	hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	tSirHostOffloadReq offloadReq;
 	QDF_STATUS status;
 	uint32_t count = 0;
@@ -492,8 +491,6 @@ static void hdd_enable_ns_offload(hdd_adapter_t *adapter)
 			&offloadReq.nsOffloadInfo.targetIPv6Addr[i], i);
 	}
 
-	hdd_info("configuredMcastBcastFilter: %d",
-		hdd_ctx->configuredMcastBcastFilter);
 	hdd_wlan_offload_event(SIR_IPV6_NS_OFFLOAD, SIR_OFFLOAD_ENABLE);
 	offloadReq.offloadType =  SIR_IPV6_NS_OFFLOAD;
 	offloadReq.enableOrDisable = SIR_OFFLOAD_ENABLE;
@@ -581,12 +578,6 @@ static void __hdd_ipv6_notifier_work_queue(struct work_struct *work)
 		return;
 	}
 
-	if (false == pHddCtx->sus_res_mcastbcast_filter_valid) {
-		pHddCtx->sus_res_mcastbcast_filter =
-			pHddCtx->configuredMcastBcastFilter;
-		pHddCtx->sus_res_mcastbcast_filter_valid = true;
-	}
-
 	/* check if the device is in NAN data mode */
 	if (WLAN_HDD_IS_NDI(pAdapter))
 		ndi_connected = WLAN_HDD_IS_NDI_CONNECTED(pAdapter);
@@ -664,6 +655,7 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable)
 		    pHddCtx->ns_offload_enable)
 			hdd_conf_ns_offload(pAdapter, fenable);
 	}
+
 	EXIT();
 	return;
 }
@@ -829,12 +821,6 @@ static void __hdd_ipv4_notifier_work_queue(struct work_struct *work)
 		return;
 	}
 
-	if (false == pHddCtx->sus_res_mcastbcast_filter_valid) {
-		pHddCtx->sus_res_mcastbcast_filter =
-			pHddCtx->configuredMcastBcastFilter;
-		pHddCtx->sus_res_mcastbcast_filter_valid = true;
-	}
-
 	ndi_connected = WLAN_HDD_IS_NDI(pAdapter) &&
 		WLAN_HDD_IS_NDI_CONNECTED(pAdapter);
 
@@ -988,24 +974,9 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
 			offLoadRequest.offloadType = SIR_IPV4_ARP_REPLY_OFFLOAD;
 			offLoadRequest.enableOrDisable = SIR_OFFLOAD_ENABLE;
 			hdd_wlan_offload_event(SIR_IPV4_ARP_REPLY_OFFLOAD,
-				SIR_OFFLOAD_ENABLE);
-
-			hdd_notice("Enabled");
-
-			if (((HDD_MCASTBCASTFILTER_FILTER_ALL_BROADCAST ==
-			      pHddCtx->sus_res_mcastbcast_filter) ||
-			     (HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST_BROADCAST
-			      == pHddCtx->sus_res_mcastbcast_filter))
-			    && (true ==
-				pHddCtx->sus_res_mcastbcast_filter_valid)) {
-				offLoadRequest.enableOrDisable =
-					SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE;
-				hdd_notice("offload: inside arp offload conditional check");
-			}
-			hdd_wlan_offload_event(
-				SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE,
-				SIR_OFFLOAD_ENABLE);
-			hdd_notice("offload: arp filter programmed = %d",
+					       SIR_OFFLOAD_ENABLE);
+
+			hdd_notice("Enable ARP offload: filter programmed = %d",
 			       offLoadRequest.enableOrDisable);
 
 			/* converting u32 to IPV4 address */
@@ -1152,23 +1123,6 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
 }
 #endif
 
-/**
- * hdd_update_mcastbcast_filter(): cache multi and broadcast filter for suspend
- * @hdd_ctx: hdd context
- *
- * Cache the configured filter to be used in suspend resume.
- */
-static void hdd_update_mcastbcast_filter(hdd_context_t *hdd_ctx)
-{
-	if (false == hdd_ctx->sus_res_mcastbcast_filter_valid) {
-		hdd_ctx->sus_res_mcastbcast_filter =
-			hdd_ctx->configuredMcastBcastFilter;
-		hdd_ctx->sus_res_mcastbcast_filter_valid = true;
-		hdd_info("configuredMCastBcastFilter saved = %d",
-			hdd_ctx->configuredMcastBcastFilter);
-	}
-}
-
 /**
  * hdd_conf_suspend_ind() - Send Suspend notification
  * @pHddCtx: HDD Global context
@@ -1192,12 +1146,9 @@ static void hdd_send_suspend_ind(hdd_context_t *pHddCtx,
 		sme_configure_suspend_ind(pHddCtx->hHal, conn_state_mask,
 					  callback, callbackContext);
 
-	if (QDF_STATUS_SUCCESS == qdf_ret_status) {
-		pHddCtx->hdd_mcastbcast_filter_set = true;
-	} else {
+	if (QDF_STATUS_SUCCESS != qdf_ret_status)
 		hdd_err("sme_configure_suspend_ind returned failure %d",
 		       qdf_ret_status);
-	}
 }
 
 /**
@@ -1221,17 +1172,6 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter)
 	hdd_notice("send wlan resume indication");
 	/* Disable supported OffLoads */
 	hdd_conf_hostoffload(pAdapter, false);
-	pHddCtx->hdd_mcastbcast_filter_set = false;
-
-	if (true == pHddCtx->sus_res_mcastbcast_filter_valid) {
-		pHddCtx->configuredMcastBcastFilter =
-			pHddCtx->sus_res_mcastbcast_filter;
-		pHddCtx->sus_res_mcastbcast_filter_valid = false;
-	}
-
-	hdd_notice("offload: in hdd_conf_resume_ind, restoring configuredMcastBcastFilter");
-	hdd_notice("configuredMcastBcastFilter = %d",
-	       pHddCtx->configuredMcastBcastFilter);
 }
 
 /**
@@ -1287,8 +1227,6 @@ hdd_suspend_wlan(void (*callback)(void *callbackContext, bool suspended),
 		return;
 	}
 
-	hdd_update_mcastbcast_filter(pHddCtx);
-
 	status = hdd_get_front_adapter(pHddCtx, &pAdapterNode);
 	while (NULL != pAdapterNode && QDF_STATUS_SUCCESS == status) {
 		pAdapter = pAdapterNode->pAdapter;
@@ -1605,7 +1543,6 @@ QDF_STATUS hdd_wlan_re_init(void)
 	/* Restart all adapters */
 	hdd_start_all_adapters(pHddCtx);
 
-	pHddCtx->hdd_mcastbcast_filter_set = false;
 	pHddCtx->btCoexModeSet = false;
 
 	/* Allow the phone to go to sleep */

+ 0 - 14
core/hdd/src/wlan_hdd_wext.c

@@ -9402,13 +9402,8 @@ static int iw_configure_mcbc_filter(hdd_adapter_t *adapter,
 		 req->mcbc_filter_setting);
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	hdd_ctx->configuredMcastBcastFilter = req->mcbc_filter_setting;
-
 	hdd_conf_hostoffload(adapter, true);
 
-	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
-		hdd_ctx->sus_res_mcastbcast_filter = req->mcbc_filter_setting;
-
 	EXIT();
 	return 0;
 }
@@ -9498,8 +9493,6 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
 {
 	int exit_code;
 	hdd_adapter_t *adapter;
-	hdd_context_t *hdd_ctx;
-	uint8_t ini_filter_setting;
 
 	ENTER();
 
@@ -9511,15 +9504,8 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
 
 	/* clear basically means: reset to ini filter settings */
 	adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ini_filter_setting = hdd_ctx->config->mcastBcastFilterSetting;
-
-	hdd_ctx->configuredMcastBcastFilter = ini_filter_setting;
 	hdd_conf_hostoffload(adapter, true);
 
-	if (hdd_ctx->sus_res_mcastbcast_filter_valid)
-		hdd_ctx->sus_res_mcastbcast_filter = ini_filter_setting;
-
 	exit_code = 0;
 
 exit_with_code:

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

@@ -2677,10 +2677,6 @@ typedef struct sSirUpdateAPWPARSNIEsReq {
 #define SIR_IPV6_NS_OFFLOAD                         2
 #define SIR_OFFLOAD_DISABLE                         0
 #define SIR_OFFLOAD_ENABLE                          1
-#define SIR_OFFLOAD_BCAST_FILTER_ENABLE             0x2
-#define SIR_OFFLOAD_MCAST_FILTER_ENABLE             0x4
-#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE     (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
-#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE      (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
 
 #ifdef WLAN_NS_OFFLOAD
 typedef struct sSirNsOffloadReq {