From 5899f438180ed70546ed5603e9d4f0474d59b4e0 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Thu, 18 Feb 2016 12:53:42 -0800 Subject: [PATCH] qcacld-3.0: Remove obsolete StaRateMode related code Remove obsolete StaRateMode related functionality. Change-Id: Id051d9081a68adfa8e32dd7960caff06fd9b677a CRs-Fixed: 980689 --- core/mac/inc/sir_api.h | 28 --------- core/mac/src/pe/lim/lim_assoc_utils.c | 60 +------------------ core/mac/src/pe/lim/lim_assoc_utils.h | 4 -- core/mac/src/pe/lim/lim_ft.c | 15 ----- .../src/pe/lim/lim_process_mlm_req_messages.c | 2 - .../src/pe/lim/lim_process_mlm_rsp_messages.c | 2 - core/mac/src/pe/lim/lim_prop_exts_utils.c | 32 ---------- core/mac/src/pe/lim/lim_prop_exts_utils.h | 1 - 8 files changed, 1 insertion(+), 143 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 79d8f5123f12..3abf7ff87fa0 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -292,19 +292,6 @@ struct rrm_config_param { uint8_t rm_capability[RMENABLEDCAP_MAX_LEN]; }; -/* each station added has a rate mode which specifies the sta attributes */ -typedef enum eStaRateMode { - eSTA_TAURUS = 0, - eSTA_TITAN, - eSTA_POLARIS, - eSTA_11b, - eSTA_11bg, - eSTA_11a, - eSTA_11n, - eSTA_11ac, - eSTA_INVALID_RATE_MODE -} tStaRateMode, *tpStaRateMode; - /* * although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 * bits with MSB=1 for basic rates. change the mask for bit0-7 only so HAL gets @@ -318,21 +305,6 @@ const char *lim_bss_type_to_string(const uint16_t bss_type); const char *lim_scan_type_to_string(const uint8_t scan_type); typedef struct sSirSupportedRates { - /* - * For Self STA Entry: this represents Self Mode. - * For Peer Stations, this represents the mode of the peer. - * On Station: - * --this mode is updated when PE adds the Self Entry. - * -- OR when PE sends 'ADD_BSS' message and station context in BSS is - * used to indicate the mode of the AP. - * ON AP: - * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for - * that BSS is used to indicate the self mode of the AP. - * -- OR when a station is associated, PE sends 'ADD_STA' message with - * this mode updated. - */ - - tStaRateMode opRateMode; /* * 11b, 11a and aniLegacyRates are IE rates which gives rate in unit * of 500Kbps diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 07dbb857eace..766374ecfbf8 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -62,26 +62,6 @@ #include "wma_types.h" #include "lim_types.h" -/* - * fill up the rate info properly based on what is actually supported by the peer - * TBD TBD TBD - */ -void -lim_fill_supported_rates_info(tpAniSirGlobal pMac, - tpDphHashNode pSta, - tpSirSupportedRates pRates, tpPESession psessionEntry) -{ - /* pSta will be NULL for self entry, so get the opRateMode based on the self mode. */ - /* For the peer entry get it from the peer Capabilities present in hash table */ - if (pSta == NULL) - pRates->opRateMode = - lim_get_sta_rate_mode((uint8_t) psessionEntry->dot11mode); - else - pRates->opRateMode = - lim_get_sta_peer_type(pMac, pSta, psessionEntry); - -} - /** * lim_cmp_ssid() - utility function to compare SSIDs * @rx_ssid: Received SSID @@ -2260,9 +2240,6 @@ lim_add_sta(tpAniSirGlobal mac_ctx, &sta_ds->mlmStaContext.capabilityInfo, sizeof(add_sta_params->capab_info)); - lim_fill_supported_rates_info(mac_ctx, sta_ds, &sta_ds->supportedRates, - session_entry); - /* Copy legacy rates */ qdf_mem_copy((uint8_t *) &add_sta_params->supportedRates, (uint8_t *) &sta_ds->supportedRates, @@ -3037,9 +3014,6 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta, pAddStaParams->p2pCapableSta = 1; } - pAddStaParams->supportedRates.opRateMode = - lim_get_sta_rate_mode((uint8_t) selfStaDot11Mode); - lim_log(pMac, LOG2, FL(" StaIdx: %d updateSta = %d htcapable = %d "), pAddStaParams->staIdx, pAddStaParams->updateSta, pAddStaParams->htCapable); @@ -4139,12 +4113,9 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pStaDs = dph_get_hash_entry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable); if (pStaDs != NULL) { - lim_fill_supported_rates_info(pMac, pStaDs, - &pStaDs->supportedRates, - psessionEntry); qdf_mem_copy((uint8_t *) &pAddBssParams->staContext. supportedRates, - (uint8_t *) &pStaDs->supportedRates, + (uint8_t *)&pStaDs->supportedRates, sizeof(tSirSupportedRates)); } else lim_log(pMac, LOGE, FL( @@ -4661,10 +4632,6 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update pBeaconStruct->HTCaps.supportedMCSSet, false, psessionEntry, &pBeaconStruct->VHTCaps); - lim_fill_supported_rates_info(pMac, NULL, - &pAddBssParams->staContext. - supportedRates, psessionEntry); - pAddBssParams->staContext.encryptType = psessionEntry->encryptType; @@ -4796,31 +4763,6 @@ lim_prepare_and_send_del_sta_cnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, statusCode, psessionEntry); } -/** ------------------------------------------------------------- - \fn lim_get_sta_rate_mode - \brief Gets the Station Rate Mode. - \param uint8_t dot11Mode - \return none - -------------------------------------------------------------*/ -tStaRateMode lim_get_sta_rate_mode(uint8_t dot11Mode) -{ - switch (dot11Mode) { - case WNI_CFG_DOT11_MODE_11A: - return eSTA_11a; - case WNI_CFG_DOT11_MODE_11B: - return eSTA_11b; - case WNI_CFG_DOT11_MODE_11G: - return eSTA_11bg; - case WNI_CFG_DOT11_MODE_11N: - return eSTA_11n; - case WNI_CFG_DOT11_MODE_11AC: - return eSTA_11ac; - case WNI_CFG_DOT11_MODE_ALL: - default: - return eSTA_11n; - } -} - /** ------------------------------------------------------------- \fn lim_init_pre_auth_timer_table \brief Initialize the Pre Auth Tanle and creates the timer for diff --git a/core/mac/src/pe/lim/lim_assoc_utils.h b/core/mac/src/pe/lim/lim_assoc_utils.h index 46f7e307537a..9daef5193ebd 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.h +++ b/core/mac/src/pe/lim/lim_assoc_utils.h @@ -93,7 +93,6 @@ tSirRetStatus lim_del_sta(tpAniSirGlobal, tpDphHashNode, bool, tpPESession); tSirRetStatus lim_add_ft_sta_self(tpAniSirGlobal pMac, uint16_t assocId, tpPESession psessionEntry); tSirRetStatus lim_add_sta_self(tpAniSirGlobal, uint16_t, uint8_t, tpPESession); -tStaRateMode lim_get_sta_rate_mode(uint8_t dot11Mode); void lim_teardown_infra_bss(tpAniSirGlobal, tpPESession); void lim_restore_pre_reassoc_state(tpAniSirGlobal, @@ -118,9 +117,6 @@ void lim_update_re_assoc_globals(tpAniSirGlobal pMac, void lim_update_assoc_sta_datas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAssocRsp pAssocRsp, tpPESession psessionEntry); -void lim_fill_supported_rates_info(tpAniSirGlobal pMac, tpDphHashNode pSta, - tpSirSupportedRates pRates, - tpPESession psessionEntry); tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, tpSchBeaconStruct pBeaconStruct, diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index c12dbd7a5dff..5f1e54176e04 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -687,21 +687,6 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, pBeaconStruct->HTCaps.supportedMCSSet, false, pftSessionEntry, &pBeaconStruct->VHTCaps); - if (pftSessionEntry->htCapability) { - pAddBssParams->staContext.supportedRates.opRateMode = - eSTA_11n; - if (pftSessionEntry->vhtCapability) - pAddBssParams->staContext.supportedRates. - opRateMode = eSTA_11ac; - } else { - if (pftSessionEntry->limRFBand == SIR_BAND_5_GHZ) { - pAddBssParams->staContext.supportedRates. - opRateMode = eSTA_11a; - } else { - pAddBssParams->staContext.supportedRates. - opRateMode = eSTA_11bg; - } - } } pAddBssParams->maxTxPower = pftSessionEntry->maxTxPower; diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index d5df1d4f2cfc..c938db44fab5 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -552,8 +552,6 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param, lim_populate_own_rate_set(mac_ctx, &sta_param->supportedRates, NULL, false, session_entry, NULL); - lim_fill_supported_rates_info(mac_ctx, NULL, &sta_param->supportedRates, - session_entry); lim_log(mac_ctx, LOGE, FL( "GF: %d, ChnlWidth: %d, MimoPS: %d, lsigTXOP: %d, dsssCCK: %d," diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 99d3be57e22f..1172dfadf7ab 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -2845,8 +2845,6 @@ lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, pAddStaParams->listenInterval = (uint16_t) listenInterval; wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &selfStaDot11Mode); - pAddStaParams->supportedRates.opRateMode = - lim_get_sta_rate_mode((uint8_t) selfStaDot11Mode); pAddStaParams->encryptType = psessionEntry->encryptType; pAddStaParams->maxTxPower = psessionEntry->maxTxPower; diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index 1126512f9121..93f820141d72 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -254,35 +254,3 @@ ePhyChanBondState lim_get_htcb_state(ePhyChanBondState aniCBMode) return PHY_SINGLE_CHANNEL_CENTERED; } } - -/* - * lim_get_sta_peer_type - * - ***FUNCTION: - * This API returns STA peer type - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param pMac - Pointer to Global MAC structure - * @param pStaDs - Pointer to the tpDphHashNode of the STA - * under consideration - * @return tStaRateMode - */ -tStaRateMode lim_get_sta_peer_type(tpAniSirGlobal pMac, - tpDphHashNode pStaDs, tpPESession psessionEntry) -{ - tStaRateMode staPeerType = eSTA_11b; - if (pStaDs->mlmStaContext.vhtCapability) - staPeerType = eSTA_11ac; - else if (pStaDs->mlmStaContext.htCapability) - staPeerType = eSTA_11n; - else if (pStaDs->erpEnabled) - staPeerType = eSTA_11bg; - else if (psessionEntry->limRFBand == SIR_BAND_5_GHZ) - staPeerType = eSTA_11a; - return staPeerType; -} diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.h b/core/mac/src/pe/lim/lim_prop_exts_utils.h index 50502536a12b..9aaaab9dde73 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.h +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.h @@ -56,7 +56,6 @@ uint32_t limComputeAvg(tpAniSirGlobal, uint32_t, uint32_t); void lim_extract_ap_capability(tpAniSirGlobal, uint8_t *, uint16_t, uint8_t *, uint16_t *, uint8_t *, int8_t *, tpPESession); -tStaRateMode lim_get_sta_peer_type(tpAniSirGlobal, tpDphHashNode, tpPESession); ePhyChanBondState lim_get_htcb_state(ePhyChanBondState aniCBMode); #endif /* __LIM_PROP_EXTS_UTILS_H */