blob: bfc60a5ef38ba483859185d62b9f6ae5a64c6c7c [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * 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 Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
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
69enum
70{
71 PTT_STATUS_SUCCESS = 0,
72 PTT_STATUS_FAILURE = 1,
73 PTT_MAX_VAL = 0XFFFF,
74};
75typedef tANI_U32 eQWPttStatus;
76
77
78typedef PACKED_PRE struct PACKED_POST {
79 tANI_U16 drvMjr;
80 tANI_U16 drvMnr;
81 tANI_U16 drvPtch;
82 tANI_U16 drvBld;
83 tANI_U16 pttMax;
84 tANI_U16 pttMin;
85 //FwVersionInfo fwVer;
86} sBuildReleaseParams;
87
88typedef PACKED_PRE struct PACKED_POST {
89 tANI_BOOLEAN agPktsDisabled; //802.11ag
90 tANI_BOOLEAN bPktsDisabled; //802.11b
91 tANI_BOOLEAN slrPktsDisabled; //deprecated in Riva
92 tANI_BOOLEAN n40PktsDisabled; //11N 40
93 tANI_BOOLEAN ac80PktsDisabled; //11AC 80
94 tANI_BOOLEAN rsvd;
95} sRxTypesDisabled;
96
97typedef PACKED_PRE struct PACKED_POST {
98 tANI_U32 totalRxPackets;
99 tANI_U32 totalMacRxPackets;
100 tANI_U32 totalMacFcsErrPackets;
101} sRxFrameCounters;
102
103
104
105
106/* GRAB RAM types */
107//TODO: Change Grab RAM interface as appropriate to Taurus
108typedef enum {
109 GRAB_RAM_RXFIR,
110 GRAB_RAM_ADC,
111 GRAB_RAM_ADC_80,
112 GRAB_RAM_MAX_VAL = 0XFFFF,
113} eGrabRamType;
114
115#define GRAB_RAM_SIZE 6000
116#define GRAB_RAM_SIZE_80MHZ_1_CHAIN 12000
117
118
119
120/// Enum used to specify the trigger type for the aniGrabRam API
121typedef enum eGramDumpTrigType {
122 eGRAM_DUMP_UNTRIGGERED,
123 eGRAM_DUMP_TRIG_ON_11A,
124 eGRAM_DUMP_TRIG_ON_11B,
125 eGRAM_DUMP_TRIG_ON_11A_OR_11B
126} tGramDumpTrigType;
127
128typedef PACKED_PRE struct PACKED_POST {
129 //common to both transmit chains
130 eHalPhyRates rate; //current rate
131 ePhyChanBondState cbState; //current Channel bonded state
132
133 tANI_U8 channelId; //current channel Id
134 tANI_U8 pwrTemplateIndex; //5-bit template index used for the current rate
135 tANI_U8 reserved[2];
136
137 //specific transmit chain power
138 tTxChainPower txChains[PHY_MAX_TX_CHAINS]; //output power for Tx chains
139} tTxPowerReport;
140
141
142typedef PACKED_PRE struct PACKED_POST {
143 /*
144 * The idea here is to store only those things which cannot be
145 * handled directly within the individual function calls.
146 * Most things will go straight to registers or come from registers.
147 */
148 sPttFrameGenParams frameGenParams;
149 tANI_U8 payload[MAX_PAYLOAD_SIZE];
150
151 //Tx Waveform Gen Service
152 tANI_U16 numWfmSamples;
153 tANI_BOOLEAN wfmEnabled;
154 tANI_BOOLEAN wfmStored;
155
156 //Tx Frame Power Service
157 tTxGain forcedTxGain[PHY_MAX_TX_CHAINS]; //use TXPWR_OVERRIDE for wfm, and fill gain table otherwise
158 tANI_U8 tpcPowerLut[PHY_MAX_TX_CHAINS][TPC_MEM_POWER_LUT_DEPTH];
159 tTxGain tpcGainLut[PHY_MAX_TX_CHAINS][TPC_MEM_GAIN_LUT_DEPTH];
160
161 //Tx Frame Gen Service
162 tANI_BOOLEAN frameGenEnabled;
163 tANI_BOOLEAN phyDbgFrameGen; //this says use phyDbg for frames - leave this in place until we know that PhyDbg will suffice
164
165 // for FTM PER feature
166 tANI_U8 tx_mode;
167
168 tANI_U8 reserved[1];
169
170 //Rx Gain Service
171 sRxChainsAgcEnable agcEnables;
172
173 tANI_U32 *pADCCaptureCache; //pointer to allocate ADC capture cache
174
175 //TX_TIMER adcRssiStatsTimer; //Create adc rssi stat collection timer
176
177 sRxChainsRssi rssi;
178} tPttModuleVariables;
179
180#endif /* PTTMODULE_H */