|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
|
|
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -45,6 +45,7 @@
|
|
|
#include "wlan_connectivity_logging.h"
|
|
|
#include "wlan_if_mgr_roam.h"
|
|
|
#include "wlan_roam_debug.h"
|
|
|
+#include "wlan_mlo_mgr_roam.h"
|
|
|
|
|
|
#ifdef WLAN_FEATURE_SAE
|
|
|
#define CM_IS_FW_FT_SAE_SUPPORTED(fw_akm_bitmap) \
|
|
@@ -875,10 +876,17 @@ cm_roam_send_disable_config(struct wlan_objmgr_psoc *psoc,
|
|
|
req->vdev_id = vdev_id;
|
|
|
req->cfg = cfg;
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+
|
|
|
status = wlan_cm_tgt_send_roam_disable_config(psoc, vdev_id, req);
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
|
mlme_debug("fail to send roam disable config");
|
|
|
|
|
|
+end:
|
|
|
qdf_mem_free(req);
|
|
|
|
|
|
return status;
|
|
@@ -895,6 +903,11 @@ cm_roam_send_disable_config(struct wlan_objmgr_psoc *psoc,
|
|
|
static QDF_STATUS
|
|
|
cm_roam_init_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, bool enable)
|
|
|
{
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
return wlan_cm_tgt_send_roam_offload_init(psoc, vdev_id, enable);
|
|
|
}
|
|
|
|
|
@@ -909,6 +922,11 @@ QDF_STATUS cm_rso_set_roam_trigger(struct wlan_objmgr_pdev *pdev,
|
|
|
if (!psoc)
|
|
|
return QDF_STATUS_E_INVAL;
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
mlme_set_roam_trigger_bitmap(psoc, trigger->vdev_id,
|
|
|
trigger->trigger_bitmap);
|
|
|
|
|
@@ -2934,6 +2952,12 @@ cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|
|
mlme_err("vdev object is NULL for vdev %d", vdev_id);
|
|
|
goto free_mem;
|
|
|
}
|
|
|
+
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
rso_cfg = wlan_cm_get_rso_config(vdev);
|
|
|
if (!rso_cfg)
|
|
|
goto rel_vdev_ref;
|
|
@@ -3362,6 +3386,11 @@ QDF_STATUS cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Update PER config to FW. No need to update in case of stop command,
|
|
|
* FW takes care of stopping this internally
|
|
@@ -3485,6 +3514,10 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev,
|
|
|
case WLAN_ROAM_INIT:
|
|
|
break;
|
|
|
|
|
|
+ case WLAN_MLO_ROAM_SYNCH_IN_PROG:
|
|
|
+ mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT);
|
|
|
+ break;
|
|
|
+
|
|
|
case WLAN_ROAM_DEINIT:
|
|
|
/*
|
|
|
* Already the roaming module is de-initialized at fw,
|
|
@@ -4070,6 +4103,45 @@ cm_record_state_change(struct wlan_objmgr_pdev *pdev,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+/**
|
|
|
+ * cm_mlo_roam_switch_for_link() - roam state handling during mlo roam
|
|
|
+ for link/s.
|
|
|
+ * @pdev: pdev pointer
|
|
|
+ * @vdev_id: vdev id
|
|
|
+ * @reason: reason for changing roam state for the requested vdev id
|
|
|
+ *
|
|
|
+ * This function is used for WLAN_MLO_ROAM_SYNCH_IN_PROG roam state handling
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+cm_mlo_roam_switch_for_link(struct wlan_objmgr_pdev *pdev,
|
|
|
+ uint8_t vdev_id,
|
|
|
+ uint8_t reason)
|
|
|
+{
|
|
|
+ struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
|
|
+ enum roam_offload_state cur_state = mlme_get_roam_state(psoc, vdev_id);
|
|
|
+
|
|
|
+ if (reason != REASON_ROAM_HANDOFF_DONE)
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+
|
|
|
+ switch (cur_state) {
|
|
|
+ case WLAN_ROAM_DEINIT:
|
|
|
+ /* Only used for link vdev during MLO roaming */
|
|
|
+ mlme_set_roam_state(psoc, vdev_id, WLAN_MLO_ROAM_SYNCH_IN_PROG);
|
|
|
+ break;
|
|
|
+ case WLAN_MLO_ROAM_SYNCH_IN_PROG:
|
|
|
+ mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ mlme_err("ROAM: MLO Roam synch not allowed in [%d] state",
|
|
|
+ cur_state);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
QDF_STATUS
|
|
|
cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
|
|
uint8_t vdev_id,
|
|
@@ -4100,6 +4172,14 @@ cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(wlan_pdev_get_psoc(pdev), vdev_id)) {
|
|
|
+ if (reason == REASON_ROAM_HANDOFF_DONE)
|
|
|
+ status = cm_mlo_roam_switch_for_link(pdev, vdev_id, reason);
|
|
|
+
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+
|
|
|
switch (requested_state) {
|
|
|
case WLAN_ROAM_DEINIT:
|
|
|
status = cm_roam_switch_to_deinit(pdev, vdev_id, reason);
|
|
@@ -5000,6 +5080,11 @@ QDF_STATUS cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
|
|
|
if (!cm_req)
|
|
|
return QDF_STATUS_E_NOMEM;
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_err("MLO ROAM: Invalid Roam req on link vdev %d", vdev_id);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
/* Ignore BSSID and channel validation for FW host roam */
|
|
|
if (source == CM_ROAMING_FW)
|
|
|
goto send_evt;
|
|
@@ -5301,6 +5386,12 @@ cm_send_roam_invoke_req(struct cnx_mgr *cm_ctx, struct cm_req *req)
|
|
|
goto roam_err;
|
|
|
}
|
|
|
|
|
|
+ if (wlan_vdev_mlme_get_is_mlo_link(psoc, vdev_id)) {
|
|
|
+ mlme_debug("MLO ROAM: skip RSO cmd for link vdev %d", vdev_id);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ goto roam_err;
|
|
|
+ }
|
|
|
+
|
|
|
wlan_vdev_get_bss_peer_mac(cm_ctx->vdev, &connected_bssid);
|
|
|
wlan_mlme_get_self_bss_roam(psoc, &enable_self_bss_roam);
|
|
|
if (!enable_self_bss_roam &&
|