qcacld-3.0: Add feature flag for DSRC feature

qcacld-2.0 to qcacld-3.0 propagation

Currently DSRC feature is compiled for all the
targets even if DSRC is not required.
Fix to protect DSRC changes with DSRC enabled feature.

Change-Id: I2e6f975366e1de8aa8afb818a073e1591f76d7fb
CRs-Fixed: 1053362
This commit is contained in:
Agrawal Ashish 2016-09-02 19:59:26 +05:30 • committed by Gerrit - the friendly Code Review server
commit b141b09b36
6 changed files with 266 additions and 6 deletions

17
Kbuild
View file

@ -145,6 +145,11 @@ ifeq ($(KERNEL_BUILD), 0)
#enable TSF get feature
CONFIG_WLAN_SYNC_TSF := y
#Enable DSRC feature
ifeq ($(CONFIG_QCA_WIFI_SDIO), 1)
CONFIG_WLAN_FEATURE_DSRC := y
endif
ifneq ($(CONFIG_ROME_IF),sdio)
#Flag to enable memdump feature
@ -349,7 +354,6 @@ HDD_OBJS := $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
$(HDD_SRC_DIR)/wlan_hdd_hostapd.o \
$(HDD_SRC_DIR)/wlan_hdd_ioctl.o \
$(HDD_SRC_DIR)/wlan_hdd_main.o \
$(HDD_SRC_DIR)/wlan_hdd_ocb.o \
$(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
$(HDD_SRC_DIR)/wlan_hdd_power.o \
$(HDD_SRC_DIR)/wlan_hdd_regulatory.o \
@ -361,6 +365,9 @@ HDD_OBJS := $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
$(HDD_SRC_DIR)/wlan_hdd_wmm.o \
$(HDD_SRC_DIR)/wlan_hdd_wowl.o
ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
HDD_OBJS+= $(HDD_SRC_DIR)/wlan_hdd_ocb.o
endif
ifeq ($(CONFIG_WLAN_FEATURE_LPSS),y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_lpass.o
@ -923,10 +930,12 @@ WMA_OBJS := $(WMA_SRC_DIR)/wma_main.o \
$(WMA_SRC_DIR)/wma_utils.o \
$(WMA_SRC_DIR)/wma_features.o \
$(WMA_SRC_DIR)/wma_dfs_interface.o \
$(WMA_SRC_DIR)/wma_ocb.o \
$(WMA_SRC_DIR)/wlan_qct_wma_legacy.o\
$(WMA_NDP_OBJS)
ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
WMA_OBJS+= $(WMA_DIR)/wma_ocb.o
endif
ifeq ($(CONFIG_MPC_UT_FRAMEWORK),y)
WMA_OBJS += $(WMA_SRC_DIR)/wma_utils_ut.o
endif
@ -1284,6 +1293,10 @@ CDEFINES += -DCONFIG_HL_SUPPORT \
-DFEATURE_WLAN_FORCE_SAP_SCC
endif
ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
CDEFINES += -DWLAN_FEATURE_DSRC
endif
#Enable USB specific APIS
ifeq ($(CONFIG_HIF_USB), 1)
CDEFINES += -DHIF_USB \

View file

@ -1061,8 +1061,10 @@ struct hdd_adapter_s {
struct sir_dcc_update_ndl_response dcc_update_ndl_resp;
/* MAC addresses used for OCB interfaces */
#ifdef WLAN_FEATURE_DSRC
struct qdf_mac_addr ocb_mac_address[QDF_MAX_CONCURRENCY_PERSONA];
int ocb_mac_addr_count;
#endif
/* BITMAP indicating pause reason */
uint32_t pause_map;

View file

@ -238,7 +238,7 @@ enum qca_wlan_vendor_attr_dcc_update_ndl {
QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX =
QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_AFTER_LAST - 1,
};
#ifdef WLAN_FEATURE_DSRC
void hdd_set_dot11p_config(hdd_context_t *hdd_ctx);
void hdd_remove_ocb_tx_header(struct sk_buff *skb);
@ -290,6 +290,97 @@ int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
void wlan_hdd_dcc_register_for_dcc_stats_event(hdd_context_t *hdd_ctx);
void wlan_hdd_dcc_stats_event(void *context_ptr, void *response_ptr);
#else
static inline void hdd_set_dot11p_config(hdd_context_t *hdd_ctx)
{
return;
}
static inline void hdd_remove_ocb_tx_header(struct sk_buff *skb)
{
return;
}
static inline int iw_set_dot11p_channel_sched(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
return 0;
}
static inline int wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
int data_len)
{
return 0;
}
static inline void wlan_hdd_dcc_register_for_dcc_stats_event(
hdd_context_t *hdd_ctx)
{
return;
}
static inline void wlan_hdd_dcc_stats_event(void *context_ptr,
void *response_ptr)
{
return;
}
#endif
#endif /* __WLAN_HDD_OCB_H */

View file

@ -1021,6 +1021,7 @@ QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
int32_t val);
void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log);
#ifdef WLAN_FEATURE_DSRC
void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
@ -1058,6 +1059,81 @@ QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
ocb_callback callback);
QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal);
#else
static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p)
{
return;
}
static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
ocb_callback callback,
struct sir_ocb_config *config)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_ocb_start_timing_advert(
struct sir_ocb_timing_advert *timing_advert)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert
*timing_advert)
{
return QDF_STATUS_SUCCESS;
}
static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal,
tSirMacAddr self_addr, uint8_t **buf,
uint32_t *timestamp_offset,
uint32_t *time_value_offset)
{
return 0;
}
static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
ocb_callback callback,
struct sir_ocb_get_tsf_timer *request)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
ocb_callback callback,
struct sir_dcc_get_stats *request)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id,
uint32_t dcc_stats_bitmap)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
ocb_callback callback,
struct sir_dcc_update_ndl *request)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal,
void *context, ocb_callback callback)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal)
{
return QDF_STATUS_SUCCESS;
}
#endif
void sme_add_set_thermal_level_callback(tHalHandle hal,
sme_set_thermal_level_callback callback);

