qcacld-3.0: Change sme_open_session to take a session Id
Currently, vdev_id and session_id are assumed to be the same, but are generated in two separate code paths. Unsurprisingly, this leads to a whole host of desync issues. Instead, modify sme_open_session to take a session_id, which will be populated with an objmgr vdev_id. This means vdev_id and session_id can no longer desync, as there is only a single source for both. Change-Id: I104aba29beb3c19d0ef2ff23380e3d005e01ced0 CRs-Fixed: 2022136
This commit is contained in:

committad av
Gerrit - the friendly Code Review server

förälder
217d55a369
incheckning
d28772bde9
@@ -873,7 +873,7 @@ void *wlansap_open(void *p_cds_gctx);
|
||||
QDF_STATUS wlansap_global_init(void);
|
||||
QDF_STATUS wlansap_global_deinit(void);
|
||||
QDF_STATUS wlansap_start(void *p_cds_gctx, enum tQDF_ADAPTER_MODE mode,
|
||||
uint8_t *addr, uint32_t *session_id);
|
||||
uint8_t *addr, uint32_t session_id);
|
||||
QDF_STATUS wlansap_stop(void *p_cds_gctx);
|
||||
QDF_STATUS wlansap_close(void *p_cds_gctx);
|
||||
typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
|
||||
|
@@ -2536,7 +2536,7 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
|
||||
uint32_t *session_id)
|
||||
uint32_t session_id)
|
||||
{
|
||||
uint32_t type, subType;
|
||||
QDF_STATUS qdf_ret_status;
|
||||
@@ -2560,7 +2560,7 @@ QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
|
||||
&wlansap_roam_callback,
|
||||
sapContext,
|
||||
sapContext->self_mac_addr,
|
||||
&sapContext->sessionId, type, subType);
|
||||
session_id, type, subType);
|
||||
|
||||
if (QDF_STATUS_SUCCESS != qdf_ret_status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
@@ -2570,6 +2570,7 @@ QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
sapContext->sessionId = session_id;
|
||||
status = qdf_wait_single_event(&sapContext->sap_session_opened_evt,
|
||||
SME_CMD_TIMEOUT_VALUE);
|
||||
|
||||
@@ -2584,7 +2585,6 @@ QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
|
||||
pMac->sap.sapCtxList[sapContext->sessionId].pSapContext = sapContext;
|
||||
pMac->sap.sapCtxList[sapContext->sessionId].sapPersona =
|
||||
sapContext->csr_roamProfile.csrPersona;
|
||||
*session_id = sapContext->sessionId;
|
||||
sapContext->isSapSessionOpen = eSAP_TRUE;
|
||||
sapContext->is_pre_cac_on = false;
|
||||
sapContext->pre_cac_complete = false;
|
||||
@@ -3604,10 +3604,12 @@ static QDF_STATUS sap_fsm_state_disconnected(ptSapContext sap_ctx,
|
||||
"failed to get vdev type");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* recycle old session Id */
|
||||
qdf_status = sme_open_session(hal,
|
||||
&wlansap_roam_callback,
|
||||
sap_ctx, sap_ctx->self_mac_addr,
|
||||
&sap_ctx->sessionId, type, subtype);
|
||||
sap_ctx->sessionId, type, subtype);
|
||||
if (QDF_STATUS_SUCCESS != qdf_status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
|
@@ -435,7 +435,7 @@ void sap_config_acs_result(tHalHandle hal, ptSapContext sap_ctx,
|
||||
bool
|
||||
sap_check_in_avoid_ch_list(ptSapContext sap_ctx, uint8_t channel);
|
||||
QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
|
||||
uint32_t *session_id);
|
||||
uint32_t session_id);
|
||||
QDF_STATUS sap_close_session(tHalHandle hHal,
|
||||
ptSapContext sapContext,
|
||||
csr_roamSessionCloseCallback callback, bool valid);
|
||||
|
@@ -310,7 +310,7 @@ void *wlansap_open(void *p_cds_gctx)
|
||||
* QDF_STATUS_SUCCESS: Success
|
||||
*/
|
||||
QDF_STATUS wlansap_start(void *pCtx, enum tQDF_ADAPTER_MODE mode,
|
||||
uint8_t *addr, uint32_t *session_id)
|
||||
uint8_t *addr, uint32_t session_id)
|
||||
{
|
||||
ptSapContext pSapCtx = NULL;
|
||||
QDF_STATUS qdf_ret_status;
|
||||
|
Referens i nytt ärende
Block a user