4 /* Channel switch: the size of command tables for switch channel */
5 #define MAX_PRECMD_CNT 16
6 #define MAX_RFDEPENDCMD_CNT 16
7 #define MAX_POSTCMD_CNT 16
9 #define MACPHY_Array_PGLength 30
10 #define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG
11 #define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array
12 #define RadioC_ArrayLength 1
13 #define RadioD_ArrayLength 1
14 #define Rtl819XRadioA_Array Rtl8192PciERadioA_Array
15 #define Rtl819XRadioB_Array Rtl8192PciERadioB_Array
16 #define Rtl819XRadioC_Array Rtl8192PciERadioC_Array
17 #define Rtl819XRadioD_Array Rtl8192PciERadioD_Array
18 #define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array
19 #define PHY_REGArrayLength 1
20 #define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray
21 #define PHY_REG_1T2RArrayLength 296
22 #define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray
24 #define AGCTAB_ArrayLength 384
25 #define MACPHY_ArrayLength 18
27 #define RadioA_ArrayLength 246
28 #define RadioB_ArrayLength 78
31 typedef enum _SwChnlCmdID
{
33 CmdID_SetTxPowerLevel
,
36 CmdID_WritePortUshort
,
41 /* switch channel data structure */
42 typedef struct _SwChnlCmd
{
47 } __attribute__ ((packed
)) SwChnlCmd
;
49 extern u32 rtl819XMACPHY_Array_PG
[];
50 extern u32 rtl819XPHY_REG_1T2RArray
[];
51 extern u32 rtl819XAGCTAB_Array
[];
52 extern u32 rtl819XRadioA_Array
[];
53 extern u32 rtl819XRadioB_Array
[];
54 extern u32 rtl819XRadioC_Array
[];
55 extern u32 rtl819XRadioD_Array
[];
57 typedef enum _HW90_BLOCK
{
62 /* Don't ever use this. */
63 HW90_BLOCK_MAXIMUM
= 4,
64 } HW90_BLOCK_E
, *PHW90_BLOCK_E
;
66 typedef enum _RF90_RADIO_PATH
{
73 /* Max RF number 92 support */
75 } RF90_RADIO_PATH_E
, *PRF90_RADIO_PATH_E
;
77 #define bMaskByte0 0xff
78 #define bMaskByte1 0xff00
79 #define bMaskByte2 0xff0000
80 #define bMaskByte3 0xff000000
81 #define bMaskHWord 0xffff0000
82 #define bMaskLWord 0x0000ffff
83 #define bMaskDWord 0xffffffff
85 u8
rtl8192_phy_CheckIsLegalRFPath(struct r8192_priv
*priv
, u32 eRFPath
);
87 void rtl8192_setBBreg(struct r8192_priv
*priv
, u32 dwRegAddr
,
88 u32 dwBitMask
, u32 dwData
);
90 u32
rtl8192_QueryBBReg(struct r8192_priv
*priv
, u32 dwRegAddr
,
93 void rtl8192_phy_SetRFReg(struct r8192_priv
*priv
,
94 RF90_RADIO_PATH_E eRFPath
, u32 RegAddr
,
95 u32 BitMask
, u32 Data
);
97 u32
rtl8192_phy_QueryRFReg(struct r8192_priv
*priv
,
98 RF90_RADIO_PATH_E eRFPath
, u32 RegAddr
, u32 BitMask
);
100 void rtl8192_phy_configmac(struct r8192_priv
*priv
);
102 void rtl8192_phyConfigBB(struct r8192_priv
*priv
, u8 ConfigType
);
104 RT_STATUS
rtl8192_phy_checkBBAndRF(struct r8192_priv
*priv
,
105 HW90_BLOCK_E CheckBlock
, RF90_RADIO_PATH_E eRFPath
);
107 RT_STATUS
rtl8192_BBConfig(struct r8192_priv
*priv
);
109 void rtl8192_phy_getTxPower(struct r8192_priv
*priv
);
111 void rtl8192_phy_setTxPower(struct r8192_priv
*priv
, u8 channel
);
113 RT_STATUS
rtl8192_phy_RFConfig(struct r8192_priv
*priv
);
115 void rtl8192_phy_updateInitGain(struct r8192_priv
*priv
);
117 u8
rtl8192_phy_ConfigRFWithHeaderFile(struct r8192_priv
*priv
,
118 RF90_RADIO_PATH_E eRFPath
);
120 u8
rtl8192_phy_SwChnl(struct ieee80211_device
*ieee80211
, u8 channel
);
122 void rtl8192_SetBWMode(struct ieee80211_device
*ieee80211
,
123 HT_CHANNEL_WIDTH Bandwidth
, HT_EXTCHNL_OFFSET Offset
);
125 void rtl8192_SwChnl_WorkItem(struct r8192_priv
*priv
);
127 void rtl8192_SetBWModeWorkItem(struct r8192_priv
*priv
);
129 void InitialGain819xPci(struct ieee80211_device
*ieee
, u8 Operation
);
131 #endif /* _R819XU_PHY_H */