42500b612a23ef0299505317189a1d651c7e00c9
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / drivers / net / wireless / bcmdhd4361 / include / event_log_set.h
1 /*
2 * EVENT_LOG system definitions
3 *
4 * Copyright (C) 1999-2019, Broadcom.
5 *
6 * Unless you and Broadcom execute a separate written software license
7 * agreement governing use of this software, this software is licensed to you
8 * under the terms of the GNU General Public License version 2 (the "GPL"),
9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10 * following added to such license:
11 *
12 * As a special exception, the copyright holders of this software give you
13 * permission to link this software with independent modules, and to copy and
14 * distribute the resulting executable under terms of your choice, provided that
15 * you also meet, for each linked independent module, the terms and conditions of
16 * the license of that module. An independent module is a module which is not
17 * derived from this software. The special exception does not apply to any
18 * modifications of the software.
19 *
20 * Notwithstanding the above, under no circumstances may you combine this
21 * software in any way with any other Broadcom software provided under a license
22 * other than the GPL, without Broadcom's express prior written consent.
23 *
24 *
25 * <<Broadcom-WL-IPTag/Open:>>
26 *
27 * $Id: event_log_set.h 744920 2018-02-06 06:25:40Z $
28 */
29
30 #ifndef _EVENT_LOG_SET_H_
31 #define _EVENT_LOG_SET_H_
32
33 #ifndef NUM_EVENT_LOG_SETS
34 /* Set a maximum number of sets here. It is not dynamic for
35 * efficiency of the EVENT_LOG calls. Old branches could define
36 * this to an appropriat enumber in their makefiles to reduce
37 * ROM invalidation
38 */
39 #define NUM_EVENT_LOG_SETS 11
40 #endif // endif
41
42 /* Legacy implementation does not have these sets. So make them 0. */
43 #if (NUM_EVENT_LOG_SETS <= 8)
44 #define NUM_EVENT_LOG_DBG_SETS 0
45 #elif (NUM_EVENT_LOG_SETS == 9)
46 #define NUM_EVENT_LOG_DBG_SETS 1
47 #else
48 #define NUM_EVENT_LOG_DBG_SETS 2
49 #endif // endif
50
51 /* Debug log sets start from this log set and are always the last few ones */
52 /* Note that these log sets are not reserved for debug builds. They can be used
53 * for other purpose as well. If used for other purpose, the debug log set
54 * allocation code will check if there is a free one available out of
55 * NUM_EVENT_LOG_DBG_SETS starting from EVENT_LOG_DBG_START_SET
56 */
57 #define EVENT_LOG_DBG_START_SET (NUM_EVENT_LOG_SETS - NUM_EVENT_LOG_DBG_SETS)
58
59 /* Define new event log sets here */
60 #define EVENT_LOG_SET_BUS 0
61 #define EVENT_LOG_SET_WL 1
62 #define EVENT_LOG_SET_PSM 2
63 #define EVENT_LOG_SET_ERROR 3
64 #define EVENT_LOG_SET_MEM_API 4
65 /* Share the set with MEM_API for now to limit ROM invalidation.
66 * The above set is used in dingo only
67 * On trunk, MSCH should move to a different set.
68 */
69 #define EVENT_LOG_SET_MSCH_PROFILER 4
70 #define EVENT_LOG_SET_ECOUNTERS 5 /* Host to instantiate this for ecounters. */
71 #define EVENT_LOG_SET_6 6 /* Instantiated by host for channel switch logs */
72 #define EVENT_LOG_SET_7 7 /* Instantiated by host for AMPDU stats */
73
74 /* The following ones could be used for debug builds. Always the last few ones */
75 #define EVENT_LOG_SET_8 8
76 #define EVENT_LOG_SET_9 9
77
78 #define EVENT_LOG_SET_PRSRV 7 /* The logtag set flushed only on error. Share with 7 to avoid
79 * abandons.
80 */
81
82 #define EVENT_LOG_SET_PRSRV_BUS 10
83
84 /* send delayed logs when >= 50% of buffer is full */
85 #ifndef ECOUNTERS_DELAYED_FLUSH_PERCENTAGE
86 #define ECOUNTERS_DELAYED_FLUSH_PERCENTAGE (50)
87 #endif // endif
88
89 #endif /* _EVENT_LOG_SET_H_ */