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
This commit is contained in:
parent
c1669831a5
commit
efe21e6b1f
@ -876,7 +876,7 @@ typedef struct sEsePEContext {
|
||||
struct join_req {
|
||||
uint16_t messageType; /* eWNI_SME_JOIN_REQ */
|
||||
uint16_t length;
|
||||
uint8_t sessionId;
|
||||
uint8_t vdev_id;
|
||||
tSirMacSSid ssId;
|
||||
tSirMacAddr self_mac_addr; /* self Mac address */
|
||||
enum bss_type bsstype; /* add new type for BT-AMP STA and AP Modules */
|
||||
@ -1357,7 +1357,7 @@ struct missed_beacon_ind {
|
||||
struct set_context_req {
|
||||
uint16_t messageType; /* eWNI_SME_SET_CONTEXT_REQ */
|
||||
uint16_t length;
|
||||
uint8_t sessionId; /* Session ID */
|
||||
uint8_t vdev_id; /* vdev ID */
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
struct qdf_mac_addr bssid; /* BSSID */
|
||||
tSirKeyMaterial keyMaterial;
|
||||
@ -1752,7 +1752,7 @@ typedef struct sSirAPWPSIEs {
|
||||
struct update_config {
|
||||
uint16_t messageType; /* eWNI_SME_UPDATE_CONFIG */
|
||||
uint16_t length;
|
||||
uint8_t sme_session_id;
|
||||
uint8_t vdev_id;
|
||||
uint16_t capab;
|
||||
uint32_t value;
|
||||
};
|
||||
@ -1771,14 +1771,14 @@ enum sir_update_session_param_type {
|
||||
* struct sir_update_session_param
|
||||
* @message_type: SME message type
|
||||
* @length: size of struct sir_update_session_param
|
||||
* @session_id: Session ID
|
||||
* @vdev_id: vdev ID
|
||||
* @param_type: parameter to be updated
|
||||
* @param_val: Parameter value to update
|
||||
*/
|
||||
struct sir_update_session_param {
|
||||
uint16_t message_type;
|
||||
uint16_t length;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
uint32_t param_type;
|
||||
uint32_t param_val;
|
||||
};
|
||||
@ -1787,13 +1787,13 @@ struct sir_update_session_param {
|
||||
* struct sir_set_he_bss_color
|
||||
* @message_type: SME message type
|
||||
* @length: size of struct sir_set_he_bss_color
|
||||
* @session_id: Session ID
|
||||
* @vdev_id: vdev ID
|
||||
* @bss_color: bss color value
|
||||
*/
|
||||
struct sir_set_he_bss_color {
|
||||
uint16_t message_type;
|
||||
uint16_t length;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
uint8_t bss_color;
|
||||
};
|
||||
|
||||
@ -4269,14 +4269,14 @@ struct chip_pwr_save_fail_detected_params {
|
||||
* struct hdd_default_scan_ie - HDD default scan IE structure
|
||||
* @message_type: message type to be set with eWNI_SME_DEFAULT_SCAN_IE
|
||||
* @length: length of the struct hdd_default_scan_ie
|
||||
* @session_id: Session Id
|
||||
* @vdev_id: vdev_id
|
||||
* @ie_len: Default scan IE length
|
||||
* @ie_data: Pointer to default scan IE data
|
||||
*/
|
||||
struct hdd_default_scan_ie {
|
||||
uint16_t message_type;
|
||||
uint16_t length;
|
||||
uint16_t session_id;
|
||||
uint16_t vdev_id;
|
||||
uint16_t ie_len;
|
||||
uint8_t ie_data[MAX_DEFAULT_SCAN_IE_LEN];
|
||||
};
|
||||
@ -4399,13 +4399,13 @@ enum powersave_qpower_mode {
|
||||
* @message_type: message id
|
||||
* @length: msg length
|
||||
* @new_channel: new channel
|
||||
* @session_id: session id
|
||||
* @vdev_id: vdev id
|
||||
*/
|
||||
struct sir_sme_ext_cng_chan_req {
|
||||
uint16_t message_type; /* eWNI_SME_EXT_CHANGE_CHANNEL */
|
||||
uint16_t length;
|
||||
uint32_t new_channel;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -5105,7 +5105,7 @@ struct sir_mac_pwr_dbg_cmd {
|
||||
* struct sme_send_disassoc_frm_req - send disassoc request frame
|
||||
* @msg_type: message type
|
||||
* @length: length of message
|
||||
* @session_id: session id
|
||||
* @vdev_id: vdev id
|
||||
* @peer_mac: peer mac address
|
||||
* @reason: reason for disassoc
|
||||
* @wait_for_ack: wait for acknowledgment
|
||||
@ -5113,7 +5113,7 @@ struct sir_mac_pwr_dbg_cmd {
|
||||
struct sme_send_disassoc_frm_req {
|
||||
uint16_t msg_type;
|
||||
uint16_t length;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
uint8_t peer_mac[6];
|
||||
uint16_t reason;
|
||||
uint8_t wait_for_ack;
|
||||
@ -5124,14 +5124,14 @@ struct sir_mac_pwr_dbg_cmd {
|
||||
* policy
|
||||
* @msg_type: message id
|
||||
* @msg_len: message length
|
||||
* @sme_session_id: sme session id
|
||||
* @vdev_id: vdev id
|
||||
* @ie: vendor ie
|
||||
* @access_policy: access policy for vendor ie
|
||||
*/
|
||||
struct sme_update_access_policy_vendor_ie {
|
||||
uint16_t msg_type;
|
||||
uint16_t length;
|
||||
uint32_t sme_session_id;
|
||||
uint32_t vdev_id;
|
||||
uint8_t ie[WLAN_MAX_IE_LEN + 2];
|
||||
uint8_t access_policy;
|
||||
};
|
||||
@ -5651,14 +5651,14 @@ struct sir_sae_info {
|
||||
* struct sir_sae_msg - SAE msg used for message posting
|
||||
* @message_type: message type
|
||||
* @length: message length
|
||||
* @session_id: SME session id
|
||||
* @vdev_id: vdev id
|
||||
* @sae_status: SAE status, 0: Success, Non-zero: Failure.
|
||||
* @peer_mac_addr: peer MAC address
|
||||
*/
|
||||
struct sir_sae_msg {
|
||||
uint16_t message_type;
|
||||
uint16_t length;
|
||||
uint16_t session_id;
|
||||
uint16_t vdev_id;
|
||||
uint8_t sae_status;
|
||||
tSirMacAddr peer_mac_addr;
|
||||
};
|
||||
|
@ -174,12 +174,12 @@ struct sir_mgmt_msg {
|
||||
/**
|
||||
* struct sir_cfg_action_frm_tb_ppdu - cfg to set action frame in he tb ppdu
|
||||
* @type: Message type
|
||||
* @session_id: session id
|
||||
* @vdev_id: vdev id
|
||||
* @cfg: enable/disable cfg
|
||||
*/
|
||||
struct sir_cfg_action_frm_tb_ppdu {
|
||||
uint16_t type;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
uint8_t cfg;
|
||||
};
|
||||
|
||||
|
@ -80,10 +80,23 @@ void lim_process_sta_mlm_add_bss_rsp_ft(struct mac_context *mac,
|
||||
struct pe_session *pe_session);
|
||||
void lim_process_mlm_reassoc_req(struct mac_context *mac_ctx,
|
||||
tLimMlmReassocReq *reassoc_req);
|
||||
|
||||
/**
|
||||
* lim_preauth_scan_event_handler() - Process preauth scan events
|
||||
* @mac_ctx:Pointer to global MAC structure
|
||||
* @event: Scan event
|
||||
* @vdev_id: vdev id
|
||||
* @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);
|
||||
QDF_STATUS lim_send_preauth_scan_offload(struct mac_context *mac_ctx,
|
||||
struct pe_session *session_entry, tSirFTPreAuthReq *ft_preauth_req);
|
||||
#else
|
||||
@ -113,7 +126,7 @@ static inline void lim_process_mlm_reassoc_req(struct mac_context *mac_ctx,
|
||||
{}
|
||||
static inline 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)
|
||||
uint8_t vdev_id, uint32_t scan_id)
|
||||
{}
|
||||
static inline int lim_process_ft_pre_auth_req(struct mac_context *mac,
|
||||
struct scheduler_msg *pMsg)
|
||||
|
@ -716,24 +716,6 @@ struct pe_session *pe_find_session_by_sta_id(struct mac_context *mac, uint8_t st
|
||||
*/
|
||||
void pe_delete_session(struct mac_context *mac, struct pe_session *pe_session);
|
||||
|
||||
|
||||
/**
|
||||
* pe_find_session_by_sme_session_id() - looks up the PE session for given sme
|
||||
* session id/vdev_id
|
||||
* @mac_ctx: pointer to global adapter context
|
||||
* @sme_session_id: sme session id/vdev id
|
||||
*
|
||||
* Looks up the PE session for given sme session id ie.e vdev id
|
||||
*
|
||||
* Return: pe session entry for given sme session if found else NULL
|
||||
*/
|
||||
static inline
|
||||
struct pe_session *pe_find_session_by_sme_session_id(struct mac_context *mac_ctx,
|
||||
uint8_t sme_session_id)
|
||||
{
|
||||
return pe_find_session_by_vdev_id(mac_ctx, sme_session_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* pe_find_session_by_scan_id() - looks up the PE session for given scan id
|
||||
* @mac_ctx: pointer to global adapter context
|
||||
|
@ -629,8 +629,7 @@ static bool is_mgmt_protected(uint32_t vdev_id,
|
||||
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 @@ pe_disconnect_callback(struct mac_context *mac, uint8_t vdev_id,
|
||||
{
|
||||
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_roam_synch_callback(struct mac_context *mac_ctx,
|
||||
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");
|
||||
|
@ -745,7 +745,7 @@ bool lim_process_ft_update_key(struct mac_context *mac, uint32_t *msg_buf)
|
||||
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,
|
||||
|
@ -732,25 +732,9 @@ QDF_STATUS lim_send_preauth_scan_offload(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_preauth_scan_event_handler(struct mac_context *mac_ctx,
|
||||
/* 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;
|
||||
}
|
||||
|
@ -1273,8 +1273,7 @@ void lim_ibss_del_bss_rsp(struct mac_context *mac,
|
||||
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;
|
||||
|
@ -203,7 +203,7 @@ void lim_delete_sta_context(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_rx_invalid_peer_process(struct mac_context *mac_ctx,
|
||||
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);
|
||||
|
@ -199,8 +199,7 @@ static void lim_process_sae_msg(struct mac_context *mac, struct sir_sae_msg *bod
|
||||
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 @@ static void lim_process_set_default_scan_ie_request(struct mac_context *mac_ctx,
|
||||
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 @@ static void lim_process_set_default_scan_ie_request(struct mac_context *mac_ctx,
|
||||
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 @@ static void lim_process_messages(struct mac_context *mac_ctx,
|
||||
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 =
|
||||
|
@ -1198,7 +1198,7 @@ void lim_join_result_callback(struct mac_context *mac,
|
||||
{
|
||||
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 @@ static void lim_process_ap_mlm_add_bss_rsp(struct mac_context *mac,
|
||||
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 @@ void lim_handle_add_bss_rsp(struct mac_context *mac_ctx,
|
||||
*/
|
||||
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 @@ void lim_process_mlm_update_hidden_ssid_rsp(struct mac_context *mac_ctx,
|
||||
|
||||
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 @@ void lim_process_mlm_set_sta_key_rsp(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_process_mlm_set_sta_key_rsp(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_process_mlm_set_sta_key_rsp(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_process_mlm_set_bss_key_rsp(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_process_mlm_set_bss_key_rsp(struct mac_context *mac_ctx,
|
||||
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 @@ void lim_process_switch_channel_rsp(struct mac_context *mac,
|
||||
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;
|
||||
|
@ -1158,7 +1158,7 @@ static void lim_set_rmf_enabled(struct mac_context *mac,
|
||||
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 @@ static void lim_set_rmf_enabled(struct mac_context *mac,
|
||||
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 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
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 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
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 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
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 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
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 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
}
|
||||
|
||||
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 @@ end:
|
||||
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 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
|
||||
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 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
|
||||
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 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
|
||||
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 @@ end:
|
||||
* 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 @@ end:
|
||||
*/
|
||||
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 @@ __lim_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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 @@ __lim_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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 @@ __lim_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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_process_sme_set_context_req(struct mac_context *mac_ctx,
|
||||
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_set_addba_accept(struct mac_context *mac_ctx,
|
||||
}
|
||||
|
||||
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_edca_params(struct mac_context *mac_ctx,
|
||||
}
|
||||
|
||||
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 @@ lim_process_sme_cfg_action_frm_in_tb_ppdu(struct mac_context *mac_ctx,
|
||||
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 @@ static void lim_process_sme_update_config(struct mac_context *mac_ctx,
|
||||
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 @@ static void __lim_process_roam_scan_offload_req(struct mac_context *mac_ctx,
|
||||
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 @@ static void __lim_process_sme_session_update(struct mac_context *mac_ctx,
|
||||
|
||||
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 @@ static void __lim_process_send_disassoc_frame(struct mac_context *mac_ctx,
|
||||
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 @@ static void lim_process_sme_update_access_policy_vendor_ie(
|
||||
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 @@ static void lim_process_ext_change_channel(struct mac_context *mac_ctx,
|
||||
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 @@ static void lim_process_nss_update_request(struct mac_context *mac_ctx,
|
||||
|
||||
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 @@ static void obss_color_collision_process_color_change(struct mac_context *mac_ct
|
||||
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 @@ void lim_process_set_he_bss_color(struct mac_context *mac_ctx, uint32_t *msg_buf
|
||||
}
|
||||
|
||||
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 @@ void lim_process_obss_color_collision_info(struct mac_context *mac_ctx,
|
||||
}
|
||||
|
||||
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 @@ void lim_send_csa_restart_req(struct mac_context *mac_ctx, uint8_t vdev_id)
|
||||
{
|
||||
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;
|
||||
|
@ -800,15 +800,10 @@ void lim_send_set_bss_key_req(struct mac_context *mac,
|
||||
}
|
||||
|
||||
/* 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 @@ void lim_send_set_sta_key_req(struct mac_context *mac,
|
||||
|
||||
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 @@ void lim_send_set_sta_key_req(struct mac_context *mac,
|
||||
|
||||
pSetStaKeyParams->defWEPIdx = defWEPIdx;
|
||||
|
||||
pSetStaKeyParams->smesessionId = pMlmSetKeysReq->smesessionId;
|
||||
pSetStaKeyParams->vdev_id = pMlmSetKeysReq->vdev_id;
|
||||
qdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
|
||||
&pMlmSetKeysReq->peer_macaddr);
|
||||
|
||||
|
@ -4957,17 +4957,17 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx,
|
||||
{
|
||||
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 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx,
|
||||
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)) {
|
||||
|
@ -1835,7 +1835,7 @@ void lim_handle_delete_bss_rsp(struct mac_context *mac,
|
||||
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);
|
||||
|
@ -6190,20 +6190,8 @@ static void lim_send_action_frm_tb_ppdu_cfg_flush_cb(struct scheduler_msg *msg)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 @@ QDF_STATUS lim_send_action_frm_tb_ppdu_cfg(struct mac_context *mac_ctx,
|
||||
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 @@ QDF_STATUS lim_send_action_frm_tb_ppdu_cfg(struct mac_context *mac_ctx,
|
||||
|
||||
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;
|
||||
|
@ -797,7 +797,7 @@ QDF_STATUS lim_send_ies_per_band(struct mac_context *mac_ctx,
|
||||
/**
|
||||
* 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 @@ QDF_STATUS lim_send_ies_per_band(struct mac_context *mac_ctx,
|
||||
* 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,
|
||||
|
@ -56,8 +56,7 @@ static QDF_STATUS lim_add_ndi_peer(struct mac_context *mac_ctx,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
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);
|
||||
@ -139,7 +138,7 @@ static void lim_ndp_delete_peer_by_addr(struct mac_context *mac_ctx, uint8_t vde
|
||||
pe_info("deleting peer: "QDF_MAC_ADDR_STR" confirm rejected",
|
||||
QDF_MAC_ADDR_ARRAY(peer_ndi_mac_addr.bytes));
|
||||
|
||||
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 || (session->bssType != eSIR_NDI_MODE)) {
|
||||
pe_err("PE session is NULL or non-NDI for sme session %d",
|
||||
vdev_id);
|
||||
@ -209,8 +208,8 @@ static void lim_ndp_delete_peers(struct mac_context *mac_ctx,
|
||||
if (ndp_map[i].num_active_ndp_sessions > 0)
|
||||
continue;
|
||||
|
||||
session = pe_find_session_by_sme_session_id(mac_ctx,
|
||||
ndp_map[i].vdev_id);
|
||||
session = pe_find_session_by_vdev_id(mac_ctx,
|
||||
ndp_map[i].vdev_id);
|
||||
if (!session || (session->bssType != eSIR_NDI_MODE)) {
|
||||
pe_err("PE session is NULL or non-NDI for sme session %d",
|
||||
ndp_map[i].vdev_id);
|
||||
@ -386,8 +385,7 @@ void lim_ndi_del_bss_rsp(struct mac_context * mac_ctx,
|
||||
rc = eSIR_SME_STOP_BSS_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
session_entry =
|
||||
pe_find_session_by_sme_session_id(mac_ctx, del_bss->vdev_id);
|
||||
session_entry = pe_find_session_by_vdev_id(mac_ctx, del_bss->vdev_id);
|
||||
if (!session_entry) {
|
||||
pe_err("Session Does not exist for given sessionID");
|
||||
goto end;
|
||||
|
@ -1567,8 +1567,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
||||
obss_detection->matched_detection_masks,
|
||||
QDF_MAC_ADDR_ARRAY(obss_detection->matched_bssid_addr));
|
||||
|
||||
session = pe_find_session_by_sme_session_id(mac_ctx,
|
||||
obss_detection->vdev_id);
|
||||
session = pe_find_session_by_vdev_id(mac_ctx, obss_detection->vdev_id);
|
||||
if (!session) {
|
||||
pe_err("Failed to get session for id %d",
|
||||
obss_detection->vdev_id);
|
||||
|
@ -5706,7 +5706,7 @@ QDF_STATUS sme_update_session_param(mac_handle_t mac_handle, uint8_t session_id,
|
||||
else {
|
||||
msg->message_type = eWNI_SME_SESSION_UPDATE_PARAM;
|
||||
msg->length = len;
|
||||
msg->session_id = session_id;
|
||||
msg->vdev_id = session_id;
|
||||
msg->param_type = param_type;
|
||||
msg->param_val = param_val;
|
||||
status = umac_send_mb_message_to_mac(msg);
|
||||
@ -8754,7 +8754,7 @@ QDF_STATUS sme_update_access_policy_vendor_ie(mac_handle_t mac_handle,
|
||||
|
||||
qdf_mem_copy(&msg->ie[0], vendor_ie, sizeof(msg->ie));
|
||||
|
||||
msg->sme_session_id = session_id;
|
||||
msg->vdev_id = session_id;
|
||||
msg->access_policy = access_policy;
|
||||
|
||||
sme_debug("sme_session_id: %hu, access_policy: %d", session_id,
|
||||
@ -11917,7 +11917,7 @@ int sme_config_action_tx_in_tb_ppdu(mac_handle_t mac_handle, uint8_t session_id,
|
||||
return -EIO;
|
||||
|
||||
cfg_msg->type = WNI_SME_CFG_ACTION_FRM_HE_TB_PPDU;
|
||||
cfg_msg->session_id = session_id;
|
||||
cfg_msg->vdev_id = session_id;
|
||||
cfg_msg->cfg = cfg_val;
|
||||
|
||||
msg.bodyptr = cfg_msg;
|
||||
@ -13048,7 +13048,7 @@ void sme_send_disassoc_req_frame(mac_handle_t mac_handle, uint8_t session_id,
|
||||
|
||||
msg->msg_type = eWNI_SME_SEND_DISASSOC_FRAME;
|
||||
msg->length = sizeof(*msg);
|
||||
msg->session_id = session_id;
|
||||
msg->vdev_id = session_id;
|
||||
qdf_mem_copy(msg->peer_mac, peer_mac, QDF_MAC_ADDR_SIZE);
|
||||
msg->reason = reason;
|
||||
msg->wait_for_ack = wait_for_ack;
|
||||
@ -13409,7 +13409,7 @@ QDF_STATUS sme_set_he_bss_color(mac_handle_t mac_handle, uint8_t session_id,
|
||||
|
||||
bss_color_msg->message_type = eWNI_SME_SET_HE_BSS_COLOR;
|
||||
bss_color_msg->length = len;
|
||||
bss_color_msg->session_id = session_id;
|
||||
bss_color_msg->vdev_id = session_id;
|
||||
bss_color_msg->bss_color = bss_color;
|
||||
return umac_send_mb_message_to_mac(bss_color_msg);
|
||||
}
|
||||
@ -13639,7 +13639,7 @@ QDF_STATUS sme_set_default_scan_ie(mac_handle_t mac_handle, uint16_t session_id,
|
||||
else {
|
||||
set_ie_params->message_type = eWNI_SME_DEFAULT_SCAN_IE;
|
||||
set_ie_params->length = sizeof(*set_ie_params);
|
||||
set_ie_params->session_id = session_id;
|
||||
set_ie_params->vdev_id = session_id;
|
||||
set_ie_params->ie_len = ie_len;
|
||||
qdf_mem_copy(set_ie_params->ie_data, ie_data, ie_len);
|
||||
status = umac_send_mb_message_to_mac(set_ie_params);
|
||||
@ -15204,14 +15204,14 @@ QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle,
|
||||
|
||||
sae_msg->message_type = eWNI_SME_SEND_SAE_MSG;
|
||||
sae_msg->length = sizeof(*sae_msg);
|
||||
sae_msg->session_id = session_id;
|
||||
sae_msg->vdev_id = session_id;
|
||||
sae_msg->sae_status = sae_status;
|
||||
qdf_mem_copy(sae_msg->peer_mac_addr,
|
||||
peer_mac_addr.bytes,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
sme_debug("SAE: sae_status %d session_id %d Peer: "
|
||||
sme_debug("SAE: sae_status %d vdev_id %d Peer: "
|
||||
QDF_MAC_ADDR_STR, sae_msg->sae_status,
|
||||
sae_msg->session_id,
|
||||
sae_msg->vdev_id,
|
||||
QDF_MAC_ADDR_ARRAY(sae_msg->peer_mac_addr));
|
||||
|
||||
sch_msg.type = eWNI_SME_SEND_SAE_MSG;
|
||||
|
@ -15380,7 +15380,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
||||
|
||||
csr_join_req->messageType = messageType;
|
||||
csr_join_req->length = msgLen;
|
||||
csr_join_req->sessionId = (uint8_t) sessionId;
|
||||
csr_join_req->vdev_id = (uint8_t) sessionId;
|
||||
if (pIes->SSID.present &&
|
||||
!csr_is_nullssid(pIes->SSID.ssid,
|
||||
pIes->SSID.num_ssid)) {
|
||||
@ -16547,7 +16547,7 @@ QDF_STATUS csr_send_mb_set_context_req_msg(struct mac_context *mac,
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
pMsg->messageType = eWNI_SME_SETCONTEXT_REQ;
|
||||
pMsg->length = msgLen;
|
||||
pMsg->sessionId = (uint8_t) sessionId;
|
||||
pMsg->vdev_id = (uint8_t) sessionId;
|
||||
qdf_copy_macaddr(&pMsg->peer_macaddr, &peer_macaddr);
|
||||
qdf_copy_macaddr(&pMsg->bssid,
|
||||
&pSession->connectedProfile.bssid);
|
||||
@ -20004,7 +20004,7 @@ QDF_STATUS csr_roam_update_config(struct mac_context *mac_ctx, uint8_t session_i
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
msg->messageType = eWNI_SME_UPDATE_CONFIG;
|
||||
msg->sme_session_id = session_id;
|
||||
msg->vdev_id = session_id;
|
||||
msg->capab = capab;
|
||||
msg->value = value;
|
||||
msg->length = sizeof(*msg);
|
||||
@ -20323,7 +20323,7 @@ QDF_STATUS csr_send_ext_change_channel(struct mac_context *mac_ctx, uint32_t cha
|
||||
msg->message_type = eWNI_SME_EXT_CHANGE_CHANNEL;
|
||||
msg->length = sizeof(*msg);
|
||||
msg->new_channel = channel;
|
||||
msg->session_id = session_id;
|
||||
msg->vdev_id = session_id;
|
||||
status = umac_send_mb_message_to_mac(msg);
|
||||
return status;
|
||||
}
|
||||
|
@ -285,7 +285,6 @@ typedef struct {
|
||||
* @smesessionId: sme session id
|
||||
* @peerMacAddr: peer mac address
|
||||
* @status: status
|
||||
* @sessionId: session id
|
||||
* @sendRsp: send response
|
||||
* @macaddr: MAC address of the peer
|
||||
*
|
||||
@ -300,10 +299,9 @@ typedef struct {
|
||||
uint8_t defWEPIdx;
|
||||
tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
|
||||
uint8_t singleTidRc;
|
||||
uint8_t smesessionId;
|
||||
uint8_t vdev_id;
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
QDF_STATUS status;
|
||||
uint8_t sessionId;
|
||||
uint8_t sendRsp;
|
||||
struct qdf_mac_addr macaddr;
|
||||
} tSetStaKeyParams, *tpSetStaKeyParams;
|
||||
@ -312,7 +310,7 @@ typedef struct {
|
||||
* struct sLimMlmSetKeysReq - set key request parameters
|
||||
* @peerMacAddr: peer mac address
|
||||
* @sessionId: PE session id
|
||||
* @smesessionId: SME session id
|
||||
* @vdev_id: vdev id
|
||||
* @aid: association id
|
||||
* @edType: Encryption/Decryption type
|
||||
* @numKeys: number of keys
|
||||
@ -321,7 +319,7 @@ typedef struct {
|
||||
typedef struct sLimMlmSetKeysReq {
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
uint8_t sessionId; /* Added For BT-AMP Support */
|
||||
uint8_t smesessionId; /* Added for drivers based on wmi interface */
|
||||
uint8_t vdev_id; /* Added for drivers based on wmi interface */
|
||||
uint16_t aid;
|
||||
tAniEdType edType; /* Encryption/Decryption type */
|
||||
uint8_t numKeys;
|
||||
@ -535,25 +533,21 @@ typedef struct sSendProbeRespParams {
|
||||
|
||||
/**
|
||||
* struct tSetBssKeyParams - BSS key parameters
|
||||
* @bss_idx: BSSID index
|
||||
* @encType: encryption Type
|
||||
* @numKeys: number of keys
|
||||
* @key: key data
|
||||
* @singleTidRc: 1=Single TID based Replay Count, 0=Per TID based RC
|
||||
* @smesessionId: sme session id
|
||||
* @vdev_id: vdev id id
|
||||
* @status: return status of command
|
||||
* @sessionId: PE session id
|
||||
* @macaddr: MAC address of the peer
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t bss_idx;
|
||||
tAniEdType encType;
|
||||
uint8_t numKeys;
|
||||
tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
|
||||
uint8_t singleTidRc;
|
||||
uint8_t smesessionId;
|
||||
uint8_t vdev_id;
|
||||
QDF_STATUS status;
|
||||
uint8_t sessionId;
|
||||
struct qdf_mac_addr macaddr;
|
||||
} tSetBssKeyParams, *tpSetBssKeyParams;
|
||||
|
||||
|
@ -212,7 +212,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, struct bss_params *add_bss)
|
||||
|
||||
WMA_LOGD("%s: ibss bss key clearing", __func__);
|
||||
qdf_mem_zero(&key_info, sizeof(key_info));
|
||||
key_info.smesessionId = vdev_id;
|
||||
key_info.vdev_id = vdev_id;
|
||||
key_info.numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
|
||||
qdf_mem_copy(&wma->ibsskey_info, &key_info, sizeof(tSetBssKeyParams));
|
||||
|
||||
@ -2002,7 +2002,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
|
||||
WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__,
|
||||
peer_addr);
|
||||
qdf_mem_zero(key_info, sizeof(*key_info));
|
||||
key_info->smesessionId = vdev_id;
|
||||
key_info->vdev_id = vdev_id;
|
||||
qdf_mem_copy(key_info->peer_macaddr.bytes, peer_addr,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
key_info->sendRsp = false;
|
||||
|
@ -5253,7 +5253,7 @@ int wma_vdev_obss_detection_info_handler(void *handle, uint8_t *event,
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_SET_KEY_CONVERGED
|
||||
static void wma_send_set_key_rsp(uint8_t session_id, bool pairwise,
|
||||
static void wma_send_set_key_rsp(uint8_t vdev_id, bool pairwise,
|
||||
uint8_t key_index)
|
||||
{
|
||||
tSetStaKeyParams *key_info_uc;
|
||||
@ -5268,7 +5268,7 @@ static void wma_send_set_key_rsp(uint8_t session_id, bool pairwise,
|
||||
return;
|
||||
}
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc,
|
||||
session_id,
|
||||
vdev_id,
|
||||
WLAN_LEGACY_WMA_ID);
|
||||
if (!vdev) {
|
||||
wma_err("VDEV object not found");
|
||||
@ -5286,8 +5286,7 @@ static void wma_send_set_key_rsp(uint8_t session_id, bool pairwise,
|
||||
key_info_uc = qdf_mem_malloc(sizeof(*key_info_uc));
|
||||
if (!key_info_uc)
|
||||
return;
|
||||
key_info_uc->sessionId = session_id;
|
||||
key_info_uc->smesessionId = session_id;
|
||||
key_info_uc->vdev_id = vdev_id;
|
||||
key_info_uc->status = QDF_STATUS_SUCCESS;
|
||||
key_info_uc->key[0].keyLength = crypto_key->keylen;
|
||||
qdf_mem_copy(&key_info_uc->macaddr, &crypto_key->macaddr,
|
||||
@ -5298,8 +5297,7 @@ static void wma_send_set_key_rsp(uint8_t session_id, bool pairwise,
|
||||
key_info_mc = qdf_mem_malloc(sizeof(*key_info_mc));
|
||||
if (!key_info_mc)
|
||||
return;
|
||||
key_info_mc->sessionId = session_id;
|
||||
key_info_mc->smesessionId = session_id;
|
||||
key_info_mc->vdev_id = vdev_id;
|
||||
key_info_mc->status = QDF_STATUS_SUCCESS;
|
||||
key_info_mc->key[0].keyLength = crypto_key->keylen;
|
||||
qdf_mem_copy(&key_info_mc->macaddr, &bcast_mac,
|
||||
|
@ -2409,7 +2409,7 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle,
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
WMA_LOGD("BSS key setup for peer");
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->smesessionId);
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->vdev_id);
|
||||
if (!txrx_vdev) {
|
||||
WMA_LOGE("%s:Invalid vdev handle", __func__);
|
||||
key_info->status = QDF_STATUS_E_FAILURE;
|
||||
@ -2419,7 +2419,7 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle,
|
||||
qdf_mem_zero(&key_params, sizeof(key_params));
|
||||
opmode = cdp_get_opmode(soc, txrx_vdev);
|
||||
qdf_mem_zero(&key_params, sizeof(key_params));
|
||||
key_params.vdev_id = key_info->smesessionId;
|
||||
key_params.vdev_id = key_info->vdev_id;
|
||||
key_params.key_type = key_info->encType;
|
||||
key_params.singl_tid_rc = key_info->singleTidRc;
|
||||
key_params.unicast = false;
|
||||
@ -2433,7 +2433,7 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle,
|
||||
key_info->encType == eSIR_ED_WEP104)) {
|
||||
vdev =
|
||||
wlan_objmgr_get_vdev_by_id_from_psoc(wma_handle->psoc,
|
||||
key_info->smesessionId,
|
||||
key_info->vdev_id,
|
||||
WLAN_LEGACY_WMA_ID);
|
||||
wma_read_cfg_wepkey(wma_handle, key_info->key,
|
||||
&def_key_idx, &key_info->numKeys, vdev);
|
||||
@ -2441,7 +2441,7 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle,
|
||||
} else if ((key_info->encType == eSIR_ED_WEP40) ||
|
||||
(key_info->encType == eSIR_ED_WEP104)) {
|
||||
struct wma_txrx_node *intf =
|
||||
&wma_handle->interfaces[key_info->smesessionId];
|
||||
&wma_handle->interfaces[key_info->vdev_id];
|
||||
key_params.def_key_idx = intf->wep_default_key_idx;
|
||||
}
|
||||
|
||||
@ -2501,7 +2501,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
WMA_LOGD("BSS key setup");
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->smesessionId);
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->vdev_id);
|
||||
if (!txrx_vdev) {
|
||||
WMA_LOGE("%s:Invalid vdev handle", __func__);
|
||||
key_info->status = QDF_STATUS_E_FAILURE;
|
||||
@ -2524,19 +2524,19 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
||||
}
|
||||
|
||||
qdf_mem_zero(&key_params, sizeof(key_params));
|
||||
key_params.vdev_id = key_info->smesessionId;
|
||||
key_params.vdev_id = key_info->vdev_id;
|
||||
key_params.key_type = key_info->encType;
|
||||
key_params.singl_tid_rc = key_info->singleTidRc;
|
||||
key_params.unicast = false;
|
||||
if (wlan_opmode == wlan_op_mode_sta) {
|
||||
qdf_mem_copy(key_params.peer_mac,
|
||||
wma_handle->interfaces[key_info->smesessionId].bssid,
|
||||
wma_handle->interfaces[key_info->vdev_id].bssid,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
} else {
|
||||
mac_addr = cdp_get_vdev_mac_addr(soc, txrx_vdev);
|
||||
if (!mac_addr) {
|
||||
WMA_LOGE("%s: mac_addr is NULL for vdev with id %d",
|
||||
__func__, key_info->smesessionId);
|
||||
__func__, key_info->vdev_id);
|
||||
goto out;
|
||||
}
|
||||
/* vdev mac address will be passed for all other modes */
|
||||
@ -2551,7 +2551,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
||||
key_info->encType == eSIR_ED_WEP104)) {
|
||||
vdev =
|
||||
wlan_objmgr_get_vdev_by_id_from_psoc(wma_handle->psoc,
|
||||
key_info->smesessionId,
|
||||
key_info->vdev_id,
|
||||
WLAN_LEGACY_WMA_ID);
|
||||
wma_read_cfg_wepkey(wma_handle, key_info->key,
|
||||
&def_key_idx, &key_info->numKeys, vdev);
|
||||
@ -2559,7 +2559,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
||||
} else if ((key_info->encType == eSIR_ED_WEP40) ||
|
||||
(key_info->encType == eSIR_ED_WEP104)) {
|
||||
struct wma_txrx_node *intf =
|
||||
&wma_handle->interfaces[key_info->smesessionId];
|
||||
&wma_handle->interfaces[key_info->vdev_id];
|
||||
key_params.def_key_idx = intf->wep_default_key_idx;
|
||||
}
|
||||
|
||||
@ -2652,7 +2652,7 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
|
||||
goto out;
|
||||
}
|
||||
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->smesessionId);
|
||||
txrx_vdev = wma_find_vdev_by_id(wma_handle, key_info->vdev_id);
|
||||
if (!txrx_vdev) {
|
||||
WMA_LOGE("%s:TxRx Vdev Handle is NULL", __func__);
|
||||
key_info->status = QDF_STATUS_E_FAILURE;
|
||||
@ -2666,7 +2666,7 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
|
||||
opmode != wlan_op_mode_ap) {
|
||||
vdev =
|
||||
wlan_objmgr_get_vdev_by_id_from_psoc(wma_handle->psoc,
|
||||
key_info->smesessionId,
|
||||
key_info->vdev_id,
|
||||
WLAN_LEGACY_WMA_ID);
|
||||
wma_read_cfg_wepkey(wma_handle, key_info->key,
|
||||
&def_key_idx, &num_keys, vdev);
|
||||
@ -2685,7 +2685,7 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
|
||||
}
|
||||
}
|
||||
qdf_mem_zero(&key_params, sizeof(key_params));
|
||||
key_params.vdev_id = key_info->smesessionId;
|
||||
key_params.vdev_id = key_info->vdev_id;
|
||||
key_params.key_type = key_info->encType;
|
||||
key_params.singl_tid_rc = key_info->singleTidRc;
|
||||
key_params.unicast = true;
|
||||
|
Loading…
Reference in New Issue
Block a user