• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 
8 
9 #ifndef	__ODM_INTERFACE_H__
10 #define __ODM_INTERFACE_H__
11 
12 
13 
14 /*  =========== Constant/Structure/Enum/... Define */
15 
16 /*  =========== Macro Define */
17 
18 #define _reg_all(_name)			ODM_##_name
19 #define _reg_ic(_name, _ic)		ODM_##_name##_ic
20 #define _bit_all(_name)			BIT_##_name
21 #define _bit_ic(_name, _ic)		BIT_##_name##_ic
22 
23 /*===================================
24 
25 #define ODM_REG_DIG_11N		0xC50
26 #define ODM_REG_DIG_11AC	0xDDD
27 
28 ODM_REG(DIG, _pDM_Odm)
29 =====================================*/
30 
31 #define _reg_11N(_name)			ODM_REG_##_name##_11N
32 #define _bit_11N(_name)			ODM_BIT_##_name##_11N
33 
34 #define _cat(_name, _ic_type, _func) _func##_11N(_name)
35 
36 /*  _name: name of register or bit. */
37 /*  Example: "ODM_REG(R_A_AGC_CORE1, pDM_Odm)" */
38 /*         gets "ODM_R_A_AGC_CORE1" or "ODM_R_A_AGC_CORE1_8192C", depends on SupportICType. */
39 #define ODM_REG(_name, _pDM_Odm)	_cat(_name, _pDM_Odm->SupportICType, _reg)
40 #define ODM_BIT(_name, _pDM_Odm)	_cat(_name, _pDM_Odm->SupportICType, _bit)
41 
42 typedef enum _ODM_H2C_CMD {
43 	ODM_H2C_RSSI_REPORT = 0,
44 	ODM_H2C_PSD_RESULT = 1,
45 	ODM_H2C_PathDiv = 2,
46 	ODM_H2C_WIFI_CALIBRATION = 3,
47 	ODM_MAX_H2CCMD
48 } ODM_H2C_CMD;
49 
50 
51 #endif	/*  __ODM_INTERFACE_H__ */
52