qcacld-3.0: Refactor mlme code to integrate SAP start fail and restart

Divide and refactor mlme functions to integrate vdev state
machine for SAP restart and start fail.

Change-Id: I824df69e126d4647a156bc10570689f6b0822b06
CRs-Fixed: 2309284
This commit is contained in:
Abhishek Singh 2018-08-30 18:04:29 +05:30 • committed by nshrivas
commit 1df508847a
6 changed files with 26 additions and 13 deletions

View file

@ -693,8 +693,7 @@ end:
* WMA_ADD_BSS_RSP from HAL
*/
if (eSIR_SME_SUCCESS != mlm_start_cnf.resultCode)
lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
(uint32_t *) &mlm_start_cnf);
lim_send_start_bss_confirm(mac_ctx, &mlm_start_cnf);
}
/**

View file

@ -2155,7 +2155,8 @@ static void lim_process_ap_mlm_add_bss_rsp(tpAniSirGlobal pMac,
pAddBssParams->status);
mlmStartCnf.resultCode = eSIR_SME_HAL_SEND_MESSAGE_FAIL;
}
lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf);
lim_send_start_bss_confirm(pMac, &mlmStartCnf);
end:
if (0 != limMsgQ->bodyptr) {
qdf_mem_free(pAddBssParams);
@ -2255,7 +2256,7 @@ lim_process_ibss_mlm_add_bss_rsp(tpAniSirGlobal pMac,
/* If ADD_BSS is done as part of coalescing, this won't happen. */
/* Update PE session Id */
mlmStartCnf.sessionId = psessionEntry->peSessionId;
lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf);
lim_send_start_bss_confirm(pMac, &mlmStartCnf);
end:
if (0 != limMsgQ->bodyptr) {
qdf_mem_free(pAddBssParams);
@ -2626,8 +2627,8 @@ void lim_process_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx,
qdf_mem_free(add_bss_param);
msg->bodyptr = NULL;
}
lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
(uint32_t *) &mlm_start_cnf);
lim_send_start_bss_confirm(mac_ctx, &mlm_start_cnf);
} else
lim_process_ap_mlm_add_bss_rsp(mac_ctx, msg);
} else {

View file

@ -8424,3 +8424,10 @@ void lim_process_ap_ecsa_timeout(void *data)
}
}
void lim_send_start_bss_confirm(tpAniSirGlobal mac_ctx,
tLimMlmStartCnf *start_cnf)
{
lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
(uint32_t *)start_cnf);
}

View file

@ -1376,6 +1376,15 @@ void lim_delete_all_peers(tpPESession session);
*/
void lim_send_vdev_stop(tpPESession session);
/**
* lim_send_start_bss_confirm() -send start bss confirm req
* @mac_ctx: pointer to global mac structure
* @start_cnf: start confirm structure pointer
*
* Return None
*/
void lim_send_start_bss_confirm(tpAniSirGlobal mac_ctx,
tLimMlmStartCnf *start_cnf);
/**
* lim_send_chan_switch_action_frame()- Send an action frame

View file

@ -380,8 +380,7 @@ void lim_process_ndi_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx,
mlm_start_cnf.resultCode = eSIR_SME_HAL_SEND_MESSAGE_FAIL;
}
mlm_start_cnf.sessionId = session_entry->peSessionId;
lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
(uint32_t *) &mlm_start_cnf);
lim_send_start_bss_confirm(mac_ctx, &mlm_start_cnf);
end:
qdf_mem_free(lim_msgq->bodyptr);
lim_msgq->bodyptr = NULL;

View file

@ -1157,17 +1157,15 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
}
qdf_mc_timer_stop(&req_msg->event_timeout);
if ((qdf_atomic_read(
&wma->interfaces[resp_event->vdev_id].vdev_restart_params.
hidden_ssid_restart_in_progress)) &&
if ((qdf_atomic_read(&iface->vdev_restart_params.
hidden_ssid_restart_in_progress)) &&
wma_is_vdev_in_ap_mode(wma, resp_event->vdev_id) &&
(req_msg->msg_type == WMA_HIDDEN_SSID_VDEV_RESTART)) {
tpHalHiddenSsidVdevRestart hidden_ssid_restart =
(tpHalHiddenSsidVdevRestart)req_msg->user_data;
WMA_LOGE("%s: vdev restart event recevied for hidden ssid set using IOCTL",
__func__);
qdf_atomic_set(&wma->interfaces[resp_event->vdev_id].
vdev_restart_params.
qdf_atomic_set(&iface->vdev_restart_params.
hidden_ssid_restart_in_progress, 0);
wma_send_msg(wma, WMA_HIDDEN_SSID_RESTART_RSP,