浏览代码

qcacld-3.0: Add new files for CM roaming

New files added for handling FW based roaming
in connection manager.

Change-Id: Ibb5b74475699719cb901bf067f5d498ad16e0a60
CRs-Fixed: 2864490
Amruta Kulkarni 4 年之前
父节点
当前提交
999081053f

+ 7 - 0
Kbuild

@@ -1380,6 +1380,7 @@ UMAC_MLME_OBJS += $(WLAN_COMMON_ROOT)/umac/mlme/connection_mgr/core/src/wlan_cm_
 ifeq ($(CONFIG_QCACLD_WLAN_LFR3), y)
 # Add LFR3/FW roam specific connection manager files here
 UMAC_MLME_OBJS += $(WLAN_COMMON_ROOT)/umac/mlme/connection_mgr/core/src/wlan_cm_roam_util.o
+
 endif
 ifeq ($(CONFIG_QCACLD_WLAN_LFR2), y)
 # Add LFR2/host roam specific connection manager files here
@@ -1422,6 +1423,12 @@ MLME_OBJS +=    $(CM_DIR)/dispatcher/src/wlan_cm_tgt_if_tx_api.o \
 		$(CM_DIR)/core/src/wlan_cm_vdev_connect.o \
 		$(CM_DIR)/core/src/wlan_cm_vdev_disconnect.o
 
+ifeq ($(CONFIG_QCACLD_WLAN_LFR3), y)
+MLME_OBJS +=    $(CM_TGT_IF_DIR)/src/target_if_cm_roam_event.o \
+		$(CM_DIR)/core/src/wlan_cm_roam_fw_sync.o \
+		$(CM_DIR)/core/src/wlan_cm_roam_offload_event.o
+endif
+
 ####### WFA_CONFIG ########
 
 WFA_DIR := components/umac/mlme/wfa_config

+ 41 - 0
components/target_if/connection_mgr/inc/target_if_cm_roam_event.h

@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2020-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 above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains definitions for target_if
+ * roaming events.
+ */
+
+#ifndef TARGET_IF_CM_ROAM_EVENT_H__
+#define TARGET_IF_CM_ROAM_EVENT_H__
+
+#include "qdf_types.h"
+#include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
+#include "wlan_cm_roam_public_struct.h"
+
+/**
+ * target_if_cm_roam_register_rx_ops  - Target IF API to register roam
+ * related rx op.
+ * @rx_ops: Pointer to rx ops fp struct
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops);
+
+#endif

+ 31 - 0
components/target_if/connection_mgr/src/target_if_cm_roam_event.c

@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2020-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 above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains definitions for target_if roaming events.
+ */
+#include "qdf_types.h"
+#include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
+#include "target_if_cm_roam_event.h"
+
+QDF_STATUS
+target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
+{
+	return QDF_STATUS_SUCCESS;
+}
+

+ 40 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012-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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * DOC: wlan_cm_roam_fw_sync.c
+ *
+ * Implementation for the FW based roaming sync api interfaces.
+ */
+#include "qdf_types.h"
+#include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
+#include "wlan_cm_roam_i.h"
+
+QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
+{
+	return QDF_STATUS_SUCCESS;
+}
+

+ 82 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_i.h

@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2012-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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * DOC: wlan_cm_roam_i.h
+ *
+ * Implementation for the common roaming api interfaces.
+ */
+
+#ifndef _WLAN_CM_ROAM_I_H_
+#define _WLAN_CM_ROAM_I_H_
+
+#include "qdf_types.h"
+#include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
+
+/**
+ * cm_fw_roam_start_req() - Post roam start req to CM SM
+ * @psoc: psoc pointer
+ * @vdev_id: vdev id
+ *
+ * This function posts roam start event change to connection manager
+ * state machine
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS cm_fw_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
+
+/**
+ * cm_fw_roam_start() - Handle roam start event
+ * @cm_ctx: connection mgr context
+ * @vdev_id: vdev id
+ * @pause_serialization: boolean indicating to pause serialization
+ *
+ * This function handles the roam start event received from FW.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS cm_fw_roam_start(struct cnx_mgr *cm_ctx, uint8_t vdev_id,
+			    bool pause_serialization);
+
+/**
+ * cm_fw_roam_sync_req() - Post roam sync to CM SM
+ * @psoc: psoc pointer
+ * @vdev_id: vdev id
+ *
+ * This function posts roam sync event change to connection manager
+ * state machine
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
+
+/**
+ * cm_fw_roam_sync_propagation() - Post roam sync propagation to CM SM
+ * @psoc: psoc pointer
+ * @vdev_id: vdev id
+ *
+ * This function posts roam sync propagation event change to connection manager
+ * state machine
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
+#endif /* _WLAN_CM_ROAM_I_H_ */

+ 39 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c

@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012-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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * DOC: wlan_cm_roam_offload_event.c
+ *
+ * Implementation for the FW based roaming events api interfaces.
+ */
+#include "qdf_status.h"
+#include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
+#include "wlan_cm_roam_i.h"
+
+QDF_STATUS cm_fw_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS cm_fw_roam_start(struct cnx_mgr *cm_ctx, uint8_t vdev_id,
+			    bool pause_serialization)
+{
+	return QDF_STATUS_SUCCESS;
+}

+ 9 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -1677,6 +1677,15 @@ struct wlan_cm_roam_tx_ops {
 #endif
 };
 
+/**
+ * wlan_cm_roam_rx_ops  - structure of tx function pointers for
+ * roaming related commands
+ * @roam_sync_event_rx: RX ops function pointer for roam sync event
+ */
+struct wlan_cm_roam_rx_ops {
+	QDF_STATUS (*roam_sync_event_rx)(struct wlan_objmgr_vdev *vdev);
+};
+
 /**
  * enum roam_scan_freq_scheme - Scan mode for triggering roam
  * ROAM_SCAN_FREQ_SCHEME_NO_SCAN: Indicates the fw to not scan.