qcacld-3.0: Replace pStaDs
Per the Linux coding style both mixed-case names and so-called Hungarian notation are frowned upon, therefore replace the identifier "pStaDs" everywhere it occurs. Note that both "sta" and "sta_ds" are commonly used in this context, so use the identifier "sta" since it is shorter and passes the "telephone test." Change-Id: I3b49a0759d8b261c1c6482a8ac0f99927756a9d4 CRs-Fixed: 2383115
This commit is contained in:
@@ -387,13 +387,13 @@ typedef struct sAniSirLim {
|
||||
uint32_t numSme, numMAC[4][16];
|
||||
|
||||
/* Debug counter to track number of Assoc Req frame drops */
|
||||
/* when received in pStaDs->mlmState other than LINK_ESTABLISED */
|
||||
/* when received in sta->mlmState other than LINK_ESTABLISED */
|
||||
uint32_t gLimNumAssocReqDropInvldState;
|
||||
/* counters to track rejection of Assoc Req due to Admission Control */
|
||||
uint32_t gLimNumAssocReqDropACRejectTS;
|
||||
uint32_t gLimNumAssocReqDropACRejectSta;
|
||||
/* Debug counter to track number of Reassoc Req frame drops */
|
||||
/* when received in pStaDs->mlmState other than LINK_ESTABLISED */
|
||||
/* when received in sta->mlmState other than LINK_ESTABLISED */
|
||||
uint32_t gLimNumReassocReqDropInvldState;
|
||||
/* Debug counter to track number of Hash Miss event that */
|
||||
/* will not cause a sending of de-auth/de-associate frame */
|
||||
|
@@ -215,7 +215,7 @@ tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr,
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
tpDphHashNode pStaDs, pnext;
|
||||
tpDphHashNode sta, pnext;
|
||||
uint16_t staIdx = STA_INVALID_IDX;
|
||||
|
||||
if (assocId >= hash_table->size) {
|
||||
@@ -223,39 +223,39 @@ tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pStaDs = get_node(mac, (uint8_t) assocId, hash_table);
|
||||
staIdx = pStaDs->staIndex;
|
||||
pnext = pStaDs->next;
|
||||
sta = get_node(mac, (uint8_t) assocId, hash_table);
|
||||
staIdx = sta->staIndex;
|
||||
pnext = sta->next;
|
||||
|
||||
/* Clear the STA node except for the next pointer */
|
||||
qdf_mem_zero((uint8_t *)pStaDs, sizeof(tDphHashNode));
|
||||
pStaDs->next = pnext;
|
||||
qdf_mem_zero((uint8_t *)sta, sizeof(tDphHashNode));
|
||||
sta->next = pnext;
|
||||
|
||||
/* Initialize the assocId */
|
||||
pStaDs->assocId = assocId;
|
||||
sta->assocId = assocId;
|
||||
if (true == validStaIdx)
|
||||
pStaDs->staIndex = staIdx;
|
||||
sta->staIndex = staIdx;
|
||||
else
|
||||
pStaDs->staIndex = STA_INVALID_IDX;
|
||||
sta->staIndex = STA_INVALID_IDX;
|
||||
|
||||
/* Initialize STA mac address */
|
||||
qdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr));
|
||||
qdf_mem_copy(sta->staAddr, staAddr, sizeof(tSirMacAddr));
|
||||
|
||||
/* Initialize fragmentation threshold */
|
||||
if (wlan_mlme_get_frag_threshold(mac->psoc, &val) !=
|
||||
QDF_STATUS_SUCCESS)
|
||||
pe_warn("could not retrieve fragmentation threshold");
|
||||
else
|
||||
pStaDs->fragSize = (uint16_t) val;
|
||||
sta->fragSize = (uint16_t) val;
|
||||
|
||||
pStaDs->added = 1;
|
||||
pStaDs->encPolicy = ENC_POLICY_NULL;
|
||||
pStaDs->is_disassoc_deauth_in_progress = 0;
|
||||
pStaDs->last_assoc_received_time = 0;
|
||||
pStaDs->last_disassoc_deauth_received_time = 0;
|
||||
pStaDs->sta_deletion_in_progress = false;
|
||||
pStaDs->valid = 1;
|
||||
return pStaDs;
|
||||
sta->added = 1;
|
||||
sta->encPolicy = ENC_POLICY_NULL;
|
||||
sta->is_disassoc_deauth_in_progress = 0;
|
||||
sta->last_assoc_received_time = 0;
|
||||
sta->last_disassoc_deauth_received_time = 0;
|
||||
sta->sta_deletion_in_progress = false;
|
||||
sta->valid = 1;
|
||||
return sta;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
@@ -63,8 +63,8 @@
|
||||
#define GET_LIM_MLM_STATE(mac) (mac->lim.gLimMlmState)
|
||||
#define SET_LIM_MLM_STATE(mac, state) (mac->lim.gLimMlmState = state)
|
||||
/*tpdphHashNode mlmStaContext*/
|
||||
#define GET_LIM_STA_CONTEXT_MLM_STATE(pStaDs) (pStaDs->mlmStaContext.mlmState)
|
||||
#define SET_LIM_STA_CONTEXT_MLM_STATE(pStaDs, state) (pStaDs->mlmStaContext.mlmState = state)
|
||||
#define GET_LIM_STA_CONTEXT_MLM_STATE(sta) (sta->mlmStaContext.mlmState)
|
||||
#define SET_LIM_STA_CONTEXT_MLM_STATE(sta, state) (sta->mlmStaContext.mlmState = state)
|
||||
#define LIM_IS_CONNECTION_ACTIVE(pe_session) (pe_session->LimRxedBeaconCntDuringHB)
|
||||
/*mac->lim.gLimProcessDefdMsgs*/
|
||||
#define GET_LIM_PROCESS_DEFD_MESGS(mac) (mac->lim.gLimProcessDefdMsgs)
|
||||
@@ -207,12 +207,12 @@ static inline tLimSmeStates lim_get_sme_state(struct mac_context *mac)
|
||||
|
||||
extern void lim_received_hb_handler(struct mac_context *, uint8_t, struct pe_session *);
|
||||
/* / Function that triggers STA context deletion */
|
||||
extern void lim_trigger_sta_deletion(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
extern void lim_trigger_sta_deletion(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
/* Function that sends TDLS Del Sta indication to SME */
|
||||
extern void lim_send_sme_tdls_del_sta_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
extern void lim_send_sme_tdls_del_sta_ind(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session,
|
||||
uint16_t reasonCode);
|
||||
/**
|
||||
|
@@ -539,22 +539,22 @@ lim_check_rx_wpa_ie_match(struct mac_context *mac, tDot11fIEWPA *rx_wpaie,
|
||||
* NA
|
||||
*
|
||||
* @param mac Pointer to Global MAC structure
|
||||
* @param pStaDs Pointer to the per STA data structure
|
||||
* @param sta Pointer to the per STA data structure
|
||||
* initialized by LIM and maintained at DPH
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
|
||||
QDF_STATUS
|
||||
lim_cleanup_rx_path(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_cleanup_rx_path(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
QDF_STATUS retCode = QDF_STATUS_SUCCESS;
|
||||
|
||||
pe_debug("Cleanup Rx Path for AID: %d"
|
||||
"pe_session->limSmeState: %d, mlmState: %d",
|
||||
pStaDs->assocId, pe_session->limSmeState,
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->assocId, pe_session->limSmeState,
|
||||
sta->mlmStaContext.mlmState);
|
||||
|
||||
pe_session->isCiscoVendorAP = false;
|
||||
|
||||
@@ -568,40 +568,40 @@ lim_cleanup_rx_path(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
mac->lim.gLimAddtsRspTimerCount);
|
||||
}
|
||||
|
||||
if (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_ASSOC_CNF_STATE) {
|
||||
if (sta->mlmStaContext.mlmState == eLIM_MLM_WT_ASSOC_CNF_STATE) {
|
||||
lim_deactivate_and_change_per_sta_id_timer(mac, eLIM_CNF_WAIT_TIMER,
|
||||
pStaDs->assocId);
|
||||
sta->assocId);
|
||||
|
||||
if (!pStaDs->mlmStaContext.updateContext) {
|
||||
if (!sta->mlmStaContext.updateContext) {
|
||||
/**
|
||||
* There is no context at Polaris to delete.
|
||||
* Release our assigned AID back to the free pool
|
||||
*/
|
||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
||||
lim_del_sta(mac, pStaDs, false, pe_session);
|
||||
lim_release_peer_idx(mac, pStaDs->assocId,
|
||||
lim_del_sta(mac, sta, false, pe_session);
|
||||
lim_release_peer_idx(mac, sta->assocId,
|
||||
pe_session);
|
||||
}
|
||||
lim_delete_dph_hash_entry(mac, pStaDs->staAddr,
|
||||
pStaDs->assocId, pe_session);
|
||||
lim_delete_dph_hash_entry(mac, sta->staAddr,
|
||||
sta->assocId, pe_session);
|
||||
|
||||
return retCode;
|
||||
}
|
||||
}
|
||||
/* delete all tspecs associated with this sta. */
|
||||
lim_admit_control_delete_sta(mac, pStaDs->assocId);
|
||||
lim_admit_control_delete_sta(mac, sta->assocId);
|
||||
|
||||
/**
|
||||
* Make STA hash entry invalid at eCPU so that DPH
|
||||
* does not process any more data packets and
|
||||
* releases those BDs
|
||||
*/
|
||||
pStaDs->valid = 0;
|
||||
sta->valid = 0;
|
||||
lim_send_sme_tsm_ie_ind(mac, pe_session, 0, 0, 0);
|
||||
/* Any roaming related changes should be above this line */
|
||||
if (lim_is_roam_synch_in_progress(pe_session))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE;
|
||||
sta->mlmStaContext.mlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE;
|
||||
|
||||
if (LIM_IS_STA_ROLE(pe_session)) {
|
||||
MTRACE(mac_trace
|
||||
@@ -620,11 +620,11 @@ lim_cleanup_rx_path(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
if (!pe_session->add_bss_failed) {
|
||||
if (pe_session->limSmeState == eLIM_SME_JOIN_FAILURE_STATE) {
|
||||
retCode =
|
||||
lim_del_bss(mac, pStaDs, pe_session->bssIdx,
|
||||
lim_del_bss(mac, sta, pe_session->bssIdx,
|
||||
pe_session);
|
||||
} else
|
||||
retCode = lim_del_sta(mac,
|
||||
pStaDs, true, pe_session);
|
||||
sta, true, pe_session);
|
||||
}
|
||||
|
||||
return retCode;
|
||||
@@ -2558,7 +2558,7 @@ lim_add_sta(struct mac_context *mac_ctx,
|
||||
* NA
|
||||
*
|
||||
* @param mac - Pointer to Global MAC structure
|
||||
* @param pStaDs - Pointer to the STA datastructure created by
|
||||
* @param sta - Pointer to the STA datastructure created by
|
||||
* LIM and maintained by DPH
|
||||
* @param fRespReqd - flag to indicate whether the delete is synchronous (true)
|
||||
* or not (false)
|
||||
@@ -2567,7 +2567,7 @@ lim_add_sta(struct mac_context *mac_ctx,
|
||||
|
||||
QDF_STATUS
|
||||
lim_del_sta(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, bool fRespReqd, struct pe_session *pe_session)
|
||||
tpDphHashNode sta, bool fRespReqd, struct pe_session *pe_session)
|
||||
{
|
||||
tpDeleteStaParams pDelStaParams = NULL;
|
||||
struct scheduler_msg msgQ = {0};
|
||||
@@ -2586,8 +2586,8 @@ lim_del_sta(struct mac_context *mac,
|
||||
*/
|
||||
if (!policy_mgr_is_hw_dbs_2x2_capable(mac->psoc) &&
|
||||
LIM_IS_AP_ROLE(pe_session) &&
|
||||
(pStaDs->staType == STA_ENTRY_PEER) &&
|
||||
!pStaDs->mlmStaContext.vhtCapability &&
|
||||
(sta->staType == STA_ENTRY_PEER) &&
|
||||
!sta->mlmStaContext.vhtCapability &&
|
||||
(pe_session->nss == 2)) {
|
||||
pe_session->ht_client_cnt--;
|
||||
if (pe_session->ht_client_cnt == 0) {
|
||||
@@ -2609,31 +2609,31 @@ lim_del_sta(struct mac_context *mac,
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
if (LIM_IS_STA_ROLE(pe_session) &&
|
||||
(pStaDs->staType != STA_ENTRY_TDLS_PEER))
|
||||
(sta->staType != STA_ENTRY_TDLS_PEER))
|
||||
#else
|
||||
if (LIM_IS_STA_ROLE(pe_session))
|
||||
#endif
|
||||
pDelStaParams->staIdx = pe_session->staId;
|
||||
|
||||
else
|
||||
pDelStaParams->staIdx = pStaDs->staIndex;
|
||||
pDelStaParams->staIdx = sta->staIndex;
|
||||
|
||||
pDelStaParams->assocId = pStaDs->assocId;
|
||||
pStaDs->valid = 0;
|
||||
pDelStaParams->assocId = sta->assocId;
|
||||
sta->valid = 0;
|
||||
|
||||
if (!fRespReqd)
|
||||
pDelStaParams->respReqd = 0;
|
||||
else {
|
||||
if (!(IS_TDLS_PEER(pStaDs->staType))) {
|
||||
if (!(IS_TDLS_PEER(sta->staType))) {
|
||||
/* when lim_del_sta is called from processSmeAssocCnf
|
||||
* then mlmState is already set properly. */
|
||||
if (eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE !=
|
||||
GET_LIM_STA_CONTEXT_MLM_STATE(pStaDs)) {
|
||||
GET_LIM_STA_CONTEXT_MLM_STATE(sta)) {
|
||||
MTRACE(mac_trace
|
||||
(mac, TRACE_CODE_MLM_STATE,
|
||||
pe_session->peSessionId,
|
||||
eLIM_MLM_WT_DEL_STA_RSP_STATE));
|
||||
SET_LIM_STA_CONTEXT_MLM_STATE(pStaDs,
|
||||
SET_LIM_STA_CONTEXT_MLM_STATE(sta,
|
||||
eLIM_MLM_WT_DEL_STA_RSP_STATE);
|
||||
}
|
||||
if (LIM_IS_STA_ROLE(pe_session)) {
|
||||
@@ -2659,9 +2659,9 @@ lim_del_sta(struct mac_context *mac,
|
||||
pDelStaParams->sessionId = pe_session->peSessionId;
|
||||
pDelStaParams->smesessionId = pe_session->smeSessionId;
|
||||
|
||||
pDelStaParams->staType = pStaDs->staType;
|
||||
pDelStaParams->staType = sta->staType;
|
||||
qdf_mem_copy((uint8_t *) pDelStaParams->staMac,
|
||||
(uint8_t *) pStaDs->staAddr, sizeof(tSirMacAddr));
|
||||
(uint8_t *) sta->staAddr, sizeof(tSirMacAddr));
|
||||
|
||||
pDelStaParams->status = QDF_STATUS_SUCCESS;
|
||||
msgQ.type = WMA_DELETE_STA_REQ;
|
||||
@@ -2673,7 +2673,7 @@ lim_del_sta(struct mac_context *mac,
|
||||
"for STAID: %X and AssocID: %d MAC : "
|
||||
MAC_ADDRESS_STR, pDelStaParams->sessionId,
|
||||
pDelStaParams->staIdx, pDelStaParams->assocId,
|
||||
MAC_ADDR_ARRAY(pStaDs->staAddr));
|
||||
MAC_ADDR_ARRAY(sta->staAddr));
|
||||
|
||||
MTRACE(mac_trace_msg_tx(mac, pe_session->peSessionId, msgQ.type));
|
||||
retCode = wma_post_ctrl_msg(mac, &msgQ);
|
||||
@@ -2705,7 +2705,7 @@ lim_del_sta(struct mac_context *mac,
|
||||
* NA
|
||||
*
|
||||
* @param mac - Pointer to Global MAC structure
|
||||
* @param pStaDs - Pointer to the STA datastructure created by
|
||||
* @param sta - Pointer to the STA datastructure created by
|
||||
* LIM and maintained by DPH
|
||||
* @return retCode - Indicates success or failure return code
|
||||
*/
|
||||
@@ -2919,13 +2919,13 @@ lim_add_sta_self(struct mac_context *mac, uint16_t staIdx, uint8_t updateSta,
|
||||
***NOTE:
|
||||
*
|
||||
* @param mac - Pointer to Global MAC structure
|
||||
* @param pStaDs - Pointer to a sta descriptor
|
||||
* @param sta - Pointer to a sta descriptor
|
||||
* @return None
|
||||
*/
|
||||
|
||||
void lim_handle_cnf_wait_timeout(struct mac_context *mac, uint16_t staId)
|
||||
{
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
struct pe_session *pe_session = NULL;
|
||||
|
||||
pe_session = pe_find_session_by_session_id(mac,
|
||||
@@ -2934,25 +2934,25 @@ void lim_handle_cnf_wait_timeout(struct mac_context *mac, uint16_t staId)
|
||||
pe_err("Session Does not exist for given sessionID");
|
||||
return;
|
||||
}
|
||||
pStaDs = dph_get_hash_entry(mac, staId, &pe_session->dph.dphHashTable);
|
||||
sta = dph_get_hash_entry(mac, staId, &pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("No STA context in SIR_LIM_CNF_WAIT_TIMEOUT");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (pStaDs->mlmStaContext.mlmState) {
|
||||
switch (sta->mlmStaContext.mlmState) {
|
||||
case eLIM_MLM_WT_ASSOC_CNF_STATE:
|
||||
pe_debug("Did not receive Assoc Cnf in eLIM_MLM_WT_ASSOC_CNF_STATE sta Assoc id %d",
|
||||
pStaDs->assocId);
|
||||
lim_print_mac_addr(mac, pStaDs->staAddr, LOGD);
|
||||
sta->assocId);
|
||||
lim_print_mac_addr(mac, sta->staAddr, LOGD);
|
||||
|
||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
||||
lim_reject_association(mac, pStaDs->staAddr,
|
||||
pStaDs->mlmStaContext.subType,
|
||||
lim_reject_association(mac, sta->staAddr,
|
||||
sta->mlmStaContext.subType,
|
||||
true,
|
||||
pStaDs->mlmStaContext.authType,
|
||||
pStaDs->assocId, true,
|
||||
sta->mlmStaContext.authType,
|
||||
sta->assocId, true,
|
||||
eSIR_MAC_UNSPEC_FAILURE_STATUS,
|
||||
pe_session);
|
||||
}
|
||||
@@ -2960,7 +2960,7 @@ void lim_handle_cnf_wait_timeout(struct mac_context *mac, uint16_t staId)
|
||||
|
||||
default:
|
||||
pe_warn("Received CNF_WAIT_TIMEOUT in state %d",
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->mlmStaContext.mlmState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3314,13 +3314,13 @@ QDF_STATUS lim_extract_ap_capabilities(struct mac_context *mac,
|
||||
* NA
|
||||
*
|
||||
* @param mac - Pointer to Global MAC structure
|
||||
* @param pStaDs - Pointer to the STA datastructure created by
|
||||
* @param sta - Pointer to the STA datastructure created by
|
||||
* LIM and maintained by DPH
|
||||
* @return retCode - Indicates success or failure return code
|
||||
*/
|
||||
|
||||
QDF_STATUS
|
||||
lim_del_bss(struct mac_context *mac, tpDphHashNode pStaDs, uint16_t bssIdx,
|
||||
lim_del_bss(struct mac_context *mac, tpDphHashNode sta, uint16_t bssIdx,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tpDeleteBssParams pDelBssParams = NULL;
|
||||
@@ -3335,10 +3335,10 @@ lim_del_bss(struct mac_context *mac, tpDphHashNode pStaDs, uint16_t bssIdx,
|
||||
|
||||
/* DPH was storing the AssocID in staID field, */
|
||||
/* staID is actually assigned by HAL when AddSTA message is sent. */
|
||||
if (pStaDs != NULL) {
|
||||
pDelBssParams->bssIdx = pStaDs->bssId;
|
||||
pStaDs->valid = 0;
|
||||
pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_DEL_BSS_RSP_STATE;
|
||||
if (sta != NULL) {
|
||||
pDelBssParams->bssIdx = sta->bssId;
|
||||
sta->valid = 0;
|
||||
sta->mlmStaContext.mlmState = eLIM_MLM_WT_DEL_BSS_RSP_STATE;
|
||||
} else
|
||||
pDelBssParams->bssIdx = bssIdx;
|
||||
pe_session->limMlmState = eLIM_MLM_WT_DEL_BSS_RSP_STATE;
|
||||
@@ -3530,7 +3530,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
||||
struct scheduler_msg msgQ = {0};
|
||||
tpAddBssParams pAddBssParams = NULL;
|
||||
uint32_t retCode;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
uint8_t chanWidthSupp = 0;
|
||||
bool is_vht_cap_in_vendor_ie = false;
|
||||
tDot11fIEVHTCaps *vht_caps = NULL;
|
||||
@@ -3727,10 +3727,10 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
||||
pAddBssParams->staContext.listenInterval = listen_interval;
|
||||
|
||||
/* Fill Assoc id from the dph table */
|
||||
pStaDs = dph_lookup_hash_entry(mac, pAddBssParams->staContext.bssId,
|
||||
sta = dph_lookup_hash_entry(mac, pAddBssParams->staContext.bssId,
|
||||
&pAddBssParams->staContext.assocId,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("Couldn't get assoc id for " "MAC ADDR: "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(
|
||||
@@ -3773,7 +3773,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
||||
vendor_vht_ie.VHTCaps))) {
|
||||
pAddBssParams->staContext.vhtCapable = 1;
|
||||
pAddBssParams->staContext.vhtSupportedRxNss =
|
||||
pStaDs->vhtSupportedRxNss;
|
||||
sta->vhtSupportedRxNss;
|
||||
if (pAssocRsp->VHTCaps.present)
|
||||
vht_caps = &pAssocRsp->VHTCaps;
|
||||
else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) {
|
||||
@@ -3951,12 +3951,12 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
||||
pAddBssParams->staContext.wmmEnabled = 0;
|
||||
|
||||
/* Update the rates */
|
||||
pStaDs = dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
sta = dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
qdf_mem_copy((uint8_t *) &pAddBssParams->staContext.
|
||||
supportedRates,
|
||||
(uint8_t *)&pStaDs->supportedRates,
|
||||
(uint8_t *)&sta->supportedRates,
|
||||
sizeof(tSirSupportedRates));
|
||||
} else
|
||||
pe_err("could not Update the supported rates");
|
||||
@@ -4546,7 +4546,7 @@ returnFailure:
|
||||
* lim_prepare_and_send_del_sta_cnf() - prepares and send del sta cnf
|
||||
*
|
||||
* @mac: mac global context
|
||||
* @pStaDs: sta dph node
|
||||
* @sta: sta dph node
|
||||
* @statusCode: status code
|
||||
* @pe_session: session context
|
||||
*
|
||||
@@ -4556,7 +4556,7 @@ returnFailure:
|
||||
* Return: void
|
||||
*/
|
||||
void
|
||||
lim_prepare_and_send_del_sta_cnf(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_prepare_and_send_del_sta_cnf(struct mac_context *mac, tpDphHashNode sta,
|
||||
tSirResultCodes statusCode,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
@@ -4564,19 +4564,19 @@ lim_prepare_and_send_del_sta_cnf(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
struct qdf_mac_addr sta_dsaddr;
|
||||
tLimMlmStaContext mlmStaContext;
|
||||
|
||||
if (pStaDs == NULL) {
|
||||
pe_err("pStaDs is NULL");
|
||||
if (sta == NULL) {
|
||||
pe_err("sta is NULL");
|
||||
return;
|
||||
}
|
||||
staDsAssocId = pStaDs->assocId;
|
||||
staDsAssocId = sta->assocId;
|
||||
qdf_mem_copy((uint8_t *) sta_dsaddr.bytes,
|
||||
pStaDs->staAddr, QDF_MAC_ADDR_SIZE);
|
||||
sta->staAddr, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
mlmStaContext = pStaDs->mlmStaContext;
|
||||
mlmStaContext = sta->mlmStaContext;
|
||||
if (LIM_IS_AP_ROLE(pe_session))
|
||||
lim_release_peer_idx(mac, pStaDs->assocId, pe_session);
|
||||
lim_release_peer_idx(mac, sta->assocId, pe_session);
|
||||
|
||||
lim_delete_dph_hash_entry(mac, pStaDs->staAddr, pStaDs->assocId,
|
||||
lim_delete_dph_hash_entry(mac, sta->staAddr, sta->assocId,
|
||||
pe_session);
|
||||
|
||||
if (LIM_IS_STA_ROLE(pe_session)) {
|
||||
|
@@ -95,9 +95,9 @@ void lim_post_reassoc_failure(struct mac_context *,
|
||||
bool lim_is_reassoc_in_progress(struct mac_context *, struct pe_session *);
|
||||
|
||||
void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session);
|
||||
tpDphHashNode sta, struct pe_session *pe_session);
|
||||
void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session);
|
||||
tpDphHashNode sta, struct pe_session *pe_session);
|
||||
void lim_send_retry_reassoc_req_frame(struct mac_context *mac,
|
||||
tLimMlmReassocReq *pMlmReassocReq, struct pe_session *pe_session);
|
||||
QDF_STATUS lim_add_ft_sta_self(struct mac_context *mac, uint16_t assocId,
|
||||
@@ -112,10 +112,10 @@ static inline void lim_post_reassoc_failure(struct mac_context *mac_ctx,
|
||||
struct pe_session *pe_session)
|
||||
{}
|
||||
static inline void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session)
|
||||
tpDphHashNode sta, struct pe_session *pe_session)
|
||||
{}
|
||||
static inline void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session)
|
||||
tpDphHashNode sta, struct pe_session *pe_session)
|
||||
{}
|
||||
static inline void lim_send_retry_reassoc_req_frame(struct mac_context *mac,
|
||||
tLimMlmReassocReq *pMlmReassocReq, struct pe_session *pe_session)
|
||||
@@ -159,7 +159,7 @@ void lim_update_re_assoc_globals(struct mac_context *mac,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
void lim_update_assoc_sta_datas(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, tpSirAssocRsp pAssocRsp,
|
||||
tpDphHashNode sta, tpSirAssocRsp pAssocRsp,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp,
|
||||
@@ -169,7 +169,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
||||
QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updateEntry,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
void lim_prepare_and_send_del_sta_cnf(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
void lim_prepare_and_send_del_sta_cnf(struct mac_context *mac, tpDphHashNode sta,
|
||||
tSirResultCodes statusCode, struct pe_session *);
|
||||
QDF_STATUS lim_extract_ap_capabilities(struct mac_context *mac, uint8_t *pIE,
|
||||
uint16_t ieLen,
|
||||
|
@@ -219,51 +219,51 @@ ibss_sta_caps_update(struct mac_context *mac,
|
||||
tLimIbssPeerNode *pPeerNode, struct pe_session *pe_session)
|
||||
{
|
||||
uint16_t peerIdx;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
|
||||
pPeerNode->beaconHBCount++; /* Update beacon count. */
|
||||
|
||||
/* if the peer node exists, update its qos capabilities */
|
||||
pStaDs = dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx,
|
||||
sta = dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL)
|
||||
if (sta == NULL)
|
||||
return;
|
||||
|
||||
/* Update HT Capabilities */
|
||||
if (IS_DOT11_MODE_HT(pe_session->dot11mode)) {
|
||||
pStaDs->mlmStaContext.htCapability = pPeerNode->htCapable;
|
||||
sta->mlmStaContext.htCapability = pPeerNode->htCapable;
|
||||
if (pPeerNode->htCapable) {
|
||||
pStaDs->htGreenfield = pPeerNode->htGreenfield;
|
||||
pStaDs->htSupportedChannelWidthSet =
|
||||
sta->htGreenfield = pPeerNode->htGreenfield;
|
||||
sta->htSupportedChannelWidthSet =
|
||||
pPeerNode->htSupportedChannelWidthSet;
|
||||
pStaDs->htSecondaryChannelOffset =
|
||||
sta->htSecondaryChannelOffset =
|
||||
pPeerNode->htSecondaryChannelOffset;
|
||||
pStaDs->htMIMOPSState = pPeerNode->htMIMOPSState;
|
||||
pStaDs->htMaxAmsduLength = pPeerNode->htMaxAmsduLength;
|
||||
pStaDs->htAMpduDensity = pPeerNode->htAMpduDensity;
|
||||
pStaDs->htDsssCckRate40MHzSupport =
|
||||
sta->htMIMOPSState = pPeerNode->htMIMOPSState;
|
||||
sta->htMaxAmsduLength = pPeerNode->htMaxAmsduLength;
|
||||
sta->htAMpduDensity = pPeerNode->htAMpduDensity;
|
||||
sta->htDsssCckRate40MHzSupport =
|
||||
pPeerNode->htDsssCckRate40MHzSupport;
|
||||
pStaDs->htShortGI20Mhz = pPeerNode->htShortGI20Mhz;
|
||||
pStaDs->htShortGI40Mhz = pPeerNode->htShortGI40Mhz;
|
||||
pStaDs->htMaxRxAMpduFactor =
|
||||
sta->htShortGI20Mhz = pPeerNode->htShortGI20Mhz;
|
||||
sta->htShortGI40Mhz = pPeerNode->htShortGI40Mhz;
|
||||
sta->htMaxRxAMpduFactor =
|
||||
pPeerNode->htMaxRxAMpduFactor;
|
||||
/* In the future, may need to check for "delayedBA" */
|
||||
/* For now, it is IMMEDIATE BA only on ALL TID's */
|
||||
pStaDs->baPolicyFlag = 0xFF;
|
||||
pStaDs->htLdpcCapable = pPeerNode->htLdpcCapable;
|
||||
sta->baPolicyFlag = 0xFF;
|
||||
sta->htLdpcCapable = pPeerNode->htLdpcCapable;
|
||||
}
|
||||
}
|
||||
if (IS_DOT11_MODE_VHT(pe_session->dot11mode)) {
|
||||
pStaDs->mlmStaContext.vhtCapability = pPeerNode->vhtCapable;
|
||||
sta->mlmStaContext.vhtCapability = pPeerNode->vhtCapable;
|
||||
if (pPeerNode->vhtCapable) {
|
||||
pStaDs->vhtSupportedChannelWidthSet =
|
||||
sta->vhtSupportedChannelWidthSet =
|
||||
pPeerNode->vhtSupportedChannelWidthSet;
|
||||
|
||||
/* If in 11AC mode and if session requires 11AC mode, consider peer's */
|
||||
/* max AMPDU length factor */
|
||||
pStaDs->htMaxRxAMpduFactor =
|
||||
sta->htMaxRxAMpduFactor =
|
||||
pPeerNode->VHTCaps.maxAMPDULenExp;
|
||||
pStaDs->vhtLdpcCapable =
|
||||
sta->vhtLdpcCapable =
|
||||
(uint8_t) pPeerNode->VHTCaps.ldpcCodingCap;
|
||||
}
|
||||
}
|
||||
@@ -273,25 +273,25 @@ ibss_sta_caps_update(struct mac_context *mac,
|
||||
/* set. so let's check for edcaParam in addition to the qos capability */
|
||||
if (pPeerNode->capabilityInfo.qos && (pe_session->limQosEnabled)
|
||||
&& pPeerNode->edcaPresent) {
|
||||
pStaDs->qosMode = 1;
|
||||
pStaDs->wmeEnabled = 0;
|
||||
if (!pStaDs->lleEnabled) {
|
||||
pStaDs->lleEnabled = 1;
|
||||
/* dphSetACM(mac, pStaDs); */
|
||||
sta->qosMode = 1;
|
||||
sta->wmeEnabled = 0;
|
||||
if (!sta->lleEnabled) {
|
||||
sta->lleEnabled = 1;
|
||||
/* dphSetACM(mac, sta); */
|
||||
}
|
||||
return;
|
||||
}
|
||||
/* peer is not 11e capable now but was 11e enabled earlier */
|
||||
else if (pStaDs->lleEnabled) {
|
||||
pStaDs->qosMode = 0;
|
||||
pStaDs->lleEnabled = 0;
|
||||
else if (sta->lleEnabled) {
|
||||
sta->qosMode = 0;
|
||||
sta->lleEnabled = 0;
|
||||
}
|
||||
/* peer is wme capable but is not wme enabled yet */
|
||||
if (pPeerNode->wmeInfoPresent && pe_session->limWmeEnabled) {
|
||||
pStaDs->qosMode = 1;
|
||||
pStaDs->lleEnabled = 0;
|
||||
if (!pStaDs->wmeEnabled) {
|
||||
pStaDs->wmeEnabled = 1;
|
||||
sta->qosMode = 1;
|
||||
sta->lleEnabled = 0;
|
||||
if (!sta->wmeEnabled) {
|
||||
sta->wmeEnabled = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -300,31 +300,31 @@ ibss_sta_caps_update(struct mac_context *mac,
|
||||
was advertising WMM param where we were not honouring that. CR# 210756
|
||||
*/
|
||||
if (pPeerNode->wmeEdcaPresent && pe_session->limWmeEnabled) {
|
||||
pStaDs->qosMode = 1;
|
||||
pStaDs->lleEnabled = 0;
|
||||
if (!pStaDs->wmeEnabled) {
|
||||
pStaDs->wmeEnabled = 1;
|
||||
sta->qosMode = 1;
|
||||
sta->lleEnabled = 0;
|
||||
if (!sta->wmeEnabled) {
|
||||
sta->wmeEnabled = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
/* peer is not wme capable now but was wme enabled earlier */
|
||||
else if (pStaDs->wmeEnabled) {
|
||||
pStaDs->qosMode = 0;
|
||||
pStaDs->wmeEnabled = 0;
|
||||
else if (sta->wmeEnabled) {
|
||||
sta->qosMode = 0;
|
||||
sta->wmeEnabled = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
ibss_sta_rates_update(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs,
|
||||
tpDphHashNode sta,
|
||||
tLimIbssPeerNode *peer, struct pe_session *pe_session)
|
||||
{
|
||||
lim_populate_matching_rate_set(mac, pStaDs, &peer->supportedRates,
|
||||
lim_populate_matching_rate_set(mac, sta, &peer->supportedRates,
|
||||
&peer->extendedRates,
|
||||
peer->supportedMCSSet, pe_session,
|
||||
&peer->VHTCaps, NULL);
|
||||
pStaDs->mlmStaContext.capabilityInfo = peer->capabilityInfo;
|
||||
sta->mlmStaContext.capabilityInfo = peer->capabilityInfo;
|
||||
} /*** end ibss_sta_info_update() ***/
|
||||
|
||||
/**
|
||||
@@ -341,7 +341,7 @@ ibss_sta_rates_update(struct mac_context *mac,
|
||||
***NOTE:
|
||||
*
|
||||
* @param mac - Pointer to Global MAC structure
|
||||
* @param pStaDs - Pointer to DPH node
|
||||
* @param sta - Pointer to DPH node
|
||||
* @param peer - Pointer to IBSS peer node
|
||||
*
|
||||
* @return None
|
||||
@@ -349,12 +349,12 @@ ibss_sta_rates_update(struct mac_context *mac,
|
||||
|
||||
static void
|
||||
ibss_sta_info_update(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs,
|
||||
tpDphHashNode sta,
|
||||
tLimIbssPeerNode *peer, struct pe_session *pe_session)
|
||||
{
|
||||
pStaDs->staType = STA_ENTRY_PEER;
|
||||
sta->staType = STA_ENTRY_PEER;
|
||||
ibss_sta_caps_update(mac, peer, pe_session);
|
||||
ibss_sta_rates_update(mac, pStaDs, peer, pe_session);
|
||||
ibss_sta_rates_update(mac, sta, peer, pe_session);
|
||||
} /*** end ibss_sta_info_update() ***/
|
||||
|
||||
static void ibss_coalesce_free(struct mac_context *mac)
|
||||
@@ -463,14 +463,14 @@ ibss_dph_entry_add(struct mac_context *mac,
|
||||
tpDphHashNode *ppSta, struct pe_session *pe_session)
|
||||
{
|
||||
uint16_t peerIdx;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
|
||||
*ppSta = NULL;
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, peerAddr, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
/* Trying to add context for already existing STA in IBSS */
|
||||
pe_err("STA exists already");
|
||||
lim_print_mac_addr(mac, peerAddr, LOGE);
|
||||
@@ -484,19 +484,19 @@ ibss_dph_entry_add(struct mac_context *mac,
|
||||
*/
|
||||
peerIdx = lim_assign_peer_idx(mac, pe_session);
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, peerIdx, &pe_session->dph.dphHashTable);
|
||||
if (pStaDs) {
|
||||
(void)lim_del_sta(mac, pStaDs, false /*asynchronous */,
|
||||
if (sta) {
|
||||
(void)lim_del_sta(mac, sta, false /*asynchronous */,
|
||||
pe_session);
|
||||
lim_delete_dph_hash_entry(mac, pStaDs->staAddr, peerIdx,
|
||||
lim_delete_dph_hash_entry(mac, sta->staAddr, peerIdx,
|
||||
pe_session);
|
||||
}
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_add_hash_entry(mac, peerAddr, peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
/* Could not add hash table entry */
|
||||
pe_err("could not add hash entry at DPH for peerIdx/aid: %d MACaddr:",
|
||||
peerIdx);
|
||||
@@ -504,7 +504,7 @@ ibss_dph_entry_add(struct mac_context *mac,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*ppSta = pStaDs;
|
||||
*ppSta = sta;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -705,7 +705,7 @@ void lim_ibss_delete_all_peers(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tLimIbssPeerNode *pCurrNode, *pTempNode;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
uint16_t peerIdx;
|
||||
|
||||
pCurrNode = pTempNode = mac->lim.gLimIbssPeerList;
|
||||
@@ -719,18 +719,18 @@ void lim_ibss_delete_all_peers(struct mac_context *mac,
|
||||
* Since it is called to remove all peers, just delete from dph,
|
||||
* no need to do any beacon related params i.e., dont call lim_delete_dph_hash_entry
|
||||
*/
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pCurrNode->peerMacAddr, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs) {
|
||||
if (sta) {
|
||||
|
||||
ibss_status_chg_notify(mac, pCurrNode->peerMacAddr,
|
||||
pStaDs->staIndex,
|
||||
sta->staIndex,
|
||||
eWNI_SME_IBSS_PEER_DEPARTED_IND,
|
||||
pe_session->smeSessionId);
|
||||
lim_del_sta(mac, pStaDs, false, pe_session);
|
||||
lim_del_sta(mac, sta, false, pe_session);
|
||||
lim_release_peer_idx(mac, peerIdx, pe_session);
|
||||
dph_delete_hash_entry(mac, pStaDs->staAddr, peerIdx,
|
||||
dph_delete_hash_entry(mac, sta->staAddr, peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ lim_ibss_update_protection_params(struct mac_context *mac,
|
||||
\return None
|
||||
-------------------------------------------------------------*/
|
||||
static void
|
||||
lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode sta,
|
||||
tpUpdateBeaconParams pBeaconParams,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
@@ -885,8 +885,8 @@ lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
|
||||
pBeaconParams->paramChangeBitmap = 0;
|
||||
|
||||
if (NULL == pStaDs) {
|
||||
pe_err("pStaDs is NULL");
|
||||
if (NULL == sta) {
|
||||
pe_err("sta is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -901,8 +901,8 @@ lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
* Beacon with HT IE but not ERP IE. So the absence of ERP IE
|
||||
* in the Beacon is not enough to conclude that STA is 11b.
|
||||
*/
|
||||
if ((pStaDs->erpEnabled == eHAL_CLEAR) &&
|
||||
(!pStaDs->mlmStaContext.htCapability)) {
|
||||
if ((sta->erpEnabled == eHAL_CLEAR) &&
|
||||
(!sta->mlmStaContext.htCapability)) {
|
||||
protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_llB;
|
||||
pe_err("Enable protection from 11B");
|
||||
lim_ibss_set_protection(mac, true,
|
||||
@@ -911,7 +911,7 @@ lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
}
|
||||
}
|
||||
}
|
||||
lim_ibss_update_protection_params(mac, pStaDs->staAddr, protStaCacheType,
|
||||
lim_ibss_update_protection_params(mac, sta->staAddr, protStaCacheType,
|
||||
pe_session);
|
||||
return;
|
||||
}
|
||||
@@ -966,7 +966,7 @@ QDF_STATUS
|
||||
lim_ibss_sta_add(struct mac_context *mac, void *pBody, struct pe_session *pe_session)
|
||||
{
|
||||
QDF_STATUS retCode = QDF_STATUS_SUCCESS;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
tLimIbssPeerNode *pPeerNode;
|
||||
tLimMlmStates prevState;
|
||||
tSirMacAddr *pPeerAddr = (tSirMacAddr *) pBody;
|
||||
@@ -985,30 +985,30 @@ lim_ibss_sta_add(struct mac_context *mac, void *pBody, struct pe_session *pe_ses
|
||||
pPeerNode = ibss_peer_find(mac, *pPeerAddr);
|
||||
if (NULL != pPeerNode) {
|
||||
retCode =
|
||||
ibss_dph_entry_add(mac, *pPeerAddr, &pStaDs,
|
||||
ibss_dph_entry_add(mac, *pPeerAddr, &sta,
|
||||
pe_session);
|
||||
if (QDF_STATUS_SUCCESS == retCode) {
|
||||
prevState = pStaDs->mlmStaContext.mlmState;
|
||||
pStaDs->erpEnabled = pPeerNode->erpIePresent;
|
||||
prevState = sta->mlmStaContext.mlmState;
|
||||
sta->erpEnabled = pPeerNode->erpIePresent;
|
||||
|
||||
ibss_sta_info_update(mac, pStaDs, pPeerNode,
|
||||
ibss_sta_info_update(mac, sta, pPeerNode,
|
||||
pe_session);
|
||||
pe_debug("initiating ADD STA for the IBSS peer");
|
||||
retCode =
|
||||
lim_add_sta(mac, pStaDs, false, pe_session);
|
||||
lim_add_sta(mac, sta, false, pe_session);
|
||||
if (retCode != QDF_STATUS_SUCCESS) {
|
||||
pe_err("ibss-sta-add failed (reason %x)",
|
||||
retCode);
|
||||
lim_print_mac_addr(mac, *pPeerAddr, LOGE);
|
||||
pStaDs->mlmStaContext.mlmState = prevState;
|
||||
dph_delete_hash_entry(mac, pStaDs->staAddr,
|
||||
pStaDs->assocId,
|
||||
sta->mlmStaContext.mlmState = prevState;
|
||||
dph_delete_hash_entry(mac, sta->staAddr,
|
||||
sta->assocId,
|
||||
&pe_session->dph.
|
||||
dphHashTable);
|
||||
} else {
|
||||
if (mac->lim.gLimProtectionControl !=
|
||||
MLME_FORCE_POLICY_PROTECTION_DISABLE)
|
||||
lim_ibss_decide_protection(mac, pStaDs,
|
||||
lim_ibss_decide_protection(mac, sta,
|
||||
&beaconParams,
|
||||
pe_session);
|
||||
|
||||
@@ -1208,7 +1208,7 @@ skip_event:
|
||||
QDF_STATUS
|
||||
lim_ibss_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *pe_session)
|
||||
{
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
uint16_t peerIdx;
|
||||
tpAddStaParams pAddStaParams = (tpAddStaParams) msg;
|
||||
|
||||
@@ -1218,10 +1218,10 @@ lim_ibss_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *pe_s
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pAddStaParams->staMac, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("IBSS: ADD_STA_RSP for unknown MAC addr: "MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(pAddStaParams->staMac));
|
||||
qdf_mem_free(pAddStaParams);
|
||||
@@ -1238,15 +1238,15 @@ lim_ibss_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *pe_s
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pStaDs->bssId = pAddStaParams->bssIdx;
|
||||
pStaDs->staIndex = pAddStaParams->staIdx;
|
||||
pStaDs->valid = 1;
|
||||
pStaDs->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
|
||||
sta->bssId = pAddStaParams->bssIdx;
|
||||
sta->staIndex = pAddStaParams->staIdx;
|
||||
sta->valid = 1;
|
||||
sta->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
|
||||
|
||||
pe_debug("IBSS: sending IBSS_NEW_PEER msg to SME!");
|
||||
|
||||
ibss_status_chg_notify(mac, pAddStaParams->staMac,
|
||||
pStaDs->staIndex,
|
||||
sta->staIndex,
|
||||
eWNI_SME_IBSS_NEW_PEER_IND,
|
||||
pe_session->smeSessionId);
|
||||
|
||||
@@ -1452,7 +1452,7 @@ lim_ibss_coalesce(struct mac_context *mac,
|
||||
uint16_t peerIdx;
|
||||
tSirMacAddr currentBssId;
|
||||
tLimIbssPeerNode *pPeerNode;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
tUpdateBeaconParams beaconParams;
|
||||
|
||||
qdf_mem_zero((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams));
|
||||
@@ -1549,14 +1549,14 @@ lim_ibss_coalesce(struct mac_context *mac,
|
||||
}
|
||||
ibss_peer_add(mac, pPeerNode);
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
/* / DPH node already exists for the peer */
|
||||
pe_warn("DPH Node present for just learned peer");
|
||||
lim_print_mac_addr(mac, pPeerNode->peerMacAddr, LOGD);
|
||||
ibss_sta_info_update(mac, pStaDs, pPeerNode,
|
||||
ibss_sta_info_update(mac, sta, pPeerNode,
|
||||
pe_session);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1568,12 +1568,12 @@ lim_ibss_coalesce(struct mac_context *mac,
|
||||
return retCode;
|
||||
}
|
||||
/* Decide protection mode */
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (mac->lim.gLimProtectionControl !=
|
||||
MLME_FORCE_POLICY_PROTECTION_DISABLE)
|
||||
lim_ibss_decide_protection(mac, pStaDs, &beaconParams,
|
||||
lim_ibss_decide_protection(mac, sta, &beaconParams,
|
||||
pe_session);
|
||||
|
||||
if (beaconParams.paramChangeBitmap) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012, 2014-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2012, 2014-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
|
||||
@@ -94,7 +94,7 @@ void lim_ibss_del_bss_rsp(struct mac_context *, void *, struct pe_session *);
|
||||
void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *, void *, struct pe_session *);
|
||||
void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, void *msg,
|
||||
struct pe_session *pe_session);
|
||||
void lim_ibss_decide_protection_on_delete(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
void lim_ibss_decide_protection_on_delete(struct mac_context *mac, tpDphHashNode sta,
|
||||
tpUpdateBeaconParams pBeaconParams,
|
||||
struct pe_session *pe_session);
|
||||
void lim_ibss_heart_beat_handle(struct mac_context *mac, struct pe_session *pe_session);
|
||||
|
@@ -357,7 +357,7 @@ void
|
||||
lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
|
||||
tSirMacReasonCodes reasonCode)
|
||||
{
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
|
||||
/* tear down the following pe_session */
|
||||
struct pe_session *pe_session;
|
||||
@@ -379,11 +379,11 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
|
||||
/* Announce loss of link to Roaming algorithm */
|
||||
/* and cleanup by sending SME_DISASSOC_REQ to SME */
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
tLimMlmDeauthInd mlmDeauthInd;
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
@@ -391,12 +391,12 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
|
||||
lim_delete_tdls_peers(mac, pe_session);
|
||||
#endif
|
||||
|
||||
pStaDs->mlmStaContext.disassocReason = reasonCode;
|
||||
pStaDs->mlmStaContext.cleanupTrigger =
|
||||
sta->mlmStaContext.disassocReason = reasonCode;
|
||||
sta->mlmStaContext.cleanupTrigger =
|
||||
eLIM_LINK_MONITORING_DEAUTH;
|
||||
/* / Issue Deauth Indication to SME. */
|
||||
qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
|
||||
pStaDs->staAddr, sizeof(tSirMacAddr));
|
||||
sta->staAddr, sizeof(tSirMacAddr));
|
||||
|
||||
/*
|
||||
* if deauth_before_connection is enabled and reasoncode is
|
||||
@@ -415,16 +415,16 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
|
||||
|
||||
pe_debug("HB Failure on MAC "
|
||||
MAC_ADDRESS_STR" Store it on Index %d",
|
||||
MAC_ADDR_ARRAY(pStaDs->staAddr), apCount);
|
||||
MAC_ADDR_ARRAY(sta->staAddr), apCount);
|
||||
|
||||
sir_copy_mac_addr(mac->lim.gLimHeartBeatApMac[apCount],
|
||||
pStaDs->staAddr);
|
||||
sta->staAddr);
|
||||
}
|
||||
|
||||
mlmDeauthInd.reasonCode =
|
||||
(uint8_t) pStaDs->mlmStaContext.disassocReason;
|
||||
(uint8_t) sta->mlmStaContext.disassocReason;
|
||||
mlmDeauthInd.deauthTrigger =
|
||||
pStaDs->mlmStaContext.cleanupTrigger;
|
||||
sta->mlmStaContext.cleanupTrigger;
|
||||
|
||||
if (LIM_IS_STA_ROLE(pe_session))
|
||||
lim_post_sme_message(mac, LIM_MLM_DEAUTH_IND,
|
||||
@@ -435,7 +435,7 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
|
||||
WLAN_LOG_REASON_HB_FAILURE,
|
||||
false, false);
|
||||
|
||||
lim_send_sme_deauth_ind(mac, pStaDs, pe_session);
|
||||
lim_send_sme_deauth_ind(mac, sta, pe_session);
|
||||
}
|
||||
} /*** lim_tear_down_link_with_ap() ***/
|
||||
|
||||
|
@@ -1577,15 +1577,15 @@ lim_drop_unprotected_action_frame(struct mac_context *mac, struct pe_session *pe
|
||||
tpSirMacMgmtHdr pHdr, uint8_t category)
|
||||
{
|
||||
uint16_t aid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
bool rmfConnection = false;
|
||||
|
||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pHdr->sa, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL)
|
||||
if (pStaDs->rmfEnabled)
|
||||
if (sta != NULL)
|
||||
if (sta->rmfEnabled)
|
||||
rmfConnection = true;
|
||||
} else if (pe_session->limRmfEnabled)
|
||||
rmfConnection = true;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-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
|
||||
@@ -52,7 +52,7 @@
|
||||
***LOGIC:
|
||||
*
|
||||
***ASSUMPTIONS:
|
||||
* DPH drops packets for STA with 'valid' bit in pStaDs set to '0'.
|
||||
* DPH drops packets for STA with 'valid' bit in sta set to '0'.
|
||||
*
|
||||
***NOTE:
|
||||
*
|
||||
@@ -67,7 +67,7 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
|
||||
uint8_t *pBody;
|
||||
uint16_t aid, reasonCode;
|
||||
tpSirMacMgmtHdr pHdr;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
uint32_t frame_len;
|
||||
int32_t frame_rssi;
|
||||
|
||||
@@ -168,11 +168,11 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
|
||||
* Extract 'associated' context for STA, if any.
|
||||
* This is maintained by DPH and created by LIM.
|
||||
*/
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, pHdr->sa, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
/**
|
||||
* Disassociating STA is not associated.
|
||||
* Log error.
|
||||
@@ -280,34 +280,34 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) ||
|
||||
(pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE) ||
|
||||
pStaDs->sta_deletion_in_progress) {
|
||||
if ((sta->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) ||
|
||||
(sta->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE) ||
|
||||
sta->sta_deletion_in_progress) {
|
||||
/**
|
||||
* Already in the process of deleting context for the peer
|
||||
* and received Disassociation frame. Log and Ignore.
|
||||
*/
|
||||
pe_debug("Deletion is in progress (%d) for peer:%pM in mlmState %d",
|
||||
pStaDs->sta_deletion_in_progress, pHdr->sa,
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->sta_deletion_in_progress, pHdr->sa,
|
||||
sta->mlmStaContext.mlmState);
|
||||
return;
|
||||
}
|
||||
pStaDs->sta_deletion_in_progress = true;
|
||||
sta->sta_deletion_in_progress = true;
|
||||
lim_disassoc_tdls_peers(mac, pe_session, pHdr->sa);
|
||||
if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) {
|
||||
if (sta->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) {
|
||||
/**
|
||||
* Requesting STA is in some 'transient' state?
|
||||
* Log error.
|
||||
*/
|
||||
if (pStaDs->mlmStaContext.mlmState ==
|
||||
if (sta->mlmStaContext.mlmState ==
|
||||
eLIM_MLM_WT_ASSOC_CNF_STATE)
|
||||
pStaDs->mlmStaContext.updateContext = 1;
|
||||
sta->mlmStaContext.updateContext = 1;
|
||||
|
||||
pe_err("received Disassoc frame from peer that is in state: %X, addr "MAC_ADDRESS_STR,
|
||||
pStaDs->mlmStaContext.mlmState,
|
||||
sta->mlmStaContext.mlmState,
|
||||
MAC_ADDR_ARRAY(pHdr->sa));
|
||||
|
||||
} /* if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */
|
||||
} /* if (sta->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */
|
||||
|
||||
lim_perform_disassoc(mac, frame_rssi, reasonCode,
|
||||
pe_session, pHdr->sa);
|
||||
|
@@ -177,7 +177,7 @@ static void lim_handle_sme_reaasoc_result(struct mac_context *mac,
|
||||
tSirResultCodes resultCode, uint16_t protStatusCode,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
uint8_t smesessionId;
|
||||
uint16_t smetransactionId;
|
||||
|
||||
@@ -188,21 +188,21 @@ static void lim_handle_sme_reaasoc_result(struct mac_context *mac,
|
||||
smesessionId = pe_session->smeSessionId;
|
||||
smetransactionId = pe_session->transactionId;
|
||||
if (resultCode != eSIR_SME_SUCCESS) {
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
pStaDs->mlmStaContext.disassocReason =
|
||||
if (sta != NULL) {
|
||||
sta->mlmStaContext.disassocReason =
|
||||
eSIR_MAC_UNSPEC_FAILURE_REASON;
|
||||
pStaDs->mlmStaContext.cleanupTrigger =
|
||||
sta->mlmStaContext.cleanupTrigger =
|
||||
eLIM_JOIN_FAILURE;
|
||||
pStaDs->mlmStaContext.resultCode = resultCode;
|
||||
pStaDs->mlmStaContext.protStatusCode = protStatusCode;
|
||||
lim_cleanup_rx_path(mac, pStaDs, pe_session);
|
||||
sta->mlmStaContext.resultCode = resultCode;
|
||||
sta->mlmStaContext.protStatusCode = protStatusCode;
|
||||
lim_cleanup_rx_path(mac, sta, pe_session);
|
||||
/* Cleanup if add bss failed */
|
||||
if (pe_session->add_bss_failed) {
|
||||
dph_delete_hash_entry(mac,
|
||||
pStaDs->staAddr, pStaDs->assocId,
|
||||
sta->staAddr, sta->assocId,
|
||||
&pe_session->dph.dphHashTable);
|
||||
goto error;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(struct mac_context *mac,
|
||||
struct scheduler_msg *limMsgQ, struct pe_session *pe_session)
|
||||
{
|
||||
tLimMlmReassocCnf mlmReassocCnf; /* keep sme */
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
tpAddStaParams pAddStaParams = NULL;
|
||||
uint32_t listenInterval = MLME_CFG_LISTEN_INTERVAL;
|
||||
tpAddBssParams pAddBssParams = (tpAddBssParams) limMsgQ->bodyptr;
|
||||
@@ -367,10 +367,10 @@ void lim_process_sta_mlm_add_bss_rsp_ft(struct mac_context *mac,
|
||||
goto end;
|
||||
}
|
||||
|
||||
pStaDs = dph_add_hash_entry(mac, pAddBssParams->bssId,
|
||||
sta = dph_add_hash_entry(mac, pAddBssParams->bssId,
|
||||
DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
/* Could not add hash table entry */
|
||||
pe_err("could not add hash entry at DPH for");
|
||||
lim_print_mac_addr(mac, pAddBssParams->staContext.staMac,
|
||||
@@ -435,9 +435,9 @@ void lim_process_sta_mlm_add_bss_rsp_ft(struct mac_context *mac,
|
||||
pe_session->bssIdx = (uint8_t) pAddBssParams->bssIdx;
|
||||
|
||||
/* Success, handle below */
|
||||
pStaDs->bssId = pAddBssParams->bssIdx;
|
||||
sta->bssId = pAddBssParams->bssIdx;
|
||||
/* STA Index(genr by HAL) for the BSS entry is stored here */
|
||||
pStaDs->staIndex = pAddBssParams->staContext.staIdx;
|
||||
sta->staIndex = pAddBssParams->staContext.staIdx;
|
||||
|
||||
rrm_cache_mgmt_tx_power(mac, pAddBssParams->txMgmtPower,
|
||||
pe_session);
|
||||
|
@@ -782,7 +782,7 @@ void lim_process_mlm_assoc_ind(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
uint32_t len;
|
||||
struct scheduler_msg msg = {0};
|
||||
tSirSmeAssocInd *pSirSmeAssocInd;
|
||||
tpDphHashNode pStaDs = 0;
|
||||
tpDphHashNode sta = 0;
|
||||
struct pe_session *pe_session;
|
||||
|
||||
if (pMsgBuf == NULL) {
|
||||
@@ -811,19 +811,19 @@ void lim_process_mlm_assoc_ind(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
msg.type = eWNI_SME_ASSOC_IND;
|
||||
msg.bodyptr = pSirSmeAssocInd;
|
||||
msg.bodyval = 0;
|
||||
pStaDs = dph_get_hash_entry(mac,
|
||||
sta = dph_get_hash_entry(mac,
|
||||
((tpLimMlmAssocInd) pMsgBuf)->aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (!pStaDs) {
|
||||
if (!sta) {
|
||||
pe_err("MLM AssocInd: Station context no longer valid (aid %d)",
|
||||
((tpLimMlmAssocInd) pMsgBuf)->aid);
|
||||
qdf_mem_free(pSirSmeAssocInd);
|
||||
|
||||
return;
|
||||
}
|
||||
pSirSmeAssocInd->staId = pStaDs->staIndex;
|
||||
pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
|
||||
pSirSmeAssocInd->timingMeasCap = pStaDs->timingMeasCap;
|
||||
pSirSmeAssocInd->staId = sta->staIndex;
|
||||
pSirSmeAssocInd->reassocReq = sta->mlmStaContext.subType;
|
||||
pSirSmeAssocInd->timingMeasCap = sta->timingMeasCap;
|
||||
MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG,
|
||||
pe_session->peSessionId, msg.type));
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
@@ -1716,7 +1716,7 @@ void lim_process_sta_mlm_del_bss_rsp(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tpDeleteBssParams pDelBssParams = (tpDeleteBssParams) limMsgQ->bodyptr;
|
||||
tpDphHashNode pStaDs =
|
||||
tpDphHashNode sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
tSirResultCodes statusCode = eSIR_SME_SUCCESS;
|
||||
@@ -1736,20 +1736,20 @@ void lim_process_sta_mlm_del_bss_rsp(struct mac_context *mac,
|
||||
statusCode = eSIR_SME_REFUSED;
|
||||
goto end;
|
||||
}
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("DPH Entry for STA 1 missing");
|
||||
statusCode = eSIR_SME_REFUSED;
|
||||
goto end;
|
||||
}
|
||||
if (eLIM_MLM_WT_DEL_BSS_RSP_STATE !=
|
||||
pStaDs->mlmStaContext.mlmState) {
|
||||
sta->mlmStaContext.mlmState) {
|
||||
pe_err("Received unexpected WMA_DEL_BSS_RSP in state %X",
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->mlmStaContext.mlmState);
|
||||
statusCode = eSIR_SME_REFUSED;
|
||||
goto end;
|
||||
}
|
||||
pe_debug("STA AssocID %d MAC", pStaDs->assocId);
|
||||
lim_print_mac_addr(mac, pStaDs->staAddr, LOGD);
|
||||
pe_debug("STA AssocID %d MAC", sta->assocId);
|
||||
lim_print_mac_addr(mac, sta->staAddr, LOGD);
|
||||
} else {
|
||||
pe_err("DEL BSS failed!");
|
||||
statusCode = eSIR_SME_STOP_BSS_FAILURE;
|
||||
@@ -1759,23 +1759,23 @@ end:
|
||||
qdf_mem_free(pDelBssParams);
|
||||
limMsgQ->bodyptr = NULL;
|
||||
}
|
||||
if (pStaDs == NULL)
|
||||
if (sta == NULL)
|
||||
return;
|
||||
if ((LIM_IS_STA_ROLE(pe_session)) &&
|
||||
(pe_session->limSmeState !=
|
||||
eLIM_SME_WT_DISASSOC_STATE &&
|
||||
pe_session->limSmeState !=
|
||||
eLIM_SME_WT_DEAUTH_STATE) &&
|
||||
pStaDs->mlmStaContext.cleanupTrigger !=
|
||||
sta->mlmStaContext.cleanupTrigger !=
|
||||
eLIM_JOIN_FAILURE) {
|
||||
/** The Case where the DelBss is invoked from
|
||||
* context of other than normal DisAssoc / Deauth OR
|
||||
* as part of Join Failure.
|
||||
*/
|
||||
lim_handle_del_bss_in_re_assoc_context(mac, pStaDs, pe_session);
|
||||
lim_handle_del_bss_in_re_assoc_context(mac, sta, pe_session);
|
||||
return;
|
||||
}
|
||||
lim_prepare_and_send_del_sta_cnf(mac, pStaDs, statusCode, pe_session);
|
||||
lim_prepare_and_send_del_sta_cnf(mac, sta, statusCode, pe_session);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2062,53 +2062,53 @@ void lim_process_ap_mlm_add_sta_rsp(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tpAddStaParams pAddStaParams = (tpAddStaParams) limMsgQ->bodyptr;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
|
||||
if (NULL == pAddStaParams) {
|
||||
pe_err("Invalid body pointer in message");
|
||||
goto end;
|
||||
}
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, pAddStaParams->assocId,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("DPH Entry for STA %X missing", pAddStaParams->assocId);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (eLIM_MLM_WT_ADD_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState) {
|
||||
if (eLIM_MLM_WT_ADD_STA_RSP_STATE != sta->mlmStaContext.mlmState) {
|
||||
pe_err("Received unexpected WMA_ADD_STA_RSP in state %X",
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->mlmStaContext.mlmState);
|
||||
goto end;
|
||||
}
|
||||
if (QDF_STATUS_SUCCESS != pAddStaParams->status) {
|
||||
pe_err("Error! rcvd delSta rsp from HAL with status %d",
|
||||
pAddStaParams->status);
|
||||
lim_reject_association(mac, pStaDs->staAddr,
|
||||
pStaDs->mlmStaContext.subType,
|
||||
true, pStaDs->mlmStaContext.authType,
|
||||
pStaDs->assocId, true,
|
||||
lim_reject_association(mac, sta->staAddr,
|
||||
sta->mlmStaContext.subType,
|
||||
true, sta->mlmStaContext.authType,
|
||||
sta->assocId, true,
|
||||
eSIR_MAC_UNSPEC_FAILURE_STATUS,
|
||||
pe_session);
|
||||
goto end;
|
||||
}
|
||||
pStaDs->bssId = pAddStaParams->bssIdx;
|
||||
pStaDs->staIndex = pAddStaParams->staIdx;
|
||||
pStaDs->nss = pAddStaParams->nss;
|
||||
sta->bssId = pAddStaParams->bssIdx;
|
||||
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 */
|
||||
pStaDs->valid = 1;
|
||||
pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ASSOC_CNF_STATE;
|
||||
sta->valid = 1;
|
||||
sta->mlmStaContext.mlmState = eLIM_MLM_WT_ASSOC_CNF_STATE;
|
||||
pe_debug("AddStaRsp Success.STA AssocID %d staId %d MAC",
|
||||
pStaDs->assocId, pStaDs->staIndex);
|
||||
lim_print_mac_addr(mac, pStaDs->staAddr, LOGD);
|
||||
sta->assocId, sta->staIndex);
|
||||
lim_print_mac_addr(mac, sta->staAddr, LOGD);
|
||||
|
||||
/* For BTAMP-AP, the flow sequence shall be:
|
||||
* 1) PE sends eWNI_SME_ASSOC_IND to SME
|
||||
* 2) PE receives eWNI_SME_ASSOC_CNF from SME
|
||||
* 3) BTAMP-AP sends Re/Association Response to BTAMP-STA
|
||||
*/
|
||||
lim_send_mlm_assoc_ind(mac, pStaDs, pe_session);
|
||||
lim_send_mlm_assoc_ind(mac, sta, pe_session);
|
||||
/* fall though to reclaim the original Add STA Response message */
|
||||
end:
|
||||
if (0 != limMsgQ->bodyptr) {
|
||||
@@ -2405,18 +2405,18 @@ lim_process_sta_add_bss_rsp_pre_assoc(struct mac_context *mac_ctx,
|
||||
tpAddBssParams pAddBssParams = (tpAddBssParams) msg->bodyptr;
|
||||
tAniAuthType cfgAuthType, authMode;
|
||||
tLimMlmAuthReq *pMlmAuthReq;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
|
||||
if (NULL == pAddBssParams) {
|
||||
pe_err("Invalid body pointer in message");
|
||||
goto joinFailure;
|
||||
}
|
||||
if (QDF_STATUS_SUCCESS == pAddBssParams->status) {
|
||||
pStaDs = dph_add_hash_entry(mac_ctx,
|
||||
sta = dph_add_hash_entry(mac_ctx,
|
||||
pAddBssParams->staContext.staMac,
|
||||
DPH_STA_HASH_INDEX_PEER,
|
||||
&session_entry->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
/* Could not add hash table entry */
|
||||
pe_err("could not add hash entry at DPH for");
|
||||
lim_print_mac_addr(mac_ctx,
|
||||
@@ -2425,9 +2425,9 @@ lim_process_sta_add_bss_rsp_pre_assoc(struct mac_context *mac_ctx,
|
||||
}
|
||||
session_entry->bssIdx = (uint8_t) pAddBssParams->bssIdx;
|
||||
/* Success, handle below */
|
||||
pStaDs->bssId = pAddBssParams->bssIdx;
|
||||
sta->bssId = pAddBssParams->bssIdx;
|
||||
/* STA Index(genr by HAL) for the BSS entry is stored here */
|
||||
pStaDs->staIndex = pAddBssParams->staContext.staIdx;
|
||||
sta->staIndex = pAddBssParams->staContext.staIdx;
|
||||
/* Trigger Authentication with AP */
|
||||
cfgAuthType = mac_ctx->mlme_cfg->wep_params.auth_type;
|
||||
|
||||
|
@@ -2287,7 +2287,7 @@ sendDisassoc:
|
||||
from HDD or upper layer application.
|
||||
|
||||
\param mac - global mac structure
|
||||
\param pStaDs - station dph hash node
|
||||
\param sta - station dph hash node
|
||||
\return none
|
||||
\sa
|
||||
----------------------------------------------------------------- */
|
||||
@@ -2295,7 +2295,7 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
{
|
||||
tSirSmeDisassocCnf smeDisassocCnf;
|
||||
uint16_t aid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
struct pe_session *pe_session;
|
||||
uint8_t sessionId;
|
||||
uint32_t *msg = NULL;
|
||||
@@ -2387,10 +2387,10 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
if ((pe_session->limSmeState == eLIM_SME_WT_DISASSOC_STATE) ||
|
||||
(pe_session->limSmeState == eLIM_SME_WT_DEAUTH_STATE) ||
|
||||
LIM_IS_AP_ROLE(pe_session)) {
|
||||
pStaDs = dph_lookup_hash_entry(mac,
|
||||
sta = dph_lookup_hash_entry(mac,
|
||||
smeDisassocCnf.peer_macaddr.bytes, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("DISASSOC_CNF for a STA with no context, addr= "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(smeDisassocCnf.peer_macaddr.bytes));
|
||||
@@ -2405,13 +2405,13 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pStaDs->mlmStaContext.mlmState ==
|
||||
if ((sta->mlmStaContext.mlmState ==
|
||||
eLIM_MLM_WT_DEL_STA_RSP_STATE) ||
|
||||
(pStaDs->mlmStaContext.mlmState ==
|
||||
(sta->mlmStaContext.mlmState ==
|
||||
eLIM_MLM_WT_DEL_BSS_RSP_STATE)) {
|
||||
pe_err("No need of cleanup for addr:" MAC_ADDRESS_STR "as MLM state is %d",
|
||||
MAC_ADDR_ARRAY(smeDisassocCnf.peer_macaddr.bytes),
|
||||
pStaDs->mlmStaContext.mlmState);
|
||||
sta->mlmStaContext.mlmState);
|
||||
status = lim_prepare_disconnect_done_ind(mac, &msg,
|
||||
pe_session->smeSessionId,
|
||||
eSIR_SME_SUCCESS,
|
||||
@@ -2425,7 +2425,7 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
|
||||
/* Delete FT session if there exists one */
|
||||
lim_ft_cleanup_pre_auth_info(mac, pe_session);
|
||||
lim_cleanup_rx_path(mac, pStaDs, pe_session);
|
||||
lim_cleanup_rx_path(mac, sta, pe_session);
|
||||
|
||||
lim_clean_up_disassoc_deauth_req(mac,
|
||||
(char *)&smeDisassocCnf.peer_macaddr, 0);
|
||||
@@ -3319,7 +3319,7 @@ end:
|
||||
|
||||
static void __lim_process_sme_addts_req(struct mac_context *mac, uint32_t *pMsgBuf)
|
||||
{
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
tSirMacAddr peerMac;
|
||||
tpSirAddtsReq pSirAddts;
|
||||
uint32_t timeout;
|
||||
@@ -3367,16 +3367,16 @@ static void __lim_process_sme_addts_req(struct mac_context *mac, uint32_t *pMsgB
|
||||
goto send_failure_addts_rsp;
|
||||
}
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("Cannot find AP context for addts req");
|
||||
goto send_failure_addts_rsp;
|
||||
}
|
||||
|
||||
if ((!pStaDs->valid) || (pStaDs->mlmStaContext.mlmState !=
|
||||
if ((!sta->valid) || (sta->mlmStaContext.mlmState !=
|
||||
eLIM_MLM_LINK_ESTABLISHED_STATE)) {
|
||||
pe_err("AddTs received in invalid MLM state");
|
||||
goto send_failure_addts_rsp;
|
||||
@@ -3386,13 +3386,13 @@ static void __lim_process_sme_addts_req(struct mac_context *mac, uint32_t *pMsgB
|
||||
pSirAddts->req.wmeTspecPresent = 0;
|
||||
pSirAddts->req.lleTspecPresent = 0;
|
||||
|
||||
if ((pStaDs->wsmEnabled) &&
|
||||
if ((sta->wsmEnabled) &&
|
||||
(pSirAddts->req.tspec.tsinfo.traffic.accessPolicy !=
|
||||
SIR_MAC_ACCESSPOLICY_EDCA))
|
||||
pSirAddts->req.wsmTspecPresent = 1;
|
||||
else if (pStaDs->wmeEnabled)
|
||||
else if (sta->wmeEnabled)
|
||||
pSirAddts->req.wmeTspecPresent = 1;
|
||||
else if (pStaDs->lleEnabled)
|
||||
else if (sta->lleEnabled)
|
||||
pSirAddts->req.lleTspecPresent = 1;
|
||||
else {
|
||||
pe_warn("ADDTS_REQ ignore - qos is disabled");
|
||||
@@ -3470,7 +3470,7 @@ static void __lim_process_sme_delts_req(struct mac_context *mac, uint32_t *pMsgB
|
||||
uint8_t ac;
|
||||
struct mac_ts_info *pTsinfo;
|
||||
tpSirDeltsReq pDeltsReq = (tpSirDeltsReq) pMsgBuf;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
struct pe_session *pe_session;
|
||||
uint8_t sessionId;
|
||||
uint32_t status = QDF_STATUS_SUCCESS;
|
||||
@@ -3548,12 +3548,12 @@ static void __lim_process_sme_delts_req(struct mac_context *mac, uint32_t *pMsgB
|
||||
lim_set_active_edca_params(mac, pe_session->gLimEdcaParams,
|
||||
pe_session);
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
lim_send_edca_params(mac, pe_session->gLimEdcaParamsActive,
|
||||
pStaDs->bssId, false);
|
||||
sta->bssId, false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
pe_err("Self entry missing in Hash Table");
|
||||
@@ -4081,7 +4081,7 @@ static void __lim_process_sme_set_ht2040_mode(struct mac_context *mac,
|
||||
struct scheduler_msg msg = {0};
|
||||
tUpdateVHTOpMode *pHtOpMode = NULL;
|
||||
uint16_t staId = 0;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
|
||||
pe_debug("received Set HT 20/40 mode message");
|
||||
if (pMsgBuf == NULL) {
|
||||
@@ -4136,12 +4136,12 @@ static void __lim_process_sme_set_ht2040_mode(struct mac_context *mac,
|
||||
|
||||
/* update OP Mode for each associated peer */
|
||||
for (staId = 0; staId < pe_session->dph.dphHashTable.size; staId++) {
|
||||
pStaDs = dph_get_hash_entry(mac, staId,
|
||||
sta = dph_get_hash_entry(mac, staId,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (NULL == pStaDs)
|
||||
if (NULL == sta)
|
||||
continue;
|
||||
|
||||
if (pStaDs->valid && pStaDs->htSupportedChannelWidthSet) {
|
||||
if (sta->valid && sta->htSupportedChannelWidthSet) {
|
||||
pHtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode));
|
||||
if (!pHtOpMode)
|
||||
return;
|
||||
@@ -4150,7 +4150,7 @@ static void __lim_process_sme_set_ht2040_mode(struct mac_context *mac,
|
||||
PHY_SINGLE_CHANNEL_CENTERED) ?
|
||||
eHT_CHANNEL_WIDTH_20MHZ : eHT_CHANNEL_WIDTH_40MHZ;
|
||||
pHtOpMode->staId = staId;
|
||||
qdf_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr,
|
||||
qdf_mem_copy(pHtOpMode->peer_mac, &sta->staAddr,
|
||||
sizeof(tSirMacAddr));
|
||||
pHtOpMode->smesessionId = sessionId;
|
||||
|
||||
|
@@ -993,18 +993,18 @@ static void populate_dotf_tdls_vht_aid(struct mac_context *mac, uint32_t selfDot
|
||||
IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) {
|
||||
|
||||
uint16_t aid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, peerMac.bytes, &aid,
|
||||
&pe_session->dph.
|
||||
dphHashTable);
|
||||
if (NULL != pStaDs) {
|
||||
if (NULL != sta) {
|
||||
Aid->present = 1;
|
||||
Aid->assocId = aid | LIM_AID_MASK; /* set bit 14 and 15 1's */
|
||||
} else {
|
||||
Aid->present = 0;
|
||||
pe_err("pStaDs is NULL for "
|
||||
pe_err("sta is NULL for "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(peerMac.bytes));
|
||||
}
|
||||
@@ -2405,7 +2405,7 @@ lim_tdls_populate_matching_rate_set(struct mac_context *mac_ctx, tpDphHashNode s
|
||||
* update HASH node entry info
|
||||
*/
|
||||
static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
tDphHashNode *pStaDs,
|
||||
tDphHashNode *sta,
|
||||
tSirTdlsAddStaReq *pTdlsAddStaReq,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
@@ -2423,10 +2423,10 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
}
|
||||
htCaps = &htCap;
|
||||
if (htCaps->present) {
|
||||
pStaDs->mlmStaContext.htCapability = 1;
|
||||
pStaDs->htGreenfield = htCaps->greenField;
|
||||
sta->mlmStaContext.htCapability = 1;
|
||||
sta->htGreenfield = htCaps->greenField;
|
||||
/*
|
||||
* pStaDs->htSupportedChannelWidthSet should have the base
|
||||
* sta->htSupportedChannelWidthSet should have the base
|
||||
* channel capability. The htSupportedChannelWidthSet of the
|
||||
* TDLS link on base channel should be less than or equal to
|
||||
* channel width of STA-AP link. So take this setting from the
|
||||
@@ -2435,34 +2435,34 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
pe_debug("supportedChannelWidthSet: 0x%x htSupportedChannelWidthSet: 0x%x",
|
||||
htCaps->supportedChannelWidthSet,
|
||||
pe_session->htSupportedChannelWidthSet);
|
||||
pStaDs->htSupportedChannelWidthSet =
|
||||
sta->htSupportedChannelWidthSet =
|
||||
(htCaps->supportedChannelWidthSet <
|
||||
pe_session->htSupportedChannelWidthSet) ?
|
||||
htCaps->supportedChannelWidthSet :
|
||||
pe_session->htSupportedChannelWidthSet;
|
||||
pe_debug("pStaDs->htSupportedChannelWidthSet: 0x%x",
|
||||
pStaDs->htSupportedChannelWidthSet);
|
||||
pe_debug("sta->htSupportedChannelWidthSet: 0x%x",
|
||||
sta->htSupportedChannelWidthSet);
|
||||
|
||||
pStaDs->htMIMOPSState = htCaps->mimoPowerSave;
|
||||
pStaDs->htMaxAmsduLength = htCaps->maximalAMSDUsize;
|
||||
pStaDs->htAMpduDensity = htCaps->mpduDensity;
|
||||
pStaDs->htDsssCckRate40MHzSupport = htCaps->dsssCckMode40MHz;
|
||||
pStaDs->htShortGI20Mhz = htCaps->shortGI20MHz;
|
||||
pStaDs->htShortGI40Mhz = htCaps->shortGI40MHz;
|
||||
pStaDs->htMaxRxAMpduFactor = htCaps->maxRxAMPDUFactor;
|
||||
sta->htMIMOPSState = htCaps->mimoPowerSave;
|
||||
sta->htMaxAmsduLength = htCaps->maximalAMSDUsize;
|
||||
sta->htAMpduDensity = htCaps->mpduDensity;
|
||||
sta->htDsssCckRate40MHzSupport = htCaps->dsssCckMode40MHz;
|
||||
sta->htShortGI20Mhz = htCaps->shortGI20MHz;
|
||||
sta->htShortGI40Mhz = htCaps->shortGI40MHz;
|
||||
sta->htMaxRxAMpduFactor = htCaps->maxRxAMPDUFactor;
|
||||
lim_fill_rx_highest_supported_rate(mac,
|
||||
&pStaDs->supportedRates.
|
||||
&sta->supportedRates.
|
||||
rxHighestDataRate,
|
||||
htCaps->supportedMCSSet);
|
||||
pStaDs->baPolicyFlag = 0xFF;
|
||||
pStaDs->ht_caps = pTdlsAddStaReq->htCap.hc_cap;
|
||||
sta->baPolicyFlag = 0xFF;
|
||||
sta->ht_caps = pTdlsAddStaReq->htCap.hc_cap;
|
||||
} else {
|
||||
pStaDs->mlmStaContext.htCapability = 0;
|
||||
sta->mlmStaContext.htCapability = 0;
|
||||
}
|
||||
lim_tdls_populate_dot11f_vht_caps(mac, pTdlsAddStaReq, &vhtCap);
|
||||
pVhtCaps = &vhtCap;
|
||||
if (pVhtCaps->present) {
|
||||
pStaDs->mlmStaContext.vhtCapability = 1;
|
||||
sta->mlmStaContext.vhtCapability = 1;
|
||||
|
||||
/*
|
||||
* 11.21.1 General: The channel width of the TDLS direct
|
||||
@@ -2471,27 +2471,27 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
* associated.
|
||||
*/
|
||||
if (pe_session->ch_width)
|
||||
pStaDs->vhtSupportedChannelWidthSet =
|
||||
sta->vhtSupportedChannelWidthSet =
|
||||
pe_session->ch_width - 1;
|
||||
else
|
||||
pStaDs->vhtSupportedChannelWidthSet =
|
||||
sta->vhtSupportedChannelWidthSet =
|
||||
pe_session->ch_width;
|
||||
|
||||
pe_debug("vhtSupportedChannelWidthSet: %hu htSupportedChannelWidthSet: %hu",
|
||||
pStaDs->vhtSupportedChannelWidthSet,
|
||||
pStaDs->htSupportedChannelWidthSet);
|
||||
sta->vhtSupportedChannelWidthSet,
|
||||
sta->htSupportedChannelWidthSet);
|
||||
|
||||
pStaDs->vhtLdpcCapable = pVhtCaps->ldpcCodingCap;
|
||||
pStaDs->vhtBeamFormerCapable = 0;
|
||||
sta->vhtLdpcCapable = pVhtCaps->ldpcCodingCap;
|
||||
sta->vhtBeamFormerCapable = 0;
|
||||
pVhtCaps_txbf = (tDot11fIEVHTCaps *) (&pTdlsAddStaReq->vhtCap);
|
||||
pVhtCaps_txbf->suBeamformeeCap = 0;
|
||||
pVhtCaps_txbf->suBeamFormerCap = 0;
|
||||
pVhtCaps_txbf->muBeamformerCap = 0;
|
||||
pVhtCaps_txbf->muBeamformeeCap = 0;
|
||||
pStaDs->vht_caps = pTdlsAddStaReq->vhtCap.vhtCapInfo;
|
||||
sta->vht_caps = pTdlsAddStaReq->vhtCap.vhtCapInfo;
|
||||
} else {
|
||||
pStaDs->mlmStaContext.vhtCapability = 0;
|
||||
pStaDs->vhtSupportedChannelWidthSet =
|
||||
sta->mlmStaContext.vhtCapability = 0;
|
||||
sta->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
}
|
||||
|
||||
@@ -2500,31 +2500,31 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
* own channel bonding state is enabled
|
||||
*/
|
||||
if (pe_session->htSupportedChannelWidthSet) {
|
||||
cbMode = lim_select_cb_mode(pStaDs, pe_session,
|
||||
cbMode = lim_select_cb_mode(sta, pe_session,
|
||||
pe_session->currentOperChannel,
|
||||
pStaDs->vhtSupportedChannelWidthSet);
|
||||
sta->vhtSupportedChannelWidthSet);
|
||||
|
||||
if (pStaDs->mlmStaContext.vhtCapability)
|
||||
pStaDs->htSecondaryChannelOffset =
|
||||
if (sta->mlmStaContext.vhtCapability)
|
||||
sta->htSecondaryChannelOffset =
|
||||
lim_get_htcb_state(cbMode);
|
||||
else
|
||||
pStaDs->htSecondaryChannelOffset = cbMode;
|
||||
sta->htSecondaryChannelOffset = cbMode;
|
||||
}
|
||||
/* Lets enable QOS parameter */
|
||||
pStaDs->qosMode = (pTdlsAddStaReq->capability & CAPABILITIES_QOS_OFFSET)
|
||||
sta->qosMode = (pTdlsAddStaReq->capability & CAPABILITIES_QOS_OFFSET)
|
||||
|| pTdlsAddStaReq->htcap_present;
|
||||
pStaDs->wmeEnabled = 1;
|
||||
pStaDs->lleEnabled = 0;
|
||||
sta->wmeEnabled = 1;
|
||||
sta->lleEnabled = 0;
|
||||
/* TDLS Dummy AddSTA does not have qosInfo , is it OK ??
|
||||
*/
|
||||
pStaDs->qos.capability.qosInfo =
|
||||
sta->qos.capability.qosInfo =
|
||||
(*(tSirMacQosInfoStation *) &pTdlsAddStaReq->uapsd_queues);
|
||||
|
||||
/* populate matching rate set */
|
||||
|
||||
/* TDLS Dummy AddSTA does not have HTCap,VHTCap,Rates info , is it OK ??
|
||||
*/
|
||||
lim_tdls_populate_matching_rate_set(mac, pStaDs,
|
||||
lim_tdls_populate_matching_rate_set(mac, sta,
|
||||
pTdlsAddStaReq->supported_rates,
|
||||
pTdlsAddStaReq->
|
||||
supported_rates_length,
|
||||
@@ -2534,7 +2534,7 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
|
||||
/* TDLS Dummy AddSTA does not have right capability , is it OK ??
|
||||
*/
|
||||
pStaDs->mlmStaContext.capabilityInfo =
|
||||
sta->mlmStaContext.capabilityInfo =
|
||||
(*(tSirMacCapabilityInfo *) &pTdlsAddStaReq->capability);
|
||||
|
||||
return;
|
||||
@@ -2547,26 +2547,26 @@ static QDF_STATUS lim_tdls_setup_add_sta(struct mac_context *mac,
|
||||
tSirTdlsAddStaReq *pAddStaReq,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
uint16_t aid = 0;
|
||||
|
||||
pStaDs = dph_lookup_hash_entry(mac, pAddStaReq->peermac.bytes, &aid,
|
||||
sta = dph_lookup_hash_entry(mac, pAddStaReq->peermac.bytes, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs && pAddStaReq->tdlsAddOper == TDLS_OPER_ADD) {
|
||||
if (sta && pAddStaReq->tdlsAddOper == TDLS_OPER_ADD) {
|
||||
pe_err("TDLS entry for peer: "MAC_ADDRESS_STR " already exist, cannot add new entry",
|
||||
MAC_ADDR_ARRAY(pAddStaReq->peermac.bytes));
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (pStaDs && pStaDs->staType != STA_ENTRY_TDLS_PEER) {
|
||||
if (sta && sta->staType != STA_ENTRY_TDLS_PEER) {
|
||||
pe_err("Non TDLS entry for peer: "MAC_ADDRESS_STR " already exist",
|
||||
MAC_ADDR_ARRAY(pAddStaReq->peermac.bytes));
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (NULL == pStaDs) {
|
||||
if (NULL == sta) {
|
||||
aid = lim_assign_peer_idx(mac, pe_session);
|
||||
|
||||
if (!aid) {
|
||||
@@ -2580,33 +2580,33 @@ static QDF_STATUS lim_tdls_setup_add_sta(struct mac_context *mac,
|
||||
|
||||
pe_debug("Aid: %d, for peer: " MAC_ADDRESS_STR,
|
||||
aid, MAC_ADDR_ARRAY(pAddStaReq->peermac.bytes));
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs) {
|
||||
(void)lim_del_sta(mac, pStaDs, false /*asynchronous */,
|
||||
if (sta) {
|
||||
(void)lim_del_sta(mac, sta, false /*asynchronous */,
|
||||
pe_session);
|
||||
lim_delete_dph_hash_entry(mac, pStaDs->staAddr, aid,
|
||||
lim_delete_dph_hash_entry(mac, sta->staAddr, aid,
|
||||
pe_session);
|
||||
}
|
||||
|
||||
pStaDs = dph_add_hash_entry(mac, pAddStaReq->peermac.bytes,
|
||||
sta = dph_add_hash_entry(mac, pAddStaReq->peermac.bytes,
|
||||
aid, &pe_session->dph.dphHashTable);
|
||||
|
||||
if (NULL == pStaDs) {
|
||||
if (NULL == sta) {
|
||||
pe_err("add hash entry failed");
|
||||
QDF_ASSERT(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
lim_tdls_update_hash_node_info(mac, pStaDs, pAddStaReq, pe_session);
|
||||
lim_tdls_update_hash_node_info(mac, sta, pAddStaReq, pe_session);
|
||||
|
||||
pStaDs->staType = STA_ENTRY_TDLS_PEER;
|
||||
sta->staType = STA_ENTRY_TDLS_PEER;
|
||||
|
||||
status =
|
||||
lim_add_sta(mac, pStaDs,
|
||||
lim_add_sta(mac, sta,
|
||||
(pAddStaReq->tdlsAddOper ==
|
||||
TDLS_OPER_UPDATE) ? true : false, pe_session);
|
||||
|
||||
@@ -2627,21 +2627,21 @@ static QDF_STATUS lim_tdls_del_sta(struct mac_context *mac,
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
uint16_t peerIdx = 0;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
|
||||
pStaDs = dph_lookup_hash_entry(mac, peerMac.bytes, &peerIdx,
|
||||
sta = dph_lookup_hash_entry(mac, peerMac.bytes, &peerIdx,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
||||
if (pStaDs) {
|
||||
if (sta) {
|
||||
pe_debug("DEL STA peer MAC: "MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(pStaDs->staAddr));
|
||||
MAC_ADDR_ARRAY(sta->staAddr));
|
||||
|
||||
pe_debug("STA type: %x, sta idx: %x resp_reqd: %d",
|
||||
pStaDs->staType,
|
||||
pStaDs->staIndex,
|
||||
sta->staType,
|
||||
sta->staIndex,
|
||||
resp_reqd);
|
||||
|
||||
status = lim_del_sta(mac, pStaDs, resp_reqd, pe_session);
|
||||
status = lim_del_sta(mac, sta, resp_reqd, pe_session);
|
||||
} else {
|
||||
pe_debug("DEL STA peer MAC: "MAC_ADDRESS_STR" not found",
|
||||
MAC_ADDR_ARRAY(peerMac.bytes));
|
||||
@@ -2657,7 +2657,7 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(struct mac_context *mac,
|
||||
uint8_t sessionId,
|
||||
tSirMacAddr peerMac,
|
||||
uint8_t updateSta,
|
||||
tDphHashNode *pStaDs, uint8_t status)
|
||||
tDphHashNode *sta, uint8_t status)
|
||||
{
|
||||
struct scheduler_msg msg = { 0 };
|
||||
struct tdls_add_sta_rsp *add_sta_rsp;
|
||||
@@ -2671,8 +2671,8 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(struct mac_context *mac,
|
||||
|
||||
add_sta_rsp->session_id = sessionId;
|
||||
add_sta_rsp->status_code = status;
|
||||
if (pStaDs) {
|
||||
add_sta_rsp->sta_id = pStaDs->staIndex;
|
||||
if (sta) {
|
||||
add_sta_rsp->sta_id = sta->staIndex;
|
||||
}
|
||||
if (peerMac) {
|
||||
qdf_mem_copy(add_sta_rsp->peermac.bytes,
|
||||
@@ -2706,7 +2706,7 @@ QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg,
|
||||
{
|
||||
tAddStaParams *pAddStaParams = (tAddStaParams *) msg;
|
||||
uint8_t status = QDF_STATUS_SUCCESS;
|
||||
tDphHashNode *pStaDs = NULL;
|
||||
tDphHashNode *sta = NULL;
|
||||
uint16_t aid = 0;
|
||||
|
||||
SET_LIM_PROCESS_DEFD_MESGS(mac, true);
|
||||
@@ -2721,22 +2721,22 @@ QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg,
|
||||
goto add_sta_error;
|
||||
}
|
||||
|
||||
pStaDs = dph_lookup_hash_entry(mac, pAddStaParams->staMac, &aid,
|
||||
sta = dph_lookup_hash_entry(mac, pAddStaParams->staMac, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (NULL == pStaDs) {
|
||||
pe_err("pStaDs is NULL ");
|
||||
if (NULL == sta) {
|
||||
pe_err("sta is NULL ");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto add_sta_error;
|
||||
}
|
||||
|
||||
pStaDs->bssId = pAddStaParams->bssIdx;
|
||||
pStaDs->staIndex = pAddStaParams->staIdx;
|
||||
pStaDs->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
|
||||
pStaDs->valid = 1;
|
||||
sta->bssId = pAddStaParams->bssIdx;
|
||||
sta->staIndex = pAddStaParams->staIdx;
|
||||
sta->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
|
||||
sta->valid = 1;
|
||||
add_sta_error:
|
||||
status = lim_send_sme_tdls_add_sta_rsp(mac, pe_session->smeSessionId,
|
||||
pAddStaParams->staMac,
|
||||
pAddStaParams->updateSta, pStaDs,
|
||||
pAddStaParams->updateSta, sta,
|
||||
status);
|
||||
qdf_mem_free(pAddStaParams);
|
||||
return status;
|
||||
@@ -2929,7 +2929,7 @@ lim_tdls_send_mgmt_error:
|
||||
static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(struct mac_context *mac,
|
||||
uint8_t sessionId,
|
||||
struct qdf_mac_addr peerMac,
|
||||
tDphHashNode *pStaDs, uint8_t status)
|
||||
tDphHashNode *sta, uint8_t status)
|
||||
{
|
||||
struct scheduler_msg msg = { 0 };
|
||||
struct tdls_del_sta_rsp *del_sta_rsp;
|
||||
@@ -2943,8 +2943,8 @@ static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(struct mac_context *mac,
|
||||
|
||||
del_sta_rsp->session_id = sessionId;
|
||||
del_sta_rsp->status_code = status;
|
||||
if (pStaDs) {
|
||||
del_sta_rsp->sta_id = pStaDs->staIndex;
|
||||
if (sta) {
|
||||
del_sta_rsp->sta_id = sta->staIndex;
|
||||
} else
|
||||
del_sta_rsp->sta_id = STA_INVALID_IDX;
|
||||
|
||||
|
@@ -92,7 +92,7 @@ void lim_update_re_assoc_globals(struct mac_context *mac, tpSirAssocRsp pAssocRs
|
||||
/**
|
||||
* @lim_handle_del_bss_in_re_assoc_context() - DEL BSS during reassociation
|
||||
* @mac: Global MAC Context
|
||||
* @pStaDs: Station Hash entry
|
||||
* @sta: Station Hash entry
|
||||
* @pe_session: PE Session
|
||||
*
|
||||
* While Processing the ReAssociation Response Frame in STA,
|
||||
@@ -107,7 +107,7 @@ void lim_update_re_assoc_globals(struct mac_context *mac, tpSirAssocRsp pAssocRs
|
||||
* Return: None
|
||||
*/
|
||||
void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session)
|
||||
tpDphHashNode sta, struct pe_session *pe_session)
|
||||
{
|
||||
tLimMlmReassocCnf mlmReassocCnf;
|
||||
tpSirBssDescription bss_desc;
|
||||
@@ -122,7 +122,7 @@ void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
case eLIM_SME_WT_REASSOC_STATE:
|
||||
{
|
||||
tpSirAssocRsp assocRsp;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
QDF_STATUS retStatus = QDF_STATUS_SUCCESS;
|
||||
tpSchBeaconStruct beacon_struct;
|
||||
|
||||
@@ -143,11 +143,11 @@ void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
* Add an entry for AP to hash table
|
||||
* maintained by DPH module
|
||||
*/
|
||||
pStaDs = dph_add_hash_entry(mac,
|
||||
sta = dph_add_hash_entry(mac,
|
||||
pe_session->limReAssocbssId,
|
||||
DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
/* Could not add hash table entry */
|
||||
pe_err("could not add hash entry at DPH for");
|
||||
lim_print_mac_addr(mac,
|
||||
@@ -164,7 +164,7 @@ void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
*/
|
||||
assocRsp =
|
||||
(tpSirAssocRsp) pe_session->limAssocResponseData;
|
||||
lim_update_assoc_sta_datas(mac, pStaDs, assocRsp,
|
||||
lim_update_assoc_sta_datas(mac, sta, assocRsp,
|
||||
pe_session);
|
||||
lim_update_re_assoc_globals(mac, assocRsp, pe_session);
|
||||
bss_desc = &pe_session->pLimReAssocReq->bssDescription;
|
||||
@@ -225,7 +225,7 @@ error:
|
||||
/**
|
||||
* @lim_handle_add_bss_in_re_assoc_context() - ADD BSS during reassociation
|
||||
* @mac: Global MAC Context
|
||||
* @pStaDs: Station Hash entry
|
||||
* @sta: Station Hash entry
|
||||
* @pe_session: PE Session
|
||||
*
|
||||
* While Processing the ReAssociation Response Frame in STA,
|
||||
@@ -240,7 +240,7 @@ error:
|
||||
* Return: None
|
||||
*/
|
||||
void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs, struct pe_session *pe_session)
|
||||
tpDphHashNode sta, struct pe_session *pe_session)
|
||||
{
|
||||
tLimMlmReassocCnf mlmReassocCnf;
|
||||
/** Skipped the DeleteDPH Hash Entry as we need it for the new BSS*/
|
||||
@@ -252,7 +252,7 @@ void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
switch (pe_session->limSmeState) {
|
||||
case eLIM_SME_WT_REASSOC_STATE: {
|
||||
tpSirAssocRsp assocRsp;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
QDF_STATUS retStatus = QDF_STATUS_SUCCESS;
|
||||
tSchBeaconStruct *pBeaconStruct;
|
||||
|
||||
@@ -266,10 +266,10 @@ void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
goto Error;
|
||||
}
|
||||
/* Get the AP entry from DPH hash table */
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_get_hash_entry(mac, DPH_STA_HASH_INDEX_PEER,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs == NULL) {
|
||||
if (sta == NULL) {
|
||||
pe_err("Fail to get STA PEER entry from hash");
|
||||
mlmReassocCnf.resultCode =
|
||||
eSIR_SME_RESOURCES_UNAVAILABLE;
|
||||
@@ -283,7 +283,7 @@ void lim_handle_add_bss_in_re_assoc_context(struct mac_context *mac,
|
||||
*/
|
||||
assocRsp =
|
||||
(tpSirAssocRsp) pe_session->limAssocResponseData;
|
||||
lim_update_assoc_sta_datas(mac, pStaDs, assocRsp,
|
||||
lim_update_assoc_sta_datas(mac, sta, assocRsp,
|
||||
pe_session);
|
||||
lim_update_re_assoc_globals(mac, assocRsp, pe_session);
|
||||
lim_extract_ap_capabilities(mac,
|
||||
|
@@ -2989,7 +2989,7 @@ lim_send_deauth_mgmt_frame(struct mac_context *mac,
|
||||
uint32_t val = 0;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
uint16_t aid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
#endif
|
||||
uint8_t smeSessionId = 0;
|
||||
|
||||
@@ -3075,7 +3075,7 @@ lim_send_deauth_mgmt_frame(struct mac_context *mac,
|
||||
|
||||
txFlag |= HAL_USE_PEER_STA_REQUESTED_MASK;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, peer, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
#endif
|
||||
@@ -3130,8 +3130,8 @@ lim_send_deauth_mgmt_frame(struct mac_context *mac,
|
||||
pe_session->peSessionId,
|
||||
pMacHdr->fc.subType));
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
if ((NULL != pStaDs)
|
||||
&& (STA_ENTRY_TDLS_PEER == pStaDs->staType)) {
|
||||
if ((NULL != sta)
|
||||
&& (STA_ENTRY_TDLS_PEER == sta->staType)) {
|
||||
/* Queue Disassociation frame in high priority WQ */
|
||||
lim_diag_mgmt_tx_event_report(mac, pMacHdr,
|
||||
pe_session,
|
||||
|
@@ -904,12 +904,12 @@ error:
|
||||
reason code.
|
||||
|
||||
\param mac - global mac structure
|
||||
\param pStaDs - station dph hash node
|
||||
\param sta - station dph hash node
|
||||
\return none
|
||||
\sa
|
||||
----------------------------------------------------------------- */
|
||||
void
|
||||
lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
@@ -925,15 +925,15 @@ lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
pSirSmeDisassocInd->sessionId = pe_session->smeSessionId;
|
||||
pSirSmeDisassocInd->transactionId = pe_session->transactionId;
|
||||
pSirSmeDisassocInd->statusCode = eSIR_SME_DEAUTH_STATUS;
|
||||
pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
|
||||
pSirSmeDisassocInd->reasonCode = sta->mlmStaContext.disassocReason;
|
||||
|
||||
qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes, pe_session->bssId,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
|
||||
qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, pStaDs->staAddr,
|
||||
qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, sta->staAddr,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
|
||||
pSirSmeDisassocInd->staId = pStaDs->staIndex;
|
||||
pSirSmeDisassocInd->staId = sta->staIndex;
|
||||
|
||||
mmhMsg.type = eWNI_SME_DISASSOC_IND;
|
||||
mmhMsg.bodyptr = pSirSmeDisassocInd;
|
||||
@@ -943,7 +943,7 @@ lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
pe_session->peSessionId, mmhMsg.type));
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
lim_diag_event_report(mac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, pe_session,
|
||||
0, (uint16_t) pStaDs->mlmStaContext.disassocReason);
|
||||
0, (uint16_t) sta->mlmStaContext.disassocReason);
|
||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
@@ -958,12 +958,12 @@ lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
reason code.
|
||||
|
||||
\param mac - global mac structure
|
||||
\param pStaDs - station dph hash node
|
||||
\param sta - station dph hash node
|
||||
\return none
|
||||
\sa
|
||||
----------------------------------------------------------------- */
|
||||
void
|
||||
lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
@@ -980,24 +980,24 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
pSirSmeDeauthInd->transactionId = pe_session->transactionId;
|
||||
if (eSIR_INFRA_AP_MODE == pe_session->bssType) {
|
||||
pSirSmeDeauthInd->statusCode =
|
||||
(tSirResultCodes) pStaDs->mlmStaContext.cleanupTrigger;
|
||||
(tSirResultCodes) sta->mlmStaContext.cleanupTrigger;
|
||||
} else {
|
||||
/* Need to indicatet he reascon code over the air */
|
||||
pSirSmeDeauthInd->statusCode =
|
||||
(tSirResultCodes) pStaDs->mlmStaContext.disassocReason;
|
||||
(tSirResultCodes) sta->mlmStaContext.disassocReason;
|
||||
}
|
||||
/* BSSID */
|
||||
qdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, pe_session->bssId,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
/* peerMacAddr */
|
||||
qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, pStaDs->staAddr,
|
||||
qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, sta->staAddr,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
|
||||
pSirSmeDeauthInd->reasonCode = sta->mlmStaContext.disassocReason;
|
||||
|
||||
pSirSmeDeauthInd->staId = pStaDs->staIndex;
|
||||
pSirSmeDeauthInd->staId = sta->staIndex;
|
||||
if (eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON ==
|
||||
pStaDs->mlmStaContext.disassocReason)
|
||||
pSirSmeDeauthInd->rssi = pStaDs->del_sta_ctx_rssi;
|
||||
sta->mlmStaContext.disassocReason)
|
||||
pSirSmeDeauthInd->rssi = sta->del_sta_ctx_rssi;
|
||||
|
||||
mmhMsg.type = eWNI_SME_DEAUTH_IND;
|
||||
mmhMsg.bodyptr = pSirSmeDeauthInd;
|
||||
@@ -1006,7 +1006,7 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
MTRACE(mac_trace_msg_tx(mac, pe_session->peSessionId, mmhMsg.type));
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
lim_diag_event_report(mac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, pe_session,
|
||||
0, pStaDs->mlmStaContext.cleanupTrigger);
|
||||
0, sta->mlmStaContext.cleanupTrigger);
|
||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
@@ -1028,21 +1028,21 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
* NA
|
||||
*
|
||||
* @param mac - Pointer to global MAC structure
|
||||
* @param pStaDs - Pointer to internal STA Datastructure
|
||||
* @param sta - Pointer to internal STA Datastructure
|
||||
* @param pe_session - Pointer to the session entry
|
||||
* @param reasonCode - Reason for TDLS sta deletion
|
||||
* @return None
|
||||
*/
|
||||
void
|
||||
lim_send_sme_tdls_del_sta_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
lim_send_sme_tdls_del_sta_ind(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session, uint16_t reasonCode)
|
||||
{
|
||||
struct tdls_event_info info;
|
||||
|
||||
pe_debug("Delete TDLS Peer "MAC_ADDRESS_STR "with reason code: %d",
|
||||
MAC_ADDR_ARRAY(pStaDs->staAddr), reasonCode);
|
||||
MAC_ADDR_ARRAY(sta->staAddr), reasonCode);
|
||||
info.vdev_id = pe_session->smeSessionId;
|
||||
qdf_mem_copy(info.peermac.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE);
|
||||
qdf_mem_copy(info.peermac.bytes, sta->staAddr, QDF_MAC_ADDR_SIZE);
|
||||
info.message_type = TDLS_PEER_DISCONNECTED;
|
||||
info.peer_reason = TDLS_DISCONNECTED_PEER_DELETE;
|
||||
|
||||
|
@@ -394,7 +394,7 @@ QDF_STATUS lim_process_auth_frame_no_session(struct mac_context *mac, uint8_t *,
|
||||
void *body);
|
||||
|
||||
void lim_process_assoc_req_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *);
|
||||
void lim_send_mlm_assoc_ind(struct mac_context *mac, tpDphHashNode pStaDs,
|
||||
void lim_send_mlm_assoc_ind(struct mac_context *mac, tpDphHashNode sta,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
void lim_process_assoc_rsp_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *);
|
||||
|
@@ -1196,7 +1196,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
uint16_t tmpAid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
enum band_info rfBand = BAND_UNKNOWN;
|
||||
uint32_t phyMode;
|
||||
tLimProtStaCacheType protStaCacheType =
|
||||
@@ -1205,11 +1205,11 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
|
||||
pBeaconParams->paramChangeBitmap = 0;
|
||||
/* check whether to enable protection or not */
|
||||
pStaDs =
|
||||
sta =
|
||||
dph_lookup_hash_entry(mac, peerMacAddr, &tmpAid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (NULL == pStaDs) {
|
||||
pe_err("pStaDs is NULL");
|
||||
if (NULL == sta) {
|
||||
pe_err("sta is NULL");
|
||||
return;
|
||||
}
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
@@ -1220,7 +1220,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
if (true == pe_session->htCapability) {
|
||||
/* we are 11N and 11A station is joining. */
|
||||
/* protection from 11A required. */
|
||||
if (false == pStaDs->mlmStaContext.htCapability) {
|
||||
if (false == sta->mlmStaContext.htCapability) {
|
||||
lim_update_11a_protection(mac, true, false,
|
||||
pBeaconParams,
|
||||
pe_session);
|
||||
@@ -1234,7 +1234,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
if ((phyMode == WNI_CFG_PHY_MODE_11G) &&
|
||||
(false == pe_session->htCapability)) {
|
||||
|
||||
if (pStaDs->erpEnabled == eHAL_CLEAR) {
|
||||
if (sta->erpEnabled == eHAL_CLEAR) {
|
||||
protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_llB;
|
||||
/* enable protection */
|
||||
pe_debug("Enabling protection from 11B");
|
||||
@@ -1246,8 +1246,8 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
/* HT station. */
|
||||
if (true == pe_session->htCapability) {
|
||||
/* check if we need protection from 11b station */
|
||||
if ((pStaDs->erpEnabled == eHAL_CLEAR) &&
|
||||
(!pStaDs->mlmStaContext.htCapability)) {
|
||||
if ((sta->erpEnabled == eHAL_CLEAR) &&
|
||||
(!sta->mlmStaContext.htCapability)) {
|
||||
protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_llB;
|
||||
/* enable protection */
|
||||
pe_debug("Enabling protection from 11B");
|
||||
@@ -1256,7 +1256,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
pe_session);
|
||||
}
|
||||
/* station being joined is non-11b and non-ht ==> 11g device */
|
||||
else if (!pStaDs->mlmStaContext.htCapability) {
|
||||
else if (!sta->mlmStaContext.htCapability) {
|
||||
protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_llG;
|
||||
/* enable protection */
|
||||
lim_enable_ht_protection_from11g(mac, true, false,
|
||||
@@ -1270,8 +1270,8 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
}
|
||||
/* we are HT and HT station is joining. This code is common for both the bands. */
|
||||
if ((true == pe_session->htCapability) &&
|
||||
(true == pStaDs->mlmStaContext.htCapability)) {
|
||||
if (!pStaDs->htGreenfield) {
|
||||
(true == sta->mlmStaContext.htCapability)) {
|
||||
if (!sta->htGreenfield) {
|
||||
lim_enable_ht_non_gf_protection(mac, true, false,
|
||||
pBeaconParams,
|
||||
pe_session);
|
||||
@@ -1279,7 +1279,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
}
|
||||
/* Station joining is HT 20Mhz */
|
||||
if ((eHT_CHANNEL_WIDTH_20MHZ ==
|
||||
pStaDs->htSupportedChannelWidthSet) &&
|
||||
sta->htSupportedChannelWidthSet) &&
|
||||
(eHT_CHANNEL_WIDTH_20MHZ !=
|
||||
pe_session->htSupportedChannelWidthSet)){
|
||||
protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_HT20;
|
||||
@@ -1287,7 +1287,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
pBeaconParams, pe_session);
|
||||
}
|
||||
/* Station joining does not support LSIG TXOP Protection */
|
||||
if (!pStaDs->htLsigTXOPProtection) {
|
||||
if (!sta->htLsigTXOPProtection) {
|
||||
lim_enable_ht_lsig_txop_protection(mac, false, false,
|
||||
pBeaconParams,
|
||||
pe_session);
|
||||
@@ -5492,13 +5492,13 @@ lim_set_protected_bit(struct mac_context *mac,
|
||||
tSirMacAddr peer, tpSirMacMgmtHdr pMacHdr)
|
||||
{
|
||||
uint16_t aid;
|
||||
tpDphHashNode pStaDs;
|
||||
tpDphHashNode sta;
|
||||
|
||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
||||
|
||||
pStaDs = dph_lookup_hash_entry(mac, peer, &aid,
|
||||
sta = dph_lookup_hash_entry(mac, peer, &aid,
|
||||
&pe_session->dph.dphHashTable);
|
||||
if (pStaDs != NULL) {
|
||||
if (sta != NULL) {
|
||||
/* rmfenabled will be set at the time of addbss.
|
||||
* but sometimes EAP auth fails and keys are not
|
||||
* installed then if we send any management frame
|
||||
@@ -5506,7 +5506,7 @@ lim_set_protected_bit(struct mac_context *mac,
|
||||
* firmware crashes. so check for keys are
|
||||
* installed or not also before setting the bit
|
||||
*/
|
||||
if (pStaDs->rmfEnabled && pStaDs->is_key_installed)
|
||||
if (sta->rmfEnabled && sta->is_key_installed)
|
||||
pMacHdr->fc.wep = 1;
|
||||
}
|
||||
} else if (pe_session->limRmfEnabled &&
|
||||
|
@@ -203,7 +203,7 @@ void lim_release_peer_idx(struct mac_context *, uint16_t, struct pe_session *);
|
||||
void lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
tpUpdateBeaconParams pBeaconParams, struct pe_session *);
|
||||
void lim_decide_ap_protection_on_delete(struct mac_context *mac,
|
||||
tpDphHashNode pStaDs,
|
||||
tpDphHashNode sta,
|
||||
tpUpdateBeaconParams pBeaconParams,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
@@ -383,11 +383,11 @@ lim_get_mgmt_staid(struct mac_context *mac, uint16_t *staid,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline int lim_select_cb_mode(tDphHashNode *pStaDs,
|
||||
static inline int lim_select_cb_mode(tDphHashNode *sta,
|
||||
struct pe_session *pe_session, uint8_t channel,
|
||||
uint8_t chan_bw)
|
||||
{
|
||||
if (pStaDs->mlmStaContext.vhtCapability && chan_bw) {
|
||||
if (sta->mlmStaContext.vhtCapability && chan_bw) {
|
||||
if (channel == 36 || channel == 52 || channel == 100 ||
|
||||
channel == 116 || channel == 149) {
|
||||
return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW - 1;
|
||||
@@ -403,7 +403,7 @@ static inline int lim_select_cb_mode(tDphHashNode *pStaDs,
|
||||
} else if (channel == 165) {
|
||||
return PHY_SINGLE_CHANNEL_CENTERED;
|
||||
}
|
||||
} else if (pStaDs->mlmStaContext.htCapability) {
|
||||
} else if (sta->mlmStaContext.htCapability) {
|
||||
if (channel == 40 || channel == 48 || channel == 56 ||
|
||||
channel == 64 || channel == 104 || channel == 112 ||
|
||||
channel == 120 || channel == 128 || channel == 136 ||
|
||||
|
@@ -342,7 +342,7 @@ sch_bcn_process_sta(struct mac_context *mac_ctx,
|
||||
uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh)
|
||||
{
|
||||
uint32_t bi;
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
QDF_STATUS status;
|
||||
|
||||
/*
|
||||
@@ -431,7 +431,7 @@ sch_bcn_process_sta(struct mac_context *mac_ctx,
|
||||
}
|
||||
lim_update_short_slot(mac_ctx, bcn, beaconParams, session);
|
||||
|
||||
pStaDs = dph_get_hash_entry(mac_ctx, DPH_STA_HASH_INDEX_PEER,
|
||||
sta = dph_get_hash_entry(mac_ctx, DPH_STA_HASH_INDEX_PEER,
|
||||
&session->dph.dphHashTable);
|
||||
if ((bcn->wmeEdcaPresent && session->limWmeEnabled) ||
|
||||
(bcn->edcaPresent && session->limQosEnabled)) {
|
||||
@@ -442,13 +442,13 @@ sch_bcn_process_sta(struct mac_context *mac_ctx,
|
||||
session);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
pe_err("EDCA parameter processing error");
|
||||
} else if (pStaDs != NULL) {
|
||||
} else if (sta != NULL) {
|
||||
/* If needed, downgrade the EDCA parameters */
|
||||
lim_set_active_edca_params(mac_ctx,
|
||||
session->gLimEdcaParams, session);
|
||||
lim_send_edca_params(mac_ctx,
|
||||
session->gLimEdcaParamsActive,
|
||||
pStaDs->bssId, false);
|
||||
sta->bssId, false);
|
||||
} else {
|
||||
pe_err("Self Entry missing in Hash Table");
|
||||
}
|
||||
@@ -720,7 +720,7 @@ sch_bcn_process_sta_ibss(struct mac_context *mac_ctx,
|
||||
tUpdateBeaconParams *beaconParams,
|
||||
uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh)
|
||||
{
|
||||
tpDphHashNode pStaDs = NULL;
|
||||
tpDphHashNode sta = NULL;
|
||||
uint16_t aid;
|
||||
uint8_t cb_mode;
|
||||
|
||||
@@ -733,14 +733,14 @@ sch_bcn_process_sta_ibss(struct mac_context *mac_ctx,
|
||||
} else
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
|
||||
/* check for VHT capability */
|
||||
pStaDs = dph_lookup_hash_entry(mac_ctx, pMh->sa, &aid,
|
||||
sta = dph_lookup_hash_entry(mac_ctx, pMh->sa, &aid,
|
||||
&session->dph.dphHashTable);
|
||||
if ((NULL == pStaDs) || ((NULL != pStaDs) &&
|
||||
(STA_INVALID_IDX == pStaDs->staIndex)))
|
||||
if ((NULL == sta) || ((NULL != sta) &&
|
||||
(STA_INVALID_IDX == sta->staIndex)))
|
||||
return;
|
||||
sch_bcn_update_opmode_change(mac_ctx, pStaDs, session, bcn, pMh,
|
||||
sch_bcn_update_opmode_change(mac_ctx, sta, session, bcn, pMh,
|
||||
cb_mode);
|
||||
sch_bcn_update_he_ies(mac_ctx, pStaDs, session, bcn, pMh);
|
||||
sch_bcn_update_he_ies(mac_ctx, sta, session, bcn, pMh);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user