xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/hal/btc/halbtc8821cwifionly.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2017 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 #ifndef __INC_HAL8821CWIFIONLYHWCFG_H
16 #define __INC_HAL8821CWIFIONLYHWCFG_H
17 
18 
19 struct rfe_type_8821c_wifi_only {
20 
21 	u8			rfe_module_type;
22 	boolean		ext_ant_switch_exist;
23 	u8			ext_ant_switch_type;			/* 0:DPDT, 1:SPDT */
24 	u8			ext_ant_switch_ctrl_polarity;		/*  iF 0: DPDT_P=0, DPDT_N=1 => BTG to Main, WL_A+G to Aux */
25 
26 	boolean		ant_at_main_port;
27 
28 	boolean		wlg_Locate_at_btg;				/*  If true:  WLG at BTG, If false: WLG at WLAG */
29 
30 	boolean		ext_ant_switch_diversity;		/* If diversity on */
31 };
32 
33 enum bt_8821c_wifi_only_ext_ant_switch_type {
34 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_USE_DPDT		= 0x0,
35 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_USE_SPDT		= 0x1,
36 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_NONE			= 0x2,
37 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_MAX
38 };
39 
40 enum bt_8821c_wifi_only_ext_ant_switch_ctrl_type {
41 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_BBSW		= 0x0,
42 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_PTA		= 0x1,
43 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_ANTDIV	= 0x2,
44 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_MAC		= 0x3,
45 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_BT		= 0x4,
46 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_MAX
47 };
48 
49 enum bt_8821c_wifi_only_ext_ant_switch_pos_type {
50 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_BT				= 0x0,
51 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_WLG			= 0x1,
52 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_WLA			= 0x2,
53 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_NOCARE			= 0x3,
54 	BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_MAX
55 };
56 
57 
58 VOID
59 hal8821c_wifi_only_switch_antenna(
60 	IN struct wifi_only_cfg *pwifionlycfg,
61 	IN u1Byte  is_5g
62 	);
63 
64 VOID
65 halbtc8821c_wifi_only_set_rfe_type(
66 	IN struct wifi_only_cfg *pwifionlycfg
67 	);
68 
69 
70 VOID
71 ex_hal8821c_wifi_only_hw_config(
72 	IN struct wifi_only_cfg *pwifionlycfg
73 	);
74 VOID
75 ex_hal8821c_wifi_only_scannotify(
76 	IN struct wifi_only_cfg *pwifionlycfg,
77 	IN u1Byte  is_5g
78 	);
79 VOID
80 ex_hal8821c_wifi_only_switchbandnotify(
81 	IN struct wifi_only_cfg *pwifionlycfg,
82 	IN u1Byte  is_5g
83 	);
84 VOID
85 ex_hal8821c_wifi_only_connectnotify(
86 	IN struct wifi_only_cfg *pwifionlycfg,
87 	IN u1Byte  is_5g
88 	);
89 
90 #endif
91