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