From 650d916982a9bf804fa6f915157b1eb89392a028 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 7 Jun 2018 15:08:49 -0700 Subject: [PATCH] qcacld-3.0: Remap tSirRetStatus to QDF_STATUS The protocol stack has some lingering uses of the legacy status enumeration tSirRetStatus. There is a plan to transition all of these to QDF_STATUS. As the next step of this plan replace the tSirRetStatus definition with macros that map to QDF_STATUS identifiers. This will ensure that the transition does not have any side effects, and will provide the mappings to be used to allow a global replace of tSirRetStatus identifiers with QDF_STATUS identifiers. Change-Id: Ied64393500d78b5059b68536fc5511918188962b CRs-Fixed: 2261128 --- core/mac/inc/sir_types.h | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/core/mac/inc/sir_types.h b/core/mac/inc/sir_types.h index 33cb05a36d27..a75aafd7a848 100644 --- a/core/mac/inc/sir_types.h +++ b/core/mac/inc/sir_types.h @@ -27,9 +27,9 @@ #ifndef __SIR_TYPES_H #define __SIR_TYPES_H +#include #include - /** * typedef mac_handle_t - MAC Handle * @@ -69,28 +69,25 @@ typedef mac_handle_t tHalHandle; struct opaque_hdd_handle; typedef struct opaque_hdd_handle *hdd_handle_t; -/* ********************************************** * -* * -* SIRIUS ERROR Codes / Return Codes * -* * -* ********************************************** */ +/* + * map legacy definitions to current definitions + * these will be removed when all legacy references are converted + */ +typedef QDF_STATUS tSirRetStatus; +#define eSIR_SUCCESS QDF_STATUS_SUCCESS +#define eSIR_FAILURE QDF_STATUS_E_FAILURE +#define eSIR_MEM_ALLOC_FAILED QDF_STATUS_E_NOMEM +#define eSIR_HAL_STA_DOES_NOT_EXIST QDF_STATUS_E_NOENT +#define eSIR_HAL_INPUT_INVALID QDF_STATUS_E_INVAL +#define eSIR_LIM_IGNORE_BEACON QDF_STATUS_E_INVAL +#define eSIR_LIM_INVALID_STA QDF_STATUS_E_NOENT +#define eSIR_LIM_MAX_STA_REACHED_ERROR QDF_STATUS_E_NOSPC +#define eSIR_CFG_INVALID_ID QDF_STATUS_E_INVAL +#define eSIR_CFG_INVALID_LEN QDF_STATUS_E_INVAL +#define eSIR_IGNORE_IE QDF_STATUS_E_INVAL -/* / Return status type */ -typedef enum eSirRetStatus { - eSIR_SUCCESS, - eSIR_FAILURE, - eSIR_MEM_ALLOC_FAILED, - eSIR_HAL_STA_DOES_NOT_EXIST, - eSIR_HAL_INPUT_INVALID, - eSIR_LIM_IGNORE_BEACON, - eSIR_LIM_INVALID_STA, - eSIR_LIM_MAX_STA_REACHED_ERROR, - eSIR_CFG_INVALID_ID, - eSIR_CFG_INVALID_LEN, - eSIR_IGNORE_IE, -} tSirRetStatus; +#define IS_SIR_STATUS_SUCCESS(status) QDF_IS_STATUS_SUCCESS(status) -#define IS_SIR_STATUS_SUCCESS(status) (eSIR_SUCCESS == status) typedef enum { HAL_STOP_TYPE_SYS_RESET, HAL_STOP_TYPE_SYS_DEEP_SLEEP,