root/drivers/staging/rtl8723bs/include/HalVerDef.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /******************************************************************************
   3  *
   4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
   5  *
   6  ******************************************************************************/
   7 #ifndef __HAL_VERSION_DEF_H__
   8 #define __HAL_VERSION_DEF_H__
   9 
  10 /*  HAL_IC_TYPE_E */
  11 typedef enum tag_HAL_IC_Type_Definition
  12 {
  13         CHIP_8192S      =       0,
  14         CHIP_8188C      =       1,
  15         CHIP_8192C      =       2,
  16         CHIP_8192D      =       3,
  17         CHIP_8723A      =       4,
  18         CHIP_8188E      =       5,
  19         CHIP_8812       =       6,
  20         CHIP_8821       =       7,
  21         CHIP_8723B      =       8,
  22         CHIP_8192E      =       9,
  23 }HAL_IC_TYPE_E;
  24 
  25 /* HAL_CHIP_TYPE_E */
  26 typedef enum tag_HAL_CHIP_Type_Definition
  27 {
  28         TEST_CHIP               =       0,
  29         NORMAL_CHIP     =       1,
  30         FPGA                    =       2,
  31 }HAL_CHIP_TYPE_E;
  32 
  33 /* HAL_CUT_VERSION_E */
  34 typedef enum tag_HAL_Cut_Version_Definition
  35 {
  36         A_CUT_VERSION           =       0,
  37         B_CUT_VERSION           =       1,
  38         C_CUT_VERSION           =       2,
  39         D_CUT_VERSION           =       3,
  40         E_CUT_VERSION           =       4,
  41         F_CUT_VERSION           =       5,
  42         G_CUT_VERSION           =       6,
  43         H_CUT_VERSION           =       7,
  44         I_CUT_VERSION           =       8,
  45         J_CUT_VERSION           =       9,
  46         K_CUT_VERSION           =       10,
  47 }HAL_CUT_VERSION_E;
  48 
  49 /*  HAL_Manufacturer */
  50 typedef enum tag_HAL_Manufacturer_Version_Definition
  51 {
  52         CHIP_VENDOR_TSMC        =       0,
  53         CHIP_VENDOR_UMC         =       1,
  54         CHIP_VENDOR_SMIC        =       2,
  55 }HAL_VENDOR_E;
  56 
  57 typedef enum tag_HAL_RF_Type_Definition
  58 {
  59         RF_TYPE_1T1R    =       0,
  60         RF_TYPE_1T2R    =       1,
  61         RF_TYPE_2T2R    =       2,
  62         RF_TYPE_2T3R    =       3,
  63         RF_TYPE_2T4R    =       4,
  64         RF_TYPE_3T3R    =       5,
  65         RF_TYPE_3T4R    =       6,
  66         RF_TYPE_4T4R    =       7,
  67 }HAL_RF_TYPE_E;
  68 
  69 typedef struct tag_HAL_VERSION
  70 {
  71         HAL_IC_TYPE_E           ICType;
  72         HAL_CHIP_TYPE_E         ChipType;
  73         HAL_CUT_VERSION_E       CUTVersion;
  74         HAL_VENDOR_E            VendorType;
  75         HAL_RF_TYPE_E           RFType;
  76         u8                      ROMVer;
  77 }HAL_VERSION,*PHAL_VERSION;
  78 
  79 /* VERSION_8192C                        VersionID; */
  80 /* HAL_VERSION                  VersionID; */
  81 
  82 /*  Get element */
  83 #define GET_CVID_IC_TYPE(version)                       ((HAL_IC_TYPE_E)((version).ICType)      )
  84 #define GET_CVID_CHIP_TYPE(version)                     ((HAL_CHIP_TYPE_E)((version).ChipType)  )
  85 #define GET_CVID_RF_TYPE(version)                       ((HAL_RF_TYPE_E)((version).RFType))
  86 #define GET_CVID_MANUFACTUER(version)           ((HAL_VENDOR_E)((version).VendorType))
  87 #define GET_CVID_CUT_VERSION(version)           ((HAL_CUT_VERSION_E)((version).CUTVersion))
  88 #define GET_CVID_ROM_VERSION(version)           (((version).ROMVer) & ROM_VERSION_MASK)
  89 
  90 /*  */
  91 /* Common Macro. -- */
  92 /*  */
  93 /* HAL_VERSION VersionID */
  94 
  95 /* HAL_CHIP_TYPE_E */
  96 #define IS_TEST_CHIP(version)                   ((GET_CVID_CHIP_TYPE(version) ==TEST_CHIP)? true: false)
  97 #define IS_NORMAL_CHIP(version)                 ((GET_CVID_CHIP_TYPE(version) ==NORMAL_CHIP)? true: false)
  98 
  99 /* HAL_CUT_VERSION_E */
 100 #define IS_A_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
 101 #define IS_B_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false)
 102 #define IS_C_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false)
 103 #define IS_D_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? true : false)
 104 #define IS_E_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? true : false)
 105 #define IS_I_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == I_CUT_VERSION) ? true : false)
 106 #define IS_J_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == J_CUT_VERSION) ? true : false)
 107 #define IS_K_CUT(version)                               ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? true : false)
 108 
 109 /* HAL_VENDOR_E */
 110 #define IS_CHIP_VENDOR_TSMC(version)    ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC)? true: false)
 111 #define IS_CHIP_VENDOR_UMC(version)     ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC)? true: false)
 112 #define IS_CHIP_VENDOR_SMIC(version)    ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC)? true: false)
 113 
 114 /* HAL_RF_TYPE_E */
 115 #define IS_1T1R(version)                                        ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R)? true : false)
 116 #define IS_1T2R(version)                                        ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R)? true : false)
 117 #define IS_2T2R(version)                                        ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R)? true : false)
 118 
 119 #endif

/* [<][>][^][v][top][bottom][index][help] */