1 //===========================================
2 // The following is for 8812A_1ANT BT Co-exist definition
3 //===========================================
4 #define BT_INFO_8812A_1ANT_B_FTP BIT7
5 #define BT_INFO_8812A_1ANT_B_A2DP BIT6
6 #define BT_INFO_8812A_1ANT_B_HID BIT5
7 #define BT_INFO_8812A_1ANT_B_SCO_BUSY BIT4
8 #define BT_INFO_8812A_1ANT_B_ACL_BUSY BIT3
9 #define BT_INFO_8812A_1ANT_B_INQ_PAGE BIT2
10 #define BT_INFO_8812A_1ANT_B_SCO_ESCO BIT1
11 #define BT_INFO_8812A_1ANT_B_CONNECTION BIT0
13 #define BT_INFO_8812A_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
14 (((_BT_INFO_EXT_&BIT0))? true:false)
16 #define BTC_RSSI_COEX_THRESH_TOL_8812A_1ANT 2
21 typedef enum _BT_INFO_SRC_8812A_1ANT{
22 BT_INFO_SRC_8812A_1ANT_WIFI_FW = 0x0,
23 BT_INFO_SRC_8812A_1ANT_BT_RSP = 0x1,
24 BT_INFO_SRC_8812A_1ANT_BT_ACTIVE_SEND = 0x2,
25 BT_INFO_SRC_8812A_1ANT_MAX
26 }BT_INFO_SRC_8812A_1ANT,*PBT_INFO_SRC_8812A_1ANT;
28 typedef enum _BT_8812A_1ANT_BT_STATUS{
29 BT_8812A_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
30 BT_8812A_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
31 BT_8812A_1ANT_BT_STATUS_INQ_PAGE = 0x2,
32 BT_8812A_1ANT_BT_STATUS_ACL_BUSY = 0x3,
33 BT_8812A_1ANT_BT_STATUS_SCO_BUSY = 0x4,
34 BT_8812A_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
35 BT_8812A_1ANT_BT_STATUS_MAX
36 }BT_8812A_1ANT_BT_STATUS,*PBT_8812A_1ANT_BT_STATUS;
38 typedef enum _BT_8812A_1ANT_COEX_ALGO{
39 BT_8812A_1ANT_COEX_ALGO_UNDEFINED = 0x0,
40 BT_8812A_1ANT_COEX_ALGO_SCO = 0x1,
41 BT_8812A_1ANT_COEX_ALGO_HID = 0x2,
42 BT_8812A_1ANT_COEX_ALGO_A2DP = 0x3,
43 BT_8812A_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
44 BT_8812A_1ANT_COEX_ALGO_PANEDR = 0x5,
45 BT_8812A_1ANT_COEX_ALGO_PANHS = 0x6,
46 BT_8812A_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
47 BT_8812A_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
48 BT_8812A_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
49 BT_8812A_1ANT_COEX_ALGO_HID_A2DP = 0xa,
50 BT_8812A_1ANT_COEX_ALGO_MAX = 0xb,
51 }BT_8812A_1ANT_COEX_ALGO,*PBT_8812A_1ANT_COEX_ALGO;
53 typedef struct _COEX_DM_8812A_1ANT{
57 bool bPreBtLnaConstrain;
58 bool bCurBtLnaConstrain;
61 u8 pre_fw_dac_swing_lvl;
62 u8 cur_fw_dac_swing_lvl;
63 bool cur_ignore_wlan_act;
64 bool pre_ignore_wlan_act;
68 u8 ps_tdma_du_adj_type;
69 bool reset_tdma_adjust;
72 bool pre_bt_auto_report;
73 bool cur_bt_auto_report;
80 bool pre_rf_rx_lpf_shrink;
81 bool cur_rf_rx_lpf_shrink;
83 bool pre_low_penalty_ra;
84 bool cur_low_penalty_ra;
85 bool pre_dac_swing_on;
86 u32 pre_dac_swing_lvl;
87 bool cur_dac_swing_on;
88 u32 cur_dac_swing_lvl;
89 bool pre_adc_back_off;
90 bool cur_adc_back_off;
91 bool pre_agc_table_en;
92 bool cur_agc_table_en;
107 u8 wifi_chnl_info[3];
110 } COEX_DM_8812A_1ANT, *PCOEX_DM_8812A_1ANT;
112 typedef struct _COEX_STA_8812A_1ANT{
115 u32 high_priority_tx;
116 u32 high_priority_rx;
120 u8 pre_bt_rssi_state;
121 u8 pre_wifi_rssi_state[4];
122 bool c2h_bt_info_req_sent;
123 u8 bt_info_c2h[BT_INFO_SRC_8812A_1ANT_MAX][10];
124 u32 bt_info_c2h_cnt[BT_INFO_SRC_8812A_1ANT_MAX];
125 bool c2h_bt_inquiry_page;
128 }COEX_STA_8812A_1ANT, *PCOEX_STA_8812A_1ANT;
130 //===========================================
131 // The following is interface which will notify coex module.
132 //===========================================
134 EXhalbtc8812a1ant_InitHwConfig(
135 PBTC_COEXIST btcoexist
138 EXhalbtc8812a1ant_InitCoexDm(
139 PBTC_COEXIST btcoexist
142 EXhalbtc8812a1ant_IpsNotify(
143 PBTC_COEXIST btcoexist,
147 EXhalbtc8812a1ant_LpsNotify(
148 PBTC_COEXIST btcoexist,
152 EXhalbtc8812a1ant_ScanNotify(
153 PBTC_COEXIST btcoexist,
157 EXhalbtc8812a1ant_ConnectNotify(
158 PBTC_COEXIST btcoexist,
162 EXhalbtc8812a1ant_MediaStatusNotify(
163 PBTC_COEXIST btcoexist,
167 EXhalbtc8812a1ant_SpecialPacketNotify(
168 PBTC_COEXIST btcoexist,
172 EXhalbtc8812a1ant_BtInfoNotify(
173 PBTC_COEXIST btcoexist,
178 EXhalbtc8812a1ant_StackOperationNotify(
179 PBTC_COEXIST btcoexist,
183 EXhalbtc8812a1ant_HaltNotify(
184 PBTC_COEXIST btcoexist
187 EXhalbtc8812a1ant_PnpNotify(
188 PBTC_COEXIST btcoexist,
192 EXhalbtc8812a1ant_Periodical(
193 PBTC_COEXIST btcoexist
196 EXhalbtc8812a1ant_DisplayCoexInfo(
197 PBTC_COEXIST btcoexist
200 EXhalbtc8812a1ant_DbgControl(
201 PBTC_COEXIST btcoexist,