Explorar o código

qcacld-3.0: Cleanup usage of RA rate limit variables in WMA

By design, when APF is supported by target, RA filtering need
not be configured. Legacy code handled this by passing INI value
of RA rate limit value to WMA and intersecting it with APF
enabled flag. Change Iabb75b46fce64b2c4a7a303848d7cb6b4714253b
replaced this implementation by a single check in PMO. So remove
the WMA legacy code since it has no purpose now. Also remove
unused PMO prototypes pmo_update_ra_limit and
pmo_update_target_service.

Cleaunp the WMA code that intersects RA rate limit and APF
variables.

Change-Id: I870a1271a627d47242000f5e04068e628f567216
CRs-Fixed: 2379745
Nachiket Kukade %!s(int64=6) %!d(string=hai) anos
pai
achega
92ee534ea3

+ 1 - 22
components/pmo/core/inc/wlan_pmo_static_config.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -64,27 +64,6 @@ void pmo_register_wow_default_patterns(struct wlan_objmgr_vdev *vdev);
 void pmo_register_action_frame_patterns(
 		struct wlan_objmgr_vdev *vdev);
 
-/**
- * pmo_update_target_service(): API to update wmi target service info to PMO.
- * @psoc: objmgr psoc
- * @wmi_service: wmi service number
- * @value: true when wmi service is enabled in firmware otherwise false.
- *
- * Return void
- */
-void pmo_update_target_service(struct wlan_objmgr_psoc *psoc,
-	WMI_SERVICE service, bool value);
-
-/**
- * pmo_update_ra_limit() - update ra limit based on apf filter
- *  enabled or not
- * @psoc: objmgr psoc
- * @apf_enabled: true when apf service is enabled else false
- *
- * Return: none
- */
-void pmo_update_ra_limit(struct wlan_objmgr_psoc *psoc, bool apf_enabled);
-
 /**
  * pmo_set_wow_event_bitmap() - Assign bitmask with wow event
  * @event: wow event

+ 7 - 0
components/pmo/core/src/wlan_pmo_main.c

@@ -24,6 +24,7 @@
 #include "wlan_pmo_obj_mgmt_public_struct.h"
 #include "wlan_pmo_cfg.h"
 #include "cfg_ucfg_api.h"
+#include "wlan_fwol_ucfg_api.h"
 
 static struct wlan_pmo_ctx *gp_pmo_ctx;
 
@@ -152,6 +153,12 @@ static void wlan_pmo_runtime_pm_init_cfg(struct wlan_objmgr_psoc *psoc,
 static void wlan_pmo_ra_filtering_init_cfg(struct wlan_objmgr_psoc *psoc,
 					   struct pmo_psoc_cfg *psoc_cfg)
 {
+	bool ra_enable;
+
+	if (QDF_IS_STATUS_SUCCESS(ucfg_fwol_get_is_rate_limit_enabled(psoc,
+								   &ra_enable)))
+		psoc_cfg->ra_ratelimit_enable = ra_enable;
+
 	psoc_cfg->ra_ratelimit_interval =
 			cfg_get(psoc, CFG_RA_RATE_LIMIT_INTERVAL);
 }

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

@@ -1745,28 +1745,6 @@ static int hdd_generate_macaddr_auto(struct hdd_context *hdd_ctx)
 	return 0;
 }
 
-/**
- * hdd_update_ra_rate_limit() - Update RA rate limit from target
- *  configuration to cfg_ini in HDD
- * @hdd_ctx: Pointer to hdd_ctx
- * @cfg: target configuration
- *
- * Return: None
- */
-#ifdef FEATURE_WLAN_RA_FILTERING
-static void hdd_update_ra_rate_limit(struct hdd_context *hdd_ctx,
-				     struct wma_tgt_cfg *cfg)
-{
-	ucfg_fwol_set_is_rate_limit_enabled(hdd_ctx->psoc,
-					    cfg->is_ra_rate_limit_enabled);
-}
-#else
-static void hdd_update_ra_rate_limit(struct hdd_context *hdd_ctx,
-				     struct wma_tgt_cfg *cfg)
-{
-}
-#endif
-
 static void hdd_sar_target_config(struct hdd_context *hdd_ctx,
 				  struct wma_tgt_cfg *cfg)
 {
@@ -2009,7 +1987,6 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
 		  hdd_ctx->current_antenna_mode);
 
 	hdd_ctx->rcpi_enabled = cfg->rcpi_enabled;
