1 /******************************************************************************
\r
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
\r
5 * This program is free software; you can redistribute it and/or modify it
\r
6 * under the terms of version 2 of the GNU General Public License as
\r
7 * published by the Free Software Foundation.
\r
9 * This program is distributed in the hope that it will be useful, but WITHOUT
\r
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
14 * You should have received a copy of the GNU General Public License along with
\r
15 * this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
\r
19 ******************************************************************************/
\r
21 #ifndef __ODMANTDIV_H__
\r
22 #define __ODMANTDIV_H__
\r
26 #define ANT1_2G 0 // = ANT2_5G
\r
27 #define ANT2_2G 1 // = ANT1_5G
\r
29 //Antenna Diversty Control Type
\r
30 #define ODM_AUTO_ANT 0
\r
31 #define ODM_FIX_MAIN_ANT 1
\r
32 #define ODM_FIX_AUX_ANT 2
\r
36 #if (DM_ODM_SUPPORT_TYPE != ODM_AP)
\r
37 #define ODM_RTL8881A 0 //Just for windows driver to jointly use ODM-driver
\r
40 #define ODM_ANTDIV_SUPPORT (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
\r
41 #define ODM_N_ANTDIV_SUPPORT (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B)
\r
42 #define ODM_AC_ANTDIV_SUPPORT (ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
\r
43 #define ODM_SMART_ANT_SUPPORT (ODM_RTL8188E|ODM_RTL8192E)
\r
45 #define ODM_ANTDIV_2G_SUPPORT_IC (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8881A)
\r
46 #define ODM_ANTDIV_5G_SUPPORT_IC (ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
\r
47 #define ODM_ANTDIV_2G BIT0
\r
48 #define ODM_ANTDIV_5G BIT1
\r
51 #define ANTDIV_OFF 0
\r
55 IN PDM_ODM_T pDM_Odm
\r
60 IN PDM_ODM_T pDM_Odm
\r
63 #if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
\r
66 ODM_UpdateRxIdleAnt(
\r
67 IN PDM_ODM_T pDM_Odm,
\r
71 #if (RTL8723B_SUPPORT == 1)||(RTL8821A_SUPPORT == 1)
\r
72 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r
74 ODM_SW_AntDiv_Callback(
\r
79 ODM_SW_AntDiv_WorkitemCallback(
\r
82 #endif //#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r
83 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
\r
85 ODM_SW_AntDiv_Callback(void *FunctionContext);
\r
86 #endif //#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
\r
89 #if(RTL8188E_SUPPORT == 1 || RTL8192E_SUPPORT == 1)
\r
90 #if ( !(DM_ODM_SUPPORT_TYPE == ODM_CE))
\r
92 odm_FastAntTraining(
\r
93 IN PDM_ODM_T pDM_Odm
\r
97 odm_FastAntTrainingCallback(
\r
98 IN PDM_ODM_T pDM_Odm
\r
102 odm_FastAntTrainingWorkItemCallback(
\r
103 IN PDM_ODM_T pDM_Odm
\r
109 ODM_Process_RSSIForAntDiv(
\r
110 IN OUT PDM_ODM_T pDM_Odm,
\r
111 IN PODM_PHY_INFO_T pPhyInfo,
\r
112 IN PODM_PACKET_INFO_T pPktinfo
\r
115 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
\r
117 ODM_SetTxAntByTxInfo(
\r
118 IN PDM_ODM_T pDM_Odm,
\r
123 #else// (DM_ODM_SUPPORT_TYPE == ODM_AP)
\r
125 ODM_SetTxAntByTxInfo(
\r
126 //IN PDM_ODM_T pDM_Odm,
\r
127 struct rtl8192cd_priv *priv,
\r
128 struct tx_desc *pdesc,
\r
129 struct tx_insn *txcfg,
\r
130 unsigned short aid
\r
135 #endif //#if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
\r
136 #endif //#ifndef __ODMANTDIV_H__
\r