blob: 2ee4c7fc02cb66447c5df95098eeb58d978bbaf7 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
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
Jeff Johnson295189b2012-06-20 16:38:30 -070028/**=========================================================================
29
30 \file macTrace.h
31
32 \brief definition for trace related APIs
33
34 \author Sunit Bhatia
35
Jeff Johnson295189b2012-06-20 16:38:30 -070036
37 ========================================================================*/
38
39
40
41#ifndef __MAC_TRACE_H
42#define __MAC_TRACE_H
43
44#include "aniGlobal.h"
45
46
47#ifdef TRACE_RECORD
48
Jeff Johnson295189b2012-06-20 16:38:30 -070049#define MAC_TRACE_GET_MODULE_ID(data) ((data >> 8) & 0xff)
50#define MAC_TRACE_GET_MSG_ID(data) (data & 0xffff)
51
52
Leela Venkata Kiran Kumar Reddy Chiralaf3fe6302013-03-18 12:32:14 -070053#define eLOG_NODROP_MISSED_BEACON_SCENARIO 0
Venkata Prathyusha Kuntupallie5675292013-04-11 17:01:17 -070054#define eLOG_PROC_DEAUTH_FRAME_SCENARIO 1
Jeff Johnson295189b2012-06-20 16:38:30 -070055
Jeff Johnson295189b2012-06-20 16:38:30 -070056void macTraceReset(tpAniSirGlobal pMac);
57void macTrace(tpAniSirGlobal pMac, tANI_U8 code, tANI_U8 session, tANI_U32 data);
58void macTraceNew(tpAniSirGlobal pMac, tANI_U8 module, tANI_U8 code, tANI_U8 session, tANI_U32 data);
Jeff Johnson295189b2012-06-20 16:38:30 -070059tANI_U8* macTraceGetCfgMsgString( tANI_U16 cfgMsg );
60tANI_U8* macTraceGetLimMsgString( tANI_U16 limMsg );
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -080061tANI_U8* macTraceGetWdaMsgString( tANI_U16 wdaMsg );
Jeff Johnson295189b2012-06-20 16:38:30 -070062tANI_U8* macTraceGetSmeMsgString( tANI_U16 smeMsg );
63tANI_U8* macTraceGetModuleString( tANI_U8 moduleId);
Leela Venkata Kiran Kumar Reddy Chiralaf3fe6302013-03-18 12:32:14 -070064tANI_U8* macTraceGetInfoLogString( tANI_U16 infoLog );
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -080065eHalStatus pe_AcquireGlobalLock( tAniSirLim *psPe);
66eHalStatus pe_ReleaseGlobalLock( tAniSirLim *psPe);
Jeff Johnson295189b2012-06-20 16:38:30 -070067
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +053068tANI_U8* macTraceGetHDDWlanConnState(tANI_U16 connState);
Jeff Johnson295189b2012-06-20 16:38:30 -070069
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +053070#ifdef WLAN_FEATURE_P2P_DEBUG
71tANI_U8* macTraceGetP2PConnState(tANI_U16 connState);
72#endif
73
74tANI_U8* macTraceGetNeighbourRoamState(tANI_U16 neighbourRoamState);
75tANI_U8* macTraceGetcsrRoamState(tANI_U16 csrRoamState);
76tANI_U8* macTraceGetcsrRoamSubState(tANI_U16 csrRoamSubState);
77tANI_U8* macTraceGetLimSmeState(tANI_U16 limState);
78tANI_U8* macTraceGetLimMlmState(tANI_U16 mlmState);
79tANI_U8* macTraceGetTLState(tANI_U16 tlState);
Jeff Johnson295189b2012-06-20 16:38:30 -070080
81#endif
82
83#endif
84