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 typedef enum _SwChnlCmdID
{
11 CmdID_SetTxPowerLevel
,
14 CmdID_WritePortUshort
,
19 /* -----------------------Define structure---------------------- */
20 /* 1. Switch channel related */
21 typedef struct _SwChnlCmd
{
28 extern u32 rtl819XMACPHY_Array_PG
[];
29 extern u32 rtl819XPHY_REG_1T2RArray
[];
30 extern u32 rtl819XAGCTAB_Array
[];
31 extern u32 rtl819XRadioA_Array
[];
32 extern u32 rtl819XRadioB_Array
[];
33 extern u32 rtl819XRadioC_Array
[];
34 extern u32 rtl819XRadioD_Array
[];
36 typedef enum _HW90_BLOCK
{
41 HW90_BLOCK_MAXIMUM
= 4, /* Never use this */
42 } HW90_BLOCK_E
, *PHW90_BLOCK_E
;
44 typedef enum _RF90_RADIO_PATH
{
45 RF90_PATH_A
= 0, /* Radio Path A */
46 RF90_PATH_B
= 1, /* Radio Path B */
47 RF90_PATH_C
= 2, /* Radio Path C */
48 RF90_PATH_D
= 3, /* Radio Path D */
49 RF90_PATH_MAX
/* Max RF number 92 support */
50 } RF90_RADIO_PATH_E
, *PRF90_RADIO_PATH_E
;
52 #define bMaskByte0 0xff
53 #define bMaskByte1 0xff00
54 #define bMaskByte2 0xff0000
55 #define bMaskByte3 0xff000000
56 #define bMaskHWord 0xffff0000
57 #define bMaskLWord 0x0000ffff
58 #define bMaskDWord 0xffffffff
60 u8
rtl8192_phy_CheckIsLegalRFPath(struct net_device
*dev
, u32 eRFPath
);
61 void rtl8192_setBBreg(struct net_device
*dev
, u32 reg_addr
,
62 u32 bitmask
, u32 data
);
63 u32
rtl8192_QueryBBReg(struct net_device
*dev
, u32 reg_addr
, u32 bitmask
);
64 void rtl8192_phy_SetRFReg(struct net_device
*dev
, RF90_RADIO_PATH_E eRFPath
,
65 u32 reg_addr
, u32 bitmask
, u32 data
);
66 u32
rtl8192_phy_QueryRFReg(struct net_device
*dev
, RF90_RADIO_PATH_E eRFPath
,
67 u32 reg_addr
, u32 bitmask
);
68 void rtl8192_phy_configmac(struct net_device
*dev
);
69 void rtl8192_phyConfigBB(struct net_device
*dev
, u8 ConfigType
);
70 u8
rtl8192_phy_checkBBAndRF(struct net_device
*dev
,
71 HW90_BLOCK_E CheckBlock
, RF90_RADIO_PATH_E eRFPath
);
72 void rtl8192_BBConfig(struct net_device
*dev
);
73 void rtl8192_phy_getTxPower(struct net_device
*dev
);
74 void rtl8192_phy_setTxPower(struct net_device
*dev
, u8 channel
);
75 void rtl8192_phy_RFConfig(struct net_device
*dev
);
76 void rtl8192_phy_updateInitGain(struct net_device
*dev
);
77 u8
rtl8192_phy_ConfigRFWithHeaderFile(struct net_device
*dev
,
78 RF90_RADIO_PATH_E eRFPath
);
80 u8
rtl8192_phy_SwChnl(struct net_device
*dev
, u8 channel
);
81 void rtl8192_SetBWMode(struct net_device
*dev
, HT_CHANNEL_WIDTH bandwidth
,
82 HT_EXTCHNL_OFFSET offset
);
83 void rtl8192_SwChnl_WorkItem(struct net_device
*dev
);
84 void rtl8192_SetBWModeWorkItem(struct net_device
*dev
);
85 bool rtl8192_SetRFPowerState(struct net_device
*dev
,
86 RT_RF_POWER_STATE eRFPowerState
);
87 void InitialGain819xUsb(struct net_device
*dev
, u8 Operation
);
89 void InitialGainOperateWorkItemCallBack(struct work_struct
*work
);