qcacmn: Add logic to remove preauth and roam ser command
Add logic to remove preauth or roam command from serialization depending on the state the roaming was in. Change-Id: Ia381d040ce7e15a725eb2402896bf476d3236566 CRs-fixed: 2882994
This commit is contained in:

gecommit door
snandini

bovenliggende
b29d1e9018
commit
9b797fd035
@@ -168,7 +168,6 @@ typedef QDF_STATUS (*wlan_ser_umac_cmd_cb)(void *umac_cmd);
|
||||
* @WLAN_SER_CMD_SME_ISSUE_REASSOC_SAME_AP: SME Reassoc cmd
|
||||
* @WLAN_SER_CMD_SME_ISSUE_DISASSOC_FOR_HANDOFF: SME Disassoc cmd
|
||||
* @WLAN_SER_CMD_SME_ISSUE_ASSOC_TO_SIMILAR_AP: SME Assoc cmd
|
||||
* @WLAN_SER_CMD_FORCE_IBSS_LEAVE: IBSS leave AP cmd
|
||||
* @WLAN_SER_CMD_SME_ISSUE_FT_REASSOC: SME reassoc cmd
|
||||
* @WLAN_SER_CMD_FORCE_DISASSOC_STA: Force diassoc for STA vap
|
||||
* @WLAN_SER_CMD_FORCE_DEAUTH_STA: Force deauth for STA vap
|
||||
@@ -196,19 +195,20 @@ typedef QDF_STATUS (*wlan_ser_umac_cmd_cb)(void *umac_cmd);
|
||||
* @WLAN_SER_CMD_PDEV_RESTART: Cmd to restart all VDEVs of a PDEV
|
||||
* @WLAN_SER_CMD_PDEV_CSA_RESTART: Cmd to CSA restart all AP VDEVs of a PDEV
|
||||
* @WLAN_SER_CMD_GET_DISCONNECT_STATS: Cmd to get peer stats on disconnection
|
||||
* @WLAN_SER_CMD_VDEV_REASSOC: Cmd to roam a STA VDEV
|
||||
* @WLAN_SER_CMD_VDEV_ROAM: Cmd to roam a STA VDEV
|
||||
*/
|
||||
enum wlan_serialization_cmd_type {
|
||||
/* all scan command before non-scan */
|
||||
WLAN_SER_CMD_SCAN,
|
||||
/* all non-scan command below */
|
||||
WLAN_SER_CMD_NONSCAN,
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
WLAN_SER_CMD_HDD_ISSUE_REASSOC_SAME_AP,
|
||||
WLAN_SER_CMD_SME_ISSUE_REASSOC_SAME_AP,
|
||||
WLAN_SER_CMD_SME_ISSUE_DISASSOC_FOR_HANDOFF,
|
||||
WLAN_SER_CMD_SME_ISSUE_ASSOC_TO_SIMILAR_AP,
|
||||
WLAN_SER_CMD_FORCE_IBSS_LEAVE,
|
||||
WLAN_SER_CMD_SME_ISSUE_FT_REASSOC,
|
||||
#endif
|
||||
WLAN_SER_CMD_FORCE_DISASSOC_STA,
|
||||
WLAN_SER_CMD_FORCE_DEAUTH_STA,
|
||||
WLAN_SER_CMD_PERFORM_PRE_AUTH,
|
||||
@@ -235,7 +235,7 @@ enum wlan_serialization_cmd_type {
|
||||
WLAN_SER_CMD_PDEV_RESTART,
|
||||
WLAN_SER_CMD_PDEV_CSA_RESTART,
|
||||
WLAN_SER_CMD_GET_DISCONNECT_STATS,
|
||||
WLAN_SER_CMD_VDEV_REASSOC,
|
||||
WLAN_SER_CMD_VDEV_ROAM,
|
||||
WLAN_SER_CMD_MAX
|
||||
};
|
||||
|
||||
|
@@ -226,6 +226,18 @@ static QDF_STATUS cm_host_roam_start(struct cnx_mgr *cm_ctx,
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static
|
||||
QDF_STATUS cm_host_roam_start_fail(struct cnx_mgr *cm_ctx,
|
||||
struct cm_req *cm_req,
|
||||
enum wlan_cm_connect_fail_reason reason)
|
||||
{
|
||||
/*
|
||||
* call API to send WLAN_CM_SM_EV_PREAUTH_FAIL to call preauth complete
|
||||
* and move SM to CONNECTED state
|
||||
*/
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS cm_host_roam_start(struct cnx_mgr *cm_ctx,
|
||||
struct cm_req *cm_req)
|
||||
@@ -234,6 +246,14 @@ static QDF_STATUS cm_host_roam_start(struct cnx_mgr *cm_ctx,
|
||||
sizeof(cm_req->roam_req),
|
||||
&cm_req->roam_req);
|
||||
}
|
||||
|
||||
static
|
||||
QDF_STATUS cm_host_roam_start_fail(struct cnx_mgr *cm_ctx,
|
||||
struct cm_req *cm_req,
|
||||
enum wlan_cm_connect_fail_reason reason)
|
||||
{
|
||||
return cm_send_reassoc_start_fail(cm_ctx, cm_req->cm_id, reason, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS cm_host_roam_start_req(struct cnx_mgr *cm_ctx,
|
||||
@@ -262,7 +282,7 @@ QDF_STATUS cm_host_roam_start_req(struct cnx_mgr *cm_ctx,
|
||||
return status;
|
||||
|
||||
roam_err:
|
||||
return cm_send_reassoc_start_fail(cm_ctx, cm_req->cm_id, reason, true);
|
||||
return cm_host_roam_start_fail(cm_ctx, cm_req, reason);
|
||||
}
|
||||
|
||||
bool cm_roam_resp_cmid_match_list_head(struct cnx_mgr *cm_ctx,
|
||||
@@ -578,7 +598,7 @@ static QDF_STATUS cm_ser_reassoc_req(struct cnx_mgr *cm_ctx,
|
||||
return status;
|
||||
}
|
||||
|
||||
cmd.cmd_type = WLAN_SER_CMD_VDEV_REASSOC;
|
||||
cmd.cmd_type = WLAN_SER_CMD_VDEV_ROAM;
|
||||
cmd.cmd_id = cm_req->cm_id;
|
||||
cmd.cmd_cb = cm_ser_reassoc_cb;
|
||||
cmd.source = WLAN_UMAC_COMP_MLME;
|
||||
|
@@ -235,6 +235,9 @@ struct cm_req_history {
|
||||
* @vdev: vdev back pointer
|
||||
* @sm: state machine
|
||||
* @active_cm_id: cm_id of the active command, if any active command present
|
||||
* @preauth_in_progress: is roaming in preauth state, set during preauth state,
|
||||
* this is used to get which command to flush from serialization during
|
||||
* host roaming.
|
||||
* @req_list: connect/disconnect req list
|
||||
* @cm_req_lock: lock to manupulate/read the cm req list
|
||||
* @disconnect_count: disconnect count
|
||||
@@ -255,6 +258,7 @@ struct cnx_mgr {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct cm_state_sm sm;
|
||||
wlan_cm_id active_cm_id;
|
||||
bool preauth_in_progress;
|
||||
qdf_list_t req_list;
|
||||
#ifdef WLAN_CM_USE_SPINLOCK
|
||||
qdf_spinlock_t cm_req_lock;
|
||||
|
@@ -142,9 +142,13 @@ bool cm_subst_preauth_event(void *ctx, uint16_t event,
|
||||
data_len, data);
|
||||
break;
|
||||
case WLAN_CM_SM_EV_ROAM_START:
|
||||
/* set preauth to true when we enter preauth state */
|
||||
cm_ctx->preauth_in_progress = true;
|
||||
cm_host_roam_start_req(cm_ctx, data);
|
||||
break;
|
||||
case WLAN_CM_SM_EV_START_REASSOC:
|
||||
/* set preauth to false as soon as we move to reassoc state */
|
||||
cm_ctx->preauth_in_progress = false;
|
||||
cm_sm_transition_to(cm_ctx, WLAN_CM_SS_REASSOC);
|
||||
cm_sm_deliver_event_sync(cm_ctx, WLAN_CM_SM_EV_START_REASSOC,
|
||||
data_len, data);
|
||||
|
@@ -492,25 +492,34 @@ static void cm_remove_cmd_from_serialization(struct cnx_mgr *cm_ctx,
|
||||
cmd_info.cmd_id = cm_id;
|
||||
cmd_info.req_type = WLAN_SER_CANCEL_NON_SCAN_CMD;
|
||||
|
||||
if (prefix == CONNECT_REQ_PREFIX)
|
||||
if (prefix == CONNECT_REQ_PREFIX) {
|
||||
cmd_info.cmd_type = WLAN_SER_CMD_VDEV_CONNECT;
|
||||
else if (prefix == ROAM_REQ_PREFIX)
|
||||
cmd_info.cmd_type = WLAN_SER_CMD_VDEV_REASSOC;
|
||||
else
|
||||
} else if (prefix == ROAM_REQ_PREFIX) {
|
||||
/*
|
||||
* Try removing PREAUTH command when in preauth state else
|
||||
* try remove ROAM command
|
||||
*/
|
||||
if (cm_ctx->preauth_in_progress)
|
||||
cmd_info.cmd_type = WLAN_SER_CMD_PERFORM_PRE_AUTH;
|
||||
else
|
||||
cmd_info.cmd_type = WLAN_SER_CMD_VDEV_ROAM;
|
||||
cm_ctx->preauth_in_progress = false;
|
||||
} else {
|
||||
cmd_info.cmd_type = WLAN_SER_CMD_VDEV_DISCONNECT;
|
||||
}
|
||||
|
||||
cmd_info.vdev = cm_ctx->vdev;
|
||||
|
||||
if (cm_id == cm_ctx->active_cm_id) {
|
||||
mlme_debug(CM_PREFIX_FMT "Remove from active",
|
||||
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|
||||
cm_id));
|
||||
mlme_debug(CM_PREFIX_FMT "Remove cmd type %d from active",
|
||||
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev), cm_id),
|
||||
cmd_info.cmd_type);
|
||||
cmd_info.queue_type = WLAN_SERIALIZATION_ACTIVE_QUEUE;
|
||||
wlan_serialization_remove_cmd(&cmd_info);
|
||||
} else {
|
||||
mlme_debug(CM_PREFIX_FMT "Remove from pending",
|
||||
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|
||||
cm_id));
|
||||
mlme_debug(CM_PREFIX_FMT "Remove cmd type %d from pending",
|
||||
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev), cm_id),
|
||||
cmd_info.cmd_type);
|
||||
cmd_info.queue_type = WLAN_SERIALIZATION_PENDING_QUEUE;
|
||||
wlan_serialization_cancel_request(&cmd_info);
|
||||
}
|
||||
|
Verwijs in nieuw issue
Block a user