qcacmn: Update mlo_disconnect_no_lock to check for MLO cap
When a connection is requested but the client is unable to find the candidate, connection will fail. In legacy case, legacy disconnection path should be invoked. Update the mlo_disconnect_no_lock function to match the mlo_disconnect logic when checking for MLO capabilities. Also update the link connect notify function to prevent queuing multiple disconnect requests. Change-Id: I5ed4b213b1fe6b48d2d5631bf1625bea2864f606 CRs-fixed: 3069545
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8220a04a87
commit
ddfe7df316
@@ -266,7 +266,15 @@ static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_mlo_sta *sta_ctx = NULL;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (mlo_dev_ctx) {
|
||||
if (mlo_dev_ctx)
|
||||
sta_ctx = mlo_dev_ctx->sta_ctx;
|
||||
if (sta_ctx && sta_ctx->orig_conn_req) {
|
||||
mlo_free_connect_ies(sta_ctx->orig_conn_req);
|
||||
qdf_mem_free(sta_ctx->orig_conn_req);
|
||||
sta_ctx->orig_conn_req = NULL;
|
||||
}
|
||||
|
||||
if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
|
||||
sta_ctx = mlo_dev_ctx->sta_ctx;
|
||||
if (!sta_ctx)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -277,12 +285,6 @@ static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
|
||||
sta_ctx->connect_req = NULL;
|
||||
}
|
||||
|
||||
if (sta_ctx->orig_conn_req) {
|
||||
mlo_free_connect_ies(sta_ctx->orig_conn_req);
|
||||
qdf_mem_free(sta_ctx->orig_conn_req);
|
||||
sta_ctx->orig_conn_req = NULL;
|
||||
}
|
||||
|
||||
status = mlo_send_link_disconnect(mlo_dev_ctx, source,
|
||||
reason_code, bssid);
|
||||
}
|
||||
@@ -631,19 +633,10 @@ void mlo_handle_sta_link_connect_failure(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_cm_connect_resp *rsp)
|
||||
{
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
||||
struct wlan_mlo_sta *sta_ctx = NULL;
|
||||
struct scheduler_msg msg = {0};
|
||||
QDF_STATUS ret;
|
||||
|
||||
if (vdev == mlo_get_assoc_link_vdev(mlo_dev_ctx)) {
|
||||
sta_ctx = mlo_dev_ctx->sta_ctx;
|
||||
if (sta_ctx->orig_conn_req) {
|
||||
mlo_free_connect_ies(
|
||||
sta_ctx->orig_conn_req);
|
||||
qdf_mem_free(sta_ctx->orig_conn_req);
|
||||
sta_ctx->orig_conn_req = NULL;
|
||||
}
|
||||
} else {
|
||||
if (vdev != mlo_get_assoc_link_vdev(mlo_dev_ctx)) {
|
||||
mlo_update_connected_links(vdev, 0);
|
||||
if (rsp->reason == CM_NO_CANDIDATE_FOUND ||
|
||||
rsp->reason == CM_HW_MODE_FAILURE ||
|
||||
@@ -680,8 +673,22 @@ void mlo_sta_link_connect_notify(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_cm_connect_resp *rsp)
|
||||
{
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
||||
struct wlan_mlo_sta *sta_ctx = NULL;
|
||||
|
||||
if (mlo_dev_ctx) {
|
||||
if (mlo_dev_ctx)
|
||||
sta_ctx = mlo_dev_ctx->sta_ctx;
|
||||
|
||||
if (wlan_cm_is_vdev_disconnected(vdev) &&
|
||||
vdev == mlo_get_assoc_link_vdev(mlo_dev_ctx)) {
|
||||
if (sta_ctx && sta_ctx->orig_conn_req) {
|
||||
mlo_free_connect_ies(sta_ctx->orig_conn_req);
|
||||
qdf_mem_free(sta_ctx->orig_conn_req);
|
||||
sta_ctx->orig_conn_req = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
|
||||
mlo_debug("Vdev: %d", wlan_vdev_get_id(vdev));
|
||||
if (wlan_cm_is_vdev_disconnected(vdev)) {
|
||||
mlo_handle_sta_link_connect_failure(vdev, rsp);
|
||||
|
Reference in New Issue
Block a user