Browse Source

qcacld-3.0: Add legacy pointer in connection manager context

Add legacy pointer in connection manager context to use for RSO
and other connection manager legacy operations.

Change-Id: Ibc665f53d77aebb3f248fedbdffd1cfe86492b25
CRs-Fixed: 2845980
gaurank kathpalia 4 years ago
parent
commit
835437cad6

+ 3 - 1
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2021 The Linux Foundation. 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
@@ -1734,6 +1734,8 @@ static struct mlme_ext_ops ext_ops = {
 	.mlme_vdev_ext_hdl_post_create = vdevmgr_mlme_ext_post_hdl_create,
 	.mlme_vdev_ext_delete_rsp = vdevmgr_vdev_delete_rsp_handle,
 #ifdef FEATURE_CM_ENABLE
+	.mlme_cm_ext_hdl_create_cb = cm_ext_hdl_create,
+        .mlme_cm_ext_hdl_destroy_cb = cm_ext_hdl_destroy,
 	.mlme_cm_ext_connect_start_ind_cb = cm_connect_start_ind,
 	.mlme_cm_ext_connect_req_cb = cm_handle_connect_req,
 	.mlme_cm_ext_bss_peer_create_req_cb = cm_send_bss_peer_create_req,

+ 6 - 1
components/mlme/dispatcher/inc/wlan_ext_mlme_obj_types.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 The Linux Foundation. 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
@@ -46,4 +46,9 @@ typedef struct mlme_legacy_priv mlme_vdev_ext_t;
  */
 typedef struct wlan_mlme_psoc_ext_obj mlme_psoc_ext_t;
 
+/**
+ * typedef cm_ext_t - Definition of connection manager ext pointer
+ * Define ext_cm_ptr from legacy umac/mlme component to use
+ */
+typedef struct cm_ext_obj cm_ext_t;
 #endif

+ 34 - 1
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_api.h

@@ -27,7 +27,7 @@
 #ifdef FEATURE_CM_ENABLE
 #include <wlan_cm_public_struct.h>
 #include "scheduler_api.h"
-#include "connection_mgr/core/src/wlan_cm_main_api.h"
+#include "connection_mgr/core/src/wlan_cm_main.h"
 
 /**
  * struct cm_vdev_join_req - connect req from legacy CM to vdev manager
@@ -105,6 +105,39 @@ struct cm_peer_create_req {
 	struct qdf_mac_addr peer_mac;
 };
 
+/**
+ * struct cm_connect_config - connect config to be used to send info in
+ * RSO. This is the info we dont have in VDEV or CM ctx
+ * @rsn_cap: original rsn caps from the connect req from supplicant
+ */
+struct cm_connect_config {
+	uint8_t rsn_cap;
+};
+
+/**
+ * struct cm_ext_obj - Connection manager legacy object
+ * @connect_config: connect info to be used in RSO.
+ */
+struct cm_ext_obj {
+	struct cm_connect_config connect_config;
+};
+
+static inline QDF_STATUS cm_ext_hdl_create(struct cnx_mgr *cm_ctx)
+{
+	cm_ctx->ext_cm_ptr = qdf_mem_malloc(sizeof(struct cm_ext_obj));
+	if (!cm_ctx->ext_cm_ptr)
+		return QDF_STATUS_E_NOMEM;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS cm_ext_hdl_destroy(struct cnx_mgr *cm_ctx)
+{
+	qdf_mem_free(cm_ctx->ext_cm_ptr);
+
+	return QDF_STATUS_SUCCESS;
+}
+
 /**
  * cm_connect_start_ind() - Connection manager ext connect start indication
  * vdev and peer assoc state machine