|
@@ -1672,9 +1672,22 @@ cm_handle_connect_req_in_non_init_state(struct cnx_mgr *cm_ctx,
|
|
{
|
|
{
|
|
uint8_t vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
|
|
uint8_t vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
|
|
|
|
|
|
- if (cm_state_substate != WLAN_CM_S_CONNECTED &&
|
|
|
|
- cm_is_connect_req_reassoc(&cm_req->req)) {
|
|
|
|
- cm_req->req.reassoc_in_non_connected = true;
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Connect re-assoc req should have been received in one of the
|
|
|
|
+ * following states:
|
|
|
|
+ * a) SB disconnect in progress
|
|
|
|
+ * b) Roam start/Roam sync in progress
|
|
|
|
+ * c) Reassoc
|
|
|
|
+ * d) Connected state with LFR3 disabled
|
|
|
|
+ * e) Invalid Roam request
|
|
|
|
+ *
|
|
|
|
+ * In this case, set reassoc_in_non_init flag, so that disconnect can
|
|
|
|
+ * be notified to the upper layers if connect request fails. This is
|
|
|
|
+ * required by upper layers to clear the connection state of the
|
|
|
|
+ * previous connection.
|
|
|
|
+ */
|
|
|
|
+ if (cm_is_connect_req_reassoc(&cm_req->req)) {
|
|
|
|
+ cm_req->req.reassoc_in_non_init = true;
|
|
mlme_debug(CM_PREFIX_FMT "Reassoc received in %d state",
|
|
mlme_debug(CM_PREFIX_FMT "Reassoc received in %d state",
|
|
CM_PREFIX_REF(vdev_id, cm_req->cm_id),
|
|
CM_PREFIX_REF(vdev_id, cm_req->cm_id),
|
|
cm_state_substate);
|
|
cm_state_substate);
|
|
@@ -2799,17 +2812,17 @@ cm_clear_vdev_mlo_cap(struct wlan_objmgr_vdev *vdev)
|
|
#endif /*WLAN_FEATURE_11BE_MLO*/
|
|
#endif /*WLAN_FEATURE_11BE_MLO*/
|
|
|
|
|
|
/**
|
|
/**
|
|
- * cm_is_connect_id_reassoc_in_non_connected()
|
|
|
|
|
|
+ * cm_is_connect_id_reassoc_in_non_init()
|
|
* @cm_ctx: connection manager context
|
|
* @cm_ctx: connection manager context
|
|
* @cm_id: cm id
|
|
* @cm_id: cm id
|
|
*
|
|
*
|
|
- * If connect req is a reassoc req and received in not connected state.
|
|
|
|
|
|
+ * If connect req is a reassoc req and received in non init state.
|
|
* Caller should take cm_ctx lock.
|
|
* Caller should take cm_ctx lock.
|
|
*
|
|
*
|
|
* Return: bool
|
|
* Return: bool
|
|
*/
|
|
*/
|
|
-static bool cm_is_connect_id_reassoc_in_non_connected(struct cnx_mgr *cm_ctx,
|
|
|
|
- wlan_cm_id cm_id)
|
|
|
|
|
|
+static bool cm_is_connect_id_reassoc_in_non_init(struct cnx_mgr *cm_ctx,
|
|
|
|
+ wlan_cm_id cm_id)
|
|
{
|
|
{
|
|
qdf_list_node_t *cur_node = NULL, *next_node = NULL;
|
|
qdf_list_node_t *cur_node = NULL, *next_node = NULL;
|
|
struct cm_req *cm_req;
|
|
struct cm_req *cm_req;
|
|
@@ -2825,7 +2838,7 @@ static bool cm_is_connect_id_reassoc_in_non_connected(struct cnx_mgr *cm_ctx,
|
|
cm_req = qdf_container_of(cur_node, struct cm_req, node);
|
|
cm_req = qdf_container_of(cur_node, struct cm_req, node);
|
|
|
|
|
|
if (cm_req->cm_id == cm_id) {
|
|
if (cm_req->cm_id == cm_id) {
|
|
- if (cm_req->connect_req.req.reassoc_in_non_connected)
|
|
|
|
|
|
+ if (cm_req->connect_req.req.reassoc_in_non_init)
|
|
is_reassoc = true;
|
|
is_reassoc = true;
|
|
return is_reassoc;
|
|
return is_reassoc;
|
|
}
|
|
}
|
|
@@ -2894,8 +2907,7 @@ QDF_STATUS cm_notify_connect_complete(struct cnx_mgr *cm_ctx,
|
|
sm_state == WLAN_CM_S_INIT) {
|
|
sm_state == WLAN_CM_S_INIT) {
|
|
if (acquire_lock)
|
|
if (acquire_lock)
|
|
cm_req_lock_acquire(cm_ctx);
|
|
cm_req_lock_acquire(cm_ctx);
|
|
- if (cm_is_connect_id_reassoc_in_non_connected(cm_ctx,
|
|
|
|
- resp->cm_id)) {
|
|
|
|
|
|
+ if (cm_is_connect_id_reassoc_in_non_init(cm_ctx, resp->cm_id)) {
|
|
resp->send_disconnect = true;
|
|
resp->send_disconnect = true;
|
|
mlme_debug(CM_PREFIX_FMT "Set send disconnect to true to indicate disconnect instead of connect resp",
|
|
mlme_debug(CM_PREFIX_FMT "Set send disconnect to true to indicate disconnect instead of connect resp",
|
|
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|
|
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|