Prakash Dhavali | 0573c4d | 2014-02-12 13:19:04 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /**========================================================================= |
| 29 | ========================================================================*/ |
Leo Chang | 09a6018 | 2013-12-04 18:12:10 -0800 | [diff] [blame] | 30 | /** ------------------------------------------------------------------------- * |
Prakash Dhavali | 0573c4d | 2014-02-12 13:19:04 -0800 | [diff] [blame] | 31 | |
Leo Chang | 09a6018 | 2013-12-04 18:12:10 -0800 | [diff] [blame] | 32 | ------------------------------------------------------------------------- * |
| 33 | |
| 34 | |
| 35 | \file wlan_nv2.h |
| 36 | |
| 37 | \brief Types for NV implementation |
| 38 | Anything that needs to be publicly available should |
| 39 | be in this file |
| 40 | |
| 41 | $Id$ |
| 42 | |
Leo Chang | 09a6018 | 2013-12-04 18:12:10 -0800 | [diff] [blame] | 43 | |
| 44 | ========================================================================== */ |
| 45 | |
| 46 | #if !defined( __WLAN_NV2_H ) |
| 47 | #define __WLAN_NV2_H |
| 48 | |
| 49 | #include "halLegacyPalTypes.h" |
| 50 | #include "halCompiler.h" |
| 51 | #include "wlan_nv.h" |
| 52 | |
| 53 | /* From here, NV2 No CH144 support reduced structure |
| 54 | * This structure will be used for NV2 backward compatibility */ |
| 55 | |
| 56 | typedef enum |
| 57 | { |
| 58 | //2.4GHz Band |
| 59 | RF_CHAN_1_V2 = 0, |
| 60 | RF_CHAN_2_V2 = 1, |
| 61 | RF_CHAN_3_V2 = 2, |
| 62 | RF_CHAN_4_V2 = 3, |
| 63 | RF_CHAN_5_V2 = 4, |
| 64 | RF_CHAN_6_V2 = 5, |
| 65 | RF_CHAN_7_V2 = 6, |
| 66 | RF_CHAN_8_V2 = 7, |
| 67 | RF_CHAN_9_V2 = 8, |
| 68 | RF_CHAN_10_V2 = 9, |
| 69 | RF_CHAN_11_V2 = 10, |
| 70 | RF_CHAN_12_V2 = 11, |
| 71 | RF_CHAN_13_V2 = 12, |
| 72 | RF_CHAN_14_V2 = 13, |
| 73 | |
| 74 | //4.9GHz Band |
| 75 | RF_CHAN_240_V2 = 14, |
| 76 | RF_CHAN_244_V2 = 15, |
| 77 | RF_CHAN_248_V2 = 16, |
| 78 | RF_CHAN_252_V2 = 17, |
| 79 | RF_CHAN_208_V2 = 18, |
| 80 | RF_CHAN_212_V2 = 19, |
| 81 | RF_CHAN_216_V2 = 20, |
| 82 | |
| 83 | //5GHz Low & Mid U-NII Band |
| 84 | RF_CHAN_36_V2 = 21, |
| 85 | RF_CHAN_40_V2 = 22, |
| 86 | RF_CHAN_44_V2 = 23, |
| 87 | RF_CHAN_48_V2 = 24, |
| 88 | RF_CHAN_52_V2 = 25, |
| 89 | RF_CHAN_56_V2 = 26, |
| 90 | RF_CHAN_60_V2 = 27, |
| 91 | RF_CHAN_64_V2 = 28, |
| 92 | |
| 93 | //5GHz Mid Band - ETSI & FCC |
| 94 | RF_CHAN_100_V2 = 29, |
| 95 | RF_CHAN_104_V2 = 30, |
| 96 | RF_CHAN_108_V2 = 31, |
| 97 | RF_CHAN_112_V2 = 32, |
| 98 | RF_CHAN_116_V2 = 33, |
| 99 | RF_CHAN_120_V2 = 34, |
| 100 | RF_CHAN_124_V2 = 35, |
| 101 | RF_CHAN_128_V2 = 36, |
| 102 | RF_CHAN_132_V2 = 37, |
| 103 | RF_CHAN_136_V2 = 38, |
| 104 | RF_CHAN_140_V2 = 39, |
| 105 | |
| 106 | //5GHz High U-NII Band |
| 107 | RF_CHAN_149_V2 = 40, |
| 108 | RF_CHAN_153_V2 = 41, |
| 109 | RF_CHAN_157_V2 = 42, |
| 110 | RF_CHAN_161_V2 = 43, |
| 111 | RF_CHAN_165_V2 = 44, |
| 112 | |
| 113 | //CHANNEL BONDED CHANNELS |
| 114 | RF_CHAN_BOND_3_V2 = 45, |
| 115 | RF_CHAN_BOND_4_V2 = 46, |
| 116 | RF_CHAN_BOND_5_V2 = 47, |
| 117 | RF_CHAN_BOND_6_V2 = 48, |
| 118 | RF_CHAN_BOND_7_V2 = 49, |
| 119 | RF_CHAN_BOND_8_V2 = 50, |
| 120 | RF_CHAN_BOND_9_V2 = 51, |
| 121 | RF_CHAN_BOND_10_V2 = 52, |
| 122 | RF_CHAN_BOND_11_V2 = 53, |
| 123 | RF_CHAN_BOND_242_V2 = 54, //4.9GHz Band |
| 124 | RF_CHAN_BOND_246_V2 = 55, |
| 125 | RF_CHAN_BOND_250_V2 = 56, |
| 126 | RF_CHAN_BOND_210_V2 = 57, |
| 127 | RF_CHAN_BOND_214_V2 = 58, |
| 128 | RF_CHAN_BOND_38_V2 = 59, //5GHz Low & Mid U-NII Band |
| 129 | RF_CHAN_BOND_42_V2 = 60, |
| 130 | RF_CHAN_BOND_46_V2 = 61, |
| 131 | RF_CHAN_BOND_50_V2 = 62, |
| 132 | RF_CHAN_BOND_54_V2 = 63, |
| 133 | RF_CHAN_BOND_58_V2 = 64, |
| 134 | RF_CHAN_BOND_62_V2 = 65, |
| 135 | RF_CHAN_BOND_102_V2 = 66, //5GHz Mid Band - ETSI & FCC |
| 136 | RF_CHAN_BOND_106_V2 = 67, |
| 137 | RF_CHAN_BOND_110_V2 = 68, |
| 138 | RF_CHAN_BOND_114_V2 = 69, |
| 139 | RF_CHAN_BOND_118_V2 = 70, |
| 140 | RF_CHAN_BOND_122_V2 = 71, |
| 141 | RF_CHAN_BOND_126_V2 = 72, |
| 142 | RF_CHAN_BOND_130_V2 = 73, |
| 143 | RF_CHAN_BOND_134_V2 = 74, |
| 144 | RF_CHAN_BOND_138_V2 = 75, |
| 145 | RF_CHAN_BOND_151_V2 = 76, //5GHz High U-NII Band |
| 146 | RF_CHAN_BOND_155_V2 = 77, |
| 147 | RF_CHAN_BOND_159_V2 = 78, |
| 148 | RF_CHAN_BOND_163_V2 = 79, |
| 149 | |
| 150 | NUM_RF_CHANNELS_V2, |
| 151 | |
| 152 | MIN_2_4GHZ_CHANNEL_V2 = RF_CHAN_1_V2, |
| 153 | MAX_2_4GHZ_CHANNEL_V2 = RF_CHAN_14_V2, |
| 154 | |
| 155 | MIN_5GHZ_CHANNEL_V2 = RF_CHAN_240_V2, |
| 156 | MAX_5GHZ_CHANNEL_V2 = RF_CHAN_165_V2, |
| 157 | NUM_5GHZ_CHANNELS_V2 = (MAX_5GHZ_CHANNEL_V2 - MIN_5GHZ_CHANNEL_V2 + 1), |
| 158 | |
| 159 | MIN_20MHZ_RF_CHANNEL_V2 = RF_CHAN_1_V2, |
| 160 | MAX_20MHZ_RF_CHANNEL_V2 = RF_CHAN_165_V2, |
| 161 | NUM_20MHZ_RF_CHANNELS_V2 = (MAX_20MHZ_RF_CHANNEL_V2 - MIN_20MHZ_RF_CHANNEL_V2 + 1), |
| 162 | |
| 163 | MIN_40MHZ_RF_CHANNEL_V2 = RF_CHAN_BOND_3_V2, |
| 164 | MAX_40MHZ_RF_CHANNEL_V2 = RF_CHAN_BOND_163_V2, |
| 165 | NUM_40MHZ_RF_CHANNELS_V2 = (MAX_40MHZ_RF_CHANNEL_V2 - MIN_40MHZ_RF_CHANNEL_V2 + 1), |
| 166 | |
| 167 | MIN_CB_2_4GHZ_CHANNEL_V2 = RF_CHAN_BOND_3_V2, |
| 168 | MAX_CB_2_4GHZ_CHANNEL_V2 = RF_CHAN_BOND_11_V2, |
| 169 | |
| 170 | MIN_CB_5GHZ_CHANNEL_V2 = RF_CHAN_BOND_242_V2, |
| 171 | MAX_CB_5GHZ_CHANNEL_V2 = RF_CHAN_BOND_163_V2, |
| 172 | |
| 173 | NUM_TPC_2_4GHZ_CHANNELS_V2 = 14, |
| 174 | NUM_TPC_5GHZ_CHANNELS_V2 = NUM_5GHZ_CHANNELS_V2, |
| 175 | |
| 176 | INVALID_RF_CHANNEL_V2 = 0xBAD, |
| 177 | RF_CHANNEL_INVALID_MAX_FIELD_V2 = 0x7FFFFFFF /* define as 4 bytes data */ |
| 178 | }eRfChannelsV2; |
| 179 | |
| 180 | typedef PACKED_PRE struct PACKED_POST |
| 181 | { |
| 182 | sRegulatoryChannel channels[NUM_RF_CHANNELS_V2]; |
| 183 | uAbsPwrPrecision antennaGain[NUM_RF_SUBBANDS]; |
| 184 | uAbsPwrPrecision bRatePowerOffset[NUM_2_4GHZ_CHANNELS]; |
| 185 | uAbsPwrPrecision gnRatePowerOffset[NUM_RF_CHANNELS_V2]; |
| 186 | }ALIGN_4 sRegulatoryDomainsV2; |
| 187 | |
| 188 | typedef PACKED_PRE struct PACKED_POST |
| 189 | { |
| 190 | int16 bRssiOffset[NUM_RF_CHANNELS_V2]; |
| 191 | int16 gnRssiOffset[NUM_RF_CHANNELS_V2]; |
| 192 | }ALIGN_4 sRssiChannelOffsetsV2; |
| 193 | |
| 194 | typedef PACKED_PRE union PACKED_POST |
| 195 | { |
| 196 | tRateGroupPwr pwrOptimum[NUM_RF_SUBBANDS]; // NV_TABLE_RATE_POWER_SETTINGS |
| 197 | sRegulatoryDomainsV2 regDomains[NUM_REG_DOMAINS]; // NV_TABLE_REGULATORY_DOMAINS |
| 198 | sDefaultCountry defaultCountryTable; // NV_TABLE_DEFAULT_COUNTRY |
| 199 | tTpcPowerTable plutCharacterized[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_POWER_TABLE |
| 200 | int16 plutPdadcOffset[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_PDADC_OFFSETS |
| 201 | tRateGroupPwrVR pwrOptimum_virtualRate[NUM_RF_SUBBANDS]; // NV_TABLE_VIRTUAL_RATE |
| 202 | sFwConfig fwConfig; // NV_TABLE_FW_CONFIG |
| 203 | sRssiChannelOffsetsV2 rssiChanOffsets[2]; // NV_TABLE_RSSI_CHANNEL_OFFSETS |
| 204 | sHwCalValues hwCalValues; // NV_TABLE_HW_CAL_VALUES |
| 205 | int16 antennaPathLoss[NUM_RF_CHANNELS_V2]; // NV_TABLE_ANTENNA_PATH_LOSS |
| 206 | int16 pktTypePwrLimits[NUM_802_11_MODES][NUM_RF_CHANNELS_V2]; // NV_TABLE_PACKET_TYPE_POWER_LIMITS |
| 207 | sOfdmCmdPwrOffset ofdmCmdPwrOffset; // NV_TABLE_OFDM_CMD_PWR_OFFSET |
| 208 | sTxBbFilterMode txbbFilterMode; // NV_TABLE_TX_BB_FILTER_MODE |
| 209 | }ALIGN_4 uNvTablesV2; |
| 210 | |
| 211 | typedef PACKED_PRE struct PACKED_POST |
| 212 | { |
| 213 | tRateGroupPwr pwrOptimum[NUM_RF_SUBBANDS]; // NV_TABLE_RATE_POWER_SETTINGS |
| 214 | sRegulatoryDomainsV2 regDomains[NUM_REG_DOMAINS]; // NV_TABLE_REGULATORY_DOMAINS |
| 215 | sDefaultCountry defaultCountryTable; // NV_TABLE_DEFAULT_COUNTRY |
| 216 | tTpcPowerTable plutCharacterized[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_POWER_TABLE |
| 217 | int16 plutPdadcOffset[NUM_RF_CHANNELS_V2]; // NV_TABLE_TPC_PDADC_OFFSETS |
| 218 | tRateGroupPwrVR pwrOptimum_virtualRate[NUM_RF_SUBBANDS]; // NV_TABLE_VIRTUAL_RATE |
| 219 | sFwConfig fwConfig; // NV_TABLE_FW_CONFIG |
| 220 | sRssiChannelOffsetsV2 rssiChanOffsets[2]; // NV_TABLE_RSSI_CHANNEL_OFFSETS |
| 221 | sHwCalValues hwCalValues; // NV_TABLE_HW_CAL_VALUES |
| 222 | int16 antennaPathLoss[NUM_RF_CHANNELS_V2]; // NV_TABLE_ANTENNA_PATH_LOSS |
| 223 | int16 pktTypePwrLimits[NUM_802_11_MODES][NUM_RF_CHANNELS_V2]; // NV_TABLE_PACKET_TYPE_POWER_LIMITS |
| 224 | sOfdmCmdPwrOffset ofdmCmdPwrOffset; // NV_TABLE_OFDM_CMD_PWR_OFFSET |
| 225 | sTxBbFilterMode txbbFilterMode; // NV_TABLE_TX_BB_FILTER_MODE |
| 226 | }ALIGN_4 sNvTablesV2; |
| 227 | |
| 228 | typedef PACKED_PRE struct PACKED_POST |
| 229 | { |
| 230 | sNvFields fields; |
| 231 | sNvTablesV2 tables; |
| 232 | }ALIGN_4 sHalNvV2; |
| 233 | |
| 234 | extern const sHalNvV2 nvDefaultsV2; |
| 235 | |
| 236 | #endif |
| 237 | |