|
@@ -13813,6 +13813,87 @@ free_scan_flter:
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
+QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
|
|
|
+{
|
|
|
+ struct wma_roam_invoke_cmd *roam_invoke_params;
|
|
|
+ struct scheduler_msg msg = {0};
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
+ struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
|
|
+ struct mlme_roam_after_data_stall *vdev_roam_params;
|
|
|
+ struct csr_roam_session *session;
|
|
|
+ struct csr_roam_profile *roam_profile;
|
|
|
+
|
|
|
+ if (!mac_ctx->mlme_cfg->gen.data_stall_recovery_fw_support) {
|
|
|
+ sme_debug("FW does not support data stall recovery, aborting roam invoke");
|
|
|
+ return QDF_STATUS_E_NOSUPPORT;
|
|
|
+ }
|
|
|
+
|
|
|
+ session = CSR_GET_SESSION(mac_ctx, vdev_id);
|
|
|
+ if (!session || !session->pCurRoamProfile) {
|
|
|
+ sme_err("session %d not found", vdev_id);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ roam_profile = session->pCurRoamProfile;
|
|
|
+ if (roam_profile->driver_disabled_roaming) {
|
|
|
+ sme_debug("roaming status in driver %d",
|
|
|
+ roam_profile->driver_disabled_roaming);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
|
|
|
+ WLAN_LEGACY_SME_ID);
|
|
|
+
|
|
|
+ if (!vdev) {
|
|
|
+ sme_err("vdev is NULL, aborting roam invoke");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ vdev_roam_params = mlme_get_roam_invoke_params(vdev);
|
|
|
+
|
|
|
+ if (!vdev_roam_params) {
|
|
|
+ sme_err("Invalid vdev roam params, aborting roam invoke");
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (vdev_roam_params->roam_invoke_in_progress) {
|
|
|
+ sme_debug("Roaming in progress set by source = %d, aborting this roam invoke",
|
|
|
+ vdev_roam_params->source);
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+ return QDF_STATUS_E_BUSY;
|
|
|
+ }
|
|
|
+
|
|
|
+ roam_invoke_params = qdf_mem_malloc(sizeof(*roam_invoke_params));
|
|
|
+ if (!roam_invoke_params) {
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+ roam_invoke_params->vdev_id = vdev_id;
|
|
|
+ /* Set forced roaming as true so that FW scans all ch, and connect */
|
|
|
+ roam_invoke_params->forced_roaming = true;
|
|
|
+
|
|
|
+ msg.type = eWNI_SME_ROAM_INVOKE;
|
|
|
+ msg.reserved = 0;
|
|
|
+ msg.bodyptr = roam_invoke_params;
|
|
|
+ status = scheduler_post_message(QDF_MODULE_ID_SME,
|
|
|
+ QDF_MODULE_ID_PE,
|
|
|
+ QDF_MODULE_ID_PE, &msg);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
|
|
|
+ qdf_mem_free(roam_invoke_params);
|
|
|
+ } else {
|
|
|
+ vdev_roam_params->roam_invoke_in_progress = true;
|
|
|
+ vdev_roam_params->source = CONNECTION_MGR_INITIATED;
|
|
|
+ sme_debug("Trigger roaming for vdev id %d source = CONNECTION_MGR_INITIATED",
|
|
|
+ session->sessionId);
|
|
|
+ }
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+
|
|
|
+ return status;
|
|
|
+}
|
|
|
+
|
|
|
QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|
|
struct csr_roam_profile *profile,
|
|
|
const tSirMacAddr bssid, int channel,
|
|
@@ -13824,6 +13905,8 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|
|
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
|
|
struct csr_roam_session *session;
|
|
|
struct csr_roam_profile *roam_profile;
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
+ struct mlme_roam_after_data_stall *vdev_roam_params;
|
|
|
|
|
|
session = CSR_GET_SESSION(mac_ctx, vdev_id);
|
|
|
if (!session || !session->pCurRoamProfile) {
|
|
@@ -13837,10 +13920,35 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|
|
roam_profile->driver_disabled_roaming);
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
+
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
|
|
|
+ WLAN_LEGACY_SME_ID);
|
|
|
+
|
|
|
+ if (!vdev) {
|
|
|
+ sme_err("vdev is NULL, aborting roam invoke");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ vdev_roam_params = mlme_get_roam_invoke_params(vdev);
|
|
|
+
|
|
|
+ if (!vdev_roam_params) {
|
|
|
+ sme_err("Invalid vdev roam params, aborting roam invoke");
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (vdev_roam_params->roam_invoke_in_progress) {
|
|
|
+ sme_debug("Roaming in progress set by source = %d, aborting this roam invoke",
|
|
|
+ vdev_roam_params->source);
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
fastreassoc = qdf_mem_malloc(sizeof(*fastreassoc));
|
|
|
- if (!fastreassoc)
|
|
|
+ if (!fastreassoc) {
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
return QDF_STATUS_E_NOMEM;
|
|
|
-
|
|
|
+ }
|
|
|
/* if both are same then set the flag */
|
|
|
if (!qdf_mem_cmp(connected_bssid, bssid, ETH_ALEN)) {
|
|
|
fastreassoc->is_same_bssid = true;
|
|
@@ -13861,13 +13969,18 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|
|
|
|
|
if (!channel) {
|
|
|
sme_err("channel retrieval from BSS desc fails!");
|
|
|
+ qdf_mem_free(fastreassoc->frame_buf);
|
|
|
+ fastreassoc->frame_buf = NULL;
|
|
|
+ fastreassoc->frame_len = 0;
|
|
|
qdf_mem_free(fastreassoc);
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
return QDF_STATUS_E_FAULT;
|
|
|
}
|
|
|
|
|
|
fastreassoc->channel = channel;
|
|
|
if (QDF_STATUS_SUCCESS != status) {
|
|
|
sme_warn("sme_get_beacon_frm failed");
|
|
|
+ qdf_mem_free(fastreassoc->frame_buf);
|
|
|
fastreassoc->frame_buf = NULL;
|
|
|
fastreassoc->frame_len = 0;
|
|
|
}
|
|
@@ -13888,11 +14001,20 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|
|
status = scheduler_post_message(QDF_MODULE_ID_SME,
|
|
|
QDF_MODULE_ID_PE,
|
|
|
QDF_MODULE_ID_PE, &msg);
|
|
|
- if (QDF_STATUS_SUCCESS != status) {
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
|
|
|
+ qdf_mem_free(fastreassoc->frame_buf);
|
|
|
+ fastreassoc->frame_buf = NULL;
|
|
|
+ fastreassoc->frame_len = 0;
|
|
|
qdf_mem_free(fastreassoc);
|
|
|
+ } else {
|
|
|
+ vdev_roam_params->roam_invoke_in_progress = true;
|
|
|
+ vdev_roam_params->source = USERSPACE_INITIATED;
|
|
|
+ sme_debug("Trigger roaming for vdev id %d source = USERSPACE_INITIATED",
|
|
|
+ session->sessionId);
|
|
|
}
|
|
|
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
return status;
|
|
|
}
|
|
|
#endif
|