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