1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
14 ******************************************************************************/
26 /* slot time for 11g */
27 #define SHORT_SLOT_TIME 9
28 #define NON_SHORT_SLOT_TIME 20
30 #define RTL8711_RF_MAX_SENS 6
31 #define RTL8711_RF_DEF_SENS 4
33 /* We now define the following channels as the max channels in each
35 /* 2G, total 14 chnls */
36 /* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */
37 #define MAX_CHANNEL_NUM_2G 14
38 #define MAX_CHANNEL_NUM 14 /* 2.4 GHz only */
40 #define NUM_REGULATORYS 1
44 #define EUROPE 0x1 /* temp, should be provided later */
45 #define JAPAN 0x2 /* temp, should be provided later */
47 struct regulatory_class {
48 u32 starting_freq; /* MHz, */
49 u8 channel_set[MAX_CHANNEL_NUM];
50 u8 channel_cck_power[MAX_CHANNEL_NUM]; /* dbm */
51 u8 channel_ofdm_power[MAX_CHANNEL_NUM]; /* dbm */
52 u8 txpower_limit; /* dbm */
53 u8 channel_spacing; /* MHz */
63 cShortPreamble = 0x0020,
65 cChannelAgility = 0x0080,
66 cSpectrumMgnt = 0x0100,
67 cQos = 0x0200, /* For HCCA, use with CF-Pollable
69 cShortSlotTime = 0x0400,
71 cRM = 0x1000, /* RRM (Radio Request Measurement) */
74 cImmediateBA = 0x8000,
77 enum _REG_PREAMBLE_MODE {
83 enum _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
94 enum rf90_radio_path {
95 RF90_PATH_A = 0, /* Radio Path A */
96 RF90_PATH_B = 1, /* Radio Path B */
97 RF90_PATH_C = 2, /* Radio Path C */
98 RF90_PATH_D = 3 /* Radio Path D */
101 /* Bandwidth Offset */
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
106 /* Represent Channel Width in HT Capabilities */
108 enum 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,
117 /* Represent Extension Channel Offset in HT Capabilities */
118 /* This is available only in 40Mhz mode. */
120 enum 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,
127 /* 2007/11/15 MH Define different RF type. */
128 enum rt_rf_type_def {
134 RF_819X_MAX_TYPE = 5,
137 u32 rtw_ch2freq(u32 ch);
140 #endif /* _RTL8711_RF_H_ */