|
@@ -49,6 +49,44 @@
|
|
|
#include "wlan_vdev_mgr_utils_api.h"
|
|
|
#include "wlan_mlo_link_force.h"
|
|
|
#include <wlan_psoc_mlme_api.h>
|
|
|
+#include <wma.h>
|
|
|
+
|
|
|
+/*
|
|
|
+ * cm_is_peer_preset_on_other_sta() - Check if peer exists on other STA
|
|
|
+ * @psoc: Pointer to psoc
|
|
|
+ * @vdev: pointer to vdev
|
|
|
+ * @vdev_id: vdev id
|
|
|
+ * @event: Roam sync event pointer
|
|
|
+ *
|
|
|
+ * Return: True is peer found on other STA else return false
|
|
|
+ */
|
|
|
+static bool
|
|
|
+cm_is_peer_preset_on_other_sta(struct wlan_objmgr_psoc *psoc,
|
|
|
+ struct wlan_objmgr_vdev *vdev,
|
|
|
+ uint8_t vdev_id, void *event)
|
|
|
+{
|
|
|
+ bool peer_exists_other_sta = false;
|
|
|
+ struct roam_offload_synch_ind *sync_ind;
|
|
|
+ tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
|
|
+ uint8_t peer_vdev_id;
|
|
|
+
|
|
|
+ sync_ind = (struct roam_offload_synch_ind *)event;
|
|
|
+
|
|
|
+ if (wma_objmgr_peer_exist(wma, sync_ind->bssid.bytes, &peer_vdev_id)) {
|
|
|
+ if ((!wlan_vdev_mlme_is_mlo_vdev(vdev) &&
|
|
|
+ vdev_id != peer_vdev_id) ||
|
|
|
+ !mlo_check_is_given_vdevs_on_same_mld(psoc, vdev_id,
|
|
|
+ peer_vdev_id)) {
|
|
|
+ wma_debug("Peer " QDF_MAC_ADDR_FMT
|
|
|
+ " already exists on vdev %d, current vdev %d",
|
|
|
+ QDF_MAC_ADDR_REF(sync_ind->bssid.bytes),
|
|
|
+ peer_vdev_id, vdev_id);
|
|
|
+ peer_exists_other_sta = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return peer_exists_other_sta;
|
|
|
+}
|
|
|
|
|
|
QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|
|
void *event, uint32_t event_data_len)
|
|
@@ -66,7 +104,8 @@ QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|
|
|
|
|
if (mlo_is_mld_disconnecting_connecting(vdev) ||
|
|
|
cm_is_vdev_connecting(vdev) ||
|
|
|
- cm_is_vdev_disconnecting(vdev)) {
|
|
|
+ cm_is_vdev_disconnecting(vdev) ||
|
|
|
+ cm_is_peer_preset_on_other_sta(psoc, vdev, vdev_id, event)) {
|
|
|
mlme_err("vdev %d Roam sync not handled in connecting/disconnecting state",
|
|
|
vdev_id);
|
|
|
status = wlan_cm_roam_state_change(wlan_vdev_get_pdev(vdev),
|
|
@@ -1538,7 +1577,7 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
|
|
|
|
|
|
roam_req = cm_get_first_roam_command(vdev);
|
|
|
if (roam_req) {
|
|
|
- mlme_debug("Roam req found, get cm id to remove it, before disconnect");
|
|
|
+ mlme_debug("Roam req found, get cm id to remove it, after disconnect");
|
|
|
cm_id = roam_req->cm_id;
|
|
|
}
|
|
|
/* CPU freq is boosted during roam sync to improve roam latency,
|
|
@@ -1546,9 +1585,6 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
|
|
|
*/
|
|
|
mlme_cm_osif_perfd_reset_cpufreq();
|
|
|
|
|
|
- cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_HO_FAIL,
|
|
|
- sizeof(wlan_cm_id), &cm_id);
|
|
|
-
|
|
|
qdf_mem_zero(&ap_info, sizeof(struct reject_ap_info));
|
|
|
if (cm_ho_fail_is_avoid_list_candidate(vdev, ind)) {
|
|
|
ap_info.bssid = ind->bssid;
|
|
@@ -1571,8 +1607,7 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
|
|
|
WLAN_LOG_INDICATOR_HOST_DRIVER,
|
|
|
WLAN_LOG_REASON_ROAM_HO_FAILURE, false, false);
|
|
|
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
- cm_remove_cmd(cm_ctx, &cm_id);
|
|
|
+ cm_remove_cmd(cm_ctx, &cm_id);
|
|
|
|
|
|
error:
|
|
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|