qcacld-3.0: Replace find pe session by sme session id with vdev id
Replace pe_find_session_by_sme_session_id with
pe_find_session_by_vdev_id as sme_session_id is vdev id.
Change-Id: I5fa537ff8e391fc18e568fd6f750334268faafa9
CRs-Fixed: 2531681
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 3f8676f..daf3ce4 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -629,8 +629,7 @@
if (!mac_ctx)
return false;
- session = pe_find_session_by_sme_session_id(mac_ctx,
- vdev_id);
+ session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session) {
/* couldn't find session */
pe_err("Session not found for vdev_id: %d", vdev_id);
@@ -2280,7 +2279,7 @@
{
struct pe_session *session;
- session = pe_find_session_by_sme_session_id(mac, vdev_id);
+ session = pe_find_session_by_vdev_id(mac, vdev_id);
if (!session) {
pe_err("LFR3: Vdev %d doesn't exist", vdev_id);
return QDF_STATUS_E_FAILURE;
@@ -2313,7 +2312,7 @@
pe_err("LFR3:roam_sync_ind_ptr is NULL");
return status;
}
- session_ptr = pe_find_session_by_sme_session_id(mac_ctx,
+ session_ptr = pe_find_session_by_vdev_id(mac_ctx,
roam_sync_ind_ptr->roamed_vdev_id);
if (!session_ptr) {
pe_err("LFR3:Unable to find session");
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index 78957b8..3f1166b 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -745,7 +745,7 @@
qdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
&pKeyInfo->bssid);
pMlmSetKeysReq->sessionId = pe_session->peSessionId;
- pMlmSetKeysReq->smesessionId = pe_session->smeSessionId;
+ pMlmSetKeysReq->vdev_id = pe_session->vdev_id;
pMlmSetKeysReq->edType = pKeyInfo->keyMaterial.edType;
pMlmSetKeysReq->numKeys = pKeyInfo->keyMaterial.numKeys;
qdf_mem_copy((uint8_t *) &pMlmSetKeysReq->key,
diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c
index a23fbcb..365ff72 100644
--- a/core/mac/src/pe/lim/lim_ft_preauth.c
+++ b/core/mac/src/pe/lim/lim_ft_preauth.c
@@ -732,25 +732,9 @@
return status;
}
-/**
- * lim_preauth_scan_event_handler() - Process firmware preauth scan events
- *
- * @mac_ctx:Pointer to global MAC structure
- * @event: Scan event
- * @session_id: session entry
- * @scan_id: scan id from WMA scan event.
- *
- * If scan event signifies failure or successful completion, operation
- * is complete.
- * If scan event signifies that STA is on foreign channel, send auth frame
- *
- * Return: void
- */
-
void lim_preauth_scan_event_handler(struct mac_context *mac_ctx,
- enum sir_scan_event_type event,
- uint8_t session_id,
- uint32_t scan_id)
+ enum sir_scan_event_type event,
+ uint8_t vdev_id, uint32_t scan_id)
{
struct pe_session *session_entry;
@@ -767,13 +751,11 @@
/* For the first pre-auth request
* need to get it by sme session id (vdev id)
*/
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- session_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
}
if (!session_entry) {
- pe_err("SmeSessionId:%d PeSessionId:%d does not exist",
- session_id,
+ pe_err("vdev_id :%d PeSessionId:%d does not exist", vdev_id,
mac_ctx->lim.limTimers.gLimFTPreAuthRspTimer.sessionId);
return;
}
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 4db723e..bac2b73 100644
--- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
+++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
@@ -1273,8 +1273,7 @@
goto end;
}
- pe_session = pe_find_session_by_sme_session_id(mac,
- vdev_stop_rsp->vdev_id);
+ pe_session = pe_find_session_by_vdev_id(mac, vdev_stop_rsp->vdev_id);
if (!pe_session) {
pe_err("Session Does not exist for given sessionID");
goto end;
diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c
index 712f544..26b5818 100644
--- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c
+++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c
@@ -203,7 +203,7 @@
pe_err("Invalid body pointer in message");
return;
}
- session_entry = pe_find_session_by_sme_session_id(mac_ctx, msg->vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, msg->vdev_id);
if (!session_entry) {
pe_err("session not found for given sme session");
qdf_mem_free(msg);
@@ -579,8 +579,7 @@
return;
}
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- msg->vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, msg->vdev_id);
if (!session_entry) {
pe_err_rl("session not found for given sme session");
qdf_mem_free(msg);
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index 210259d..9c7e0d2 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -199,8 +199,7 @@
return;
}
- session = pe_find_session_by_sme_session_id(mac,
- sae_msg->session_id);
+ session = pe_find_session_by_vdev_id(mac, sae_msg->vdev_id);
if (!session) {
pe_err("SAE:Unable to find session");
return;
@@ -420,9 +419,8 @@
if (!local_ie_buf)
return;
- pe_session = pe_find_session_by_sme_session_id(mac_ctx,
-
- set_ie_params->session_id);
+ pe_session = pe_find_session_by_vdev_id(mac_ctx,
+ set_ie_params->vdev_id);
if (lim_update_ext_cap_ie(mac_ctx,
(uint8_t *)set_ie_params->ie_data,
local_ie_buf, &local_ie_len, pe_session)) {
@@ -434,7 +432,7 @@
if (!wma_ie_params)
goto scan_ie_send_fail;
- wma_ie_params->vdev_id = set_ie_params->session_id;
+ wma_ie_params->vdev_id = set_ie_params->vdev_id;
wma_ie_params->ie_id = DEFAULT_SCAN_IE_ID;
wma_ie_params->length = local_ie_len;
wma_ie_params->data = (uint8_t *)(wma_ie_params)
@@ -1990,8 +1988,8 @@
beacon_params.paramChangeBitmap = 0;
for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
vdev_id = ((uint8_t *)msg->bodyptr)[i];
- session_entry = pe_find_session_by_sme_session_id(
- mac_ctx, vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx,
+ vdev_id);
if (!session_entry)
continue;
session_entry->sap_advertise_avoid_ch_ie =
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 c1c967d..95f032a 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
@@ -1198,7 +1198,7 @@
{
struct pe_session *session;
- session = pe_find_session_by_sme_session_id(mac, vdev_id);
+ session = pe_find_session_by_vdev_id(mac, vdev_id);
if (!session) {
return;
}
@@ -1955,8 +1955,7 @@
return;
}
/* TBD: free the memory before returning, do it for all places where lookup fails. */
- pe_session = pe_find_session_by_sme_session_id(mac,
- add_bss_rsp->vdev_id);
+ pe_session = pe_find_session_by_vdev_id(mac, add_bss_rsp->vdev_id);
if (!pe_session) {
pe_err("session does not exist for vdev_id %d",
add_bss_rsp->vdev_id);
@@ -2331,8 +2330,8 @@
*/
SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true);
/* Validate SME/LIM/MLME state */
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- add_bss_rsp->vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx,
+ add_bss_rsp->vdev_id);
if (!session_entry) {
pe_err("vdev id:%d Session Doesn't exist",
add_bss_rsp->vdev_id);
@@ -2392,7 +2391,7 @@
pe_debug("hidden ssid resp for vdev_id:%d ", vdev_id);
- session_entry = pe_find_session_by_sme_session_id(mac_ctx, vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session_entry) {
pe_err("vdev_id:%d Session Doesn't exist",
vdev_id);
@@ -2448,7 +2447,7 @@
uint8_t resp_reqd = 1;
struct sLimMlmSetKeysCnf mlm_set_key_cnf;
uint8_t session_id = 0;
- uint8_t sme_session_id;
+ uint8_t vdev_id;
struct pe_session *session_entry;
uint16_t key_len;
uint16_t result_status;
@@ -2461,9 +2460,8 @@
return;
}
set_key_params = msg->bodyptr;
- sme_session_id = set_key_params->smesessionId;
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- sme_session_id);
+ vdev_id = set_key_params->vdev_id;
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session_entry) {
pe_err("session does not exist for given session_id");
qdf_mem_zero(msg->bodyptr, sizeof(*set_key_params));
@@ -2472,12 +2470,11 @@
lim_send_sme_set_context_rsp(mac_ctx,
mlm_set_key_cnf.peer_macaddr,
0, eSIR_SME_INVALID_SESSION, NULL,
- sme_session_id);
+ vdev_id);
return;
}
session_id = session_entry->peSessionId;
- pe_debug("PE session ID %d, SME session id %d", session_id,
- sme_session_id);
+ pe_debug("PE session ID %d, vdev_id %d", session_id, vdev_id);
result_status = set_key_params->status;
if (!lim_is_set_key_req_converged()) {
if (eLIM_MLM_WT_SET_STA_KEY_STATE !=
@@ -2548,7 +2545,7 @@
struct sLimMlmSetKeysCnf set_key_cnf;
uint16_t result_status;
uint8_t session_id = 0;
- uint8_t sme_session_id;
+ uint8_t vdev_id;
struct pe_session *session_entry;
tpLimMlmSetKeysReq set_key_req;
uint16_t key_len;
@@ -2559,23 +2556,20 @@
pe_err("msg bodyptr is null");
return;
}
- sme_session_id = ((tpSetBssKeyParams) msg->bodyptr)->smesessionId;
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- sme_session_id);
+ vdev_id = ((tpSetBssKeyParams) msg->bodyptr)->vdev_id;
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session_entry) {
- pe_err("session does not exist for given sessionId [%d]",
- session_id);
+ pe_err("session does not exist for vdev_id %d", vdev_id);
qdf_mem_zero(msg->bodyptr, sizeof(tSetBssKeyParams));
qdf_mem_free(msg->bodyptr);
msg->bodyptr = NULL;
lim_send_sme_set_context_rsp(mac_ctx, set_key_cnf.peer_macaddr,
0, eSIR_SME_INVALID_SESSION, NULL,
- sme_session_id);
+ vdev_id);
return;
}
session_id = session_entry->peSessionId;
- pe_debug("PE session ID %d, SME session id %d", session_id,
- sme_session_id);
+ pe_debug("PE session ID %d, SME vdev_id %d", session_id, vdev_id);
if (eLIM_MLM_WT_SET_BSS_KEY_STATE == session_entry->limMlmState) {
result_status =
(uint16_t)(((tpSetBssKeyParams)msg->bodyptr)->status);
@@ -2939,7 +2933,7 @@
SET_LIM_PROCESS_DEFD_MESGS(mac, true);
status = rsp->status;
- pe_session = pe_find_session_by_sme_session_id(mac, rsp->vdev_id);
+ pe_session = pe_find_session_by_vdev_id(mac, rsp->vdev_id);
if (!pe_session) {
pe_err("session does not exist for given sessionId");
return;
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 a20f902..e64e186 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
@@ -1158,7 +1158,7 @@
uint16_t rsn_caps;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc,
- csr_join_req->sessionId,
+ csr_join_req->vdev_id,
WLAN_LEGACY_SME_ID);
if (!vdev) {
pe_err("Invalid vdev");
@@ -1178,7 +1178,7 @@
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
pe_debug("vdev %d limRmfEnabled %d rsn_caps 0x%x",
- csr_join_req->sessionId, session->limRmfEnabled,
+ csr_join_req->vdev_id, session->limRmfEnabled,
rsn_caps);
}
#else
@@ -1243,7 +1243,7 @@
uint8_t session_id;
uint8_t bss_chan_id;
struct pe_session *session = NULL;
- uint8_t sme_session_id = 0;
+ uint8_t vdev_id = 0;
int8_t local_power_constraint = 0, reg_max = 0;
uint16_t ie_len;
const uint8_t *vendor_ie;
@@ -1283,8 +1283,8 @@
if (!lim_is_sme_join_req_valid(mac_ctx, sme_join_req)) {
/* Received invalid eWNI_SME_JOIN_REQ */
/* Log the event */
- pe_warn("SessionId:%d JOIN REQ with invalid data",
- sme_join_req->sessionId);
+ pe_warn("vdev_id:%d JOIN REQ with invalid data",
+ sme_join_req->vdev_id);
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
@@ -1312,7 +1312,7 @@
session->limSmeState);
if (session->limSmeState == eLIM_SME_LINK_EST_STATE &&
- session->smeSessionId == sme_join_req->sessionId) {
+ session->smeSessionId == sme_join_req->vdev_id) {
/*
* Received eWNI_SME_JOIN_REQ for same
* BSS as currently associated.
@@ -1338,7 +1338,7 @@
session = pe_create_session(mac_ctx, bss_desc->bssId,
&session_id, mac_ctx->lim.maxStation,
eSIR_INFRASTRUCTURE_MODE,
- sme_join_req->sessionId);
+ sme_join_req->vdev_id);
if (!session) {
pe_err("Session Can not be created");
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
@@ -1700,7 +1700,7 @@
}
end:
- sme_session_id = in_req->sessionId;
+ vdev_id = in_req->vdev_id;
if (sme_join_req) {
qdf_mem_free(sme_join_req);
@@ -1714,10 +1714,10 @@
session = NULL;
}
}
- pe_debug("Send failure status on sessionid: %d with ret_code: %d",
- sme_session_id, ret_code);
+ pe_debug("Send failure status on vdev_id: %d with ret_code: %d",
+ vdev_id, ret_code);
lim_send_sme_join_reassoc_rsp(mac_ctx, eWNI_SME_JOIN_RSP, ret_code,
- eSIR_MAC_UNSPEC_FAILURE_STATUS, session, sme_session_id);
+ eSIR_MAC_UNSPEC_FAILURE_STATUS, session, vdev_id);
}
uint8_t lim_get_max_tx_power(struct mac_context *mac,
@@ -1768,12 +1768,12 @@
tSirResultCodes ret_code = eSIR_SME_SUCCESS;
struct pe_session *session_entry = NULL;
uint8_t session_id;
- uint8_t sme_session_id;
+ uint8_t vdev_id;
int8_t local_pwr_constraint = 0, reg_max = 0;
uint32_t tele_bcn_en = 0;
QDF_STATUS status;
- sme_session_id = in_req->sessionId;
+ vdev_id = in_req->vdev_id;
reassoc_req = qdf_mem_malloc(in_req->length);
if (!reassoc_req) {
@@ -1801,8 +1801,7 @@
LOGE);
ret_code = eSIR_SME_INVALID_PARAMETERS;
session_entry =
- pe_find_session_by_sme_session_id(mac_ctx,
- sme_session_id);
+ pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (session_entry)
lim_handle_sme_join_result(mac_ctx,
eSIR_SME_INVALID_PARAMETERS,
@@ -1882,7 +1881,7 @@
goto end;
}
- session_entry->smeSessionId = sme_session_id;
+ session_entry->vdev_id = vdev_id;
mlm_reassoc_req =
qdf_mem_malloc(sizeof(*mlm_reassoc_req));
if (!mlm_reassoc_req) {
@@ -2030,7 +2029,7 @@
* extract session id from there, otherwise we'll use
* the value already extracted from the message
*/
- sme_session_id = session_entry->smeSessionId;
+ vdev_id = session_entry->vdev_id;
/*
* Send Reassoc failure response to host
@@ -2038,7 +2037,7 @@
*/
lim_send_sme_join_reassoc_rsp(mac_ctx, eWNI_SME_REASSOC_RSP,
ret_code, eSIR_MAC_UNSPEC_FAILURE_STATUS,
- session_entry, sme_session_id);
+ session_entry, vdev_id);
}
bool send_disassoc_frame = 1;
@@ -2627,7 +2626,7 @@
tLimMlmSetKeysReq *mlm_set_key_req;
struct pe_session *session_entry;
uint8_t session_id; /* PE sessionID */
- uint8_t sme_session_id;
+ uint8_t vdev_id;
if (!msg_buf) {
pe_err("Buffer is Pointing to NULL");
@@ -2641,7 +2640,7 @@
sizeof(*set_context_req));
qdf_mem_zero(msg_buf, sizeof(*set_context_req));
- sme_session_id = set_context_req->sessionId;
+ vdev_id = set_context_req->vdev_id;
if ((!lim_is_sme_set_context_req_valid(mac_ctx, set_context_req))) {
pe_warn("received invalid SME_SETCONTEXT_REQ message");
@@ -2655,7 +2654,7 @@
lim_send_sme_set_context_rsp(mac_ctx,
set_context_req->peer_macaddr, 1,
eSIR_SME_INVALID_PARAMETERS, NULL,
- sme_session_id);
+ vdev_id);
goto end;
}
@@ -2666,7 +2665,7 @@
lim_send_sme_set_context_rsp(mac_ctx,
set_context_req->peer_macaddr, 1,
eSIR_SME_INVALID_PARAMETERS, NULL,
- sme_session_id);
+ vdev_id);
goto end;
}
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
@@ -2702,7 +2701,7 @@
numKeys : 1));
mlm_set_key_req->sessionId = session_id;
- mlm_set_key_req->smesessionId = sme_session_id;
+ mlm_set_key_req->vdev_id = vdev_id;
pe_debug("received SETCONTEXT_REQ message sessionId=%d",
mlm_set_key_req->sessionId);
@@ -2741,7 +2740,7 @@
lim_send_sme_set_context_rsp(mac_ctx,
set_context_req->peer_macaddr, 1,
eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
- session_entry, sme_session_id);
+ session_entry, vdev_id);
}
end:
qdf_mem_zero(set_context_req, sizeof(*set_context_req));
@@ -3505,14 +3504,14 @@
}
static void lim_process_sme_update_edca_params(struct mac_context *mac_ctx,
- uint32_t sme_session_id)
+ uint32_t vdev_id)
{
struct pe_session *pe_session;
tpDphHashNode sta_ds_ptr;
- pe_session = pe_find_session_by_sme_session_id(mac_ctx, sme_session_id);
+ pe_session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!pe_session) {
- pe_err("Session does not exist: sme_id %d", sme_session_id);
+ pe_err("Session does not exist: vdev_id %d", vdev_id);
return;
}
pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE].no_ack =
@@ -3534,14 +3533,14 @@
}
static void lim_process_sme_update_mu_edca_params(struct mac_context *mac_ctx,
- uint32_t sme_session_id)
+ uint32_t vdev_id)
{
struct pe_session *pe_session;
tpDphHashNode sta_ds_ptr;
- pe_session = pe_find_session_by_sme_session_id(mac_ctx, sme_session_id);
+ pe_session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!pe_session) {
- pe_err("Session does not exist: sme_id %d", sme_session_id);
+ pe_err("Session does not exist: vdev_id %d", vdev_id);
return;
}
sta_ds_ptr = dph_get_hash_entry(mac_ctx, DPH_STA_HASH_INDEX_PEER,
@@ -3563,7 +3562,7 @@
return;
}
- lim_send_action_frm_tb_ppdu_cfg(mac_ctx, msg->session_id, msg->cfg);
+ lim_send_action_frm_tb_ppdu_cfg(mac_ctx, msg->vdev_id, msg->cfg);
}
static void lim_process_sme_update_config(struct mac_context *mac_ctx,
@@ -3577,8 +3576,7 @@
return;
}
- pe_session = pe_find_session_by_sme_session_id(mac_ctx,
- msg->sme_session_id);
+ pe_session = pe_find_session_by_vdev_id(mac_ctx, msg->vdev_id);
if (!pe_session) {
pe_warn("Session does not exist for given BSSID");
return;
@@ -3649,7 +3647,7 @@
uint8_t *local_ie_buf;
req_buffer = (struct roam_offload_scan_req *)msg_buf;
- pe_session = pe_find_session_by_sme_session_id(mac_ctx,
+ pe_session = pe_find_session_by_vdev_id(mac_ctx,
req_buffer->sessionId);
local_ie_buf = qdf_mem_malloc(MAX_DEFAULT_SCAN_IE_LEN);
@@ -3760,10 +3758,10 @@
msg = (struct sir_update_session_param *) msg_buf;
- session = pe_find_session_by_sme_session_id(mac_ctx, msg->session_id);
+ session = pe_find_session_by_vdev_id(mac_ctx, msg->vdev_id);
if (!session) {
- pe_warn("Session does not exist for given sessionId %d",
- msg->session_id);
+ pe_warn("Session does not exist for given vdev_id %d",
+ msg->vdev_id);
return;
}
@@ -4204,17 +4202,15 @@
return;
}
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- req->session_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, req->vdev_id);
if (!session_entry) {
pe_err("session does not exist for given bssId "
QDF_MAC_ADDR_STR, QDF_MAC_ADDR_ARRAY(req->peer_mac));
return;
}
- pe_debug("msg_type->%d len->%d sess_id->%d mac->"
- QDF_MAC_ADDR_STR " reason->%d wait_for_ack->%d",
- req->msg_type, req->length, req->session_id,
+ pe_debug("msg_type %d len %d vdev_id %d mac: " QDF_MAC_ADDR_STR " reason %d wait_for_ack %d",
+ req->msg_type, req->length, req->vdev_id,
QDF_MAC_ADDR_ARRAY(req->peer_mac), req->reason, req->wait_for_ack);
lim_send_disassoc_mgmt_frame(mac_ctx, req->reason, req->peer_mac,
@@ -4451,12 +4447,12 @@
return;
}
update_vendor_ie = (struct sme_update_access_policy_vendor_ie *) msg;
- pe_session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- update_vendor_ie->sme_session_id);
+ pe_session_entry = pe_find_session_by_vdev_id(mac_ctx,
+ update_vendor_ie->vdev_id);
if (!pe_session_entry) {
- pe_err("Session does not exist for given sme session id(%hu)",
- update_vendor_ie->sme_session_id);
+ pe_err("Session does not exist for given vdev_id %d",
+ update_vendor_ie->vdev_id);
return;
}
if (pe_session_entry->access_policy_vendor_ie)
@@ -5786,11 +5782,10 @@
return;
}
session_entry =
- pe_find_session_by_sme_session_id(mac_ctx,
- ext_chng_channel->session_id);
+ pe_find_session_by_vdev_id(mac_ctx, ext_chng_channel->vdev_id);
if (!session_entry) {
- pe_err("Session not found for given session %d",
- ext_chng_channel->session_id);
+ pe_err("Session not found for given vdev_id %d",
+ ext_chng_channel->vdev_id);
return;
}
if (LIM_IS_AP_ROLE(session_entry)) {
@@ -5876,8 +5871,8 @@
nss_update_req_ptr = (struct sir_nss_update_request *)msg_buf;
vdev_id = nss_update_req_ptr->vdev_id;
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- nss_update_req_ptr->vdev_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx,
+ nss_update_req_ptr->vdev_id);
if (!session_entry) {
pe_err("Session not found for given session_id %d",
nss_update_req_ptr->vdev_id);
@@ -6083,7 +6078,7 @@
i = (rand_byte + qdf_mc_timer_get_system_ticks()) %
num_bss_color;
pe_debug("New bss color = %d", bss_color_index_array[i]);
- he_bss_color.session_id = obss_color_info->vdev_id;
+ he_bss_color.vdev_id = obss_color_info->vdev_id;
he_bss_color.bss_color = bss_color_index_array[i];
lim_process_set_he_bss_color(mac_ctx,
(uint32_t *)&he_bss_color);
@@ -6119,11 +6114,10 @@
}
bss_color = (struct sir_set_he_bss_color *)msg_buf;
- session_entry = pe_find_session_by_sme_session_id(mac_ctx,
- bss_color->session_id);
+ session_entry = pe_find_session_by_vdev_id(mac_ctx, bss_color->vdev_id);
if (!session_entry) {
- pe_err("Session not found for given session_id %d",
- bss_color->session_id);
+ pe_err("Session not found for given vdev_id %d",
+ bss_color->vdev_id);
return;
}
@@ -6228,8 +6222,7 @@
}
obss_color_info = (struct wmi_obss_color_collision_info *)msg_buf;
- session = pe_find_session_by_sme_session_id(mac_ctx,
- obss_color_info->vdev_id);
+ session = pe_find_session_by_vdev_id(mac_ctx, obss_color_info->vdev_id);
if (!session) {
pe_err("Session not found for given session_id %d",
obss_color_info->vdev_id);
@@ -6292,8 +6285,7 @@
{
struct pe_session *session;
- session = pe_find_session_by_sme_session_id(mac_ctx, vdev_id);
-
+ session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session) {
pe_err("session not found for vdev id %d", vdev_id);
return;
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index 5a301f9..f0d1a10 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -800,15 +800,10 @@
}
/* Update the WMA_SET_BSSKEY_REQ parameters */
- pSetBssKeyParams->bss_idx = pe_session->vdev_id;
pSetBssKeyParams->encType = pMlmSetKeysReq->edType;
-
pSetBssKeyParams->singleTidRc =
(uint8_t)(mac->mlme_cfg->sta.single_tid);
- /* Update PE session Id */
- pSetBssKeyParams->sessionId = pe_session->peSessionId;
-
- pSetBssKeyParams->smesessionId = pMlmSetKeysReq->smesessionId;
+ pSetBssKeyParams->vdev_id = pMlmSetKeysReq->vdev_id;
if (pMlmSetKeysReq->key[0].keyId &&
((pMlmSetKeysReq->edType == eSIR_ED_WEP40) ||
@@ -897,8 +892,6 @@
pSetStaKeyParams->singleTidRc =
(uint8_t)(mac->mlme_cfg->sta.single_tid);
- /* Update PE session ID */
- pSetStaKeyParams->sessionId = pe_session->peSessionId;
/**
* For WEP - defWEPIdx indicates the default WEP
@@ -910,7 +903,7 @@
pSetStaKeyParams->defWEPIdx = defWEPIdx;
- pSetStaKeyParams->smesessionId = pMlmSetKeysReq->smesessionId;
+ pSetStaKeyParams->vdev_id = pMlmSetKeysReq->vdev_id;
qdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
&pMlmSetKeysReq->peer_macaddr);
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 520aaac..4512324 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -4957,17 +4957,17 @@
{
tpSirMacFrameCtl fc = (tpSirMacFrameCtl) mb_msg->data;
QDF_STATUS qdf_status;
- uint8_t sme_session_id = 0;
+ uint8_t vdev_id = 0;
struct pe_session *session;
uint16_t auth_ack_status;
enum rateid min_rid = RATEID_DEFAULT;
- sme_session_id = mb_msg->session_id;
- session = pe_find_session_by_sme_session_id(mac_ctx, sme_session_id);
+ vdev_id = mb_msg->session_id;
+ session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session) {
cds_packet_free((void *)packet);
- pe_err("session not found for given sme session %d",
- sme_session_id);
+ pe_err("session not found for given vdev_id %d",
+ vdev_id);
return;
}
@@ -4982,7 +4982,7 @@
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
7, lim_tx_complete, frame,
lim_auth_tx_complete_cnf,
- 0, sme_session_id, false, 0, min_rid);
+ 0, vdev_id, false, 0, min_rid);
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
session->peSessionId, qdf_status));
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 740992e..2e44ca5 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -1835,7 +1835,7 @@
struct pe_session *pe_session;
pe_session =
- pe_find_session_by_sme_session_id(mac, del_bss_rsp->vdev_id);
+ pe_find_session_by_vdev_id(mac, del_bss_rsp->vdev_id);
if (!pe_session) {
pe_err("Session Does not exist for vdev id: %d",
del_bss_rsp->vdev_id);
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 9f93093..fcd3741 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -6190,20 +6190,8 @@
}
}
-/**
- * lim_send_action_frm_tb_ppdu_cfg() - sets action frame in TB PPDU cfg to FW
- * @mac_ctx: global MAC context
- * @session_id: SME session id
- * @cfg: config setting
- *
- * Preapres the vendor action frame and send action frame in HE TB PPDU
- * configuration to FW.
- *
- * Return: QDF_STATUS
- */
QDF_STATUS lim_send_action_frm_tb_ppdu_cfg(struct mac_context *mac_ctx,
- uint32_t session_id,
- uint8_t cfg)
+ uint32_t vdev_id, uint8_t cfg)
{
tDot11fvendor_action_frame *frm;
uint8_t frm_len = sizeof(*frm);
@@ -6212,11 +6200,10 @@
struct scheduler_msg msg = {0};
uint8_t *data_buf;
- session = pe_find_session_by_sme_session_id(mac_ctx, session_id);
-
+ session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (!session) {
- pe_err("pe session does not exist for sme session id %d",
- session_id);
+ pe_err("pe session does not exist for vdev_id %d",
+ vdev_id);
return QDF_STATUS_E_FAILURE;
}
@@ -6236,7 +6223,7 @@
frm->vendor_action_subtype.subtype = 0xFF;
- cfg_msg->vdev_id = session_id;
+ cfg_msg->vdev_id = vdev_id;
cfg_msg->cfg = cfg;
cfg_msg->frm_len = frm_len;
cfg_msg->data = (uint8_t *)frm;
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index 190a385..93b035d 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -797,7 +797,7 @@
/**
* lim_send_action_frm_tb_ppdu_cfg() - sets action frame in TB PPDU cfg to FW
* @mac_ctx: global MAC context
- * @session_id: SME session id
+ * @vdev_id: vdev id
* @cfg: config setting
*
* Preapres the vendor action frame and send action frame in HE TB PPDU
@@ -806,7 +806,7 @@
* Return: QDF_STATUS
*/
QDF_STATUS lim_send_action_frm_tb_ppdu_cfg(struct mac_context *mac_ctx,
- uint32_t session_id,
+ uint32_t vdev_id,
uint8_t cfg);
void lim_update_extcap_struct(struct mac_context *mac_ctx, uint8_t *buf,