qcacld-3.0: Conditionally build TDLS component

Currently the TDLS component code is unconditionally built which will
bloat images where TDLS is not required. Fix this by only building the
TDLS component when the TDLS feature is enabled.

Change-Id: I7496b8f07ed495b00e62fc3cf50a96e1829d9341
CRs-Fixed: 2399966
This commit is contained in:
Jeff Johnson 2019-02-15 10:15:07 -08:00 committed by nshrivas
parent 7c0082d61d
commit 74c6bb25ba
4 changed files with 86 additions and 4 deletions

3
Kbuild
View File

@ -1028,6 +1028,8 @@ TDLS_TARGET_IF_SRC := components/target_if/tdls/src
TDLS_INC := -I$(WLAN_ROOT)/$(TDLS_DIR)/dispatcher/inc \
-I$(WLAN_ROOT)/$(TDLS_OS_IF_INC) \
-I$(WLAN_ROOT)/$(TDLS_TARGET_IF_INC)
ifeq ($(CONFIG_CONVERGED_TDLS_ENABLE), y)
TDLS_OBJS := $(TDLS_DIR)/core/src/wlan_tdls_main.o \
$(TDLS_DIR)/core/src/wlan_tdls_cmds_process.o \
$(TDLS_DIR)/core/src/wlan_tdls_peer.o \
@ -1039,6 +1041,7 @@ TDLS_OBJS := $(TDLS_DIR)/core/src/wlan_tdls_main.o \
$(TDLS_DIR)/dispatcher/src/wlan_tdls_cfg.o \
$(TDLS_OS_IF_SRC)/wlan_cfg80211_tdls.o \
$(TDLS_TARGET_IF_SRC)/target_if_tdls.o
endif
########### BMI ###########
BMI_DIR := core/bmi

View File

@ -32,6 +32,8 @@
#include <wlan_objmgr_pdev_obj.h>
#include <wlan_objmgr_vdev_obj.h>
#ifdef CONVERGED_TDLS_ENABLE
/**
* ucfg_tdls_init() - TDLS module initialization API
*
@ -253,4 +255,63 @@ QDF_STATUS ucfg_set_tdls_offchan_mode(struct wlan_objmgr_vdev *vdev,
*/
QDF_STATUS ucfg_set_tdls_secoffchanneloffset(struct wlan_objmgr_vdev *vdev,
int offchanoffset);
#else
static inline
QDF_STATUS ucfg_tdls_init(void)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_tdls_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_tdls_psoc_open(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_tdls_psoc_close(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_tdls_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *mac_addr,
struct qdf_mac_addr *dest_mac_addr)
{
}
static inline
void ucfg_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *mac_addr)
{
}
static inline
QDF_STATUS ucfg_tdls_teardown_links(struct wlan_objmgr_vdev *vdev)
{
return QDF_STATUS_SUCCESS;
}
#endif /* CONVERGED_TDLS_ENABLE */
#endif

View File

@ -1261,6 +1261,7 @@ void hdd_update_macaddr(struct hdd_context *hdd_ctx,
}
}
#ifdef CONVERGED_TDLS_ENABLE
static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
{
struct wlan_objmgr_psoc *psoc = hdd_ctx->psoc;
@ -1303,6 +1304,12 @@ static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
return 0;
}
#else
static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
{
return 0;
}
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static void hdd_update_roam_offload(struct hdd_context *hdd_ctx,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 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
@ -270,7 +270,18 @@ void hdd_notify_sta_disconnect(uint8_t session_id,
*/
void hdd_notify_teardown_tdls_links(struct wlan_objmgr_vdev *vdev);
#else
#else /* CONVERGED_TDLS_ENABLE */
static inline
QDF_STATUS wlan_cfg80211_tdls_priv_init(struct vdev_osif_priv *osif_priv)
{
return QDF_STATUS_SUCCESS;
}
static inline
void wlan_cfg80211_tdls_priv_deinit(struct vdev_osif_priv *osif_priv)
{
}
static inline void
hdd_notify_tdls_reset_adapter(struct wlan_objmgr_vdev *vdev)
{
@ -305,5 +316,5 @@ void hdd_notify_teardown_tdls_links(struct wlan_objmgr_vdev *vdev)
{
}
#endif
#endif
#endif /* CONVERGED_TDLS_ENABLE */
#endif /* _WLAN_CFG80211_TDLS_H_ */