net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723cs / hal / phydm / phydm_psd.h
1 /******************************************************************************\r
2  *\r
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.\r
4  *                                        \r
5  * This program is free software; you can redistribute it and/or modify it\r
6  * under the terms of version 2 of the GNU General Public License as\r
7  * published by the Free Software Foundation.\r
8  *\r
9  * This program is distributed in the hope that it will be useful, but WITHOUT\r
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
12  * more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along with\r
15  * this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
17  *\r
18  *\r
19  ******************************************************************************/\r
20 \r
21 #ifndef __PHYDMPSD_H__\r
22 #define    __PHYDMPSD_H__\r
23 \r
24 /*#define PSD_VERSION   "1.0"*/  /*2016.09.22  Dino*/\r
25 #define PSD_VERSION     "1.1"  /*2016.10.07  Dino, Add Option for PSD Tone index Selection */\r
26 \r
27 #if (CONFIG_PSD_TOOL == 1)\r
28 \r
29 \r
30 #define STOP_TRX_SUCCESS        1\r
31 #define STOP_TRX_FAIL   0\r
32 \r
33 \r
34 struct _PHYDM_PSD_ {\r
35 \r
36         u8      psd_in_progress;\r
37         u32     psd_reg;\r
38         u32     psd_report_reg;\r
39         u8      psd_pwr_common_offset;\r
40         u16     sw_avg_time;\r
41         u16     fft_smp_point;\r
42         u32     initial_gain_backup;\r
43         u32     rf_0x18_bkp;\r
44         u16     psd_fc_channel;\r
45         u32     psd_bw_rf_reg;\r
46         u8      psd_result[128];\r
47         u8      noise_k_en;\r
48 };\r
49 \r
50 u32\r
51 phydm_get_psd_data(\r
52         void                    *p_dm_void,\r
53         u32                     psd_tone_idx,\r
54         u32                     igi\r
55 );\r
56 \r
57 void
58 phydm_psd_debug(\r
59         void            *p_dm_void,
60         char            input[][16],\r
61         u32             *_used,
62         char            *output,\r
63         u32             *_out_len,
64         u32             input_num
65 );\r
66 \r
67 void\r
68 phydm_psd(\r
69         void            *p_dm_void,\r
70         u32             igi,\r
71         u16             start_point,\r
72         u16             stop_point\r
73 );\r
74 \r
75 void\r
76 phydm_psd_para_setting(\r
77         void            *p_dm_void,\r
78         u8              sw_avg_time,\r
79         u8              hw_avg_time,\r
80         u8              i_q_setting,\r
81         u16             fft_smp_point,\r
82         u8              ant_sel,\r
83         u8              psd_input,\r
84         u8              channel,\r
85         u8              noise_k_en\r
86 );\r
87 \r
88 void\r
89 phydm_psd_init(\r
90         void            *p_dm_void\r
91 );\r
92 \r
93 u8\r
94 phydm_get_psd_result_table(\r
95         void            *p_dm_void,\r
96         int             index\r
97 );\r
98 \r
99 #endif\r
100 #endif\r
101 \r