-	hdd_update_ra_rate_limit(hdd_ctx, cfg);
 
 	status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
 							&value);
@@ -9741,34 +9718,6 @@ static inline void hdd_txrx_populate_cds_config(struct cds_config_info
 }
 #endif
 
-#ifdef FEATURE_WLAN_RA_FILTERING
-/**
- * hdd_ra_populate_cds_config() - Populate RA filtering cds configuration
- * @cds_cfg: CDS Configuration
- * @hdd_ctx: Pointer to hdd context
- *
- * Return: none
- */
-static inline void hdd_ra_populate_cds_config(struct cds_config_info *cds_cfg,
-			      struct hdd_context *hdd_ctx)
-{
-	bool is_rate_limit_enabled;
-	QDF_STATUS status;
-
-	status = ucfg_fwol_get_is_rate_limit_enabled(hdd_ctx->psoc,
-						     &is_rate_limit_enabled);
-	if (QDF_IS_STATUS_ERROR(status))
-		return;
-
-	cds_cfg->is_ra_ratelimit_enabled = is_rate_limit_enabled;
-}
-#else
-static inline void hdd_ra_populate_cds_config(struct cds_config_info *cds_cfg,
-			     struct hdd_context *hdd_ctx)
-{
-}
-#endif
-
 /**
  * hdd_update_cds_config() - API to update cds configuration parameters
  * @hdd_ctx: HDD Context
@@ -9852,7 +9801,6 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
 	cds_cfg->bandcapability = band_capability;
 	cds_cfg->num_vdevs = hdd_ctx->config->num_vdevs;
 
-	hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
 	hdd_txrx_populate_cds_config(cds_cfg, hdd_ctx);
 	hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx);
 	cds_init_ini_config(cds_cfg);
@@ -14327,37 +14275,6 @@ int hdd_update_config(struct hdd_context *hdd_ctx)
 	return ret;
 }
 
-#ifdef FEATURE_WLAN_RA_FILTERING
-/**
- * hdd_ra_populate_cds_config() - Populate RA filtering cds configuration
- * @psoc_cfg: pmo psoc Configuration
- * @hdd_ctx: Pointer to hdd context
- *
- * Return: none
- */
-static inline void hdd_ra_populate_pmo_config(
-			struct pmo_psoc_cfg *psoc_cfg,
-			struct hdd_context *hdd_ctx)
-{
-	bool is_rate_limit_enabled;
-	QDF_STATUS status;
-
-	status = ucfg_fwol_get_is_rate_limit_enabled(hdd_ctx->psoc,
-						     &is_rate_limit_enabled);
-	if (QDF_IS_STATUS_ERROR(status))
-		return;
-
-	psoc_cfg->ra_ratelimit_enable =
-		is_rate_limit_enabled;
-}
-#else
-static inline void hdd_ra_populate_pmo_config(
-			struct cds_config_info *cds_cfg,
-			struct hdd_context *hdd_ctx)
-{
-}
-#endif
-
 /**
  * hdd_update_pmo_config - API to update pmo configuration parameters
  * @hdd_ctx: HDD context
@@ -14390,7 +14307,6 @@ static int hdd_update_pmo_config(struct hdd_context *hdd_ctx)
 					     &psoc_cfg.sta_max_li_mod_dtim);
 
 
-	hdd_ra_populate_pmo_config(&psoc_cfg, hdd_ctx);
 	hdd_lpass_populate_pmo_config(&psoc_cfg, hdd_ctx);
 
 	status = ucfg_pmo_update_psoc_config(hdd_ctx->psoc, &psoc_cfg);

+ 0 - 4
core/wma/inc/wma.h

@@ -1176,10 +1176,6 @@ typedef struct {
 	bool suitable_ap_hb_failure;
 	uint32_t suitable_ap_hb_failure_rssi;
 	ibss_power_save_params wma_ibss_power_save_params;
-#ifdef FEATURE_WLAN_RA_FILTERING
-	bool IsRArateLimitEnabled;
-	uint16_t RArateLimitInterval;
-#endif
 #ifdef WLAN_FEATURE_LPSS
 	bool is_lpass_enabled;
 #endif

+ 0 - 4
core/wma/inc/wma_tgt_cfg.h

@@ -164,7 +164,6 @@ struct board_info {
  * @lpss_support: lpass support
  * @egap_support: enhanced green ap support
  * @nan_datapath_enabled: nan data path support
- * @bool is_ra_rate_limit_enabled: RA filter support
  * @he_cap: HE capability received from FW
  * @dfs_cac_offload: dfs and cac timer offloaded
  * @tx_bfee_8ss_enabled: Tx Beamformee support for 8x8
@@ -190,9 +189,6 @@ struct wma_tgt_cfg {
 #endif
 	uint8_t ap_arpns_support;
 	uint32_t fine_time_measurement_cap;
-#ifdef FEATURE_WLAN_RA_FILTERING
-	bool is_ra_rate_limit_enabled;
-#endif
 #ifdef WLAN_FEATURE_NAN
 	bool nan_datapath_enabled;
 #endif

+ 0 - 45
core/wma/src/wma_main.c

@@ -3339,9 +3339,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 	wma_handle->active_mc_bc_apf_mode =
 		ucfg_pmo_get_active_mc_bc_apf_mode(wma_handle->psoc);
 	wma_handle->link_stats_results = NULL;
-#ifdef FEATURE_WLAN_RA_FILTERING
-	wma_handle->IsRArateLimitEnabled = cds_cfg->is_ra_ratelimit_enabled;
-#endif /* FEATURE_WLAN_RA_FILTERING */
 #ifdef WLAN_FEATURE_LPSS
 	wma_handle->is_lpass_enabled = cds_cfg->is_lpass_enabled;
 #endif
