net: wireless: rockchip_wlan: add rtl8188eu support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8188eu / hal / btc / HalBtc8188c2Ant.h
1 //===========================================
2 // The following is for 8188C 2Ant BT Co-exist definition
3 //===========================================
4 #define         BTC_RSSI_COEX_THRESH_TOL_8188C_2ANT             6
5
6 typedef enum _BT_INFO_SRC_8188C_2ANT{
7         BT_INFO_SRC_8188C_2ANT_WIFI_FW                  = 0x0,
8         BT_INFO_SRC_8188C_2ANT_BT_RSP                           = 0x1,
9         BT_INFO_SRC_8188C_2ANT_BT_ACTIVE_SEND           = 0x2,
10         BT_INFO_SRC_8188C_2ANT_MAX
11 }BT_INFO_SRC_8188C_2ANT,*PBT_INFO_SRC_8188C_2ANT;
12
13 typedef enum _BT_8188C_2ANT_BT_STATUS{
14         BT_8188C_2ANT_BT_STATUS_IDLE                            = 0x0,
15         BT_8188C_2ANT_BT_STATUS_CONNECTED_IDLE  = 0x1,
16         BT_8188C_2ANT_BT_STATUS_NON_IDLE                        = 0x2,
17         BT_8188C_2ANT_BT_STATUS_MAX
18 }BT_8188C_2ANT_BT_STATUS,*PBT_8188C_2ANT_BT_STATUS;
19
20 typedef enum _BT_8188C_2ANT_COEX_ALGO{
21         BT_8188C_2ANT_COEX_ALGO_UNDEFINED                       = 0x0,
22         BT_8188C_2ANT_COEX_ALGO_SCO                                     = 0x1,
23         BT_8188C_2ANT_COEX_ALGO_HID                                     = 0x2,
24         BT_8188C_2ANT_COEX_ALGO_A2DP                            = 0x3,
25         BT_8188C_2ANT_COEX_ALGO_PAN                                     = 0x4,
26         BT_8188C_2ANT_COEX_ALGO_HID_A2DP                        = 0x5,
27         BT_8188C_2ANT_COEX_ALGO_HID_PAN                         = 0x6,
28         BT_8188C_2ANT_COEX_ALGO_PAN_A2DP                        = 0x7,
29         BT_8188C_2ANT_COEX_ALGO_MAX
30 }BT_8188C_2ANT_COEX_ALGO,*PBT_8188C_2ANT_COEX_ALGO;
31
32 typedef struct _COEX_DM_8188C_2ANT{
33         // fw mechanism
34         BOOLEAN         bPreBalanceOn;
35         BOOLEAN         bCurBalanceOn;
36
37         // diminishWifi
38         BOOLEAN         bPreDacOn;
39         BOOLEAN         bCurDacOn;
40         BOOLEAN         bPreInterruptOn;
41         BOOLEAN         bCurInterruptOn;
42         u1Byte          preFwDacSwingLvl;
43         u1Byte          curFwDacSwingLvl;
44         BOOLEAN         bPreNavOn;
45         BOOLEAN         bCurNavOn;
46
47         // sw mechanism
48         BOOLEAN         bPreRfRxLpfShrink;
49         BOOLEAN         bCurRfRxLpfShrink;
50         u4Byte          btRf0x1eBackup;
51         BOOLEAN         bPreLowPenaltyRa;
52         BOOLEAN         bCurLowPenaltyRa;
53         BOOLEAN         bPreDacSwingOn;
54         u4Byte          preDacSwingLvl;
55         BOOLEAN         bCurDacSwingOn;
56         u4Byte          curDacSwingLvl;
57         BOOLEAN         bPreAdcBackOff;
58         BOOLEAN         bCurAdcBackOff;
59         BOOLEAN         bPreAgcTableEn;
60         BOOLEAN         bCurAgcTableEn;
61         //u4Byte                preVal0x6c0;
62         //u4Byte                curVal0x6c0;
63         u4Byte          preVal0x6c4;
64         u4Byte          curVal0x6c4;
65         u4Byte          preVal0x6c8;
66         u4Byte          curVal0x6c8;
67         u4Byte          preVal0x6cc;
68         u4Byte          curVal0x6cc;
69         //BOOLEAN               bLimitedDig;
70
71         // algorithm related
72         u1Byte          preAlgorithm;
73         u1Byte          curAlgorithm;
74         //u1Byte                btStatus;
75         //u1Byte                wifiChnlInfo[3];
76 } COEX_DM_8188C_2ANT, *PCOEX_DM_8188C_2ANT;
77
78 typedef struct _COEX_STA_8188C_2ANT{
79         u1Byte                                  preWifiRssiState[4];
80         BOOLEAN                                 bBtBusy;
81         BOOLEAN                                 bBtUplink;
82         BOOLEAN                                 bBtDownLink;
83         BOOLEAN                                 bA2dpBusy;
84 }COEX_STA_8188C_2ANT, *PCOEX_STA_8188C_2ANT;
85
86 //===========================================
87 // The following is interface which will notify coex module.
88 //===========================================
89 VOID
90 EXhalbtc8188c2ant_PowerOnSetting(
91         IN      PBTC_COEXIST            pBtCoexist
92         );
93 VOID
94 EXhalbtc8188c2ant_InitHwConfig(
95         IN      PBTC_COEXIST            pBtCoexist,
96         IN      BOOLEAN                         bWifiOnly
97         );
98 VOID
99 EXhalbtc8188c2ant_InitCoexDm(
100         IN      PBTC_COEXIST            pBtCoexist
101         );
102 VOID
103 EXhalbtc8188c2ant_IpsNotify(
104         IN      PBTC_COEXIST            pBtCoexist,
105         IN      u1Byte                  type
106         );
107 VOID
108 EXhalbtc8188c2ant_LpsNotify(
109         IN      PBTC_COEXIST            pBtCoexist,
110         IN      u1Byte                  type
111         );
112 VOID
113 EXhalbtc8188c2ant_ScanNotify(
114         IN      PBTC_COEXIST            pBtCoexist,
115         IN      u1Byte                  type
116         );
117 VOID
118 EXhalbtc8188c2ant_ConnectNotify(
119         IN      PBTC_COEXIST            pBtCoexist,
120         IN      u1Byte                  type
121         );
122 VOID
123 EXhalbtc8188c2ant_MediaStatusNotify(
124         IN      PBTC_COEXIST                    pBtCoexist,
125         IN      u1Byte                          type
126         );
127 VOID
128 EXhalbtc8188c2ant_SpecialPacketNotify(
129         IN      PBTC_COEXIST                    pBtCoexist,
130         IN      u1Byte                          type
131         );
132 VOID
133 EXhalbtc8188c2ant_HaltNotify(
134         IN      PBTC_COEXIST                    pBtCoexist
135         );
136 VOID
137 EXhalbtc8188c2ant_Periodical(
138         IN      PBTC_COEXIST                    pBtCoexist
139         );
140 VOID
141 EXhalbtc8188c2ant_BtInfoNotify(
142         IN      PBTC_COEXIST            pBtCoexist,
143         IN      pu1Byte                 tmpBuf,
144         IN      u1Byte                  length
145         );
146 VOID
147 EXhalbtc8188c2ant_DisplayCoexInfo(
148         IN      PBTC_COEXIST            pBtCoexist
149         );