blob: a3653b009c3eae35a13d986d63a535fa9d8ec788 [file] [log] [blame]
Leo Chang6f601322013-12-04 18:12:10 -08001/*
2 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20*/
Leo Chang09a60182013-12-04 18:12:10 -080021/** ------------------------------------------------------------------------- *
22* Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
23* All Rights Reserved.
24* Qualcomm Atheros Confidential and Proprietary.
25 ------------------------------------------------------------------------- *
26
27
28 \file wlan_nv2.h
29
30 \brief Types for NV implementation
31 Anything that needs to be publicly available should
32 be in this file
33
34 $Id$
35
36 Copyright (C) 2006 Airgo Networks, Incorporated
37
38
39 ========================================================================== */
40
41#if !defined( __WLAN_NV2_H )
42#define __WLAN_NV2_H
43
44#include "halLegacyPalTypes.h"
45#include "halCompiler.h"
46#include "wlan_nv.h"
47
48/* From here, NV2 No CH144 support reduced structure
49 * This structure will be used for NV2 backward compatibility */
50
51typedef enum
52{
53 //2.4GHz Band
54 RF_CHAN_1_V2 = 0,
55 RF_CHAN_2_V2 = 1,
56 RF_CHAN_3_V2 = 2,
57 RF_CHAN_4_V2 = 3,
58 RF_CHAN_5_V2 = 4,
59 RF_CHAN_6_V2 = 5,
60 RF_CHAN_7_V2 = 6,
61 RF_CHAN_8_V2 = 7,
62 RF_CHAN_9_V2 = 8,
63 RF_CHAN_10_V2 = 9,
64 RF_CHAN_11_V2 = 10,
65 RF_CHAN_12_V2 = 11,
66 RF_CHAN_13_V2 = 12,
67 RF_CHAN_14_V2 = 13,
68
69 //4.9GHz Band
70 RF_CHAN_240_V2 = 14,
71 RF_CHAN_244_V2 = 15,
72 RF_CHAN_248_V2 = 16,
73 RF_CHAN_252_V2 = 17,
74 RF_CHAN_208_V2 = 18,
75 RF_CHAN_212_V2 = 19,
76 RF_CHAN_216_V2 = 20,
77
78 //5GHz Low & Mid U-NII Band
79 RF_CHAN_36_V2 = 21,
80 RF_CHAN_40_V2 = 22,
81 RF_CHAN_44_V2 = 23,
82 RF_CHAN_48_V2 = 24,
83 RF_CHAN_52_V2 = 25,
84 RF_CHAN_56_V2 = 26,
85 RF_CHAN_60_V2 = 27,
86 RF_CHAN_64_V2 = 28,
87
88 //5GHz Mid Band - ETSI & FCC
89 RF_CHAN_100_V2 = 29,
90 RF_CHAN_104_V2 = 30,
91 RF_CHAN_108_V2 = 31,
92 RF_CHAN_112_V2 = 32,
93 RF_CHAN_116_V2 = 33,
94 RF_CHAN_120_V2 = 34,
95 RF_CHAN_124_V2 = 35,
96 RF_CHAN_128_V2 = 36,
97 RF_CHAN_132_V2 = 37,
98 RF_CHAN_136_V2 = 38,
99 RF_CHAN_140_V2 = 39,
100
101 //5GHz High U-NII Band
102 RF_CHAN_149_V2 = 40,
103 RF_CHAN_153_V2 = 41,
104 RF_CHAN_157_V2 = 42,
105 RF_CHAN_161_V2 = 43,
106 RF_CHAN_165_V2 = 44,
107
108 //CHANNEL BONDED CHANNELS
109 RF_CHAN_BOND_3_V2 = 45,
110 RF_CHAN_BOND_4_V2 = 46,
111 RF_CHAN_BOND_5_V2 = 47,
112 RF_CHAN_BOND_6_V2 = 48,
113 RF_CHAN_BOND_7_V2 = 49,
114 RF_CHAN_BOND_8_V2 = 50,
115 RF_CHAN_BOND_9_V2 = 51,
116 RF_CHAN_BOND_10_V2 = 52,
117 RF_CHAN_BOND_11_V2 = 53,
118 RF_CHAN_BOND_242_V2 = 54, //4.9GHz Band
119 RF_CHAN_BOND_246_V2 = 55,
120 RF_CHAN_BOND_250_V2 = 56,
121 RF_CHAN_BOND_210_V2 = 57,
122 RF_CHAN_BOND_214_V2 = 58,
123 RF_CHAN_BOND_38_V2 = 59, //5GHz Low & Mid U-NII Band
124 RF_CHAN_BOND_42_V2 = 60,
125 RF_CHAN_BOND_46_V2 = 61,
126 RF_CHAN_BOND_50_V2 = 62,
127 RF_CHAN_BOND_54_V2 = 63,
128 RF_CHAN_BOND_58_V2 = 64,
129 RF_CHAN_BOND_62_V2 = 65,
130 RF_CHAN_BOND_102_V2 = 66, //5GHz Mid Band - ETSI & FCC
131 RF_CHAN_BOND_106_V2 = 67,
132 RF_CHAN_BOND_110_V2 = 68,
133 RF_CHAN_BOND_114_V2 = 69,
134 RF_CHAN_BOND_118_V2 = 70,
135 RF_CHAN_BOND_122_V2 = 71,
136 RF_CHAN_BOND_126_V2 = 72,
137 RF_CHAN_BOND_130_V2 = 73,
138 RF_CHAN_BOND_134_V2 = 74,
139 RF_CHAN_BOND_138_V2 = 75,
140 RF_CHAN_BOND_151_V2 = 76, //5GHz High U-NII Band
141 RF_CHAN_BOND_155_V2 = 77,
142 RF_CHAN_BOND_159_V2 = 78,
143 RF_CHAN_BOND_163_V2 = 79,
144
145 NUM_RF_CHANNELS_V2,
146
147 MIN_2_4GHZ_CHANNEL_V2 = RF_CHAN_1_V2,
148 MAX_2_4GHZ_CHANNEL_V2 = RF_CHAN_14_V2,
149
150 MIN_5GHZ_CHANNEL_V2 = RF_CHAN_240_V2,
151 MAX_5GHZ_CHANNEL_V2 = RF_CHAN_165_V2,
152 NUM_5GHZ_CHANNELS_V2 = (MAX_5GHZ_CHANNEL_V2 - MIN_5GHZ_CHANNEL_V2 + 1),
153
154 MIN_20MHZ_RF_CHANNEL_V2 = RF_CHAN_1_V2,
155 MAX_20MHZ_RF_CHANNEL_V2 = RF_CHAN_165_V2,
156 NUM_20MHZ_RF_CHANNELS_V2 = (MAX_20MHZ_RF_CHANNEL_V2 - MIN_20MHZ_RF_CHANNEL_V2 + 1),
157
158 MIN_40MHZ_RF_CHANNEL_V2 = RF_CHAN_BOND_3_V2,
159 MAX_40MHZ_RF_CHANNEL_V2 = RF_CHAN_BOND_163_V2,
160 NUM_40MHZ_RF_CHANNELS_V2 = (MAX_40MHZ_RF_CHANNEL_V2 - MIN_40MHZ_RF_CHANNEL_V2 + 1),
161
162 MIN_CB_2_4GHZ_CHANNEL_V2 = RF_CHAN_BOND_3_V2,
163 MAX_CB_2_4GHZ_CHANNEL_V2 = RF_CHAN_BOND_11_V2,
164
165 MIN_CB_5GHZ_CHANNEL_V2 = RF_CHAN_BOND_242_V2,
166 MAX_CB_5GHZ_CHANNEL_V2 = RF_CHAN_BOND_163_V2,
167
168 NUM_TPC_2_4GHZ_CHANNELS_V2 = 14,
169 NUM_TPC_5GHZ_CHANNELS_V2 = NUM_5GHZ_CHANNELS_V2,
170
171 INVALID_RF_CHANNEL_V2 = 0xBAD,
172 RF_CHANNEL_INVALID_MAX_FIELD_V2 = 0x7FFFFFFF /* define as 4 bytes data */
173}eRfChannelsV2;
174
175typedef PACKED_PRE struct PACKED_POST
176{
177 sRegulatoryChannel channels[NUM_RF_CHANNELS_V2];
178 uAbsPwrPrecision antennaGain[NUM_RF_SUBBANDS];
179 uAbsPwrPrecision bRatePowerOffset[NUM_2_4GHZ_CHANNELS];
180 uAbsPwrPrecision gnRatePowerOffset[NUM_RF_CHANNELS_V2];
181}ALIGN_4 sRegulatoryDomainsV2;
182
183typedef PACKED_PRE struct PACKED_POST
184{
185 int16 bRssiOffset[NUM_RF_CHANNELS_V2];
186 int16 gnRssiOffset[NUM_RF_CHANNELS_V2];
187}ALIGN_4 sRssiChannelOffsetsV2;
188
189typedef PACKED_PRE union PACKED_POST
190{
191 tRateGroupPwr pwrOptimum[NUM_RF_SUBBANDS]; // NV_TABLE_RATE_POWER_SETTINGS
192 sRegulatoryDomainsV2 regDomains[NUM_REG_DOMAINS]; // NV_TABLE_REGULATORY_DOMAINS
193 sDefaultCountry defaultCountryTable; // NV_TABLE_DEFAULT_COUNTRY
194 tTpcPowerTable plutCharacterized[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_POWER_TABLE
195 int16 plutPdadcOffset[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_PDADC_OFFSETS
196 tRateGroupPwrVR pwrOptimum_virtualRate[NUM_RF_SUBBANDS]; // NV_TABLE_VIRTUAL_RATE
197 sFwConfig fwConfig; // NV_TABLE_FW_CONFIG
198 sRssiChannelOffsetsV2 rssiChanOffsets[2]; // NV_TABLE_RSSI_CHANNEL_OFFSETS
199 sHwCalValues hwCalValues; // NV_TABLE_HW_CAL_VALUES
200 int16 antennaPathLoss[NUM_RF_CHANNELS_V2]; // NV_TABLE_ANTENNA_PATH_LOSS
201 int16 pktTypePwrLimits[NUM_802_11_MODES][NUM_RF_CHANNELS_V2]; // NV_TABLE_PACKET_TYPE_POWER_LIMITS
202 sOfdmCmdPwrOffset ofdmCmdPwrOffset; // NV_TABLE_OFDM_CMD_PWR_OFFSET
203 sTxBbFilterMode txbbFilterMode; // NV_TABLE_TX_BB_FILTER_MODE
204}ALIGN_4 uNvTablesV2;
205
206typedef PACKED_PRE struct PACKED_POST
207{
208 tRateGroupPwr pwrOptimum[NUM_RF_SUBBANDS]; // NV_TABLE_RATE_POWER_SETTINGS
209 sRegulatoryDomainsV2 regDomains[NUM_REG_DOMAINS]; // NV_TABLE_REGULATORY_DOMAINS
210 sDefaultCountry defaultCountryTable; // NV_TABLE_DEFAULT_COUNTRY
211 tTpcPowerTable plutCharacterized[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_POWER_TABLE
212 int16 plutPdadcOffset[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_PDADC_OFFSETS
213 tRateGroupPwrVR pwrOptimum_virtualRate[NUM_RF_SUBBANDS]; // NV_TABLE_VIRTUAL_RATE
214 sFwConfig fwConfig; // NV_TABLE_FW_CONFIG
215 sRssiChannelOffsetsV2 rssiChanOffsets[2]; // NV_TABLE_RSSI_CHANNEL_OFFSETS
216 sHwCalValues hwCalValues; // NV_TABLE_HW_CAL_VALUES
217 int16 antennaPathLoss[NUM_RF_CHANNELS_V2]; // NV_TABLE_ANTENNA_PATH_LOSS
218 int16 pktTypePwrLimits[NUM_802_11_MODES][NUM_RF_CHANNELS_V2]; // NV_TABLE_PACKET_TYPE_POWER_LIMITS
219 sOfdmCmdPwrOffset ofdmCmdPwrOffset; // NV_TABLE_OFDM_CMD_PWR_OFFSET
220 sTxBbFilterMode txbbFilterMode; // NV_TABLE_TX_BB_FILTER_MODE
221}ALIGN_4 sNvTablesV2;
222
223typedef PACKED_PRE struct PACKED_POST
224{
225 sNvFields fields;
226 sNvTablesV2 tables;
227}ALIGN_4 sHalNvV2;
228
229extern const sHalNvV2 nvDefaultsV2;
230
231#endif
232