@@ -5413,26 +5410,6 @@ static void wma_update_target_ext_vht_cap(struct target_psoc_info *tgt_hdl,
 		vht_cap->vht_mu_bformee, vht_cap->vht_max_ampdu_len_exp);
 }
 
-/**
- * wma_update_ra_rate_limit() - update wma config
- * @wma_handle: wma handle
- * @cfg: target config
- *
- * Return: none
- */
-#ifdef FEATURE_WLAN_RA_FILTERING
-static void wma_update_ra_rate_limit(tp_wma_handle wma_handle,
-				     struct wma_tgt_cfg *cfg)
-{
-	cfg->is_ra_rate_limit_enabled = wma_handle->IsRArateLimitEnabled;
-}
-#else
-static void wma_update_ra_rate_limit(tp_wma_handle wma_handle,
-				     struct wma_tgt_cfg *cfg)
-{
-}
-#endif
-
 static void
 wma_update_sar_version(struct wlan_psoc_host_service_ext_param *param,
 		       struct wma_tgt_cfg *cfg)
@@ -5632,7 +5609,6 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
 	tgt_cfg.ap_arpns_support = wma_handle->ap_arpns_support;
 	tgt_cfg.dfs_cac_offload = wma_handle->is_dfs_offloaded;
 	tgt_cfg.rcpi_enabled = wma_handle->rcpi_enabled;
-	wma_update_ra_rate_limit(wma_handle, &tgt_cfg);
 	wma_update_hdd_band_cap(target_if_get_phy_capability(tgt_hdl),
 				&tgt_cfg);
 	wma_update_sar_version(service_ext_param, &tgt_cfg);
@@ -5716,25 +5692,6 @@ static void wma_init_scan_fw_mode_config(struct wlan_objmgr_psoc *psoc,
 	policy_mgr_init_dbs_config(psoc, scan_config, fw_config);
 }
 
-/**
- * wma_update_ra_limit() - update ra limit based on apf filter
- *  enabled or not
- * @handle: wma handle
- *
- * Return: none
- */
-#ifdef FEATURE_WLAN_RA_FILTERING
-static void wma_update_ra_limit(tp_wma_handle wma_handle)
-{
-	if (ucfg_pmo_is_apf_enabled(wma_handle->psoc))
-		wma_handle->IsRArateLimitEnabled = false;
-}
-#else
-static void wma_update_ra_limit(tp_wma_handle handle)
-{
-}
-#endif
-
 static void wma_set_pmo_caps(struct wlan_objmgr_psoc *psoc)
 {
 	QDF_STATUS status;
@@ -5958,8 +5915,6 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 	wma_handle->ap_arpns_support =
 		wmi_service_enabled(wmi_handle, wmi_service_ap_arpns_offload);
 
-	wma_update_ra_limit(wma_handle);
-
 	if (wmi_service_enabled(wmi_handle, wmi_service_csa_offload)) {
 		WMA_LOGD("%s: FW support CSA offload capability", __func__);
 		status = wmi_unified_register_event_handler(