mac80211: backport from trunk
[openwrt-10.03/.git] / package / mac80211 / patches / 070-deactivate_mac80211_tracing.patch
1 Do not activate the mac80211 tracing by default as it does not work with 
2 kernel <= 2.6.32. Compat also includes include/trace/define_trace.h over
3 include/trace/events/module.h which makes this not compiling any more.
4
5 --- a/net/mac80211/Makefile
6 +++ b/net/mac80211/Makefile
7 @@ -24,8 +24,7 @@ mac80211-y := \
8         util.o \
9         wme.o \
10         event.o \
11 -       chan.o \
12 -       driver-trace.o
13 +       chan.o
14  
15  mac80211-$(CONFIG_MAC80211_LEDS) += led.o
16  mac80211-$(CONFIG_MAC80211_DEBUGFS) += \
17 @@ -42,6 +41,7 @@ mac80211-$(CONFIG_MAC80211_MESH) += \
18  
19  mac80211-$(CONFIG_PM) += pm.o
20  
21 +mac80211-$(CONFIG_MAC80211_DRIVER_API_TRACER) += driver-trace.o
22  CFLAGS_driver-trace.o := -I$(src)
23  
24  # objects for PID algorithm
25 --- a/net/mac80211/driver-trace.h
26 +++ b/net/mac80211/driver-trace.h
27 @@ -5,6 +5,17 @@
28  #include <net/mac80211.h>
29  #include "ieee80211_i.h"
30  
31 +#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
32 +#undef TRACE_EVENT
33 +#define TRACE_EVENT(name, proto, ...) \
34 +static inline void trace_ ## name(proto) {}
35 +#undef DECLARE_EVENT_CLASS
36 +#define DECLARE_EVENT_CLASS(...)
37 +#undef DEFINE_EVENT
38 +#define DEFINE_EVENT(evt_class, name, proto, ...) \
39 +static inline void trace_ ## name(proto) {}
40 +#endif
41 +
42  #undef TRACE_SYSTEM
43  #define TRACE_SYSTEM mac80211
44