1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
6 ******************************************************************************/
18 /* slot time for 11g */
19 #define SHORT_SLOT_TIME 9
20 #define NON_SHORT_SLOT_TIME 20
22 #define RTL8711_RF_MAX_SENS 6
23 #define RTL8711_RF_DEF_SENS 4
25 /* We now define the following channels as the max channels in each
28 /* 2G, total 14 chnls */
29 /* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */
30 #define MAX_CHANNEL_NUM_2G 14
31 #define MAX_CHANNEL_NUM 14 /* 2.4 GHz only */
33 #define NUM_REGULATORYS 1
37 #define EUROPE 0x1 /* temp, should be provided later */
38 #define JAPAN 0x2 /* temp, should be provided later */
40 struct regulatory_class {
41 u32 starting_freq; /* MHz, */
42 u8 channel_set[MAX_CHANNEL_NUM];
43 u8 channel_cck_power[MAX_CHANNEL_NUM]; /* dbm */
44 u8 channel_ofdm_power[MAX_CHANNEL_NUM]; /* dbm */
45 u8 txpower_limit; /* dbm */
46 u8 channel_spacing; /* MHz */
56 cShortPreamble = 0x0020,
58 cChannelAgility = 0x0080,
59 cSpectrumMgnt = 0x0100,
60 cQos = 0x0200, /* For HCCA, use with CF-Pollable
63 cShortSlotTime = 0x0400,
65 cRM = 0x1000, /* RRM (Radio Request Measurement) */
68 cImmediateBA = 0x8000,
71 enum _REG_PREAMBLE_MODE {
77 enum _RTL8712_RF_MIMO_CONFIG_ {
78 RTL8712_RFCONFIG_1T = 0x10,
79 RTL8712_RFCONFIG_2T = 0x20,
80 RTL8712_RFCONFIG_1R = 0x01,
81 RTL8712_RFCONFIG_2R = 0x02,
82 RTL8712_RFCONFIG_1T1R = 0x11,
83 RTL8712_RFCONFIG_1T2R = 0x12,
84 RTL8712_RFCONFIG_TURBO = 0x92,
85 RTL8712_RFCONFIG_2T2R = 0x22
88 enum rf90_radio_path {
89 RF90_PATH_A = 0, /* Radio Path A */
90 RF90_PATH_B = 1, /* Radio Path B */
91 RF90_PATH_C = 2, /* Radio Path C */
92 RF90_PATH_D = 3 /* Radio Path D */
95 /* Bandwidth Offset */
96 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
97 #define HAL_PRIME_CHNL_OFFSET_LOWER 1
98 #define HAL_PRIME_CHNL_OFFSET_UPPER 2
100 /* Represent Channel Width in HT Capabilities */
102 enum ht_channel_width {
103 HT_CHANNEL_WIDTH_20 = 0,
104 HT_CHANNEL_WIDTH_40 = 1,
105 HT_CHANNEL_WIDTH_80 = 2,
106 HT_CHANNEL_WIDTH_160 = 3,
107 HT_CHANNEL_WIDTH_10 = 4,
111 /* Represent Extension Channel Offset in HT Capabilities */
112 /* This is available only in 40Mhz mode. */
114 enum ht_extchnl_offset {
115 HT_EXTCHNL_OFFSET_NO_EXT = 0,
116 HT_EXTCHNL_OFFSET_UPPER = 1,
117 HT_EXTCHNL_OFFSET_NO_DEF = 2,
118 HT_EXTCHNL_OFFSET_LOWER = 3,
121 /* 2007/11/15 MH Define different RF type. */
122 enum rt_rf_type_def {
128 RF_819X_MAX_TYPE = 5,
131 u32 rtw_ch2freq(u32 ch);
134 #endif /* _RTL8711_RF_H_ */