xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8822bs/hal/phydm/halrf/rtl8822b/halrf_8822b.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 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  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 
26 #ifndef __HALRF_8822B_H__
27 #define __HALRF_8822B_H__
28 
29 #define AVG_THERMAL_NUM_8822B 4
30 #define RF_T_METER_8822B 0x42
31 
32 void configure_txpower_track_8822b(struct txpwrtrack_cfg *config);
33 
34 void odm_tx_pwr_track_set_pwr8822b(void *dm_void, enum pwrtrack_method method,
35 				   u8 rf_path, u8 channel_mapped_index);
36 
37 void get_delta_swing_table_8822b(void *dm_void,
38 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
39 				 u8 **temperature_up_a, u8 **temperature_down_a,
40 				 u8 **temperature_up_b, u8 **temperature_down_b,
41 				 u8 **temperature_up_cck_a,
42 				 u8 **temperature_down_cck_a,
43 				 u8 **temperature_up_cck_b,
44 				 u8 **temperature_down_cck_b
45 #else
46 				 u8 **temperature_up_a, u8 **temperature_down_a,
47 				 u8 **temperature_up_b,
48 				 u8 **temperature_down_b
49 #endif
50 				 );
51 
52 void aac_check_8822b(struct dm_struct *dm);
53 
54 void phy_lc_calibrate_8822b(void *dm_void);
55 
56 void halrf_rf_lna_setting_8822b(struct dm_struct *dm, enum halrf_lna_set type);
57 
58 #if ((DM_ODM_SUPPORT_TYPE & ODM_AP) || (DM_ODM_SUPPORT_TYPE == ODM_CE))
59 void phy_set_rf_path_switch_8822b(struct dm_struct *dm,
60 #else
61 void phy_set_rf_path_switch_8822b(void *adapter,
62 #endif
63 				  boolean is_main);
64 
65 #endif /*__HALRF_8822B_H__*/
66