qcacld-3.0: Fix Race condition btw RSO stop and VDEV_SET_PARAM cmd to FW
Currently, RSO STOP is going through CSR to WMA via LIM but VDEV_SET_PARAM is going directly CSR to WMA. This results VDEV_SET_PARAM got processed first and host sends VDEV_SET_PARAM (disable roaming) before 11K_OFFLOAD_REPORT to fw. If FW try to disable roaming without disabling 11k offload, leads to assert in fw. In order to avoid asset in fw, host should send RSO cmd command before disabling roaming via VDEV_SET_PARAM cmd. Fix is, like RSO STOP, send VDEV_SET_PARAM from CSR to WMA via LIM. Change-Id: Idbb602b717f46f88426ef36a738efd456ac7af8b CRs-Fixed: 2554449
This commit is contained in:
parent
ffcaf378c7
commit
0ba7ed00e3
@ -243,8 +243,8 @@ enum eWniMsgTypes {
|
||||
eWNI_SME_MON_DEINIT_SESSION = SIR_SME_MSG_TYPES_BEGIN + 156,
|
||||
eWNI_SME_VDEV_DELETE_REQ = SIR_SME_MSG_TYPES_BEGIN + 157,
|
||||
eWNI_SME_VDEV_DELETE_RSP = SIR_SME_MSG_TYPES_BEGIN + 158,
|
||||
eWNI_SME_MSG_TYPES_END = SIR_SME_MSG_TYPES_BEGIN + 159
|
||||
|
||||
eWNI_SME_ROAM_INIT_PARAM = SIR_SME_MSG_TYPES_BEGIN + 159,
|
||||
eWNI_SME_MSG_TYPES_END = SIR_SME_MSG_TYPES_BEGIN + 160
|
||||
};
|
||||
|
||||
typedef struct sAniCfgTxRateCtrs {
|
||||
|
@ -1746,6 +1746,7 @@ static void lim_process_messages(struct mac_context *mac_ctx,
|
||||
case eWNI_SME_ROAM_INVOKE:
|
||||
/* fall through */
|
||||
case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ:
|
||||
case eWNI_SME_ROAM_INIT_PARAM:
|
||||
case eWNI_SME_SET_ADDBA_ACCEPT:
|
||||
case eWNI_SME_UPDATE_EDCA_PROFILE:
|
||||
case WNI_SME_UPDATE_MU_EDCA_PARAMS:
|
||||
|
@ -3684,6 +3684,29 @@ static void __lim_process_roam_scan_offload_req(struct mac_context *mac_ctx,
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/**
|
||||
* lim_send_roam_offload_init() - Process Roam offload flag from csr
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @msg_buf: Pointer to SME message buffer
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void lim_send_roam_offload_init(struct mac_context *mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
struct scheduler_msg wma_msg = {0};
|
||||
QDF_STATUS status;
|
||||
|
||||
wma_msg.type = WMA_ROAM_INIT_PARAM;
|
||||
wma_msg.bodyptr = msg_buf;
|
||||
|
||||
status = wma_post_ctrl_msg(mac_ctx, &wma_msg);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
pe_err("Posting WMA_ROAM_INIT_PARAM failed");
|
||||
qdf_mem_free(msg_buf);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_process_roam_invoke() - process the Roam Invoke req
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
@ -3709,6 +3732,11 @@ static void lim_process_roam_invoke(struct mac_context *mac_ctx,
|
||||
pe_err("Not able to post SIR_HAL_ROAM_INVOKE to WMA");
|
||||
}
|
||||
#else
|
||||
static void lim_send_roam_offload_init(struct mac_context *mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
qdf_mem_free(msg_buf);
|
||||
}
|
||||
static void lim_process_roam_invoke(struct mac_context *mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
@ -4756,6 +4784,10 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
|
||||
__lim_process_roam_scan_offload_req(mac, msg_buf);
|
||||
bufConsumed = false;
|
||||
break;
|
||||
case eWNI_SME_ROAM_INIT_PARAM:
|
||||
lim_send_roam_offload_init(mac, msg_buf);
|
||||
bufConsumed = false;
|
||||
break;
|
||||
case eWNI_SME_ROAM_INVOKE:
|
||||
lim_process_roam_invoke(mac, msg_buf);
|
||||
bufConsumed = false;
|
||||
|
@ -355,6 +355,7 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
|
||||
CASE_RETURN_STRING(eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE);
|
||||
CASE_RETURN_STRING(eWNI_SME_DEFAULT_SCAN_IE);
|
||||
CASE_RETURN_STRING(eWNI_SME_ROAM_SCAN_OFFLOAD_REQ);
|
||||
CASE_RETURN_STRING(eWNI_SME_ROAM_INIT_PARAM);
|
||||
CASE_RETURN_STRING(eWNI_SME_LOST_LINK_INFO_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_GET_PEER_INFO_EXT_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_RSO_CMD_STATUS_IND);
|
||||
|
@ -18712,16 +18712,20 @@ csr_roam_send_rso_cmd(struct mac_context *mac_ctx,
|
||||
struct roam_offload_scan_req *request_buf)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct scheduler_msg message = {0};
|
||||
|
||||
request_buf->message_type = eWNI_SME_ROAM_SCAN_OFFLOAD_REQ;
|
||||
request_buf->length = sizeof(*request_buf);
|
||||
message.bodyptr = request_buf;
|
||||
message.type = eWNI_SME_ROAM_SCAN_OFFLOAD_REQ;
|
||||
|
||||
status = scheduler_post_message(QDF_MODULE_ID_SME, QDF_MODULE_ID_PE,
|
||||
QDF_MODULE_ID_PE, &message);
|
||||
|
||||
status = umac_send_mb_message_to_mac(request_buf);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
sme_err("Send RSO from CSR failed");
|
||||
return status;
|
||||
qdf_mem_free(request_buf);
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -21981,21 +21985,22 @@ csr_send_roam_offload_init_msg(struct mac_context *mac, uint32_t vdev_id,
|
||||
params->vdev_id = vdev_id;
|
||||
params->enable = enable;
|
||||
|
||||
sme_debug("Post roam init to WMA for vdev %d", vdev_id);
|
||||
/*
|
||||
* Post to lim and then to wma to keep the same path as that of RSO
|
||||
* stop command, otherwise due to a race if deinit RSO goes first
|
||||
* without RSO stop , firmware will assert.
|
||||
*/
|
||||
sme_debug("Post roam init to LIM for vdev %d", vdev_id);
|
||||
message.bodyptr = params;
|
||||
message.type = WMA_ROAM_INIT_PARAM;
|
||||
status = scheduler_post_message(QDF_MODULE_ID_SME,
|
||||
QDF_MODULE_ID_WMA,
|
||||
QDF_MODULE_ID_WMA,
|
||||
&message);
|
||||
|
||||
message.type = eWNI_SME_ROAM_INIT_PARAM;
|
||||
status = scheduler_post_message(QDF_MODULE_ID_SME, QDF_MODULE_ID_PE,
|
||||
QDF_MODULE_ID_PE, &message);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
sme_err("ROAM: Failed to post ROAM_TRIGGERS msg");
|
||||
qdf_mem_free(params);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
Loading…
Reference in New Issue
Block a user