aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-08 17:14:50 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-26 06:42:59 -0500
commit3d9d1d6656a73ea8407734cfb00b81d14ef62d4b (patch)
tree74f8b3b4acd0b91068ebebbfaa00aaef1f7e097e /net/wireless/trace.h
parent683b6d3b31a51956ea540df00abb0b78894924c1 (diff)
nl80211/cfg80211: support VHT channel configuration
Change nl80211 to support specifying a VHT (or HT) using the control channel frequency (as before) and new attributes for the channel width and first and second center frequency. The old channel type is of course still supported for HT. Also change the cfg80211 channel definition struct to support these by adding the relevant fields to it (and removing the _type field.) This also adds new helper functions: - cfg80211_chandef_create to create a channel def struct given the control channel and channel type, - cfg80211_chandef_identical to check if two channel definitions are identical - cfg80211_chandef_compatible to check if the given channel definitions are compatible, and return the wider of the two This isn't entirely complete, but that doesn't matter until we have a driver using it. In particular, it's missing - regulatory checks on the usable bandwidth (if that even makes sense) - regulatory TX power (database can't deal with it) - a proper channel compatibility calculation for the new channel types Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/trace.h')
-rw-r--r--net/wireless/trace.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 1370d52b1393..3c7aa1221563 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -126,25 +126,33 @@
126#define CHAN_PR_FMT ", band: %d, freq: %u" 126#define CHAN_PR_FMT ", band: %d, freq: %u"
127#define CHAN_PR_ARG __entry->band, __entry->center_freq 127#define CHAN_PR_ARG __entry->band, __entry->center_freq
128 128
129#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \ 129#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
130 __field(u16, center_freq) \ 130 __field(u32, control_freq) \
131 __field(u32, channel_type) 131 __field(u32, width) \
132 __field(u32, center_freq1) \
133 __field(u32, center_freq2)
132#define CHAN_DEF_ASSIGN(chandef) \ 134#define CHAN_DEF_ASSIGN(chandef) \
133 do { \ 135 do { \
134 if ((chandef) && (chandef)->chan) { \ 136 if ((chandef) && (chandef)->chan) { \
135 __entry->band = (chandef)->chan->band; \ 137 __entry->band = (chandef)->chan->band; \
136 __entry->center_freq = \ 138 __entry->control_freq = \
137 (chandef)->chan->center_freq; \ 139 (chandef)->chan->center_freq; \
138 __entry->channel_type = (chandef)->_type; \ 140 __entry->width = (chandef)->width; \
141 __entry->center_freq1 = (chandef)->center_freq1;\
142 __entry->center_freq2 = (chandef)->center_freq2;\
139 } else { \ 143 } else { \
140 __entry->band = 0; \ 144 __entry->band = 0; \
141 __entry->center_freq = 0; \ 145 __entry->control_freq = 0; \
142 __entry->channel_type = 0; \ 146 __entry->width = 0; \
147 __entry->center_freq1 = 0; \
148 __entry->center_freq2 = 0; \
143 } \ 149 } \
144 } while (0) 150 } while (0)
145#define CHAN_DEF_PR_FMT ", band: %d, freq: %u, chantype: %d" 151#define CHAN_DEF_PR_FMT \
146#define CHAN_DEF_PR_ARG __entry->band, __entry->center_freq, \ 152 ", band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
147 __entry->channel_type 153#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
154 __entry->width, __entry->center_freq1, \
155 __entry->center_freq2
148 156
149#define SINFO_ENTRY __field(int, generation) \ 157#define SINFO_ENTRY __field(int, generation) \
150 __field(u32, connected_time) \ 158 __field(u32, connected_time) \