1
2
3
4
5
6
7#ifndef __RTW_RF_H_
8#define __RTW_RF_H_
9
10#include <rtw_cmd.h>
11
12#define OFDM_PHY 1
13#define MIXED_PHY 2
14#define CCK_PHY 3
15
16#define NumRates (13)
17
18
19#define SHORT_SLOT_TIME 9
20#define NON_SHORT_SLOT_TIME 20
21
22
23
24
25
26
27#define MAX_CHANNEL_NUM_2G 14
28#define MAX_CHANNEL_NUM 14
29
30
31#define USA 0x555320
32#define EUROPE 0x1
33#define JAPAN 0x2
34
35struct regulatory_class {
36 u32 starting_freq;
37 u8 channel_set[MAX_CHANNEL_NUM];
38 u8 channel_cck_power[MAX_CHANNEL_NUM];
39 u8 channel_ofdm_power[MAX_CHANNEL_NUM];
40 u8 txpower_limit;
41 u8 channel_spacing;
42 u8 modem;
43};
44
45enum capability {
46 cESS = 0x0001,
47 cIBSS = 0x0002,
48 cPollable = 0x0004,
49 cPollReq = 0x0008,
50 cPrivacy = 0x0010,
51 cShortPreamble = 0x0020,
52 cPBCC = 0x0040,
53 cChannelAgility = 0x0080,
54 cSpectrumMgnt = 0x0100,
55 cQos = 0x0200,
56
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 rf90_radio_path {
73 RF90_PATH_A = 0,
74 RF90_PATH_B = 1,
75 RF90_PATH_C = 2,
76 RF90_PATH_D = 3
77};
78
79
80#define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
81#define HAL_PRIME_CHNL_OFFSET_LOWER 1
82#define HAL_PRIME_CHNL_OFFSET_UPPER 2
83
84
85
86enum ht_channel_width {
87 HT_CHANNEL_WIDTH_20 = 0,
88 HT_CHANNEL_WIDTH_40 = 1,
89 HT_CHANNEL_WIDTH_80 = 2,
90 HT_CHANNEL_WIDTH_160 = 3,
91 HT_CHANNEL_WIDTH_10 = 4,
92};
93
94
95
96
97
98enum ht_extchnl_offset {
99 HT_EXTCHNL_OFFSET_NO_EXT = 0,
100 HT_EXTCHNL_OFFSET_UPPER = 1,
101 HT_EXTCHNL_OFFSET_NO_DEF = 2,
102 HT_EXTCHNL_OFFSET_LOWER = 3,
103};
104
105
106enum rt_rf_type_def {
107 RF_1T2R = 0,
108 RF_2T4R = 1,
109 RF_2T2R = 2,
110 RF_1T1R = 3,
111 RF_2T2R_GREEN = 4,
112 RF_819X_MAX_TYPE = 5,
113};
114
115u32 rtw_ch2freq(u32 ch);
116
117#endif
118