1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 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 17 #ifndef __HALRF_8188E_H__ 18 #define __HALRF_8188E_H__ 19 20 /*--------------------------Define Parameters-------------------------------*/ 21 #define IQK_DELAY_TIME_88E 10 /* ms */ 22 #define index_mapping_NUM_88E 15 23 #define AVG_THERMAL_NUM_88E 4 24 25 #include "../halphyrf_ap.h" 26 27 void configure_txpower_track_8188e( 28 struct txpwrtrack_cfg *config 29 ); 30 31 void do_iqk_8188e( 32 void *dm_void, 33 u8 delta_thermal_index, 34 u8 thermal_value, 35 u8 threshold 36 ); 37 38 void 39 odm_tx_pwr_track_set_pwr88_e( 40 struct dm_struct *dm, 41 enum pwrtrack_method method, 42 u8 rf_path, 43 u8 channel_mapped_index 44 ); 45 46 /* 1 7. IQK */ 47 48 void 49 phy_iq_calibrate_8188e( 50 struct dm_struct *dm, 51 boolean is_recovery); 52 53 54 /* 55 * LC calibrate 56 * */ 57 void 58 phy_lc_calibrate_8188e( 59 struct dm_struct *dm 60 ); 61 62 /* 63 * AP calibrate 64 * */ 65 void 66 phy_ap_calibrate_8188e( 67 struct dm_struct *dm, 68 s8 delta); 69 70 void 71 _phy_save_adda_registers( 72 struct dm_struct *dm, 73 u32 *adda_reg, 74 u32 *adda_backup, 75 u32 register_num 76 ); 77 78 void 79 _phy_path_adda_on( 80 struct dm_struct *dm, 81 u32 *adda_reg, 82 boolean is_path_a_on, 83 boolean is2T 84 ); 85 86 void 87 _phy_mac_setting_calibration( 88 struct dm_struct *dm, 89 u32 *mac_reg, 90 u32 *mac_backup 91 ); 92 93 94 void 95 _phy_path_a_stand_by( 96 struct dm_struct *dm 97 ); 98 99 void 100 halrf_rf_lna_setting_8188e( 101 struct dm_struct *dm, 102 enum halrf_lna_set type 103 ); 104 105 #endif /*#ifndef __HALRF_8188E_H__*/ 106