Skip to content

Commit

Permalink
mac80211: don't assume channel is set in tracing
Browse files Browse the repository at this point in the history
With the move to multi-channel and away from
drv_config(), hw.conf.channel will not always
be set, only for devices using the current API
instead of the new channel context APIs. Check
the channel is set before adding its frequency
to the trace data.

Also break some overly long lines in the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Aug 20, 2012
1 parent f9e6e95 commit 3d01be7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/mac80211/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,12 @@ TRACE_EVENT(drv_config,
__entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
__entry->max_sleep_period = local->hw.conf.max_sleep_period;
__entry->listen_interval = local->hw.conf.listen_interval;
__entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
__entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
__entry->center_freq = local->hw.conf.channel->center_freq;
__entry->long_frame_max_tx_count =
local->hw.conf.long_frame_max_tx_count;
__entry->short_frame_max_tx_count =
local->hw.conf.short_frame_max_tx_count;
__entry->center_freq = local->hw.conf.channel ?
local->hw.conf.channel->center_freq : 0;
__entry->channel_type = local->hw.conf.channel_type;
__entry->smps = local->hw.conf.smps_mode;
),
Expand Down

0 comments on commit 3d01be7

Please sign in to comment.