From 78b974008a95932fdf74297ef300efd1e5ce75f9 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 19 Sep 2019 14:19:36 +0530 Subject: [PATCH] qcacld-3.0: Remove unused bssId from struct sDphHashNode The bssId in struct sDphHashNode represent vdev_id and same can be used from pe session which already has this info so remove bssId param. Change-Id: I47a7f27e95bfaa9ecd617cb531895601a27dfbf5 CRs-Fixed: 2530965 --- Kbuild | 1 - core/mac/src/include/dph_global.h | 1 - core/mac/src/pe/lim/lim_api.c | 2 - core/mac/src/pe/lim/lim_assoc_utils.c | 1 - core/mac/src/pe/lim/lim_ft.c | 2 +- core/mac/src/pe/lim/lim_ibss_peer_mgmt.c | 2 - .../mac/src/pe/lim/lim_process_action_frame.c | 4 +- .../src/pe/lim/lim_process_assoc_req_frame.c | 1 - .../src/pe/lim/lim_process_assoc_rsp_frame.c | 3 +- .../src/pe/lim/lim_process_mlm_host_roam.c | 1 - .../src/pe/lim/lim_process_mlm_rsp_messages.c | 9 +-- .../src/pe/lim/lim_process_probe_rsp_frame.c | 2 +- .../src/pe/lim/lim_process_sme_req_messages.c | 6 +- core/mac/src/pe/lim/lim_process_tdls.c | 2 - core/mac/src/pe/lim/lim_reassoc_utils.c | 1 - .../src/pe/lim/lim_send_frames_host_roam.c | 1 - .../src/pe/lim/lim_send_management_frames.c | 1 - core/mac/src/pe/lim/lim_send_messages.c | 27 +------- core/mac/src/pe/lim/lim_send_messages.h | 13 +++- core/mac/src/pe/lim/lim_sta_hash_api.c | 67 ------------------- core/mac/src/pe/lim/lim_sta_hash_api.h | 41 ------------ core/mac/src/pe/lim/lim_utils.c | 22 ------ core/mac/src/pe/lim/lim_utils.h | 15 ++++- core/mac/src/pe/nan/nan_datapath.c | 1 - core/mac/src/pe/sch/sch_beacon_process.c | 33 +++------ core/mac/src/pe/sch/sch_message.c | 2 +- core/wma/inc/wma_if.h | 4 +- core/wma/src/wma_mgmt.c | 2 +- 28 files changed, 51 insertions(+), 216 deletions(-) delete mode 100644 core/mac/src/pe/lim/lim_sta_hash_api.c delete mode 100644 core/mac/src/pe/lim/lim_sta_hash_api.h diff --git a/Kbuild b/Kbuild index d750a966b27b..7d74024e9c69 100644 --- a/Kbuild +++ b/Kbuild @@ -375,7 +375,6 @@ MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/lim_aid_mgmt.o \ $(MAC_SRC_DIR)/pe/lim/lim_session.o \ $(MAC_SRC_DIR)/pe/lim/lim_session_utils.o \ $(MAC_SRC_DIR)/pe/lim/lim_sme_req_utils.o \ - $(MAC_SRC_DIR)/pe/lim/lim_sta_hash_api.o \ $(MAC_SRC_DIR)/pe/lim/lim_timer_utils.o \ $(MAC_SRC_DIR)/pe/lim/lim_trace.o \ $(MAC_SRC_DIR)/pe/lim/lim_utils.o diff --git a/core/mac/src/include/dph_global.h b/core/mac/src/include/dph_global.h index 4d1771e0d11c..c0e66f9ba15a 100644 --- a/core/mac/src/include/dph_global.h +++ b/core/mac/src/include/dph_global.h @@ -141,7 +141,6 @@ typedef struct sDphHashNode { */ uint8_t htSupportedChannelWidthSet:1; uint8_t htSecondaryChannelOffset:2; - uint16_t bssId; /* BSSID */ uint16_t assocId; /* Association ID */ /* This is the real sta index generated by HAL */ uint16_t staIndex; diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 6cf1aafcd5eb..728490caf979 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2445,8 +2445,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx, add_bss_params->vdev_id = roam_sync_ind_ptr->roamed_vdev_id; ft_session_ptr->bss_idx = add_bss_params->vdev_id; - - curr_sta_ds->bssId = add_bss_params->vdev_id; curr_sta_ds->staIndex = add_bss_params->staContext.staIdx; mac_ctx->roam.reassocRespLen = roam_sync_ind_ptr->reassocRespLength; mac_ctx->roam.pReassocResp = diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 33a79a3ae28f..adbea85d7018 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -42,7 +42,6 @@ #include "lim_assoc_utils.h" #include "lim_security_utils.h" #include "lim_ser_des_utils.h" -#include "lim_sta_hash_api.h" #include "lim_admit_control.h" #include "lim_send_messages.h" #include "lim_ibss_peer_mgmt.h" diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index 67f9a7dcc61b..78957b899560 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -1004,7 +1004,7 @@ QDF_STATUS lim_process_ft_aggr_qos_req(struct mac_context *mac, lim_send_edca_params(mac, pe_session->gLimEdcaParamsActive, - pSta->bssId, false); + pe_session->vdev_id, false); if (QDF_STATUS_SUCCESS != lim_tspec_add(mac, pSta->staAddr, pSta->assocId, diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c index 47f95b721a6f..4355aa31fdc4 100644 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c +++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c @@ -22,7 +22,6 @@ #include "wni_cfg.h" #include "lim_utils.h" #include "lim_assoc_utils.h" -#include "lim_sta_hash_api.h" #include "sch_api.h" /* sch_set_fixed_beacon_fields for IBSS coalesce */ #include "lim_security_utils.h" #include "lim_send_messages.h" @@ -1186,7 +1185,6 @@ lim_ibss_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *pe_s return QDF_STATUS_E_FAILURE; } - sta->bssId = pe_session->vdev_id; sta->staIndex = pAddStaParams->staIdx; sta->valid = 1; sta->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c index a57363b9756b..eae0af8bd617 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -829,7 +829,7 @@ static void __lim_process_add_ts_rsp(struct mac_context *mac_ctx, &session->dph.dphHashTable); if (sta_ds_ptr) lim_send_edca_params(mac_ctx, session->gLimEdcaParamsActive, - sta_ds_ptr->bssId, false); + session->vdev_id, false); else pe_err("Self entry missing in Hash Table"); sir_copy_mac_addr(peer_macaddr, session->bssId); @@ -1030,7 +1030,7 @@ static void __lim_process_del_ts_req(struct mac_context *mac_ctx, &session->dph.dphHashTable); if (sta_ds_ptr) lim_send_edca_params(mac_ctx, session->gLimEdcaParamsActive, - sta_ds_ptr->bssId, false); + session->vdev_id, false); else pe_err("Self entry missing in Hash Table"); diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index f554d823b671..68d74582ef41 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -33,7 +33,6 @@ #include "lim_assoc_utils.h" #include "lim_security_utils.h" #include "lim_ser_des_utils.h" -#include "lim_sta_hash_api.h" #include "lim_admit_control.h" #include "cds_packet.h" #include "lim_session_utils.h" diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index 0464bc2a49ce..a1a4d9278d19 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -39,7 +39,6 @@ #include "lim_assoc_utils.h" #include "lim_security_utils.h" #include "lim_ser_des_utils.h" -#include "lim_sta_hash_api.h" #include "lim_send_messages.h" #include "lim_process_fils.h" @@ -922,7 +921,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, if (!lim_is_roam_synch_in_progress(session_entry)) { lim_send_edca_params(mac_ctx, session_entry->gLimEdcaParamsActive, - sta_ds->bssId, false); + session_entry->vdev_id, false); lim_add_ft_sta_self(mac_ctx, (assoc_rsp->aid & 0x3FFF), session_entry); diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c index fd3fa5937a31..2ab04a0ff3c9 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c +++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c @@ -460,7 +460,6 @@ void lim_process_sta_mlm_add_bss_rsp_ft(struct mac_context *mac, pe_session->bss_idx = add_bss_rsp->vdev_id; /* Success, handle below */ - sta->bssId = add_bss_rsp->vdev_id; /* STA Index(genr by HAL) for the BSS entry is stored here */ sta->staIndex = wma_peer_get_peet_id(pe_session->bssId); 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 4e1560fe668d..58cf30817504 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 @@ -1511,12 +1511,12 @@ void lim_process_sta_mlm_add_sta_rsp(struct mac_context *mac_ctx, pe_debug("Send user cfg MU EDCA params to FW"); lim_send_edca_params(mac_ctx, mac_ctx->usr_mu_edca_params, - sta_ds->bssId, true); + session_entry->vdev_id, true); } else if (session_entry->mu_edca_present) { pe_debug("Send MU EDCA params to FW"); lim_send_edca_params(mac_ctx, session_entry->ap_mu_edca_params, - sta_ds->bssId, true); + session_entry->vdev_id, true); } } } else { @@ -1919,7 +1919,6 @@ void lim_process_ap_mlm_add_sta_rsp(struct mac_context *mac, pe_session); goto end; } - sta->bssId = pe_session->vdev_id; sta->staIndex = pAddStaParams->staIdx; sta->nss = pAddStaParams->nss; /* if the AssocRsp frame is not acknowledged, then keep alive timer will take care of the state */ @@ -2147,7 +2146,6 @@ void lim_process_sta_add_bss_rsp_pre_assoc(struct mac_context *mac_ctx, } session_entry->vdev_id = add_bss_params->vdev_id; /* Success, handle below */ - sta->bssId = add_bss_params->vdev_id; /* STA Index(genr by HAL) for the BSS entry is stored here */ sta->staIndex = add_bss_params->staContext.staIdx; /* Trigger Authentication with AP */ @@ -2270,7 +2268,6 @@ static void lim_process_sta_mlm_add_bss_rsp(struct mac_context *mac_ctx, session_entry->bss_idx = add_bss_rsp->vdev_id; /* Success, handle below */ - sta_ds->bssId = add_bss_rsp->vdev_id; /* * STA Index(genr by HAL) for the BSS * entry is stored here @@ -2282,7 +2279,7 @@ static void lim_process_sta_mlm_add_bss_rsp(struct mac_context *mac_ctx, session_entry->gLimEdcaParams, session_entry); lim_send_edca_params(mac_ctx, session_entry->gLimEdcaParamsActive, - sta_ds->bssId, false); + session_entry->vdev_id, false); if (lim_add_sta_self(mac_ctx, sta_idx, update_sta, session_entry) != QDF_STATUS_SUCCESS) { /* Add STA context at HW */ diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c index 5610bbcc7097..f71f6d64def8 100644 --- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c @@ -276,7 +276,7 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info session_entry); lim_send_edca_params(mac_ctx, session_entry->gLimEdcaParamsActive, - sta_ds->bssId, false); + session_entry->vdev_id, false); } else { pe_err("SelfEntry missing in Hash"); } diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 604fb9f3e11b..5924567db942 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -3407,7 +3407,7 @@ __lim_process_sme_delts_req(struct mac_context *mac, uint32_t *msg_buf) &pe_session->dph.dphHashTable); if (sta) { lim_send_edca_params(mac, pe_session->gLimEdcaParamsActive, - sta->bssId, false); + pe_session->vdev_id, false); status = QDF_STATUS_SUCCESS; } else { pe_err("Self entry missing in Hash Table"); @@ -3528,7 +3528,7 @@ static void lim_process_sme_update_edca_params(struct mac_context *mac_ctx, if (sta_ds_ptr) lim_send_edca_params(mac_ctx, pe_session->gLimEdcaParamsActive, - sta_ds_ptr->bssId, false); + pe_session->vdev_id, false); else pe_err("Self entry missing in Hash Table"); } @@ -3548,7 +3548,7 @@ static void lim_process_sme_update_mu_edca_params(struct mac_context *mac_ctx, &pe_session->dph.dphHashTable); if (sta_ds_ptr) lim_send_edca_params(mac_ctx, mac_ctx->usr_mu_edca_params, - sta_ds_ptr->bssId, true); + pe_session->vdev_id, true); else pe_err("Self entry missing in Hash Table"); } diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index b68b2ed1db68..d3fedfe3ef01 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -58,7 +58,6 @@ #include "lim_utils.h" #include "lim_security_utils.h" #include "dot11f.h" -#include "lim_sta_hash_api.h" #include "sch_api.h" #include "lim_send_messages.h" #include "utils_parser.h" @@ -2738,7 +2737,6 @@ QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg, goto add_sta_error; } - sta->bssId = pe_session->vdev_id; sta->staIndex = pAddStaParams->staIdx; sta->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; sta->valid = 1; diff --git a/core/mac/src/pe/lim/lim_reassoc_utils.c b/core/mac/src/pe/lim/lim_reassoc_utils.c index 5b50cc3cbe3e..0e027dabc0d0 100644 --- a/core/mac/src/pe/lim/lim_reassoc_utils.c +++ b/core/mac/src/pe/lim/lim_reassoc_utils.c @@ -35,7 +35,6 @@ #include "lim_assoc_utils.h" #include "lim_security_utils.h" #include "lim_ser_des_utils.h" -#include "lim_sta_hash_api.h" #include "lim_admit_control.h" #include "lim_send_messages.h" #include "lim_ibss_peer_mgmt.h" diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c index 1cf76588b5d3..b7bfc7c00b6a 100644 --- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c +++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c @@ -30,7 +30,6 @@ #include "lim_security_utils.h" #include "lim_prop_exts_utils.h" #include "dot11f.h" -#include "lim_sta_hash_api.h" #include "sch_api.h" #include "lim_send_messages.h" #include "lim_assoc_utils.h" diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index e289b6103aa3..558130cbbfe6 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -33,7 +33,6 @@ #include "lim_security_utils.h" #include "lim_prop_exts_utils.h" #include "dot11f.h" -#include "lim_sta_hash_api.h" #include "sch_api.h" #include "lim_send_messages.h" #include "lim_assoc_utils.h" diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c index efb4b375b6f7..7e3489cfb485 100644 --- a/core/mac/src/pe/lim/lim_send_messages.c +++ b/core/mac/src/pe/lim/lim_send_messages.c @@ -223,30 +223,9 @@ send_resp: return QDF_STATUS_SUCCESS; } -/** - * lim_send_edca_params() - * - ***FUNCTION: - * This function is called to send dynamically changing EDCA Parameters to WMA. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * NA - * - ***NOTE: - * NA - * - * @param mac pointer to Global Mac structure. - * @param tpUpdatedEdcaParams pointer to the structure which contains - * dynamically changing EDCA parameters. - * @param highPerformance If the peer is Airgo (taurus) then switch to highPerformance is true. - * - * @return success if message send is ok, else false. - */ QDF_STATUS lim_send_edca_params(struct mac_context *mac, - tSirMacEdcaParamRecord *pUpdatedEdcaParams, - uint16_t bss_idx, bool mu_edca) + tSirMacEdcaParamRecord *pUpdatedEdcaParams, + uint16_t vdev_id, bool mu_edca) { tEdcaParams *pEdcaParams = NULL; QDF_STATUS retCode = QDF_STATUS_SUCCESS; @@ -255,7 +234,7 @@ QDF_STATUS lim_send_edca_params(struct mac_context *mac, pEdcaParams = qdf_mem_malloc(sizeof(tEdcaParams)); if (!pEdcaParams) return QDF_STATUS_E_NOMEM; - pEdcaParams->bss_idx = bss_idx; + pEdcaParams->vdev_id = vdev_id; pEdcaParams->acbe = pUpdatedEdcaParams[QCA_WLAN_AC_BE]; pEdcaParams->acbk = pUpdatedEdcaParams[QCA_WLAN_AC_BK]; pEdcaParams->acvi = pUpdatedEdcaParams[QCA_WLAN_AC_VI]; diff --git a/core/mac/src/pe/lim/lim_send_messages.h b/core/mac/src/pe/lim/lim_send_messages.h index b28f9c093abb..131ecc5bcfeb 100644 --- a/core/mac/src/pe/lim/lim_send_messages.h +++ b/core/mac/src/pe/lim/lim_send_messages.h @@ -63,9 +63,18 @@ QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac, uint32_t cac_duration_ms, uint32_t dfs_regdomain); +/** + * lim_send_edca_params() - Send edsa params to firmware + * @mac: pointer to Global MAC structure + * @pUpdatedEdcaParams: updated edca params + * @vdev_id: vdev id + * @mu_edca: MU edca + * + * Return: QDF_STATUS + */ QDF_STATUS lim_send_edca_params(struct mac_context *mac, - tSirMacEdcaParamRecord *pUpdatedEdcaParams, - uint16_t bss_idx, bool mu_edca); + tSirMacEdcaParamRecord *pUpdatedEdcaParams, + uint16_t vdev_id, bool mu_edca); /** * lim_set_active_edca_params() - Choose best EDCA parameters * @mac_ctx: pointer to Global Mac structure. diff --git a/core/mac/src/pe/lim/lim_sta_hash_api.c b/core/mac/src/pe/lim/lim_sta_hash_api.c deleted file mode 100644 index cc1f13f95fa8..000000000000 --- a/core/mac/src/pe/lim/lim_sta_hash_api.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2011-2012, 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 - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * - * lim_sta_hash_api.c: Provides access functions to get/set values of station hash entry fields. - * Author: Sunit Bhatia - * Date: 09/19/2006 - * History:- - * Date Modified by Modification Information - * - * -------------------------------------------------------------------------- - * - */ - -#include "lim_sta_hash_api.h" - -/** - * lim_get_sta_hash_bssidx() - * - ***FUNCTION: - * This function is called to Get the Bss Index of the currently associated Station. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * NA - * - ***NOTE: - * NA - * - * @param mac pointer to Global Mac structure. - * @param assocId AssocID of the Station. - * @param bssidx pointer to the bss index, which will be returned by the function. - * - * @return success if GET operation is ok, else Failure. - */ - -QDF_STATUS lim_get_sta_hash_bssidx(struct mac_context *mac, uint16_t assocId, - uint8_t *bssidx, struct pe_session *pe_session) -{ - tpDphHashNode pSta = - dph_get_hash_entry(mac, assocId, &pe_session->dph.dphHashTable); - - if (!pSta) { - pe_err("invalid STA: %d", assocId); - return QDF_STATUS_E_NOENT; - } - - *bssidx = (uint8_t) pSta->bssId; - return QDF_STATUS_SUCCESS; -} diff --git a/core/mac/src/pe/lim/lim_sta_hash_api.h b/core/mac/src/pe/lim/lim_sta_hash_api.h deleted file mode 100644 index 17ef9628e687..000000000000 --- a/core/mac/src/pe/lim/lim_sta_hash_api.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011-2012, 2014, 2018 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 - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * - * This file lim_sta_hash_api.h contains the - * function prototypes for accessing station hash entry fields. - * - * Author: Sunit Bhatia - * Date: 09/19/2006 - * History:- - * Date Modified by Modification Information - * -------------------------------------------------------------------- - * - */ - -#ifndef __LIM_STA_HASH_API_H__ -#define __LIM_STA_HASH_API_H__ - -#include "ani_global.h" -#include "lim_types.h" - -QDF_STATUS lim_get_sta_hash_bssidx(struct mac_context *mac, uint16_t assocId, - uint8_t *bssidx, struct pe_session *pe_session); - -#endif diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index ce668a87c3a2..7c89233d4d53 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -34,7 +34,6 @@ #include "lim_send_messages.h" #include "lim_ser_des_utils.h" #include "lim_admit_control.h" -#include "lim_sta_hash_api.h" #include "dot11f.h" #include "dot11fdefs.h" #include "wmm_apsd.h" @@ -3919,29 +3918,8 @@ static void lim_ht_switch_chnl_req(struct pe_session *session) } } -/** - * \brief This function updates lim global structure, if CB parameters in the BSS - * have changed, and sends an indication to HAL also with the - * updated HT Parameters. - * This function does not detect the change in the primary channel, that is done as part - * of channel Swtich IE processing. - * If STA is configured with '20Mhz only' mode, then this function does not do anything - * This function changes the CB mode, only if the self capability is set to '20 as well as 40Mhz' - * - * - * \param mac Pointer to global MAC structure - * - * \param pRcvdHTInfo Pointer to HT Info IE obtained from a Beacon or - * Probe Response - * - * \param bss_idx BSS Index of the Bss to which Station is associated. - * - * - */ - void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac, tDot11fIEHTInfo *pHTInfo, - uint8_t bss_idx, struct pe_session *pe_session) { /* If self capability is set to '20Mhz only', then do not change the CB mode. */ diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 11b6e8346890..190a385f6a7e 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -280,10 +280,19 @@ void lim_decide_sta_protection(struct mac_context *mac, void lim_decide_sta_protection_on_assoc(struct mac_context *mac, tpSchBeaconStruct pBeaconStruct, struct pe_session *pe_session); + +/** + * lim_update_sta_run_time_ht_switch_chnl_params() - Process change in HT + * bandwidth + * @mac: pointer to Global MAC structure + * @pHTInfo: ht info IE + * @pe_session: pe session + * + * Return: none + */ void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac, - tDot11fIEHTInfo *pHTInfo, - uint8_t bss_idx, - struct pe_session *pe_session); + tDot11fIEHTInfo *pHTInfo, + struct pe_session *pe_session); /* Print MAC address utility function */ void lim_print_mac_addr(struct mac_context *, tSirMacAddr, uint8_t); diff --git a/core/mac/src/pe/nan/nan_datapath.c b/core/mac/src/pe/nan/nan_datapath.c index 4ed275f8eb26..07f28687eef2 100644 --- a/core/mac/src/pe/nan/nan_datapath.c +++ b/core/mac/src/pe/nan/nan_datapath.c @@ -493,7 +493,6 @@ void lim_ndp_add_sta_rsp(struct mac_context *mac_ctx, struct pe_session *session qdf_mem_free(add_sta_rsp); return; } - sta_ds->bssId = session->vdev_id; sta_ds->staIndex = add_sta_rsp->staIdx; sta_ds->valid = 1; sta_ds->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index deffcd9e968c..999a7def614d 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -38,8 +38,6 @@ #include "lim_utils.h" #include "lim_send_messages.h" -#include "lim_sta_hash_api.h" - #include "rrm_api.h" #ifdef FEATURE_WLAN_DIAG_SUPPORT @@ -319,14 +317,11 @@ static tSirMacHTChannelWidth get_operating_channel_width(tpDphHashNode stads) } /* - * sch_bcn_process_sta() - Process the received beacon frame for sta, - * bt_amp_sta - * + * sch_bcn_process_sta() - Process the received beacon frame for sta * @mac_ctx: mac_ctx * @bcn: beacon struct * @rx_pkt_info: received packet info * @session: pe session pointer - * @bss_idx: bss index * @beaconParams: update beacon params * @sendProbeReq: out flag to indicate if probe rsp is to be sent * @pMh: mac header @@ -339,7 +334,7 @@ static bool sch_bcn_process_sta(struct mac_context *mac_ctx, tpSchBeaconStruct bcn, uint8_t *rx_pkt_info, - struct pe_session *session, uint8_t *bss_idx, + struct pe_session *session, tUpdateBeaconParams *beaconParams, uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh) { @@ -375,11 +370,7 @@ sch_bcn_process_sta(struct mac_context *mac_ctx, } lim_detect_change_in_ap_capabilities(mac_ctx, bcn, session); - if (lim_get_sta_hash_bssidx(mac_ctx, DPH_STA_HASH_INDEX_PEER, bss_idx, - session) != QDF_STATUS_SUCCESS) - return false; - - beaconParams->bss_idx = *bss_idx; + beaconParams->bss_idx = session->vdev_id; qdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp, (uint8_t *) bcn->timeStamp, sizeof(uint64_t)); session->currentBssBeaconCnt++; @@ -452,7 +443,7 @@ sch_bcn_process_sta(struct mac_context *mac_ctx, session->gLimEdcaParams, session); lim_send_edca_params(mac_ctx, session->gLimEdcaParamsActive, - sta->bssId, false); + session->vdev_id, false); } else { pe_err("Self Entry missing in Hash Table"); } @@ -701,13 +692,11 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds, /* * sch_bcn_process_sta_ibss() - Process the received beacon frame - * for sta, bt_amp_sta and ibss - * + * for sta and ibss * @mac_ctx: mac_ctx * @bcn: beacon struct * @rx_pkt_info: received packet info * @session: pe session pointer - * @bss_idx: bss index * @beaconParams: update beacon params * @sendProbeReq: out flag to indicate if probe rsp is to be sent * @pMh: mac header @@ -721,7 +710,6 @@ sch_bcn_process_sta_ibss(struct mac_context *mac_ctx, tpSchBeaconStruct bcn, uint8_t *rx_pkt_info, struct pe_session *session, - uint8_t *bss_idx, tUpdateBeaconParams *beaconParams, uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh) { @@ -818,7 +806,6 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, struct pe_session *session) { - uint8_t bss_idx = 0; tUpdateBeaconParams beaconParams; uint8_t sendProbeReq = false; tpSirMacMgmtHdr pMh = WMA_GET_RX_MAC_HEADER(rx_pkt_info); @@ -831,9 +818,9 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, if (LIM_IS_IBSS_ROLE(session)) { lim_handle_ibss_coalescing(mac_ctx, bcn, rx_pkt_info, session); } else if (LIM_IS_STA_ROLE(session)) { - if (false == sch_bcn_process_sta(mac_ctx, bcn, - rx_pkt_info, session, &bss_idx, - &beaconParams, &sendProbeReq, pMh)) + if (false == sch_bcn_process_sta(mac_ctx, bcn, rx_pkt_info, + session, &beaconParams, + &sendProbeReq, pMh)) return; } @@ -845,7 +832,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, bcn->VHTOperation.present)) && session->htCapability && bcn->HTInfo.present && !LIM_IS_IBSS_ROLE(session)) lim_update_sta_run_time_ht_switch_chnl_params(mac_ctx, - &bcn->HTInfo, bss_idx, session); + &bcn->HTInfo, session); if ((LIM_IS_STA_ROLE(session) && !wma_is_csa_offload_enabled()) || LIM_IS_IBSS_ROLE(session)) { @@ -870,7 +857,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, if (LIM_IS_STA_ROLE(session) || LIM_IS_IBSS_ROLE(session)) sch_bcn_process_sta_ibss(mac_ctx, bcn, - rx_pkt_info, session, &bss_idx, + rx_pkt_info, session, &beaconParams, &sendProbeReq, pMh); /* Obtain the Max Tx power for the current regulatory */ regMax = lim_get_regulatory_max_transmit_power( diff --git a/core/mac/src/pe/sch/sch_message.c b/core/mac/src/pe/sch/sch_message.c index d7c7743c6f71..5582cd546f49 100644 --- a/core/mac/src/pe/sch/sch_message.c +++ b/core/mac/src/pe/sch/sch_message.c @@ -360,7 +360,7 @@ void sch_qos_update_local(struct mac_context *mac, struct pe_session *pe_session /* For AP, the bssID is stored in LIM Global context. */ lim_send_edca_params(mac, pe_session->gLimEdcaParams, - pe_session->bss_idx, false); + pe_session->vdev_id, false); } /** diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index 2735a80c72a7..53504c71ba7b 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -648,7 +648,7 @@ typedef struct { /** * struct tEdcaParams - EDCA parameters - * @bss_idx: BSSID index + * @vdev_id: vdev id * @acbe: best effort access category * @acbk: Background access category * @acvi: video access category @@ -656,7 +656,7 @@ typedef struct { * @mu_edca_params: flag to indicate MU EDCA */ typedef struct { - uint16_t bss_idx; + uint16_t vdev_id; tSirMacEdcaParamRecord acbe; tSirMacEdcaParamRecord acbk; tSirMacEdcaParamRecord acvi; diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index b6110ae76d22..efe913d6817f 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -2776,7 +2776,7 @@ QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle, QDF_STATUS status; void *soc = cds_get_context(QDF_MODULE_ID_SOC); - vdev_id = edca_params->bss_idx; + vdev_id = edca_params->vdev_id; if (!wma_is_vdev_valid(vdev_id)) { WMA_LOGE("%s: vdev id:%d is not active ", __func__, vdev_id); goto fail;