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