|
@@ -29,22 +29,6 @@
|
|
|
#include <scheduler_api.h>
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11BE_MLO
|
|
|
-/**
|
|
|
- * mlo_disconnect_no_lock - Start the disconnection process without acquiring
|
|
|
- * ML dev lock
|
|
|
- *
|
|
|
- * @vdev: pointer to vdev
|
|
|
- * @source: source of the request (can be connect or disconnect request)
|
|
|
- * @reason_code: reason for disconnect
|
|
|
- * @bssid: BSSID
|
|
|
- *
|
|
|
- * Return: QDF_STATUS
|
|
|
- */
|
|
|
-static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
|
|
|
- enum wlan_cm_source source,
|
|
|
- enum wlan_reason_code reason_code,
|
|
|
- struct qdf_mac_addr *bssid);
|
|
|
-
|
|
|
static inline void
|
|
|
mlo_allocate_and_copy_ies(struct wlan_cm_connect_req *target,
|
|
|
struct wlan_cm_connect_req *source)
|
|
@@ -122,25 +106,15 @@ ucfg_mlo_get_assoc_link_vdev(struct wlan_objmgr_vdev *vdev)
|
|
|
return mlo_get_assoc_link_vdev(mlo_dev_ctx);
|
|
|
}
|
|
|
|
|
|
-#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
|
|
-static QDF_STATUS
|
|
|
-mlo_validate_connect_req(struct wlan_objmgr_vdev *vdev,
|
|
|
- struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
- struct wlan_cm_connect_req *req)
|
|
|
-{
|
|
|
-/* check back to back connect handling */
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
-}
|
|
|
-#else
|
|
|
/**
|
|
|
- * mlo_is_mld_connected - Check whether MLD is connected
|
|
|
+ * mlo_is_mld_disconnected - Check whether MLD is disconnected
|
|
|
*
|
|
|
* @vdev: pointer to vdev
|
|
|
*
|
|
|
- * Return: true if mld is connected, false otherwise
|
|
|
+ * Return: true if mld is disconnected, false otherwise
|
|
|
*/
|
|
|
static inline
|
|
|
-bool mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
|
|
|
+bool mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
|
|
uint8_t i = 0;
|
|
@@ -152,28 +126,70 @@ bool mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
|
|
|
if (!mlo_dev_ctx->wlan_vdev_list[i])
|
|
|
continue;
|
|
|
|
|
|
- if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links)) {
|
|
|
- if (!wlan_cm_is_vdev_connected(mlo_dev_ctx->wlan_vdev_list[i]))
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (!wlan_cm_is_vdev_disconnected(mlo_dev_ctx->wlan_vdev_list[i]))
|
|
|
+ return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-bool ucfg_mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
|
|
|
+bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
- return mlo_is_mld_connected(vdev);
|
|
|
+ return mlo_is_mld_disconnected(vdev);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * mlo_is_mld_disconnected - Check whether MLD is disconnected
|
|
|
+ * mlo_send_link_disconnect- Issue the disconnect request on MLD links
|
|
|
+ *
|
|
|
+ * @mlo_dev_ctx: pointer to mlo dev context
|
|
|
+ * @source: disconnect source
|
|
|
+ * @reason_code: disconnect reason
|
|
|
+ * @bssid: bssid of AP to disconnect, can be null if not known
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mlo_send_link_disconnect(struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
+ enum wlan_cm_source source,
|
|
|
+ enum wlan_reason_code reason_code,
|
|
|
+ struct qdf_mac_addr *bssid)
|
|
|
+{
|
|
|
+ uint8_t i = 0;
|
|
|
+
|
|
|
+ for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
|
|
|
+ if (!mlo_dev_ctx->wlan_vdev_list[i])
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links) &&
|
|
|
+ mlo_dev_ctx->wlan_vdev_list[i] != mlo_get_assoc_link_vdev(mlo_dev_ctx))
|
|
|
+ wlan_cm_disconnect(mlo_dev_ctx->wlan_vdev_list[i],
|
|
|
+ CM_MLO_DISCONNECT, reason_code,
|
|
|
+ NULL);
|
|
|
+ }
|
|
|
+
|
|
|
+ wlan_cm_disconnect(mlo_get_assoc_link_vdev(mlo_dev_ctx),
|
|
|
+ source, reason_code, NULL);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
|
|
+static QDF_STATUS
|
|
|
+mlo_validate_connect_req(struct wlan_objmgr_vdev *vdev,
|
|
|
+ struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
+ struct wlan_cm_connect_req *req)
|
|
|
+{
|
|
|
+/* check back to back connect handling */
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+#else
|
|
|
+/**
|
|
|
+ * mlo_is_mld_connected - Check whether MLD is connected
|
|
|
*
|
|
|
* @vdev: pointer to vdev
|
|
|
*
|
|
|
- * Return: true if mld is disconnected, false otherwise
|
|
|
+ * Return: true if mld is connected, false otherwise
|
|
|
*/
|
|
|
static inline
|
|
|
-bool mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
|
|
|
+bool mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
|
|
uint8_t i = 0;
|
|
@@ -185,15 +201,17 @@ bool mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
|
|
|
if (!mlo_dev_ctx->wlan_vdev_list[i])
|
|
|
continue;
|
|
|
|
|
|
- if (!wlan_cm_is_vdev_disconnected(mlo_dev_ctx->wlan_vdev_list[i]))
|
|
|
- return false;
|
|
|
+ if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links)) {
|
|
|
+ if (!wlan_cm_is_vdev_connected(mlo_dev_ctx->wlan_vdev_list[i]))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
|
|
|
+bool ucfg_mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
- return mlo_is_mld_disconnected(vdev);
|
|
|
+ return mlo_is_mld_connected(vdev);
|
|
|
}
|
|
|
|
|
|
static inline
|
|
@@ -239,6 +257,39 @@ mlo_cm_handle_connect_in_disconnection_state(struct wlan_objmgr_vdev *vdev,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
|
|
|
+ enum wlan_cm_source source,
|
|
|
+ enum wlan_reason_code reason_code,
|
|
|
+ struct qdf_mac_addr *bssid)
|
|
|
+{
|
|
|
+ struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
|
|
+ struct wlan_mlo_sta *sta_ctx = NULL;
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
+ if (mlo_dev_ctx) {
|
|
|
+ sta_ctx = mlo_dev_ctx->sta_ctx;
|
|
|
+ if (!sta_ctx)
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+
|
|
|
+ if (sta_ctx->connect_req) {
|
|
|
+ mlo_free_connect_ies(sta_ctx->connect_req);
|
|
|
+ qdf_mem_free(sta_ctx->connect_req);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ return status;
|
|
|
+}
|
|
|
+
|
|
|
static void
|
|
|
mlo_cm_handle_connect_in_connection_state(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_cm_connect_req *req)
|
|
@@ -672,41 +723,7 @@ void mlo_sta_link_connect_notify(struct wlan_objmgr_vdev *vdev,
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * mlo_send_link_disconnect- Issue the disconnect request on MLD links
|
|
|
- *
|
|
|
- * @mlo_dev_ctx: pointer to mlo dev context
|
|
|
- * @source: disconnect source
|
|
|
- * @reason_code: disconnect reason
|
|
|
- * @bssid: bssid of AP to disconnect, can be null if not known
|
|
|
- *
|
|
|
- * Return: QDF_STATUS
|
|
|
- */
|
|
|
-static QDF_STATUS
|
|
|
-mlo_send_link_disconnect(struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
- enum wlan_cm_source source,
|
|
|
- enum wlan_reason_code reason_code,
|
|
|
- struct qdf_mac_addr *bssid)
|
|
|
-{
|
|
|
- uint8_t i = 0;
|
|
|
-
|
|
|
- for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
|
|
|
- if (!mlo_dev_ctx->wlan_vdev_list[i])
|
|
|
- continue;
|
|
|
-
|
|
|
- if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links) &&
|
|
|
- mlo_dev_ctx->wlan_vdev_list[i] != mlo_get_assoc_link_vdev(mlo_dev_ctx))
|
|
|
- wlan_cm_disconnect(mlo_dev_ctx->wlan_vdev_list[i],
|
|
|
- CM_MLO_DISCONNECT, reason_code,
|
|
|
- NULL);
|
|
|
- }
|
|
|
-
|
|
|
- wlan_cm_disconnect(mlo_get_assoc_link_vdev(mlo_dev_ctx),
|
|
|
- source, reason_code, NULL);
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * mlo_send_link_disconnect- Issue sync the disconnect request on MLD links
|
|
|
+ * mlo_send_link_disconnect_sync- Issue sync the disconnect request on MLD links
|
|
|
*
|
|
|
* @mlo_dev_ctx: pointer to mlo dev context
|
|
|
* @source: disconnect source
|
|
@@ -738,39 +755,6 @@ mlo_send_link_disconnect_sync(struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
|
|
|
- enum wlan_cm_source source,
|
|
|
- enum wlan_reason_code reason_code,
|
|
|
- struct qdf_mac_addr *bssid)
|
|
|
-{
|
|
|
- struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
|
|
- struct wlan_mlo_sta *sta_ctx = NULL;
|
|
|
- QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
-
|
|
|
- if (mlo_dev_ctx) {
|
|
|
- sta_ctx = mlo_dev_ctx->sta_ctx;
|
|
|
- if (!sta_ctx)
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
-
|
|
|
- if (sta_ctx->connect_req) {
|
|
|
- mlo_free_connect_ies(sta_ctx->connect_req);
|
|
|
- qdf_mem_free(sta_ctx->connect_req);
|
|
|
- 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);
|
|
|
- }
|
|
|
-
|
|
|
- return status;
|
|
|
-}
|
|
|
-
|
|
|
QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
|
|
|
enum wlan_cm_source source,
|
|
|
enum wlan_reason_code reason_code,
|
|
@@ -889,7 +873,6 @@ static
|
|
|
void mlo_handle_disconnect_resp(struct wlan_mlo_dev_context *mlo_dev_ctx,
|
|
|
struct wlan_cm_discon_rsp *resp)
|
|
|
{ }
|
|
|
-#endif
|
|
|
|
|
|
static QDF_STATUS ml_activate_connect_req_sched_cb(struct scheduler_msg *msg)
|
|
|
{
|
|
@@ -935,6 +918,7 @@ static QDF_STATUS ml_activate_connect_req_flush_cb(struct scheduler_msg *msg)
|
|
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
|
|
static inline
|