OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / phydm / phydm_psd.h
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 __PHYDMPSD_H__
27 #define __PHYDMPSD_H__
28
29 /*@#define PSD_VERSION  "1.0"*/ /*@2016.09.22  Dino*/
30 #define PSD_VERSION "1.1" /*@2016.10.07  Dino, Add Option for PSD Tone index Selection */
31
32 #ifdef CONFIG_PSD_TOOL
33
34
35 struct psd_info {
36         u8      psd_in_progress;
37         u32     psd_reg;
38         u32     psd_report_reg;
39         u8      psd_pwr_common_offset;
40         u16     sw_avg_time;
41         u16     fft_smp_point;
42         u32     initial_gain_backup;
43         u32     rf_0x18_bkp;
44         u32     rf_0x18_bkp_b;
45         u16     psd_fc_channel;
46         u32     psd_bw_rf_reg;
47         u8      psd_result[128];
48         u8      noise_k_en;
49 };
50
51 u32 phydm_get_psd_data(void *dm_void, u32 psd_tone_idx, u32 igi);
52
53 void phydm_psd_debug(void *dm_void, char input[][16], u32 *_used,
54                      char *output, u32 *_out_len);
55
56 void phydm_psd(void *dm_void, u32 igi, u16 start_point, u16 stop_point);
57
58 void phydm_psd_para_setting(void *dm_void, u8 sw_avg_time,
59                             u8 hw_avg_time, u8 i_q_setting,
60                             u16 fft_smp_point, u8 ant_sel,
61                             u8 psd_input, u8 channel, u8 noise_k_en);
62
63 void phydm_psd_init(void *dm_void);
64
65 u8 phydm_get_psd_result_table(void *dm_void, int index);
66
67 #endif
68 #endif