From: Jes Sorensen Date: Fri, 9 May 2014 13:03:42 +0000 (+0200) Subject: staging: rtl8723au: Get rid of second set of custom error codes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1465967763933490aa8a31cbdd2c2205905c914f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8723au: Get rid of second set of custom error codes One set of custom error codes for the driver should more than suffice. This allows us to get rid of odm_types.h as well. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c b/drivers/staging/rtl8723au/hal/odm_HWConfig.c index 72441709697e..2d458bef922a 100644 --- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c @@ -426,12 +426,9 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, u8 *pMacStatus, u8 MacID, } -enum hal_status -ODM_ConfigRFWithHeaderFile23a( - struct dm_odm_t *pDM_Odm, - enum RF_RADIO_PATH Content, - enum RF_RADIO_PATH eRFPath - ) +int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm, + enum RF_RADIO_PATH Content, + enum RF_RADIO_PATH eRFPath) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===>ODM_ConfigRFWithHeaderFile23a\n")); @@ -446,14 +443,11 @@ ODM_ConfigRFWithHeaderFile23a( } ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE, ("ODM_ConfigRFWithHeaderFile23a: Radio No %x\n", eRFPath)); - return HAL_STATUS_SUCCESS; + return _SUCCESS; } -enum hal_status -ODM_ConfigBBWithHeaderFile23a( - struct dm_odm_t *pDM_Odm, - enum odm_bb_config_type ConfigType - ) +int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm, + enum odm_bb_config_type ConfigType) { if (pDM_Odm->SupportICType == ODM_RTL8723A) { if (ConfigType == CONFIG_BB_PHY_REG) @@ -465,17 +459,12 @@ ODM_ConfigBBWithHeaderFile23a( ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, (" ===> phy_ConfigBBWithHeaderFile() agc:Rtl8723PHY_REG_1TArray\n")); } - return HAL_STATUS_SUCCESS; + return _SUCCESS; } -enum hal_status -ODM_ConfigMACWithHeaderFile23a( - struct dm_odm_t *pDM_Odm - ) +int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm) { - u8 result = HAL_STATUS_SUCCESS; - if (pDM_Odm->SupportICType == ODM_RTL8723A) READ_AND_CONFIG_MP(8723A, _MAC_REG_); - return result; + return _SUCCESS; } diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c index 4860ba4e0188..5be4d83b8402 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c @@ -422,8 +422,7 @@ s32 PHY_MACConfig8723A(struct rtw_adapter *Adapter) /* */ /* Config MAC */ /* */ - if (HAL_STATUS_FAILURE == - ODM_ConfigMACWithHeaderFile23a(&pHalData->odmpriv)) + if (ODM_ConfigMACWithHeaderFile23a(&pHalData->odmpriv) == _FAIL) rtStatus = _FAIL; /* 2010.07.13 AMPDU aggregation number 9 */ @@ -751,8 +750,8 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter) /* 1. Read PHY_REG.TXT BB INIT!! */ /* We will seperate as 88C / 92C according to chip version */ /* */ - if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv, - CONFIG_BB_PHY_REG)) + if (ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv, + CONFIG_BB_PHY_REG) == _FAIL) rtStatus = _FAIL; if (rtStatus != _SUCCESS) goto phy_BB8190_Config_ParaFile_Fail; @@ -782,8 +781,8 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter) /* */ /* 3. BB AGC table Initialization */ /* */ - if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv, - CONFIG_BB_AGC_TAB)) + if (ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv, + CONFIG_BB_AGC_TAB) == _FAIL) rtStatus = _FAIL; phy_BB8190_Config_ParaFile_Fail: diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c index d4f922a0675e..7fbad8eb2a20 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c @@ -453,11 +453,19 @@ static int phy_RF6052_Config_ParaFile(struct rtw_adapter *Adapter) /*----Initialize RF fom connfiguration file----*/ switch (eRFPath) { case RF_PATH_A: - if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv, (enum RF_RADIO_PATH)eRFPath, (enum RF_RADIO_PATH)eRFPath)) + if (ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv, + (enum RF_RADIO_PATH) + eRFPath, + (enum RF_RADIO_PATH) + eRFPath) == _FAIL) rtStatus = _FAIL; break; case RF_PATH_B: - if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv, (enum RF_RADIO_PATH)eRFPath, (enum RF_RADIO_PATH)eRFPath)) + if (ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv, + (enum RF_RADIO_PATH) + eRFPath, + (enum RF_RADIO_PATH) + eRFPath) == _FAIL) rtStatus = _FAIL; break; } diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h b/drivers/staging/rtl8723au/include/odm_HWConfig.h index 147855c96ad4..d2367ec95f17 100644 --- a/drivers/staging/rtl8723au/include/odm_HWConfig.h +++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h @@ -160,15 +160,13 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, bool bPacketBeacon ); -enum hal_status ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm, - enum RF_RADIO_PATH Content, - enum RF_RADIO_PATH eRFPath -); +int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm, + enum RF_RADIO_PATH Content, + enum RF_RADIO_PATH eRFPath); -enum hal_status ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm, - enum odm_bb_config_type ConfigType -); +int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm, + enum odm_bb_config_type ConfigType); -enum hal_status ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm); +int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm); #endif diff --git a/drivers/staging/rtl8723au/include/odm_precomp.h b/drivers/staging/rtl8723au/include/odm_precomp.h index f3fc2fad9884..fe6df738c3ce 100644 --- a/drivers/staging/rtl8723au/include/odm_precomp.h +++ b/drivers/staging/rtl8723au/include/odm_precomp.h @@ -16,8 +16,6 @@ #ifndef __ODM_PRECOMP_H__ #define __ODM_PRECOMP_H__ -#include "odm_types.h" - #define TEST_FALG___ 1 /* 2 Config Flags and Structs - defined by each ODM Type */ diff --git a/drivers/staging/rtl8723au/include/odm_types.h b/drivers/staging/rtl8723au/include/odm_types.h deleted file mode 100644 index 9f15f25476f5..000000000000 --- a/drivers/staging/rtl8723au/include/odm_types.h +++ /dev/null @@ -1,25 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - ******************************************************************************/ -#ifndef __ODM_TYPES_H__ -#define __ODM_TYPES_H__ - -/* Define Different SW team support */ - -enum hal_status { - HAL_STATUS_SUCCESS, - HAL_STATUS_FAILURE, -}; - -#endif /* __ODM_TYPES_H__ */