qcacld-3.0: Avoid race when uplayer triggers reassoc
When supplicant tries to reassoc AP, it will set PSK before issue connection. In driver, it invokes function __wlan_hdd_cfg80211_keymgmt_set_key and then __wlan_hdd_cfg80211_connect. __wlan_hdd_cfg80211_keymgmt_set_key puts eWNI_SME_ROAM_SCAN_OFFLOAD_REQ to PE queue, then puts WMA_ROAM_SCAN_OFFLOAD_REQ to WMA queue. __wlan_hdd_cfg80211_connect puts SIR_HAL_ROAM_INVOKE to WMA queue directly. If the command SIR_HAL_ROAM_INVOKE is issued to fw before WMA_ROAM_SCAN_OFFLOAD_REQ, then roaming scan is canceled because scan mode is set. To avoid this race, send SIR_HAL_ROAM_INVOKE to PE queue, and then to WMA queue as well. Change-Id: I08624efc466085e49fa4201deb221276ec5c260f Rs-Fixed: 2344710
This commit is contained in:
@@ -214,6 +214,7 @@ enum eWniMsgTypes {
|
||||
eWNI_SME_SEND_DISASSOC_FRAME,
|
||||
eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE,
|
||||
eWNI_SME_DEFAULT_SCAN_IE,
|
||||
eWNI_SME_ROAM_INVOKE,
|
||||
eWNI_SME_ROAM_SCAN_OFFLOAD_REQ,
|
||||
eWNI_SME_LOST_LINK_INFO_IND,
|
||||
eWNI_SME_DEL_ALL_TDLS_PEERS,
|
||||
|
@@ -1648,6 +1648,8 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
|
||||
#endif /* FEATURE_WLAN_ESE */
|
||||
case eWNI_SME_REGISTER_MGMT_FRAME_CB:
|
||||
case eWNI_SME_EXT_CHANGE_CHANNEL:
|
||||
case eWNI_SME_ROAM_INVOKE:
|
||||
/* fall through */
|
||||
case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ:
|
||||
case eWNI_SME_SET_ADDBA_ACCEPT:
|
||||
case eWNI_SME_UPDATE_EDCA_PROFILE:
|
||||
|
@@ -3938,6 +3938,39 @@ static void __lim_process_roam_scan_offload_req(tpAniSirGlobal mac_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/**
|
||||
* lim_process_roam_invoke() - process the Roam Invoke req
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @msg_buf: Pointer to the SME message buffer
|
||||
*
|
||||
* This function is called by limProcessMessageQueue(). This function sends the
|
||||
* ROAM_INVOKE command to WMA.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void lim_process_roam_invoke(tpAniSirGlobal mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
struct scheduler_msg msg = {0};
|
||||
QDF_STATUS status;
|
||||
|
||||
msg.type = SIR_HAL_ROAM_INVOKE;
|
||||
msg.bodyptr = msg_buf;
|
||||
msg.reserved = 0;
|
||||
|
||||
status = wma_post_ctrl_msg(mac_ctx, &msg);
|
||||
if (QDF_STATUS_SUCCESS != status)
|
||||
pe_err("Not able to post SIR_HAL_ROAM_INVOKE to WMA");
|
||||
}
|
||||
#else
|
||||
static void lim_process_roam_invoke(tpAniSirGlobal mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
qdf_mem_free(msg_buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lim_handle_update_ssid_hidden() - Processes SSID hidden update
|
||||
* @mac_ctx: Pointer to global mac context
|
||||
@@ -4967,6 +5000,10 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac,
|
||||
__lim_process_roam_scan_offload_req(pMac, pMsgBuf);
|
||||
bufConsumed = false;
|
||||
break;
|
||||
case eWNI_SME_ROAM_INVOKE:
|
||||
lim_process_roam_invoke(pMac, pMsgBuf);
|
||||
bufConsumed = false;
|
||||
break;
|
||||
case eWNI_SME_CHNG_MCC_BEACON_INTERVAL:
|
||||
/* Update the beaconInterval */
|
||||
__lim_process_sme_change_bi(pMac, pMsgBuf);
|
||||
|
@@ -14980,14 +14980,14 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, struct csr_roam_profile *profile,
|
||||
}
|
||||
}
|
||||
|
||||
msg.type = SIR_HAL_ROAM_INVOKE;
|
||||
msg.type = eWNI_SME_ROAM_INVOKE;
|
||||
msg.reserved = 0;
|
||||
msg.bodyptr = fastreassoc;
|
||||
status = scheduler_post_message(QDF_MODULE_ID_SME,
|
||||
QDF_MODULE_ID_WMA,
|
||||
QDF_MODULE_ID_WMA, &msg);
|
||||
QDF_MODULE_ID_PE,
|
||||
QDF_MODULE_ID_PE, &msg);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
sme_err("Not able to post ROAM_INVOKE_CMD message to WMA");
|
||||
sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
|
||||
qdf_mem_free(fastreassoc);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user