Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 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 | */ |
| 21 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 24 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 25 | * |
| 26 | * |
| 27 | * Permission to use, copy, modify, and/or distribute this software for |
| 28 | * any purpose with or without fee is hereby granted, provided that the |
| 29 | * above copyright notice and this permission notice appear in all |
| 30 | * copies. |
| 31 | * |
| 32 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 33 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 35 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 36 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 37 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 39 | * PERFORMANCE OF THIS SOFTWARE. |
| 40 | */ |
| 41 | |
| 42 | /** |
| 43 | * |
| 44 | Airgo Networks, Inc proprietary. |
| 45 | All Rights Reserved, Copyright 2005 |
| 46 | This program is the confidential and proprietary product of Airgo Networks Inc. |
| 47 | Any Unauthorized use, reproduction or transfer of this program is strictly prohibited. |
| 48 | |
| 49 | |
| 50 | pttModule.h: global variable structure for pttModule |
| 51 | Author: Mark Nelson |
| 52 | Date: 6/27/05 |
| 53 | |
| 54 | History - |
| 55 | Date Modified by Modification Information |
| 56 | -------------------------------------------------------------------------- |
| 57 | |
| 58 | */ |
| 59 | |
| 60 | #ifndef PTTMODULE_H |
| 61 | #define PTTMODULE_H |
| 62 | #include <wlan_phy.h> |
| 63 | #include <pttFrameGen.h> |
| 64 | |
| 65 | #ifdef BUILD_QWPTTSTATIC |
| 66 | #include "wlan_hal_msg.h" // it is needed to build qwptt static lib |
| 67 | #endif |
| 68 | |
Prasanna Kumar | 55d64bf | 2013-07-18 16:22:45 -0700 | [diff] [blame^] | 69 | // Max NV fragment size |
| 70 | #define MAX_NV_BIN_SIZE 2000 |
| 71 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 72 | enum |
| 73 | { |
| 74 | PTT_STATUS_SUCCESS = 0, |
| 75 | PTT_STATUS_FAILURE = 1, |
| 76 | PTT_MAX_VAL = 0XFFFF, |
| 77 | }; |
| 78 | typedef tANI_U32 eQWPttStatus; |
| 79 | |
| 80 | |
| 81 | typedef PACKED_PRE struct PACKED_POST { |
| 82 | tANI_U16 drvMjr; |
| 83 | tANI_U16 drvMnr; |
| 84 | tANI_U16 drvPtch; |
| 85 | tANI_U16 drvBld; |
| 86 | tANI_U16 pttMax; |
| 87 | tANI_U16 pttMin; |
| 88 | //FwVersionInfo fwVer; |
| 89 | } sBuildReleaseParams; |
| 90 | |
| 91 | typedef PACKED_PRE struct PACKED_POST { |
| 92 | tANI_BOOLEAN agPktsDisabled; //802.11ag |
| 93 | tANI_BOOLEAN bPktsDisabled; //802.11b |
| 94 | tANI_BOOLEAN slrPktsDisabled; //deprecated in Riva |
| 95 | tANI_BOOLEAN n40PktsDisabled; //11N 40 |
| 96 | tANI_BOOLEAN ac80PktsDisabled; //11AC 80 |
| 97 | tANI_BOOLEAN rsvd; |
| 98 | } sRxTypesDisabled; |
| 99 | |
| 100 | typedef PACKED_PRE struct PACKED_POST { |
| 101 | tANI_U32 totalRxPackets; |
| 102 | tANI_U32 totalMacRxPackets; |
| 103 | tANI_U32 totalMacFcsErrPackets; |
| 104 | } sRxFrameCounters; |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | /* GRAB RAM types */ |
| 110 | //TODO: Change Grab RAM interface as appropriate to Taurus |
| 111 | typedef enum { |
| 112 | GRAB_RAM_RXFIR, |
| 113 | GRAB_RAM_ADC, |
| 114 | GRAB_RAM_ADC_80, |
| 115 | GRAB_RAM_MAX_VAL = 0XFFFF, |
| 116 | } eGrabRamType; |
| 117 | |
| 118 | #define GRAB_RAM_SIZE 6000 |
| 119 | #define GRAB_RAM_SIZE_80MHZ_1_CHAIN 12000 |
| 120 | |
| 121 | |
| 122 | |
| 123 | /// Enum used to specify the trigger type for the aniGrabRam API |
| 124 | typedef enum eGramDumpTrigType { |
| 125 | eGRAM_DUMP_UNTRIGGERED, |
| 126 | eGRAM_DUMP_TRIG_ON_11A, |
| 127 | eGRAM_DUMP_TRIG_ON_11B, |
| 128 | eGRAM_DUMP_TRIG_ON_11A_OR_11B |
| 129 | } tGramDumpTrigType; |
| 130 | |
| 131 | typedef PACKED_PRE struct PACKED_POST { |
| 132 | //common to both transmit chains |
| 133 | eHalPhyRates rate; //current rate |
| 134 | ePhyChanBondState cbState; //current Channel bonded state |
| 135 | |
| 136 | tANI_U8 channelId; //current channel Id |
| 137 | tANI_U8 pwrTemplateIndex; //5-bit template index used for the current rate |
| 138 | tANI_U8 reserved[2]; |
| 139 | |
| 140 | //specific transmit chain power |
| 141 | tTxChainPower txChains[PHY_MAX_TX_CHAINS]; //output power for Tx chains |
| 142 | } tTxPowerReport; |
| 143 | |
Shailender Karmuchi | 3e7202f | 2013-06-25 01:14:09 -0700 | [diff] [blame] | 144 | #define RXP_MAX_FILTER_IDX 64 |
| 145 | |
| 146 | typedef PACKED_PRE struct PACKED_POST |
| 147 | { |
| 148 | uint32 rxpFilterForFTMPER[RXP_MAX_FILTER_IDX]; |
| 149 | uint32 max_pktlen; |
| 150 | uint32 flt_disable0; |
| 151 | uint32 flt_disable1; |
| 152 | uint32 config2; |
| 153 | uint32 push_wq_ctrl; |
| 154 | uint32 push_wq_ctrl2; |
| 155 | uint32 extra_frame_flt; |
| 156 | } sMACConfig; |
| 157 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 158 | |
| 159 | typedef PACKED_PRE struct PACKED_POST { |
| 160 | /* |
| 161 | * The idea here is to store only those things which cannot be |
| 162 | * handled directly within the individual function calls. |
| 163 | * Most things will go straight to registers or come from registers. |
| 164 | */ |
| 165 | sPttFrameGenParams frameGenParams; |
| 166 | tANI_U8 payload[MAX_PAYLOAD_SIZE]; |
| 167 | |
| 168 | //Tx Waveform Gen Service |
| 169 | tANI_U16 numWfmSamples; |
| 170 | tANI_BOOLEAN wfmEnabled; |
| 171 | tANI_BOOLEAN wfmStored; |
| 172 | |
| 173 | //Tx Frame Power Service |
| 174 | tTxGain forcedTxGain[PHY_MAX_TX_CHAINS]; //use TXPWR_OVERRIDE for wfm, and fill gain table otherwise |
| 175 | tANI_U8 tpcPowerLut[PHY_MAX_TX_CHAINS][TPC_MEM_POWER_LUT_DEPTH]; |
| 176 | tTxGain tpcGainLut[PHY_MAX_TX_CHAINS][TPC_MEM_GAIN_LUT_DEPTH]; |
| 177 | |
| 178 | //Tx Frame Gen Service |
| 179 | tANI_BOOLEAN frameGenEnabled; |
| 180 | tANI_BOOLEAN phyDbgFrameGen; //this says use phyDbg for frames - leave this in place until we know that PhyDbg will suffice |
| 181 | |
| 182 | // for FTM PER feature |
| 183 | tANI_U8 tx_mode; |
| 184 | |
Shailender Karmuchi | 3e7202f | 2013-06-25 01:14:09 -0700 | [diff] [blame] | 185 | tANI_BOOLEAN ftm_per_settings_saved; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 186 | |
| 187 | //Rx Gain Service |
| 188 | sRxChainsAgcEnable agcEnables; |
| 189 | |
| 190 | tANI_U32 *pADCCaptureCache; //pointer to allocate ADC capture cache |
| 191 | |
| 192 | //TX_TIMER adcRssiStatsTimer; //Create adc rssi stat collection timer |
| 193 | |
| 194 | sRxChainsRssi rssi; |
| 195 | } tPttModuleVariables; |
| 196 | |
Shailender Karmuchi | 3e7202f | 2013-06-25 01:14:09 -0700 | [diff] [blame] | 197 | #ifdef WCN_PRONTO |
| 198 | extern sMACConfig macConfig; |
| 199 | #endif |
| 200 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 201 | #endif /* PTTMODULE_H */ |