qcacmn: Code cleanup for connection manager Macro

Code cleanup for connection manager Macro.

Change-Id: I1526187e5efc6f4e38265d617c0342b4c1ea1228
CRs-Fixed: 2978727
This commit is contained in:
Abhishek Singh
2021-05-25 11:53:53 +05:30
committed by Madan Koyyalamudi
parent 35de216ce0
commit 04a8eb2045
12 changed files with 1 additions and 91 deletions

View File

@@ -24,7 +24,6 @@
#ifndef __OSIF_CM_REQ_H
#define __OSIF_CM_REQ_H
#ifdef FEATURE_CM_ENABLE
#include "qdf_status.h"
#include "wlan_cm_public_struct.h"
#include <net/cfg80211.h>
@@ -100,5 +99,4 @@ int osif_cm_disconnect(struct net_device *dev, struct wlan_objmgr_vdev *vdev,
*/
int osif_cm_disconnect_sync(struct wlan_objmgr_vdev *vdev, uint16_t reason);
#endif
#endif /* __OSIF_CM_REQ_H */

View File

@@ -68,7 +68,6 @@ osif_cm_qca_reason_to_str(enum qca_disconnect_reason_codes reason);
enum qca_disconnect_reason_codes
osif_cm_mac_to_qca_reason(enum wlan_reason_code internal_reason);
#ifdef FEATURE_CM_ENABLE
/**
* osif_cm_register_cb() - API to register connection manager
* callbacks.
@@ -440,21 +439,4 @@ void osif_cm_set_legacy_cb(struct osif_cm_ops *osif_legacy_ops);
*/
void osif_cm_reset_legacy_cb(void);
#else
static inline QDF_STATUS osif_cm_osif_priv_init(struct wlan_objmgr_vdev *vdev)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS osif_cm_osif_priv_deinit(struct wlan_objmgr_vdev *vdev)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS osif_cm_register_cb(void)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif /* __OSIF_CM_UTIL_H */

View File

@@ -24,7 +24,6 @@
#ifndef __OSIF_CM_RSP_H
#define __OSIF_CM_RSP_H
#ifdef FEATURE_CM_ENABLE
#include "wlan_objmgr_vdev_obj.h"
#include "wlan_cm_public_struct.h"
@@ -135,5 +134,4 @@ osif_indicate_reassoc_results(struct wlan_objmgr_vdev *vdev,
QDF_STATUS osif_failed_candidate_handler(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp);
#endif /* FEATURE_CM_ENABLE */
#endif /* __OSIF_CM_RSP_H */

View File

@@ -160,7 +160,6 @@ osif_cm_mac_to_qca_reason(enum wlan_reason_code internal_reason)
return reason;
}
#ifdef FEATURE_CM_ENABLE
static struct osif_cm_ops *osif_cm_legacy_ops;
void osif_cm_reset_id_and_src_no_lock(struct vdev_osif_priv *osif_priv)
@@ -634,4 +633,3 @@ void osif_cm_reset_legacy_cb(void)
{
osif_cm_legacy_ops = NULL;
}
#endif

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2017,2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2017,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
@@ -41,7 +41,6 @@ struct pdev_osif_priv {
struct qdf_net_if *nif;
};
#ifdef FEATURE_CM_ENABLE
/**
* struct osif_cm_info - osif connection manager info
* @last_source: Last command request source
@@ -55,7 +54,6 @@ struct osif_cm_info {
struct qdf_spinlock cmd_id_lock;
void *ext_priv;
};
#endif
/**
* struct vdev_osif_priv - OS private structure of vdev
@@ -68,9 +66,7 @@ struct vdev_osif_priv {
struct wireless_dev *wdev;
void *legacy_osif_priv;
struct osif_tdls_vdev *osif_tdls;
#ifdef FEATURE_CM_ENABLE
struct osif_cm_info cm_info;
#endif
};
#endif

View File

@@ -25,8 +25,6 @@
#include "include/wlan_vdev_mlme.h"
#include <qdf_event.h>
#ifdef FEATURE_CM_ENABLE
#include <wlan_cm_public_struct.h>
/* Max candidate/attempts to be tried to connect */
@@ -298,18 +296,4 @@ QDF_STATUS wlan_cm_init(struct vdev_mlme_obj *vdev_mlme);
* FAILURE, if deletion fails
*/
QDF_STATUS wlan_cm_deinit(struct vdev_mlme_obj *vdev_mlme);
#else
static inline QDF_STATUS wlan_cm_init(struct vdev_mlme_obj *vdev_mlme)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS wlan_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
{
return QDF_STATUS_SUCCESS;
}
#endif /* FEATURE_CM_ENABLE */
#endif /* __WLAN_CM_MAIN_H__ */

View File

@@ -23,7 +23,6 @@
#ifndef __WLAN_CM_SM_H__
#define __WLAN_CM_SM_H__
#ifdef FEATURE_CM_ENABLE
#include <wlan_sm_engine.h>
/**
@@ -339,6 +338,4 @@ QDF_STATUS cm_sm_deliver_event_sync(struct cnx_mgr *cm_ctx,
QDF_STATUS cm_sm_deliver_event(struct wlan_objmgr_vdev *vdev,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data);
#endif /* FEATURE_CM_ENABLE */
#endif /* __WLAN_CM_SM_H__ */

View File

@@ -23,7 +23,6 @@
#ifndef __WLAN_CM_API_H
#define __WLAN_CM_API_H
#ifdef FEATURE_CM_ENABLE
#include "wlan_cm_public_struct.h"
#include "wlan_ext_mlme_obj_types.h"
@@ -450,16 +449,4 @@ void wlan_cm_set_candidate_custom_sort_cb(
void (*sort_fun)(struct wlan_objmgr_vdev *vdev,
qdf_list_t *list));
#endif
#else
#ifdef WLAN_POLICY_MGR_ENABLE
static inline void
wlan_cm_hw_mode_change_resp(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
uint32_t cm_id, QDF_STATUS status)
{
}
#endif /* ifdef POLICY_MGR_ENABLE */
#endif
#endif /* __WLAN_CM_UCFG_API_H */

View File

@@ -23,7 +23,6 @@
#ifndef __WLAN_CM_PUBLIC_STRUCT_H__
#define __WLAN_CM_PUBLIC_STRUCT_H__
#ifdef FEATURE_CM_ENABLE
#include <wlan_scan_public_structs.h>
#include "wlan_crypto_global_def.h"
#include "qdf_status.h"
@@ -572,6 +571,4 @@ enum wlan_cm_active_request_type {
CM_ROAM_ACTIVE,
};
#endif /* FEATURE_CM_ENABLE */
#endif /* __WLAN_CM_PUBLIC_STRUCT_H__ */

View File

@@ -23,8 +23,6 @@
#ifndef __WLAN_CM_UCFG_API_H
#define __WLAN_CM_UCFG_API_H
#ifdef FEATURE_CM_ENABLE
#include <wlan_cm_api.h>
/**
@@ -189,7 +187,4 @@ const char *ucfg_cm_reason_code_to_str(enum wlan_reason_code reason)
{
return wlan_cm_reason_code_to_str(reason);
}
#endif
#endif /* __WLAN_CM_UCFG_API_H */

View File

@@ -23,11 +23,7 @@
#include <include/wlan_psoc_mlme.h>
#include <include/wlan_pdev_mlme.h>
#include <include/wlan_vdev_mlme.h>
#ifdef FEATURE_CM_ENABLE
#include "wlan_cm_public_struct.h"
#endif
#ifdef FEATURE_CM_ENABLE
/**
* mlme_cm_ops: connection manager osif callbacks
@@ -117,7 +113,6 @@ struct mlme_cm_ops {
#endif
#endif
};
#endif
/**
* struct vdev_mlme_ext_ops - VDEV MLME legacy callbacks structure
@@ -198,7 +193,6 @@ struct mlme_ext_ops {
QDF_STATUS (*mlme_multi_vdev_restart_resp)(
struct wlan_objmgr_psoc *psoc,
struct multi_vdev_restart_resp *resp);
#ifdef FEATURE_CM_ENABLE
QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct wlan_objmgr_vdev *vdev,
cm_ext_t **ext_cm_ptr);
QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
@@ -236,7 +230,6 @@ struct mlme_ext_ops {
QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
struct wlan_objmgr_vdev *vdev,
struct wlan_cm_vdev_reassoc_req *req);
#endif
};
/**
@@ -435,7 +428,6 @@ QDF_STATUS wlan_cmn_mlme_deinit(void);
QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
struct vdev_delete_response *rsp);
#ifdef FEATURE_CM_ENABLE
/**
* mlme_cm_ext_hdl_create() - Connection manager callback to create ext
* context
@@ -746,5 +738,3 @@ typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
#endif
#endif

View File

@@ -30,7 +30,6 @@
struct mlme_ext_ops *glbl_ops;
mlme_get_global_ops_cb glbl_ops_cb;
#ifdef FEATURE_CM_ENABLE
struct mlme_cm_ops *glbl_cm_ops;
osif_cm_get_global_ops_cb glbl_cm_ops_cb;
@@ -45,15 +44,6 @@ static void mlme_cm_ops_deinit(void)
if (glbl_cm_ops_cb)
glbl_cm_ops = NULL;
}
#else
static inline void mlme_cm_ops_init(void)
{
}
static inline void mlme_cm_ops_deinit(void)
{
}
#endif
QDF_STATUS wlan_cmn_mlme_init(void)
{
@@ -246,7 +236,6 @@ QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
return ret;
}
#ifdef FEATURE_CM_ENABLE
QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
cm_ext_t **ext_cm_ptr)
{
@@ -558,7 +547,6 @@ void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb osif_cm_ops)
{
glbl_cm_ops_cb = osif_cm_ops;
}
#endif
void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb)
{