blob: 362d8f7cd2e16aca0a55842395abeb3e83ede6b8 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
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 *
24 Airgo Networks, Inc proprietary.
25 All Rights Reserved, Copyright 2005
26 This program is the confidential and proprietary product of Airgo Networks Inc.
27 Any Unauthorized use, reproduction or transfer of this program is strictly prohibited.
28
29
30 pttModule.h: global variable structure for pttModule
31 Author: Mark Nelson
32 Date: 6/27/05
33
34 History -
35 Date Modified by Modification Information
36 --------------------------------------------------------------------------
37
38 */
39
40#ifndef PTTMODULE_H
41#define PTTMODULE_H
42#include <wlan_phy.h>
43#include <pttFrameGen.h>
44
45#ifdef BUILD_QWPTTSTATIC
46#include "wlan_hal_msg.h" // it is needed to build qwptt static lib
47#endif
48
49enum
50{
51 PTT_STATUS_SUCCESS = 0,
52 PTT_STATUS_FAILURE = 1,
53 PTT_MAX_VAL = 0XFFFF,
54};
55typedef tANI_U32 eQWPttStatus;
56
57
58typedef PACKED_PRE struct PACKED_POST {
59 tANI_U16 drvMjr;
60 tANI_U16 drvMnr;
61 tANI_U16 drvPtch;
62 tANI_U16 drvBld;
63 tANI_U16 pttMax;
64 tANI_U16 pttMin;
65 //FwVersionInfo fwVer;
66} sBuildReleaseParams;
67
68typedef PACKED_PRE struct PACKED_POST {
69 tANI_BOOLEAN agPktsDisabled; //802.11ag
70 tANI_BOOLEAN bPktsDisabled; //802.11b
71 tANI_BOOLEAN slrPktsDisabled; //deprecated in Riva
72 tANI_BOOLEAN n40PktsDisabled; //11N 40
73 tANI_BOOLEAN ac80PktsDisabled; //11AC 80
74 tANI_BOOLEAN rsvd;
75} sRxTypesDisabled;
76
77typedef PACKED_PRE struct PACKED_POST {
78 tANI_U32 totalRxPackets;
79 tANI_U32 totalMacRxPackets;
80 tANI_U32 totalMacFcsErrPackets;
81} sRxFrameCounters;
82
83
84
85
86/* GRAB RAM types */
87//TODO: Change Grab RAM interface as appropriate to Taurus
88typedef enum {
89 GRAB_RAM_RXFIR,
90 GRAB_RAM_ADC,
91 GRAB_RAM_ADC_80,
92 GRAB_RAM_MAX_VAL = 0XFFFF,
93} eGrabRamType;
94
95#define GRAB_RAM_SIZE 6000
96#define GRAB_RAM_SIZE_80MHZ_1_CHAIN 12000
97
98
99
100/// Enum used to specify the trigger type for the aniGrabRam API
101typedef enum eGramDumpTrigType {
102 eGRAM_DUMP_UNTRIGGERED,
103 eGRAM_DUMP_TRIG_ON_11A,
104 eGRAM_DUMP_TRIG_ON_11B,
105 eGRAM_DUMP_TRIG_ON_11A_OR_11B
106} tGramDumpTrigType;
107
108typedef PACKED_PRE struct PACKED_POST {
109 //common to both transmit chains
110 eHalPhyRates rate; //current rate
111 ePhyChanBondState cbState; //current Channel bonded state
112
113 tANI_U8 channelId; //current channel Id
114 tANI_U8 pwrTemplateIndex; //5-bit template index used for the current rate
115 tANI_U8 reserved[2];
116
117 //specific transmit chain power
118 tTxChainPower txChains[PHY_MAX_TX_CHAINS]; //output power for Tx chains
119} tTxPowerReport;
120
121
122typedef PACKED_PRE struct PACKED_POST {
123 /*
124 * The idea here is to store only those things which cannot be
125 * handled directly within the individual function calls.
126 * Most things will go straight to registers or come from registers.
127 */
128 sPttFrameGenParams frameGenParams;
129 tANI_U8 payload[MAX_PAYLOAD_SIZE];
130
131 //Tx Waveform Gen Service
132 tANI_U16 numWfmSamples;
133 tANI_BOOLEAN wfmEnabled;
134 tANI_BOOLEAN wfmStored;
135
136 //Tx Frame Power Service
137 tTxGain forcedTxGain[PHY_MAX_TX_CHAINS]; //use TXPWR_OVERRIDE for wfm, and fill gain table otherwise
138 tANI_U8 tpcPowerLut[PHY_MAX_TX_CHAINS][TPC_MEM_POWER_LUT_DEPTH];
139 tTxGain tpcGainLut[PHY_MAX_TX_CHAINS][TPC_MEM_GAIN_LUT_DEPTH];
140
141 //Tx Frame Gen Service
142 tANI_BOOLEAN frameGenEnabled;
143 tANI_BOOLEAN phyDbgFrameGen; //this says use phyDbg for frames - leave this in place until we know that PhyDbg will suffice
144
145 // for FTM PER feature
146 tANI_U8 tx_mode;
147
148 tANI_U8 reserved[1];
149
150 //Rx Gain Service
151 sRxChainsAgcEnable agcEnables;
152
153 tANI_U32 *pADCCaptureCache; //pointer to allocate ADC capture cache
154
155 //TX_TIMER adcRssiStatsTimer; //Create adc rssi stat collection timer
156
157 sRxChainsRssi rssi;
158} tPttModuleVariables;
159
160#endif /* PTTMODULE_H */