qcacld-2.0: Route RSO commands to WDA through LIM layer
Presently the Roam Scan Offload commands(Start/Restart/Stop etc) are all sent directly from CSR to WDA. This fix reroutes these commands to LIM and send them to WDA from there so that any session specific data can be updated on this RSO command exchange. "roaming_in_progress" is a PE session parameter which needs to be reset for STOP/START/RESTART commands. If not even though firmware sends KICK STA event driver wont disconnect from AP Change-Id: I86c3b93570a38329cbc6a8a31017ece172164732 CRs-fixed: 1009486
This commit is contained in:
parent
c813666e60
commit
c43a594ff7
|
@ -3850,6 +3850,8 @@ struct roam_ext_params {
|
|||
|
||||
typedef struct sSirRoamOffloadScanReq
|
||||
{
|
||||
uint16_t message_type;
|
||||
uint16_t length;
|
||||
eAniBoolean RoamScanOffloadEnabled;
|
||||
eAniBoolean MAWCEnabled;
|
||||
tANI_S8 LookupThreshold;
|
||||
|
@ -3921,14 +3923,6 @@ typedef struct sSirRoamOffloadScanRsp
|
|||
tANI_U32 reason;
|
||||
} tSirRoamOffloadScanRsp, *tpSirRoamOffloadScanRsp;
|
||||
|
||||
struct sir_sme_roam_restart_req
|
||||
{
|
||||
tANI_U16 message_type;
|
||||
tANI_U16 length;
|
||||
tANI_U8 sme_session_id;
|
||||
tANI_U8 command;
|
||||
tANI_U8 reason;
|
||||
};
|
||||
#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
|
||||
|
||||
#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
|
||||
|
|
|
@ -397,7 +397,7 @@ enum eWniMsgTypes
|
|||
eWNI_SME_EXT_CHANGE_CHANNEL_IND,
|
||||
eWNI_SME_LOST_LINK_INFO_IND,
|
||||
eWNI_SME_GET_RSSI_IND,
|
||||
eWNI_SME_ROAM_RESTART_REQ,
|
||||
eWNI_SME_ROAM_SCAN_OFFLOAD_REQ,
|
||||
eWNI_SME_SMPS_FORCE_MODE_IND,
|
||||
eWNI_SME_REGISTER_MGMT_FRAME_CB,
|
||||
eWNI_SME_MON_INIT_SESSION,
|
||||
|
|
|
@ -1427,7 +1427,7 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
|
|||
case eWNI_SME_GET_TSM_STATS_REQ:
|
||||
#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
|
||||
case eWNI_SME_EXT_CHANGE_CHANNEL:
|
||||
case eWNI_SME_ROAM_RESTART_REQ:
|
||||
case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ:
|
||||
case eWNI_SME_REGISTER_MGMT_FRAME_CB:
|
||||
case eWNI_SME_REGISTER_P2P_ACK_CB:
|
||||
// These messages are from HDD
|
||||
|
|
|
@ -4858,37 +4858,34 @@ limSendVdevRestart(tpAniSirGlobal pMac,
|
|||
vos_mem_free(pHalHiddenSsidVdevRestart);
|
||||
}
|
||||
}
|
||||
static void __lim_process_roam_restart_req(tpAniSirGlobal mac_ctx,
|
||||
static void __lim_process_roam_scan_offload_req(tpAniSirGlobal mac_ctx,
|
||||
tANI_U32 *msg_buf)
|
||||
{
|
||||
struct sir_sme_roam_restart_req *msg;
|
||||
tSirRoamOffloadScanReq *req_buffer;
|
||||
tpPESession pe_session;
|
||||
tSirMsgQ wma_msg;
|
||||
tSirRetStatus status;
|
||||
tSirRoamOffloadScanReq *msg, *req_buffer;
|
||||
|
||||
msg = (struct sir_sme_roam_restart_req *)msg_buf;
|
||||
msg = (tSirRoamOffloadScanReq *)msg_buf;
|
||||
pe_session = pe_find_session_by_sme_session_id(mac_ctx,
|
||||
msg->sme_session_id);
|
||||
if (NULL == pe_session) {
|
||||
limLog(mac_ctx, LOGE,
|
||||
FL("session does not exist for sme_session: %d"),
|
||||
msg->sme_session_id);
|
||||
return;
|
||||
}
|
||||
/* Add log for unset of the flag */
|
||||
msg->sessionId);
|
||||
|
||||
/* Set roaming_in_progress flag according to the command */
|
||||
if ( pe_session && (msg->Command == ROAM_SCAN_OFFLOAD_START ||
|
||||
msg->Command == ROAM_SCAN_OFFLOAD_RESTART ||
|
||||
msg->Command == ROAM_SCAN_OFFLOAD_STOP))
|
||||
pe_session->roaming_in_progress = false;
|
||||
|
||||
req_buffer = vos_mem_malloc(sizeof(tSirRoamOffloadScanReq));
|
||||
if (NULL == req_buffer) {
|
||||
limLog(mac_ctx, LOGE,
|
||||
FL("Mem Alloc failed for req buffer"));
|
||||
return;
|
||||
}
|
||||
vos_mem_zero(req_buffer, sizeof(tSirRoamOffloadScanReq));
|
||||
|
||||
*req_buffer = *msg;
|
||||
|
||||
vos_mem_zero(&wma_msg, sizeof(tSirMsgQ));
|
||||
req_buffer->Command = msg->command;
|
||||
req_buffer->reason = msg->reason;
|
||||
req_buffer->sessionId = msg->sme_session_id;
|
||||
wma_msg.type = WDA_ROAM_SCAN_OFFLOAD_REQ;
|
||||
wma_msg.bodyptr = req_buffer;
|
||||
|
||||
|
@ -6119,8 +6116,8 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
|
|||
case eWNI_SME_HIDE_SSID_REQ:
|
||||
__limProcessSmeHideSSID(pMac, pMsgBuf);
|
||||
break;
|
||||
case eWNI_SME_ROAM_RESTART_REQ:
|
||||
__lim_process_roam_restart_req(pMac, pMsgBuf);
|
||||
case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ:
|
||||
__lim_process_roam_scan_offload_req(pMac, pMsgBuf);
|
||||
break;
|
||||
case eWNI_SME_UPDATE_APWPSIE_REQ:
|
||||
__limProcessSmeUpdateAPWPSIEs(pMac, pMsgBuf);
|
||||
|
|
|
@ -17169,36 +17169,24 @@ bool csr_is_RSO_cmd_allowed(tpAniSirGlobal mac_ctx, uint8_t command,
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
void csr_roam_send_restart_cmd(tpAniSirGlobal pMac, tANI_U8 session_id,
|
||||
tANI_U8 command, tANI_U8 reason)
|
||||
VOS_STATUS csr_roam_send_rso_cmd(tpAniSirGlobal pMac, tANI_U8 session_id,
|
||||
tSirRoamOffloadScanReq *pRequestBuf)
|
||||
{
|
||||
struct sir_sme_roam_restart_req *msg;
|
||||
eHalStatus status;
|
||||
|
||||
msg = vos_mem_malloc(sizeof(struct sir_sme_roam_restart_req));
|
||||
if (msg == NULL) {
|
||||
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
|
||||
FL("Memory allocation failed"));
|
||||
VOS_ASSERT(msg);
|
||||
return;
|
||||
}
|
||||
vos_mem_set(msg, sizeof(struct sir_sme_roam_restart_req), 0);
|
||||
msg->message_type = eWNI_SME_ROAM_RESTART_REQ;
|
||||
msg->length = sizeof(struct sir_sme_roam_restart_req);
|
||||
msg->sme_session_id = session_id;
|
||||
msg->command = command;
|
||||
msg->reason = reason;
|
||||
status = palSendMBMessage(pMac->hHdd, msg);
|
||||
pRequestBuf->message_type = eWNI_SME_ROAM_SCAN_OFFLOAD_REQ;
|
||||
pRequestBuf->length = sizeof(*pRequestBuf);
|
||||
status = palSendMBMessage(pMac->hHdd, pRequestBuf);
|
||||
if (eHAL_STATUS_FAILURE == status) {
|
||||
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
|
||||
FL("Sending msg eWNI_SME_ROAM_RESTART_REQ failed"));
|
||||
vos_mem_free(msg);
|
||||
FL("Send RSO from CSR failed"));
|
||||
return VOS_STATUS_E_FAILURE;
|
||||
}
|
||||
return VOS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
|
||||
tANI_U8 command, tANI_U8 reason)
|
||||
{
|
||||
vos_msg_t msg;
|
||||
tSirRoamOffloadScanReq *pRequestBuf;
|
||||
tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
|
||||
&pMac->roam.neighborRoamInfo[sessionId];
|
||||
|
@ -17253,10 +17241,6 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
|
|||
command, pNeighborRoamInfo->lastSentCmd);
|
||||
return eHAL_STATUS_FAILURE;
|
||||
}
|
||||
if (ROAM_SCAN_OFFLOAD_RESTART == command) {
|
||||
csr_roam_send_restart_cmd(pMac, sessionId, command, reason);
|
||||
goto cmd_sent;
|
||||
}
|
||||
if ((VOS_TRUE == bRoamScanOffloadStarted) && (ROAM_SCAN_OFFLOAD_START == command))
|
||||
{
|
||||
smsLog( pMac, LOGE,"Roam Scan Offload is already started");
|
||||
|
@ -17632,13 +17616,11 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
|
|||
MAC_ADDR_ARRAY(roam_params_dst->bssid_favored[i]),
|
||||
roam_params_dst->bssid_favored_factor[i]);
|
||||
}
|
||||
msg.type = WDA_ROAM_SCAN_OFFLOAD_REQ;
|
||||
msg.reserved = 0;
|
||||
msg.bodyptr = pRequestBuf;
|
||||
if (!VOS_IS_STATUS_SUCCESS(vos_mq_post_message(VOS_MODULE_ID_WDA, &msg)))
|
||||
|
||||
if (!VOS_IS_STATUS_SUCCESS(csr_roam_send_rso_cmd(pMac,
|
||||
sessionId, pRequestBuf)))
|
||||
{
|
||||
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Not able to post WDA_ROAM_SCAN_OFFLOAD_REQ message to WDA", __func__);
|
||||
vos_mem_free(pRequestBuf);
|
||||
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Not able to post WDA_ROAM_SCAN_OFFLOAD_REQ message to PE", __func__);
|
||||
return eHAL_STATUS_FAILURE;
|
||||
}
|
||||
else
|
||||
|
@ -17648,7 +17630,6 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
|
|||
else if (ROAM_SCAN_OFFLOAD_STOP == command)
|
||||
bRoamScanOffloadStarted = VOS_FALSE;
|
||||
}
|
||||
cmd_sent:
|
||||
/* update the last sent cmd */
|
||||
pNeighborRoamInfo->lastSentCmd = command;
|
||||
|
||||
|
|
|
@ -6382,7 +6382,8 @@ eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac,
|
|||
if ((eCSR_NEIGHBOR_ROAM_STATE_CONNECTED != pNeighborRoamInfo->neighborRoamState)
|
||||
|| (!pNeighborRoamInfo->uOsRequestedHandoff))
|
||||
{
|
||||
smsLog(pMac, LOGE, FL("Received in not CONNECTED state or uOsRequestedHandoff is not set. Ignore it"));
|
||||
smsLog(pMac, LOGE, FL("Received in not CONNECTED state(%d) or uOsRequestedHandoff(%d) is not set. Ignore it "),
|
||||
pNeighborRoamInfo->neighborRoamState, pNeighborRoamInfo->uOsRequestedHandoff);
|
||||
status = eHAL_STATUS_FAILURE;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -519,6 +519,7 @@ tANI_U8* macTraceGetSmeMsgString( tANI_U16 smeMsg )
|
|||
CASE_RETURN_STRING(eWNI_SME_ROAM_OFFLOAD_SYNCH_IND);
|
||||
#endif
|
||||
CASE_RETURN_STRING(eWNI_SME_LOST_LINK_INFO_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_ROAM_SCAN_OFFLOAD_REQ);
|
||||
CASE_RETURN_STRING(eWNI_SME_SMPS_FORCE_MODE_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_REGISTER_MGMT_FRAME_CB);
|
||||
CASE_RETURN_STRING(eWNI_SME_REGISTER_P2P_ACK_CB);
|
||||
|
|
Loading…
Reference in New Issue