net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723cs / hal / phydm / phydm_antdect.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 __PHYDMANTDECT_H__
22 #define    __PHYDMANTDECT_H__
23
24 #define ANTDECT_VERSION "2.1"   /*2015.07.29 by YuChen*/
25
26 #if (defined(CONFIG_ANT_DETECTION))
27 /* #if( DM_ODM_SUPPORT_TYPE & (ODM_WIN |ODM_CE)) */
28 /* ANT Test */
29 #define         ANTTESTALL              0x00    /*ant A or B will be Testing*/
30 #define         ANTTESTA                0x01    /*ant A will be Testing*/
31 #define         ANTTESTB                0x02    /*ant B will be testing*/
32
33 #define MAX_ANTENNA_DETECTION_CNT       10
34
35
36 struct _ANT_DETECTED_INFO {
37         boolean                 is_ant_detected;
38         u32                     db_for_ant_a;
39         u32                     db_for_ant_b;
40         u32                     db_for_ant_o;
41 };
42
43
44 enum dm_swas_e {
45         antenna_a = 1,
46         antenna_b = 2,
47         antenna_max = 3,
48 };
49
50
51
52 /* 1 [1. Single Tone method] =================================================== */
53
54
55
56 void
57 odm_single_dual_antenna_default_setting(
58         void            *p_dm_void
59 );
60
61 boolean
62 odm_single_dual_antenna_detection(
63         void            *p_dm_void,
64         u8                      mode
65 );
66
67 /* 1 [2. Scan AP RSSI method] ================================================== */
68
69 #define sw_ant_div_check_before_link    odm_sw_ant_div_check_before_link
70
71 boolean
72 odm_sw_ant_div_check_before_link(
73         void            *p_dm_void
74 );
75
76
77
78
79 /* 1 [3. PSD method] ========================================================== */
80
81
82 void
83 odm_single_dual_antenna_detection_psd(
84         void            *p_dm_void
85 );
86
87 #endif
88
89 void
90 odm_sw_ant_detect_init(
91         void            *p_dm_void
92 );
93
94
95 #endif