Commit 50025953 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luis Henriques

mac80211: allow null chandef in tracing

commit 254d3dfe upstream.

In TDLS channel-switch operations the chandef can sometimes be NULL.
Avoid an oops in the trace code for these cases and just print a
chandef full of zeros.

Fixes: a7a6bdd0 ("mac80211: introduce TDLS channel switch ops")
Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent f5e1cc75
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
__field(u32, center_freq1) \ __field(u32, center_freq1) \
__field(u32, center_freq2) __field(u32, center_freq2)
#define CHANDEF_ASSIGN(c) \ #define CHANDEF_ASSIGN(c) \
__entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \ __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
__entry->chan_width = (c)->width; \ __entry->chan_width = (c) ? (c)->width : 0; \
__entry->center_freq1 = (c)->center_freq1; \ __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
__entry->center_freq2 = (c)->center_freq2; __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz" #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
__entry->center_freq1, __entry->center_freq2 __entry->center_freq1, __entry->center_freq2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment