OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / phydm / phydm_mp.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 __PHYDM_MP_H__
27 #define __PHYDM_MP_H__
28
29 #define MP_VERSION "1.0"
30
31 /* @1 ============================================================
32  * 1  Definition
33  * 1 ============================================================
34  */
35 /* @1 ============================================================
36  * 1  structure
37  * 1 ============================================================
38  */
39 struct phydm_mp {
40         /* @Rx OK count, statistics used in Mass Production Test.*/
41         u64 tx_phy_ok_cnt;
42         u64 rx_phy_ok_cnt;
43         /* @Rx CRC32 error count, statistics used in Mass Production Test.*/
44         u64 rx_phy_crc_err_cnt;
45         /* @The Value of IO operation is depend of MptActType.*/
46         u32 io_value;
47         u32 rf_reg0;
48         /* @u32 rfe_sel_a_0;*/
49         /* @u32 rfe_sel_b_0;*/
50         /* @u32 rfe_sel_c_0;*/
51         /* @u32 rfe_sel_d_0;*/
52         /* @u32 rfe_sel_a_1;*/
53         /* @u32 rfe_sel_b_1;*/
54         /* @u32 rfe_sel_c_1;*/
55         /* @u32 rfe_sel_d_1;*/
56 };
57
58 /* @1 ============================================================
59  * 1  enumeration
60  * 1 ============================================================
61  */
62 enum TX_MODE_OFDM {
63         OFDM_OFF = 0,
64         OFDM_CONT_TX = 1,
65         OFDM_SINGLE_CARRIER = 2,
66         OFDM_SINGLE_TONE = 4,
67 };
68 /* @1 ============================================================
69  * 1  function prototype
70  * 1 ============================================================
71  */
72 #ifdef PHYDM_IC_JGR3_SERIES_SUPPORT
73 void phydm_mp_set_single_tone_jgr3(void *dm_void, boolean is_single_tone,
74                                    u8 path);
75
76 void phydm_mp_set_carrier_supp_jgr3(void *dm_void, boolean is_carrier_supp,
77                                     u32 rate_index);
78 #endif
79
80 void phydm_mp_set_crystal_cap(void *dm_void, u8 crystal_cap);
81
82 void phydm_mp_set_single_tone(void *dm_void, boolean is_single_tone, u8 path);
83
84 void phydm_mp_set_carrier_supp(void *dm_void, boolean is_carrier_supp,
85                                u32 rate_index);
86
87 void phydm_mp_set_single_carrier(void *dm_void, boolean is_single_carrier);
88
89 void phydm_mp_reset_rx_counters_phy(void *dm_void);
90
91 void phydm_mp_get_tx_ok(void *dm_void, u32 rate_index);
92
93 void phydm_mp_get_rx_ok(void *dm_void);
94 #endif