blob: 8389285a7bc6ddc37c36041567bed0efe7207a1d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
6/*
Jeff Johnson295189b2012-06-20 16:38:30 -07007 *
8 * Airgo Networks, Inc proprietary. All rights reserved.
9 * This file schDebug.cc contains some debug functions.
10 *
11 * Author: Sandesh Goel
12 * Date: 02/25/02
13 * History:-
14 * Date Modified by Modification Information
15 * --------------------------------------------------------------------
Jeff Johnson62c27982013-02-27 17:53:55 -080016 *
Jeff Johnson295189b2012-06-20 16:38:30 -070017 */
18
19
Katya Nigam70d68332013-09-16 16:49:45 +053020#include "vos_trace.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070021#include "schDebug.h"
Katya Nigam70d68332013-09-16 16:49:45 +053022#define LOG_SIZE 256
Jeff Johnson295189b2012-06-20 16:38:30 -070023
Katya Nigam70d68332013-09-16 16:49:45 +053024void schLog(tpAniSirGlobal pMac, tANI_U32 loglevel, const char *pString, ...)
Jeff Johnson295189b2012-06-20 16:38:30 -070025{
Jeff Johnson295189b2012-06-20 16:38:30 -070026
Katya Nigam70d68332013-09-16 16:49:45 +053027 VOS_TRACE_LEVEL vosDebugLevel;
28 char logBuffer[LOG_SIZE];
29 va_list marker;
Jeff Johnson295189b2012-06-20 16:38:30 -070030
Katya Nigam70d68332013-09-16 16:49:45 +053031 /* getting proper Debug level*/
32 vosDebugLevel = getVosDebugLevel(loglevel);
Jeff Johnson62c27982013-02-27 17:53:55 -080033
Katya Nigam70d68332013-09-16 16:49:45 +053034 /* extracting arguments from pstring */
35 va_start( marker, pString );
36 vsnprintf(logBuffer, LOG_SIZE, pString, marker);
37 VOS_TRACE(VOS_MODULE_ID_PE, vosDebugLevel, "%s", logBuffer);
38 va_end( marker );
39 }
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
Jeff Johnson295189b2012-06-20 16:38:30 -070042
43// --------------------------------------------------------------------