• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 
16 
17 #ifndef	__ODM_INTERFACE_H__
18 #define __ODM_INTERFACE_H__
19 
20 
21 /*  _cat: implemented by Token-Pasting Operator. */
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 _reg_11AC(_name)		ODM_REG_##_name##_11AC
33 #define _bit_11N(_name)			ODM_BIT_##_name##_11N
34 #define _bit_11AC(_name)		ODM_BIT_##_name##_11AC
35 
36 #define _cat(_name, _func)					\
37 	(							\
38 		_func##_11N(_name)				\
39 	)
40 
41 /*  _name: name of register or bit. */
42 /*  Example: "ODM_REG(R_A_AGC_CORE1, pDM_Odm)" */
43 /*         gets "ODM_R_A_AGC_CORE1" or "ODM_R_A_AGC_CORE1_8192C", depends on SupportICType. */
44 #define ODM_REG(_name, _pDM_Odm)	_cat(_name, _reg)
45 #define ODM_BIT(_name, _pDM_Odm)	_cat(_name, _bit)
46 
47 /*  */
48 /*  2012/02/17 MH For non-MP compile pass only. Linux does not support workitem. */
49 /*  Suggest HW team to use thread instead of workitem. Windows also support the feature. */
50 /*  */
51 typedef void (*RT_WORKITEM_CALL_BACK)(struct work_struct *pContext);
52 
53 /*  */
54 /*  =========== EXtern Function Prototype */
55 /*  */
56 
57 void ODM_SetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath,
58 		  u32 RegAddr, u32 BitMask, u32 Data);
59 u32 ODM_GetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath,
60 		 u32 RegAddr, u32 BitMask);
61 
62 #endif	/*  __ODM_INTERFACE_H__ */
63