View file

@ -11060,7 +11060,7 @@ void sme_get_command_q_status(tHalHandle hHal)
return;
}
#ifdef WLAN_FEATURE_DSRC
/**
* sme_set_dot11p_config() - API to set the 802.11p config
* @hHal: The handle returned by macOpen
@ -11633,6 +11633,7 @@ QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle h_hal)
return status;
}
#endif
void sme_get_recovery_stats(tHalHandle hHal)
{

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -31,6 +31,7 @@
#include "wma.h"
#include "sir_api.h"
#ifdef WLAN_FEATURE_DSRC
int wma_ocb_set_config_resp(tp_wma_handle wma_handle, uint8_t status);
int wma_ocb_set_config_req(tp_wma_handle handle,
@ -64,5 +65,81 @@ int wma_dcc_update_ndl(tp_wma_handle wma_handle,
struct sir_dcc_update_ndl *update_ndl_param);
int wma_ocb_register_event_handlers(tp_wma_handle wma_handle);
#else
static inline int wma_ocb_set_config_resp(tp_wma_handle wma_handle,
uint8_t status)
{
return 0;
}
static inline int wma_ocb_set_config_req(tp_wma_handle handle,
struct sir_ocb_config *config_req)
{
return 0;
}
static inline int wma_ocb_set_config_event_handler(void *handle,
uint8_t *event_buf, uint32_t len)
{
return 0;
}
static inline int wma_ocb_start_resp_ind_cont(tp_wma_handle wma_handle)
{
return 0;
}
static inline int wma_ocb_set_config(tp_wma_handle wma_handle,
struct sir_ocb_config *config)
{
return 0;
}
static inline int wma_ocb_set_utc_time(tp_wma_handle wma_handle,
struct sir_ocb_utc *utc)
{
return 0;
}
static inline int wma_ocb_start_timing_advert(tp_wma_handle wma_handle,
struct sir_ocb_timing_advert *timing_advert)
{
return 0;
}
static inline int wma_ocb_stop_timing_advert(tp_wma_handle wma_handle,
struct sir_ocb_timing_advert *timing_advert)
{
return 0;
}
static inline int wma_ocb_get_tsf_timer(tp_wma_handle wma_handle,
struct sir_ocb_get_tsf_timer *request)
{
return 0;
}
static inline int wma_dcc_get_stats(tp_wma_handle wma_handle,
struct sir_dcc_get_stats *get_stats_param)
{
return 0 ;
}
static inline int wma_dcc_clear_stats(tp_wma_handle wma_handle,
struct sir_dcc_clear_stats *clear_stats_param)
{
return 0;
}
static inline int wma_dcc_update_ndl(tp_wma_handle wma_handle,
struct sir_dcc_update_ndl *update_ndl_param)
{
return 0;
}
static inline int wma_ocb_register_event_handlers(tp_wma_handle wma_handle)
{
return 0;
}
#endif
#endif /* __WMA_OCB_H */