From d79a6bd8d047584d305c4a9da79c16aeca957baa Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Wed, 4 Mar 2020 10:45:28 +0530 Subject: [PATCH] qcacld-3.0: Remove unused scan params Remove unused params from struct tag_csrscan_result and struct csr_config. Change-Id: Idec036e8fb60752905e0c1d291713ca5e6ea2aad CRs-Fixed: 2634391 --- core/sme/inc/csr_api.h | 14 ------- core/sme/inc/csr_internal.h | 22 ---------- core/sme/src/csr/csr_api_roam.c | 69 ++----------------------------- core/sme/src/csr/csr_api_scan.c | 12 ------ core/sme/src/csr/csr_inside_api.h | 23 ----------- 5 files changed, 4 insertions(+), 136 deletions(-) diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 921dfc59d23e..bae1a6448b6c 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -928,10 +928,6 @@ struct csr_config_params { */ uint8_t fAllowMCCGODiffBI; tCsr11dinfo Csr11dinfo; - /* stats request frequency from PE while in full power */ - uint32_t statsReqPeriodicity; - /* stats request frequency from PE while in power save */ - uint32_t statsReqPeriodicityInPS; #ifdef FEATURE_WLAN_ESE uint8_t isEseIniFeatureEnabled; #endif @@ -943,15 +939,8 @@ struct csr_config_params { * (apprx 1.3 sec) */ uint8_t fEnableDFSChnlScan; - /* - * To enable/disable scanning 2.4Ghz channels twice on a single scan - * request from HDD - */ - bool fScanTwice; - bool vendor_vht_sap; bool send_smps_action; - uint8_t disable_high_ht_mcs_2x2; uint8_t isCoalesingInIBSSAllowed; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH uint8_t cc_switch_mode; @@ -974,10 +963,7 @@ struct csr_config_params { int8_t roam_bg_scan_bad_rssi_thresh; uint8_t roam_bad_rssi_thresh_offset_2g; struct csr_sta_roam_policy_params sta_roam_policy_params; - bool enable_bcast_probe_rsp; - bool is_fils_enabled; enum force_1x1_type is_force_1x1; - uint8_t oce_feature_bitmap; uint32_t offload_11k_enable_bitmask; bool wep_tkip_in_he; struct csr_neighbor_report_offload_params neighbor_report_offload; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index ec16faa9418c..c1983d06db8a 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -37,7 +37,6 @@ #include "wlan_mlme_public_struct.h" #include "csr_host_scan_roam.h" -#define CSR_NUM_RSSI_CAT 15 #define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3 /* No of sessions to be supported, and a session is for Infra, IBSS or BT-AMP */ @@ -332,7 +331,6 @@ struct delstafor_sessionCmd { #define NEIGHBOR_REPORT_PARAMS_ALL 0x3F struct csr_config { - uint32_t agingCount; uint32_t channelBondingMode24GHz; uint32_t channelBondingMode5GHz; eCsrPhyMode phyMode; @@ -348,16 +346,7 @@ struct csr_config { uint8_t fAllowMCCGODiffBI; uint32_t ad_hoc_ch_freq_2g; uint32_t ad_hoc_ch_freq_5g; - /* each RSSI category has one value */ - uint32_t BssPreferValue[CSR_NUM_RSSI_CAT]; - int RSSICat[CSR_NUM_RSSI_CAT]; uint8_t bCatRssiOffset; /* to set RSSI difference for each category */ - uint32_t statsReqPeriodicity; /* stats req freq while in fullpower */ - uint32_t statsReqPeriodicityInPS;/* stats req freq while in powersave */ - uint32_t dtimPeriod; - bool ssidHidden; - struct mawc_params csr_mawc_config; - uint8_t isRoamOffloadScanEnabled; bool nRoamScanControl; /* @@ -365,15 +354,8 @@ struct csr_config { * BMPS_WORKAROUND_NOT_NEEDED */ bool doBMPSWorkaround; - /* To enable scanning 2g channels twice on single scan req from HDD */ - bool fScanTwice; uint32_t nVhtChannelWidth; bool send_smps_action; - uint8_t disable_high_ht_mcs_2x2; - /* - * Enable/Disable heartbeat offload - */ - bool enableHeartBeatOffload; uint8_t isCoalesingInIBSSAllowed; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH uint8_t cc_switch_mode; @@ -383,12 +365,8 @@ struct csr_config { uint8_t conc_custom_rule2; uint8_t is_sta_connection_in_5gz_enabled; struct roam_ext_params roam_params; - bool vendor_vht_sap; struct csr_sta_roam_policy_params sta_roam_policy; - bool enable_bcast_probe_rsp; - bool is_fils_enabled; enum force_1x1_type is_force_1x1; - uint8_t oce_feature_bitmap; uint32_t offload_11k_enable_bitmask; bool wep_tkip_in_he; struct csr_neighbor_report_offload_params neighbor_report_offload; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index e9a3a9f6638a..7e01b0c95927 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -82,9 +82,6 @@ /* 120 seconds, for WPS */ #define CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD (120 * QDF_MC_TIMER_TO_SEC_UNIT) -#define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD 500 /* ms */ -#define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD_IN_BMPS 2000 /* ms */ - #define CSR_SINGLE_PMK_OUI "\x00\x40\x96\x03" #define CSR_SINGLE_PMK_OUI_SIZE 4 @@ -2037,28 +2034,8 @@ enum csr_roam_state csr_roam_state_change(struct mac_context *mac, return PreviousState; } -void csr_assign_rssi_for_category(struct mac_context *mac, int8_t bestApRssi, - uint8_t catOffset) -{ - int i; - - if (catOffset) { - mac->roam.configParam.bCatRssiOffset = catOffset; - for (i = 0; i < CSR_NUM_RSSI_CAT; i++) { - mac->roam.configParam.RSSICat[CSR_NUM_RSSI_CAT - i - - 1] = - (int)bestApRssi - - mac->mlme_cfg->gen.select_5ghz_margin - - (int)(i * catOffset); - } - } -} - static void init_config_param(struct mac_context *mac) { - int i; - - mac->roam.configParam.agingCount = CSR_AGING_COUNT; mac->roam.configParam.channelBondingMode24GHz = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; mac->roam.configParam.channelBondingMode5GHz = @@ -2071,20 +2048,10 @@ static void init_config_param(struct mac_context *mac) mac->roam.configParam.Is11eSupportEnabled = true; mac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto; mac->roam.configParam.ProprietaryRatesEnabled = true; - for (i = 0; i < CSR_NUM_RSSI_CAT; i++) - mac->roam.configParam.BssPreferValue[i] = i; - csr_assign_rssi_for_category(mac, CSR_BEST_RSSI_VALUE, - CSR_DEFAULT_RSSI_DB_GAP); - mac->roam.configParam.statsReqPeriodicity = - CSR_MIN_GLOBAL_STAT_QUERY_PERIOD; - mac->roam.configParam.statsReqPeriodicityInPS = - CSR_MIN_GLOBAL_STAT_QUERY_PERIOD_IN_BMPS; + mac->roam.configParam.bCatRssiOffset = CSR_DEFAULT_RSSI_DB_GAP; mac->roam.configParam.nVhtChannelWidth = WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ + 1; - - mac->roam.configParam.fScanTwice = false; - /* Remove this code once SLM_Sessionization is supported */ /* BMPS_WORKAROUND_NOT_NEEDED */ mac->roam.configParam.doBMPSWorkaround = 0; @@ -2976,13 +2943,9 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, mac->roam.configParam. ProprietaryRatesEnabled); - csr_assign_rssi_for_category(mac, - mac->mlme_cfg->lfr.first_scan_bucket_threshold, - pParam->bCatRssiOffset); - mac->roam.configParam.statsReqPeriodicity = - pParam->statsReqPeriodicity; - mac->roam.configParam.statsReqPeriodicityInPS = - pParam->statsReqPeriodicityInPS; + if (pParam->bCatRssiOffset) + mac->roam.configParam.bCatRssiOffset = + pParam->bCatRssiOffset; /* Assign this before calling csr_init11d_info */ if (wlan_reg_11d_enabled_on_host(mac->psoc)) status = csr_init11d_info(mac, &pParam->Csr11dinfo); @@ -2998,7 +2961,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, csr_init_channel_power_list(mac, &pParam->Csr11dinfo); mac->scan.fEnableDFSChnlScan = pParam->fEnableDFSChnlScan; - mac->roam.configParam.fScanTwice = pParam->fScanTwice; /* This parameter is not available in cfg and not passed from * upper layers. Instead it is initialized here This parametere * is used in concurrency to determine if there are concurrent @@ -3013,16 +2975,12 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, mac->roam.configParam.doBMPSWorkaround = 0; mac->roam.configParam.send_smps_action = pParam->send_smps_action; - mac->roam.configParam.disable_high_ht_mcs_2x2 = - pParam->disable_high_ht_mcs_2x2; mac->roam.configParam.isCoalesingInIBSSAllowed = pParam->isCoalesingInIBSSAllowed; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH mac->roam.configParam.cc_switch_mode = pParam->cc_switch_mode; #endif mac->roam.configParam.obssEnabled = pParam->obssEnabled; - mac->roam.configParam.vendor_vht_sap = - pParam->vendor_vht_sap; mac->roam.configParam.conc_custom_rule1 = pParam->conc_custom_rule1; mac->roam.configParam.conc_custom_rule2 = @@ -3054,13 +3012,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, mac->roam.configParam.sta_roam_policy.sap_operating_band = pParam->sta_roam_policy_params.sap_operating_band; - mac->roam.configParam.enable_bcast_probe_rsp = - pParam->enable_bcast_probe_rsp; - mac->roam.configParam.is_fils_enabled = - pParam->is_fils_enabled; - mac->roam.configParam.oce_feature_bitmap = - pParam->oce_feature_bitmap; - csr_set_11k_offload_config_param(&mac->roam.configParam, pParam); } @@ -3120,10 +3071,7 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, pParam->ad_hoc_ch_freq_5g = cfg_params->ad_hoc_ch_freq_5g; pParam->ad_hoc_ch_freq_2g = cfg_params->ad_hoc_ch_freq_2g; pParam->bCatRssiOffset = cfg_params->bCatRssiOffset; - pParam->statsReqPeriodicity = cfg_params->statsReqPeriodicity; - pParam->statsReqPeriodicityInPS = cfg_params->statsReqPeriodicityInPS; pParam->fEnableDFSChnlScan = mac->scan.fEnableDFSChnlScan; - pParam->fScanTwice = cfg_params->fScanTwice; pParam->fEnableMCCMode = cfg_params->fenableMCCMode; pParam->fAllowMCCGODiffBI = cfg_params->fAllowMCCGODiffBI; @@ -3131,12 +3079,9 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, pParam->cc_switch_mode = cfg_params->cc_switch_mode; #endif pParam->wep_tkip_in_he = cfg_params->wep_tkip_in_he; - pParam->disable_high_ht_mcs_2x2 = cfg_params->disable_high_ht_mcs_2x2; pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed; csr_set_channels(mac, pParam); pParam->obssEnabled = cfg_params->obssEnabled; - pParam->vendor_vht_sap = - mac->roam.configParam.vendor_vht_sap; pParam->roam_dense_min_aps = cfg_params->roam_params.dense_min_aps_cnt; @@ -3164,12 +3109,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, mac->roam.configParam.sta_roam_policy.dfs_mode; pParam->sta_roam_policy_params.skip_unsafe_channels = mac->roam.configParam.sta_roam_policy.skip_unsafe_channels; - pParam->enable_bcast_probe_rsp = - mac->roam.configParam.enable_bcast_probe_rsp; - pParam->is_fils_enabled = - mac->roam.configParam.is_fils_enabled; - pParam->oce_feature_bitmap = - mac->roam.configParam.oce_feature_bitmap; csr_get_11k_offload_config_param(&mac->roam.configParam, pParam); diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 4a00b68a659b..6ed134b39d6b 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -447,13 +447,6 @@ csr_scan_save_bss_description(struct mac_context *mac, if (!pCsrBssDescription) return false; - pCsrBssDescription->AgingCount = - (int32_t) mac->roam.configParam.agingCount; - sme_debug( - "Set Aging Count = %d for BSS " QDF_MAC_ADDR_STR " ", - pCsrBssDescription->AgingCount, - QDF_MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor. - bssId)); qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor, pBSSDescription, cbBSSDesc); csr_scan_add_result(mac, pCsrBssDescription); @@ -1122,9 +1115,6 @@ static QDF_STATUS csr_save_profile(struct mac_context *mac_ctx, if (!temp) goto error; - temp->AgingCount = scan_result->AgingCount; - temp->preferValue = scan_result->preferValue; - temp->capValue = scan_result->capValue; temp->ucEncryptionType = scan_result->ucEncryptionType; temp->mcEncryptionType = scan_result->mcEncryptionType; temp->authType = scan_result->authType; @@ -2398,8 +2388,6 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx, if (!bss) return QDF_STATUS_E_NOMEM; - bss->AgingCount = - (int32_t) mac_ctx->roam.configParam.agingCount; bss->ucEncryptionType = csr_covert_enc_type_old(scan_entry->neg_sec_info.uc_enc); bss->mcEncryptionType = diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index bca8b44156bf..195a8b7726f3 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -29,13 +29,6 @@ #include "cds_reg_service.h" #include "wlan_objmgr_vdev_obj.h" -/* This number minus 1 means the number of times a channel is scanned before - * a BSS is removed from cache scan result - */ -#define CSR_AGING_COUNT 3 - -/* These are going against the signed RSSI (int8_t) so it is between -+127 */ -#define CSR_BEST_RSSI_VALUE (-30) /* RSSI >= this is in CAT4 */ #define CSR_DEFAULT_RSSI_DB_GAP 30 /* every 30 dbm for one category */ #ifdef QCA_WIFI_3_0_EMU @@ -77,20 +70,6 @@ enum csr_roamcomplete_result { struct tag_csrscan_result { tListElem Link; - /* This BSS is removed when it reaches 0 or less */ - int32_t AgingCount; - /* The bigger the number, the better the BSS. - * This value override capValue - */ - uint32_t preferValue; - /* The biggger the better. This value is in use only if we have - * equal preferValue - */ - uint32_t capValue; - /* This member must be the last in the structure because the end of - * struct bss_description (inside) is an - * array with nonknown size at this time - */ /* Preferred Encryption type that matched with profile. */ eCsrEncryptionType ucEncryptionType; eCsrEncryptionType mcEncryptionType; @@ -364,8 +343,6 @@ void csr_apply_channel_power_info_to_fw(struct mac_context *mac, struct csr_channel *pChannelList, uint8_t *countryCode); void csr_apply_power2_current(struct mac_context *mac); -void csr_assign_rssi_for_category(struct mac_context *mac, int8_t bestApRssi, - uint8_t catOffset); /* return a bool to indicate whether roaming completed or continue. */ bool csr_roam_complete_roaming(struct mac_context *mac, uint32_t sessionId,