1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#ifndef __RTW_RF_H_
21#define __RTW_RF_H_
22
23#include <rtw_cmd.h>
24
25#define OFDM_PHY 1
26#define MIXED_PHY 2
27#define CCK_PHY 3
28
29#define NumRates (13)
30
31
32#define SHORT_SLOT_TIME 9
33#define NON_SHORT_SLOT_TIME 20
34
35#define RTL8711_RF_MAX_SENS 6
36#define RTL8711_RF_DEF_SENS 4
37
38
39
40
41
42#define MAX_CHANNEL_NUM_2G 14
43#define MAX_CHANNEL_NUM 14
44
45#define NUM_REGULATORYS 1
46
47
48#define USA 0x555320
49#define EUROPE 0x1
50#define JAPAN 0x2
51
52struct regulatory_class {
53 u32 starting_freq;
54 u8 channel_set[MAX_CHANNEL_NUM];
55 u8 channel_cck_power[MAX_CHANNEL_NUM];
56 u8 channel_ofdm_power[MAX_CHANNEL_NUM];
57 u8 txpower_limit;
58 u8 channel_spacing;
59 u8 modem;
60};
61
62enum capability {
63 cESS = 0x0001,
64 cIBSS = 0x0002,
65 cPollable = 0x0004,
66 cPollReq = 0x0008,
67 cPrivacy = 0x0010,
68 cShortPreamble = 0x0020,
69 cPBCC = 0x0040,
70 cChannelAgility = 0x0080,
71 cSpectrumMgnt = 0x0100,
72 cQos = 0x0200,
73
74 cShortSlotTime = 0x0400,
75 cAPSD = 0x0800,
76 cRM = 0x1000,
77 cDSSS_OFDM = 0x2000,
78 cDelayedBA = 0x4000,
79 cImmediateBA = 0x8000,
80};
81
82enum _REG_PREAMBLE_MODE {
83 PREAMBLE_LONG = 1,
84 PREAMBLE_AUTO = 2,
85 PREAMBLE_SHORT = 3,
86};
87
88enum _RTL8712_RF_MIMO_CONFIG_ {
89 RTL8712_RFCONFIG_1T = 0x10,
90 RTL8712_RFCONFIG_2T = 0x20,
91 RTL8712_RFCONFIG_1R = 0x01,
92 RTL8712_RFCONFIG_2R = 0x02,
93 RTL8712_RFCONFIG_1T1R = 0x11,
94 RTL8712_RFCONFIG_1T2R = 0x12,
95 RTL8712_RFCONFIG_TURBO = 0x92,
96 RTL8712_RFCONFIG_2T2R = 0x22
97};
98
99enum rf90_radio_path {
100 RF90_PATH_A = 0,
101 RF90_PATH_B = 1,
102 RF90_PATH_C = 2,
103 RF90_PATH_D = 3
104};
105
106
107#define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
108#define HAL_PRIME_CHNL_OFFSET_LOWER 1
109#define HAL_PRIME_CHNL_OFFSET_UPPER 2
110
111
112
113enum ht_channel_width {
114 HT_CHANNEL_WIDTH_20 = 0,
115 HT_CHANNEL_WIDTH_40 = 1,
116 HT_CHANNEL_WIDTH_80 = 2,
117 HT_CHANNEL_WIDTH_160 = 3,
118 HT_CHANNEL_WIDTH_10 = 4,
119};
120
121
122
123
124
125enum ht_extchnl_offset {
126 HT_EXTCHNL_OFFSET_NO_EXT = 0,
127 HT_EXTCHNL_OFFSET_UPPER = 1,
128 HT_EXTCHNL_OFFSET_NO_DEF = 2,
129 HT_EXTCHNL_OFFSET_LOWER = 3,
130};
131
132
133enum rt_rf_type_def {
134 RF_1T2R = 0,
135 RF_2T4R = 1,
136 RF_2T2R = 2,
137 RF_1T1R = 3,
138 RF_2T2R_GREEN = 4,
139 RF_819X_MAX_TYPE = 5,
140};
141
142u32 rtw_ch2freq(u32 ch);
143u32 rtw_freq2ch(u32 freq);
144
145
146#endif
147