diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-06-27 21:52:03 -0700 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-06-30 17:12:11 -0700 |
| commit | ccff00c9e735d68f247d26f8d3bd7658e757da25 (patch) | |
| tree | 6642aa0c6aa5ced5072352ce0e9ff5b016fc308f | |
| parent | 8ef225a748aceec435bbbd790afa5a6d5bfed99e (diff) | |
qcacld-3.0: Fix clang warning: implicit conversion from enum type '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
| -rw-r--r-- | core/cds/inc/cds_config.h | 17 | ||||
| -rw-r--r-- | core/cds/src/cds_api.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ftm.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 2 | ||||
| -rw-r--r-- | core/mac/inc/ani_global.h | 17 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_api.c | 6 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_message_queue.c | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_sme_req_messages.c | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_send_management_frames.c | 2 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/system/src/mac_init_api.c | 4 | ||||
| -rw-r--r-- | core/wma/inc/wma.h | 6 |
11 files changed, 17 insertions, 45 deletions
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index df1ab9416785..d648ee0e777f 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -31,21 +31,6 @@ #include "cdp_txrx_cfg.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 * @WLAN_SUB_20_CH_WIDTH_5: Use 5 mhz channel width * @WLAN_SUB_20_CH_WIDTH_10: Use 10 mhz channel width @@ -131,7 +116,7 @@ struct cds_config_info { uint8_t sta_maxlimod_dtim; uint8_t sta_mod_dtim; uint8_t sta_dynamic_dtim; - enum driver_type driver_type; + enum qdf_driver_type driver_type; uint8_t max_wow_filters; uint8_t wow_enable; uint8_t ol_ini_info; diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index e3e05bc36f9f..9a254fde70b0 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -411,7 +411,7 @@ QDF_STATUS cds_open(void) * into hdd context config entry, leads to pe_open() to fail, if * 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; HTCHandle = cds_get_context(QDF_MODULE_ID_HTC); diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c index 2cceb9e83f0c..918ab7c215c4 100644 --- a/core/hdd/src/wlan_hdd_ftm.c +++ b/core/hdd/src/wlan_hdd_ftm.c @@ -128,7 +128,7 @@ int hdd_update_cds_config_ftm(hdd_context_t *hdd_ctx) return -ENOMEM; } - cds_cfg->driver_type = eDRIVER_TYPE_MFG; + cds_cfg->driver_type = QDF_DRIVER_TYPE_MFG; cds_cfg->powersave_offload_enabled = hdd_ctx->config->enablePowersaveOffload; hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 934da0ac9caa..7ccb7c0542be 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7859,7 +7859,7 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) return -ENOMEM; } - cds_cfg->driver_type = DRIVER_TYPE_PRODUCTION; + cds_cfg->driver_type = QDF_DRIVER_TYPE_PRODUCTION; if (!hdd_ctx->config->nMaxPsPoll || !hdd_ctx->config->enablePowersaveOffload) { cds_cfg->powersave_offload_enabled = diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index b816e01ef010..18c42c6c593d 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -850,22 +850,9 @@ typedef struct sRrmContext { tRrmPEContext rrmPEContext; } 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 { /* parametes for the Firmware */ - tDriverType driverType; + enum qdf_driver_type driverType; } tHalMacStartParameters; @@ -910,7 +897,7 @@ struct vdev_type_nss { /* ------------------------------------------------------------------- */ /* / MAC Sirius parameter structure */ typedef struct sAniSirGlobal { - tDriverType gDriverType; + enum qdf_driver_type gDriverType; tAniSirCfg cfg; tAniSirLim lim; diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 6bbb250ff73b..b5d6a4f4985f 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -730,7 +730,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, struct cds_config_info *cds_cfg) { tSirRetStatus status = eSIR_SUCCESS; - if (DRIVER_TYPE_MFG == cds_cfg->driver_type) + if (QDF_DRIVER_TYPE_MFG == cds_cfg->driver_type) return eSIR_SUCCESS; pMac->lim.maxBssId = cds_cfg->max_bssid; @@ -802,7 +802,7 @@ tSirRetStatus pe_close(tpAniSirGlobal pMac) { uint8_t i; - if (ANI_DRIVER_TYPE(pMac) == eDRIVER_TYPE_MFG) + if (ANI_DRIVER_TYPE(pMac) == QDF_DRIVER_TYPE_MFG) return eSIR_SUCCESS; qdf_spinlock_destroy(&pMac->sys.bbt_mgmt_lock); @@ -957,7 +957,7 @@ tSirRetStatus pe_post_msg_api(tpAniSirGlobal pMac, tSirMsgQ *pMsg) tSirRetStatus pe_process_messages(tpAniSirGlobal pMac, tSirMsgQ *pMsg) { - if (ANI_DRIVER_TYPE(pMac) == eDRIVER_TYPE_MFG) { + if (ANI_DRIVER_TYPE(pMac) == QDF_DRIVER_TYPE_MFG) { return eSIR_SUCCESS; } /** diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index 32347c955f1a..cbc9f3d042a8 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -1287,7 +1287,7 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) tSirMbMsgP2p *p2p_msg = 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); msg->bodyptr = NULL; return; diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 4d2b7389fc2f..2990cb5fd7c5 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -543,7 +543,7 @@ static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal pMac, uint32_t *pMsgB msg.bodyptr = pMsgBuf; 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; pe_register_callbacks_with_wma(pMac, ready_req); pMac->lim.add_bssdescr_callback = ready_req->add_bssdescr_cb; diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 5d22d8e77ea0..e6ce02073bb1 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -559,7 +559,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, bool extracted_ext_cap_flag = false; /* 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; if (NULL == pe_session) diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c index 58c61ca3c616..9fe59fcd7553 100644 --- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c +++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c @@ -67,7 +67,7 @@ tSirRetStatus mac_start(tHalHandle hHal, void *pHalMacStartParams) pMac->gDriverType = ((tHalMacStartParameters *) pHalMacStartParams)->driverType; - if (ANI_DRIVER_TYPE(pMac) != eDRIVER_TYPE_MFG) { + if (ANI_DRIVER_TYPE(pMac) != QDF_DRIVER_TYPE_MFG) { status = pe_start(pMac); } @@ -124,7 +124,7 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd, * For Non-FTM cases this value will be reset during mac_start */ 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 */ if (eSIR_SUCCESS != cfg_init(p_mac)) diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 2685509c5c76..41c4c1c86f7a 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1492,7 +1492,7 @@ typedef struct { qdf_event_t recovery_event; uint16_t max_station; uint16_t max_bssid; - enum driver_type driver_type; + enum qdf_driver_type driver_type; uint8_t myaddr[IEEE80211_ADDR_LEN]; uint8_t hwaddr[IEEE80211_ADDR_LEN]; wmi_abi_version target_abi_vers; @@ -1721,7 +1721,7 @@ struct wma_target_cap { typedef struct { void *pConfigBuffer; uint16_t usConfigBufferLen; - enum driver_type driver_type; + enum qdf_driver_type driver_type; void *pUserData; void *pIndUserData; } t_wma_start_req; @@ -1740,7 +1740,7 @@ typedef enum { * @uConfigBufferLen: length of config buffer */ typedef struct qdf_packed sHalMacStartParameter { - tDriverType driverType; + enum qdf_driver_type driverType; uint32_t uConfigBufferLen; /* Following this there is a TLV formatted buffer of length |
