qcacld-3.0: Fix clang warning: implicit conversion enum tDriverType
warning: implicit conversion from enumeration type 'tDriverType' to different enumeration type 'enum driver_type' [-Wenum-conversion]. Move enum driver_type to QDF. Change-Id: Ic89e4ee512a2d70c27324446257286aaafd49839 CRs-Fixed: 2055487
This commit is contained in:
committed by
snandini
parent
4ffe7c8643
commit
35b003149c
@@ -30,21 +30,6 @@
|
|||||||
#include "osdep.h"
|
#include "osdep.h"
|
||||||
#include "cdp_txrx_mob_def.h"
|
#include "cdp_txrx_mob_def.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* enum driver_type - Indicate the driver type to the cds, and based on this
|
|
||||||
* do appropriate initialization.
|
|
||||||
*
|
|
||||||
* @DRIVER_TYPE_PRODUCTION: Driver used in the production
|
|
||||||
* @DRIVER_TYPE_MFG: Driver used in the Factory
|
|
||||||
* @DRIVER_TYPE_INVALID: Invalid and unrecognized type
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
enum driver_type {
|
|
||||||
DRIVER_TYPE_PRODUCTION = 0,
|
|
||||||
DRIVER_TYPE_MFG = 1,
|
|
||||||
DRIVER_TYPE_INVALID = 0x7FFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum cfg_sub_20_channel_width: ini values for su 20 mhz channel width
|
* enum cfg_sub_20_channel_width: ini values for su 20 mhz channel width
|
||||||
* @WLAN_SUB_20_CH_WIDTH_5: Use 5 mhz channel width
|
* @WLAN_SUB_20_CH_WIDTH_5: Use 5 mhz channel width
|
||||||
@@ -131,7 +116,7 @@ struct cds_config_info {
|
|||||||
uint8_t sta_maxlimod_dtim;
|
uint8_t sta_maxlimod_dtim;
|
||||||
uint8_t sta_mod_dtim;
|
uint8_t sta_mod_dtim;
|
||||||
uint8_t sta_dynamic_dtim;
|
uint8_t sta_dynamic_dtim;
|
||||||
enum driver_type driver_type;
|
enum qdf_driver_type driver_type;
|
||||||
uint8_t max_wow_filters;
|
uint8_t max_wow_filters;
|
||||||
uint8_t wow_enable;
|
uint8_t wow_enable;
|
||||||
uint8_t ol_ini_info;
|
uint8_t ol_ini_info;
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
|
|||||||
* into hdd context config entry, leads to pe_open() to fail, if
|
* into hdd context config entry, leads to pe_open() to fail, if
|
||||||
* con_mode change happens from FTM mode to any other mode.
|
* con_mode change happens from FTM mode to any other mode.
|
||||||
*/
|
*/
|
||||||
if (DRIVER_TYPE_PRODUCTION == cds_cfg->driver_type)
|
if (QDF_DRIVER_TYPE_PRODUCTION == cds_cfg->driver_type)
|
||||||
pHddCtx->config->maxNumberOfPeers = cds_cfg->max_station;
|
pHddCtx->config->maxNumberOfPeers = cds_cfg->max_station;
|
||||||
|
|
||||||
HTCHandle = cds_get_context(QDF_MODULE_ID_HTC);
|
HTCHandle = cds_get_context(QDF_MODULE_ID_HTC);
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ int hdd_update_cds_config_ftm(hdd_context_t *hdd_ctx)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
cds_cfg->driver_type = eDRIVER_TYPE_MFG;
|
cds_cfg->driver_type = QDF_DRIVER_TYPE_MFG;
|
||||||
cds_cfg->powersave_offload_enabled =
|
cds_cfg->powersave_offload_enabled =
|
||||||
hdd_ctx->config->enablePowersaveOffload;
|
hdd_ctx->config->enablePowersaveOffload;
|
||||||
hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx);
|
hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx);
|
||||||
|
|||||||
@@ -8025,7 +8025,7 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
cds_cfg->driver_type = DRIVER_TYPE_PRODUCTION;
|
cds_cfg->driver_type = QDF_DRIVER_TYPE_PRODUCTION;
|
||||||
if (!hdd_ctx->config->nMaxPsPoll ||
|
if (!hdd_ctx->config->nMaxPsPoll ||
|
||||||
!hdd_ctx->config->enablePowersaveOffload) {
|
!hdd_ctx->config->enablePowersaveOffload) {
|
||||||
cds_cfg->powersave_offload_enabled =
|
cds_cfg->powersave_offload_enabled =
|
||||||
|
|||||||
@@ -848,22 +848,9 @@ typedef struct sRrmContext {
|
|||||||
tRrmPEContext rrmPEContext;
|
tRrmPEContext rrmPEContext;
|
||||||
} tRrmContext, *tpRrmContext;
|
} tRrmContext, *tpRrmContext;
|
||||||
|
|
||||||
/**
|
|
||||||
* enum tDriverType - Indicate the driver type to the mac, and based on this
|
|
||||||
* do appropriate initialization.
|
|
||||||
*
|
|
||||||
* @eDRIVER_TYPE_PRODUCTION:
|
|
||||||
* @eDRIVER_TYPE_MFG:
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
eDRIVER_TYPE_PRODUCTION = 0,
|
|
||||||
eDRIVER_TYPE_MFG = 1,
|
|
||||||
} tDriverType;
|
|
||||||
|
|
||||||
typedef struct sHalMacStartParameters {
|
typedef struct sHalMacStartParameters {
|
||||||
/* parametes for the Firmware */
|
/* parametes for the Firmware */
|
||||||
tDriverType driverType;
|
enum qdf_driver_type driverType;
|
||||||
|
|
||||||
} tHalMacStartParameters;
|
} tHalMacStartParameters;
|
||||||
|
|
||||||
@@ -908,7 +895,7 @@ struct vdev_type_nss {
|
|||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
/* / MAC Sirius parameter structure */
|
/* / MAC Sirius parameter structure */
|
||||||
typedef struct sAniSirGlobal {
|
typedef struct sAniSirGlobal {
|
||||||
tDriverType gDriverType;
|
enum qdf_driver_type gDriverType;
|
||||||
|
|
||||||
tAniSirCfg cfg;
|
tAniSirCfg cfg;
|
||||||
tAniSirLim lim;
|
tAniSirLim lim;
|
||||||
|
|||||||
@@ -754,7 +754,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, struct cds_config_info *cds_cfg)
|
|||||||
{
|
{
|
||||||
tSirRetStatus status = eSIR_SUCCESS;
|
tSirRetStatus status = eSIR_SUCCESS;
|
||||||
|
|
||||||
if (DRIVER_TYPE_MFG == cds_cfg->driver_type)
|
if (QDF_DRIVER_TYPE_MFG == cds_cfg->driver_type)
|
||||||
return eSIR_SUCCESS;
|
return eSIR_SUCCESS;
|
||||||
|
|
||||||
pMac->lim.maxBssId = cds_cfg->max_bssid;
|
pMac->lim.maxBssId = cds_cfg->max_bssid;
|
||||||
@@ -829,7 +829,7 @@ tSirRetStatus pe_close(tpAniSirGlobal pMac)
|
|||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
if (ANI_DRIVER_TYPE(pMac) == eDRIVER_TYPE_MFG)
|
if (ANI_DRIVER_TYPE(pMac) == QDF_DRIVER_TYPE_MFG)
|
||||||
return eSIR_SUCCESS;
|
return eSIR_SUCCESS;
|
||||||
|
|
||||||
qdf_spinlock_destroy(&pMac->sys.bbt_mgmt_lock);
|
qdf_spinlock_destroy(&pMac->sys.bbt_mgmt_lock);
|
||||||
@@ -986,7 +986,7 @@ tSirRetStatus pe_post_msg_api(tpAniSirGlobal pMac, struct scheduler_msg *pMsg)
|
|||||||
tSirRetStatus pe_process_messages(tpAniSirGlobal pMac,
|
tSirRetStatus pe_process_messages(tpAniSirGlobal pMac,
|
||||||
struct scheduler_msg *pMsg)
|
struct scheduler_msg *pMsg)
|
||||||
{
|
{
|
||||||
if (ANI_DRIVER_TYPE(pMac) == eDRIVER_TYPE_MFG) {
|
if (ANI_DRIVER_TYPE(pMac) == QDF_DRIVER_TYPE_MFG) {
|
||||||
return eSIR_SUCCESS;
|
return eSIR_SUCCESS;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1255,7 +1255,7 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
|
|||||||
tSirMbMsgP2p *p2p_msg = NULL;
|
tSirMbMsgP2p *p2p_msg = NULL;
|
||||||
tSirSetActiveModeSetBncFilterReq *bcn_filter_req = NULL;
|
tSirSetActiveModeSetBncFilterReq *bcn_filter_req = NULL;
|
||||||
|
|
||||||
if (ANI_DRIVER_TYPE(mac_ctx) == eDRIVER_TYPE_MFG) {
|
if (ANI_DRIVER_TYPE(mac_ctx) == QDF_DRIVER_TYPE_MFG) {
|
||||||
qdf_mem_free(msg->bodyptr);
|
qdf_mem_free(msg->bodyptr);
|
||||||
msg->bodyptr = NULL;
|
msg->bodyptr = NULL;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal pMac, uint32_t *pMsgB
|
|||||||
msg.bodyptr = pMsgBuf;
|
msg.bodyptr = pMsgBuf;
|
||||||
msg.bodyval = 0;
|
msg.bodyval = 0;
|
||||||
|
|
||||||
if (ANI_DRIVER_TYPE(pMac) != eDRIVER_TYPE_MFG) {
|
if (ANI_DRIVER_TYPE(pMac) != QDF_DRIVER_TYPE_MFG) {
|
||||||
ready_req->pe_roam_synch_cb = pe_roam_synch_callback;
|
ready_req->pe_roam_synch_cb = pe_roam_synch_callback;
|
||||||
pe_register_mgmt_rx_frm_callback(pMac);
|
pe_register_mgmt_rx_frm_callback(pMac);
|
||||||
pe_register_callbacks_with_wma(pMac, ready_req);
|
pe_register_callbacks_with_wma(pMac, ready_req);
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
|
|||||||
bool extracted_ext_cap_flag = false;
|
bool extracted_ext_cap_flag = false;
|
||||||
|
|
||||||
/* We don't answer requests in this case*/
|
/* We don't answer requests in this case*/
|
||||||
if (ANI_DRIVER_TYPE(mac_ctx) == eDRIVER_TYPE_MFG)
|
if (ANI_DRIVER_TYPE(mac_ctx) == QDF_DRIVER_TYPE_MFG)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (NULL == pe_session)
|
if (NULL == pe_session)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ tSirRetStatus mac_start(tHalHandle hHal, void *pHalMacStartParams)
|
|||||||
pMac->gDriverType =
|
pMac->gDriverType =
|
||||||
((tHalMacStartParameters *) pHalMacStartParams)->driverType;
|
((tHalMacStartParameters *) pHalMacStartParams)->driverType;
|
||||||
|
|
||||||
if (ANI_DRIVER_TYPE(pMac) != eDRIVER_TYPE_MFG) {
|
if (ANI_DRIVER_TYPE(pMac) != QDF_DRIVER_TYPE_MFG) {
|
||||||
status = pe_start(pMac);
|
status = pe_start(pMac);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ tSirRetStatus mac_open(struct wlan_objmgr_psoc *psoc, tHalHandle *pHalHandle,
|
|||||||
* For Non-FTM cases this value will be reset during mac_start
|
* For Non-FTM cases this value will be reset during mac_start
|
||||||
*/
|
*/
|
||||||
if (cds_cfg->driver_type)
|
if (cds_cfg->driver_type)
|
||||||
p_mac->gDriverType = eDRIVER_TYPE_MFG;
|
p_mac->gDriverType = QDF_DRIVER_TYPE_MFG;
|
||||||
|
|
||||||
/* Call routine to initialize CFG data structures */
|
/* Call routine to initialize CFG data structures */
|
||||||
if (eSIR_SUCCESS != cfg_init(p_mac))
|
if (eSIR_SUCCESS != cfg_init(p_mac))
|
||||||
|
|||||||
@@ -1355,7 +1355,7 @@ typedef struct {
|
|||||||
qdf_event_t recovery_event;
|
qdf_event_t recovery_event;
|
||||||
uint16_t max_station;
|
uint16_t max_station;
|
||||||
uint16_t max_bssid;
|
uint16_t max_bssid;
|
||||||
enum driver_type driver_type;
|
enum qdf_driver_type driver_type;
|
||||||
uint8_t myaddr[IEEE80211_ADDR_LEN];
|
uint8_t myaddr[IEEE80211_ADDR_LEN];
|
||||||
uint8_t hwaddr[IEEE80211_ADDR_LEN];
|
uint8_t hwaddr[IEEE80211_ADDR_LEN];
|
||||||
wmi_abi_version target_abi_vers;
|
wmi_abi_version target_abi_vers;
|
||||||
@@ -1561,7 +1561,7 @@ struct wma_target_cap {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
void *pConfigBuffer;
|
void *pConfigBuffer;
|
||||||
uint16_t usConfigBufferLen;
|
uint16_t usConfigBufferLen;
|
||||||
enum driver_type driver_type;
|
enum qdf_driver_type driver_type;
|
||||||
void *pUserData;
|
void *pUserData;
|
||||||
void *pIndUserData;
|
void *pIndUserData;
|
||||||
} t_wma_start_req;
|
} t_wma_start_req;
|
||||||
@@ -1580,7 +1580,7 @@ typedef enum {
|
|||||||
* @uConfigBufferLen: length of config buffer
|
* @uConfigBufferLen: length of config buffer
|
||||||
*/
|
*/
|
||||||
typedef struct qdf_packed sHalMacStartParameter {
|
typedef struct qdf_packed sHalMacStartParameter {
|
||||||
tDriverType driverType;
|
enum qdf_driver_type driverType;
|
||||||
uint32_t uConfigBufferLen;
|
uint32_t uConfigBufferLen;
|
||||||
|
|
||||||
/* Following this there is a TLV formatted buffer of length
|
/* Following this there is a TLV formatted buffer of length
|
||||||
|
|||||||
Reference in New Issue
Block a user