net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723cs / hal / phydm / phydm_cfotracking.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20
21 #ifndef __PHYDMCFOTRACK_H__
22 #define    __PHYDMCFOTRACK_H__
23
24 #define CFO_TRACKING_VERSION    "1.4" /*2015.10.01      Stanley, Modify for 8822B*/
25
26 #define         CFO_TH_XTAL_HIGH                        20                      /* kHz */
27 #define         CFO_TH_XTAL_LOW                 10                      /* kHz */
28 #define         CFO_TH_ATC                                      80                      /* kHz */
29
30 struct _CFO_TRACKING_ {
31         boolean                 is_atc_status;
32         boolean                 large_cfo_hit;
33         boolean                 is_adjust;
34         u8                      crystal_cap;
35         u8                      def_x_cap;
36         s32                     CFO_tail[4];
37         u32                     CFO_cnt[4];
38         s32                     CFO_ave_pre;
39         u32                     packet_count;
40         u32                     packet_count_pre;
41
42         boolean                 is_force_xtal_cap;
43         boolean                 is_reset;
44 };
45
46 void
47 odm_cfo_tracking_reset(
48         void                                    *p_dm_void
49 );
50
51 void
52 odm_cfo_tracking_init(
53         void                                    *p_dm_void
54 );
55
56 void
57 odm_cfo_tracking(
58         void                                    *p_dm_void
59 );
60
61 void
62 odm_parsing_cfo(
63         void                                    *p_dm_void,
64         void                                    *p_pktinfo_void,
65         s8                                      *pcfotail,
66         u8                                      num_ss
67 );
68
69 #endif