aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.h
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-26 08:37:17 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-16 14:22:42 -0400
commitc3645eac479d9aaac9f8099c94bf681dc695dd34 (patch)
treef701eb4d7b3449d9f4672590f752081ea92f2009 /net/mac80211/trace.h
parentd01a1e658606a0a69100f49c2ef09aacaf74d3e7 (diff)
mac80211: introduce new ieee80211_ops
Introduce channel context driver methods. The channel on a context channel is immutable, but the channel type and other properties can change. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r--net/mac80211/trace.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 18d9c8a52e9e..a3f5fe2a84a8 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -28,6 +28,15 @@
28#define VIF_PR_FMT " vif:%s(%d%s)" 28#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" 29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
30 30
31#define CHANCTX_ENTRY __field(int, freq) \
32 __field(int, chantype)
33#define CHANCTX_ASSIGN __entry->freq = ctx->conf.channel->center_freq; \
34 __entry->chantype = ctx->conf.channel_type
35#define CHANCTX_PR_FMT " freq:%d MHz chantype:%d"
36#define CHANCTX_PR_ARG __entry->freq, __entry->chantype
37
38
39
31/* 40/*
32 * Tracing for driver callbacks. 41 * Tracing for driver callbacks.
33 */ 42 */
@@ -1256,6 +1265,104 @@ DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1256 TP_ARGS(local, sdata) 1265 TP_ARGS(local, sdata)
1257); 1266);
1258 1267
1268DECLARE_EVENT_CLASS(local_chanctx,
1269 TP_PROTO(struct ieee80211_local *local,
1270 struct ieee80211_chanctx *ctx),
1271
1272 TP_ARGS(local, ctx),
1273
1274 TP_STRUCT__entry(
1275 LOCAL_ENTRY
1276 CHANCTX_ENTRY
1277 ),
1278
1279 TP_fast_assign(
1280 LOCAL_ASSIGN;
1281 CHANCTX_ASSIGN;
1282 ),
1283
1284 TP_printk(
1285 LOCAL_PR_FMT CHANCTX_PR_FMT,
1286 LOCAL_PR_ARG, CHANCTX_PR_ARG
1287 )
1288);
1289
1290DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1291 TP_PROTO(struct ieee80211_local *local,
1292 struct ieee80211_chanctx *ctx),
1293 TP_ARGS(local, ctx)
1294);
1295
1296DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1297 TP_PROTO(struct ieee80211_local *local,
1298 struct ieee80211_chanctx *ctx),
1299 TP_ARGS(local, ctx)
1300);
1301
1302TRACE_EVENT(drv_change_chanctx,
1303 TP_PROTO(struct ieee80211_local *local,
1304 struct ieee80211_chanctx *ctx,
1305 u32 changed),
1306
1307 TP_ARGS(local, ctx, changed),
1308
1309 TP_STRUCT__entry(
1310 LOCAL_ENTRY
1311 CHANCTX_ENTRY
1312 __field(u32, changed)
1313 ),
1314
1315 TP_fast_assign(
1316 LOCAL_ASSIGN;
1317 CHANCTX_ASSIGN;
1318 __entry->changed = changed;
1319 ),
1320
1321 TP_printk(
1322 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1323 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1324 )
1325);
1326
1327DECLARE_EVENT_CLASS(local_sdata_chanctx,
1328 TP_PROTO(struct ieee80211_local *local,
1329 struct ieee80211_sub_if_data *sdata,
1330 struct ieee80211_chanctx *ctx),
1331
1332 TP_ARGS(local, sdata, ctx),
1333
1334 TP_STRUCT__entry(
1335 LOCAL_ENTRY
1336 VIF_ENTRY
1337 CHANCTX_ENTRY
1338 ),
1339
1340 TP_fast_assign(
1341 LOCAL_ASSIGN;
1342 VIF_ASSIGN;
1343 CHANCTX_ASSIGN;
1344 ),
1345
1346 TP_printk(
1347 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1348 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1349 )
1350);
1351
1352DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1353 TP_PROTO(struct ieee80211_local *local,
1354 struct ieee80211_sub_if_data *sdata,
1355 struct ieee80211_chanctx *ctx),
1356 TP_ARGS(local, sdata, ctx)
1357);
1358
1359DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1360 TP_PROTO(struct ieee80211_local *local,
1361 struct ieee80211_sub_if_data *sdata,
1362 struct ieee80211_chanctx *ctx),
1363 TP_ARGS(local, sdata, ctx)
1364);
1365
1259/* 1366/*
1260 * Tracing for API calls that drivers call. 1367 * Tracing for API calls that drivers call.
1261 */ 1368 */