staging: rtl8723au: Get rid of second set of custom error codes
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:03:42 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:11:59 +0000 (13:11 -0700)
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 <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/odm_HWConfig.c
drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
drivers/staging/rtl8723au/include/odm_HWConfig.h
drivers/staging/rtl8723au/include/odm_precomp.h
drivers/staging/rtl8723au/include/odm_types.h [deleted file]

index 72441709697e71300b37249992aeb9b957ef69ef..2d458bef922a248a303fde59477746298e9366d7 100644 (file)
@@ -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;
 }
index 4860ba4e0188c5db9432de4edb54b4ce760d7edd..5be4d83b8402e78e4743a4e96c281ec6fcb6745d 100644 (file)
@@ -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:
index d4f922a0675e30ca21c7810f4ad90c0a3ffffd6e..7fbad8eb2a204647b34f042bde5744a0333e7dd0 100644 (file)
@@ -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;
                }
index 147855c96ad45ae79ea1e50f01e83a4696d3cad4..d2367ec95f173c06e333a28fe6ba92e1496c5933 100644 (file)
@@ -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
index f3fc2fad98846c10afe8297a3a95d6d0973e10c8..fe6df738c3cef58725f29ae1c07b25bf2d9382cf 100644 (file)
@@ -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 (file)
index 9f15f25..0000000
+++ /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__ */