qcacld-3.0: Process assoc indication in sme callback

In a noisy enviornment assoc indication in SME queueu
is not getting processed due to multiple beacons/probes
getting processed in PE queue which is high priority
than SME queue.

Instead of posting a message to SME queue, assoc indication
will run to completion using sme callback mechanism.

Change-Id: I4dc7e3ef0c91964ebc842afa38b7815464e0e406
CRs-Fixed: 2114425
Цей коміт міститься в:
Sandeep Puligilla
2017-04-12 18:22:06 -07:00
джерело 7b797a73b2
коміт 1426d619f3
7 змінених файлів з 45 додано та 10 видалено

Переглянути файл

@@ -837,6 +837,8 @@ typedef struct sAniSirLim {
QDF_STATUS(*add_bssdescr_callback)
(tpAniSirGlobal pMac, tpSirBssDescription buf,
uint32_t scan_id, uint32_t flags);
QDF_STATUS(*sme_msg_callback)
(tHalHandle hal, struct scheduler_msg *msg);
uint8_t retry_packet_cnt;
uint8_t scan_disabled;
uint8_t beacon_probe_rsp_cnt_per_scan;

Переглянути файл

@@ -470,6 +470,7 @@ typedef struct sSirSmeReadyReq {
void *add_bssdescr_cb;
void *csr_roam_synch_cb;
void *pe_roam_synch_cb;
void *sme_msg_cb;
} tSirSmeReadyReq, *tpSirSmeReadyReq;
/**

Переглянути файл

@@ -790,7 +790,7 @@ lim_fill_assoc_ind_params(tpAniSirGlobal mac_ctx,
void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
{
uint32_t len;
struct scheduler_msg msgQ = {0};
struct scheduler_msg msg = {0};
tSirSmeAssocInd *pSirSmeAssocInd;
tpDphHashNode pStaDs = 0;
tpPESession psessionEntry;
@@ -814,11 +814,12 @@ void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
}
pSirSmeAssocInd->messageType = eWNI_SME_ASSOC_IND;
lim_fill_assoc_ind_params(pMac, (tpLimMlmAssocInd) pMsgBuf, pSirSmeAssocInd,
lim_fill_assoc_ind_params(pMac, (tpLimMlmAssocInd) pMsgBuf,
pSirSmeAssocInd,
psessionEntry);
msgQ.type = eWNI_SME_ASSOC_IND;
msgQ.bodyptr = pSirSmeAssocInd;
msgQ.bodyval = 0;
msg.type = eWNI_SME_ASSOC_IND;
msg.bodyptr = pSirSmeAssocInd;
msg.bodyval = 0;
pStaDs = dph_get_hash_entry(pMac,
((tpLimMlmAssocInd) pMsgBuf)->aid,
&psessionEntry->dph.dphHashTable);
@@ -833,13 +834,11 @@ void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
pSirSmeAssocInd->timingMeasCap = pStaDs->timingMeasCap;
MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
psessionEntry->peSessionId, msgQ.type));
psessionEntry->peSessionId, msg.type));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
lim_diag_event_report(pMac, WLAN_PE_DIAG_ASSOC_IND_EVENT, psessionEntry, 0,
0);
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT);
pe_debug("Create CNF_WAIT_TIMER after received LIM_MLM_ASSOC_IND");
/*
** turn on a timer to detect the loss of ASSOC CNF
@@ -848,6 +847,7 @@ void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
(uint16_t) ((tpLimMlmAssocInd) pMsgBuf)->aid,
psessionEntry);
pMac->lim.sme_msg_callback(pMac, &msg);
} /*** end lim_process_mlm_assoc_ind() ***/
/**

Переглянути файл

@@ -554,6 +554,7 @@ static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal pMac, uint32_t *pMsgB
pe_register_mgmt_rx_frm_callback(pMac);
pe_register_callbacks_with_wma(pMac, ready_req);
pMac->lim.add_bssdescr_callback = ready_req->add_bssdescr_cb;
pMac->lim.sme_msg_callback = ready_req->sme_msg_cb;
}
pe_debug("sending WMA_SYS_READY_IND msg to HAL");

Переглянути файл

@@ -1682,7 +1682,6 @@ QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
*/
void sme_set_5g_band_pref(tHalHandle hal_handle,
struct sme_5g_band_pref_params *pref_params);
/**
* sme_get_chain_rssi() - Get chain rssi
* @hal: Global HAL handle
@@ -1731,4 +1730,16 @@ tpAniSirGlobal sme_get_mac_context(void);
* Return: None
*/
void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id);
/**
* sme_process_msg_callback() - process callback message from LIM
* @hal: global hal handle
* @msg: scheduler message
*
* This function process the callback messages from LIM.
*
* Return: QDF_STATUS enumeration.
*/
QDF_STATUS sme_process_msg_callback(tHalHandle hal,
struct scheduler_msg *msg);
#endif /* #if !defined( __SME_API_H ) */

Переглянути файл

@@ -1261,6 +1261,7 @@ QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal)
msg->length = sizeof(*msg);
msg->add_bssdescr_cb = csr_scan_process_single_bssdescr;
msg->csr_roam_synch_cb = csr_roam_synch_callback;
msg->sme_msg_cb = sme_process_msg_callback;
if (eSIR_FAILURE != u_mac_post_ctrl_msg(hHal, (tSirMbMsg *) msg)) {
status = QDF_STATUS_SUCCESS;
@@ -16631,6 +16632,19 @@ QDF_STATUS sme_get_chain_rssi(tHalHandle hal,
return status;
}
QDF_STATUS sme_process_msg_callback(tHalHandle hal,
struct scheduler_msg *msg)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
if (msg == NULL) {
sme_err("Empty message for SME Msg callback");
return status;
}
status = sme_process_msg(hal, msg);
return status;
}
void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id)
{
struct csr_roam_session *session;

Переглянути файл

@@ -15676,6 +15676,7 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tSirSmeAssocCnf *pMsg;
struct scheduler_msg msg = { 0 };
sme_debug("Posting eWNI_SME_ASSOC_CNF to LIM.HalStatus: %d", Halstatus);
do {
@@ -15701,8 +15702,13 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd
QDF_MAC_ADDR_SIZE);
/* alternateChannelId */
pMsg->alternateChannelId = 11;
msg.type = pMsg->messageType;
msg.bodyval = 0;
msg.bodyptr = pMsg;
/* pMsg is freed by umac_send_mb_message_to_mac in anycase*/
status = umac_send_mb_message_to_mac(pMsg);
status = scheduler_post_msg_by_priority(QDF_MODULE_ID_PE, &msg,
true);
} while (0);
return status;
}