driver-trace.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560
  1. #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
  2. #define __MAC80211_DRIVER_TRACE
  3. #include <linux/tracepoint.h>
  4. #include <net/mac80211.h>
  5. #include "ieee80211_i.h"
  6. #undef TRACE_SYSTEM
  7. #define TRACE_SYSTEM mac80211
  8. #define MAXNAME 32
  9. #define LOCAL_ENTRY __array(char, wiphy_name, 32)
  10. #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
  11. #define LOCAL_PR_FMT "%s"
  12. #define LOCAL_PR_ARG __entry->wiphy_name
  13. #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
  14. #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
  15. #define STA_PR_FMT " sta:%pM"
  16. #define STA_PR_ARG __entry->sta_addr
  17. #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
  18. __field(bool, p2p) \
  19. __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
  20. #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
  21. __entry->p2p = sdata->vif.p2p; \
  22. __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
  23. #define VIF_PR_FMT " vif:%s(%d%s)"
  24. #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
  25. /*
  26. * Tracing for driver callbacks.
  27. */
  28. DECLARE_EVENT_CLASS(local_only_evt,
  29. TP_PROTO(struct ieee80211_local *local),
  30. TP_ARGS(local),
  31. TP_STRUCT__entry(
  32. LOCAL_ENTRY
  33. ),
  34. TP_fast_assign(
  35. LOCAL_ASSIGN;
  36. ),
  37. TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
  38. );
  39. DECLARE_EVENT_CLASS(local_sdata_addr_evt,
  40. TP_PROTO(struct ieee80211_local *local,
  41. struct ieee80211_sub_if_data *sdata),
  42. TP_ARGS(local, sdata),
  43. TP_STRUCT__entry(
  44. LOCAL_ENTRY
  45. VIF_ENTRY
  46. __array(char, addr, 6)
  47. ),
  48. TP_fast_assign(
  49. LOCAL_ASSIGN;
  50. VIF_ASSIGN;
  51. memcpy(__entry->addr, sdata->vif.addr, 6);
  52. ),
  53. TP_printk(
  54. LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
  55. LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
  56. )
  57. );
  58. DECLARE_EVENT_CLASS(local_u32_evt,
  59. TP_PROTO(struct ieee80211_local *local, u32 value),
  60. TP_ARGS(local, value),
  61. TP_STRUCT__entry(
  62. LOCAL_ENTRY
  63. __field(u32, value)
  64. ),
  65. TP_fast_assign(
  66. LOCAL_ASSIGN;
  67. __entry->value = value;
  68. ),
  69. TP_printk(
  70. LOCAL_PR_FMT " value:%d",
  71. LOCAL_PR_ARG, __entry->value
  72. )
  73. );
  74. DECLARE_EVENT_CLASS(local_sdata_evt,
  75. TP_PROTO(struct ieee80211_local *local,
  76. struct ieee80211_sub_if_data *sdata),
  77. TP_ARGS(local, sdata),
  78. TP_STRUCT__entry(
  79. LOCAL_ENTRY
  80. VIF_ENTRY
  81. ),
  82. TP_fast_assign(
  83. LOCAL_ASSIGN;
  84. VIF_ASSIGN;
  85. ),
  86. TP_printk(
  87. LOCAL_PR_FMT VIF_PR_FMT,
  88. LOCAL_PR_ARG, VIF_PR_ARG
  89. )
  90. );
  91. DEFINE_EVENT(local_only_evt, drv_return_void,
  92. TP_PROTO(struct ieee80211_local *local),
  93. TP_ARGS(local)
  94. );
  95. TRACE_EVENT(drv_return_int,
  96. TP_PROTO(struct ieee80211_local *local, int ret),
  97. TP_ARGS(local, ret),
  98. TP_STRUCT__entry(
  99. LOCAL_ENTRY
  100. __field(int, ret)
  101. ),
  102. TP_fast_assign(
  103. LOCAL_ASSIGN;
  104. __entry->ret = ret;
  105. ),
  106. TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
  107. );
  108. TRACE_EVENT(drv_return_bool,
  109. TP_PROTO(struct ieee80211_local *local, bool ret),
  110. TP_ARGS(local, ret),
  111. TP_STRUCT__entry(
  112. LOCAL_ENTRY
  113. __field(bool, ret)
  114. ),
  115. TP_fast_assign(
  116. LOCAL_ASSIGN;
  117. __entry->ret = ret;
  118. ),
  119. TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
  120. "true" : "false")
  121. );
  122. TRACE_EVENT(drv_return_u64,
  123. TP_PROTO(struct ieee80211_local *local, u64 ret),
  124. TP_ARGS(local, ret),
  125. TP_STRUCT__entry(
  126. LOCAL_ENTRY
  127. __field(u64, ret)
  128. ),
  129. TP_fast_assign(
  130. LOCAL_ASSIGN;
  131. __entry->ret = ret;
  132. ),
  133. TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
  134. );
  135. DEFINE_EVENT(local_only_evt, drv_start,
  136. TP_PROTO(struct ieee80211_local *local),
  137. TP_ARGS(local)
  138. );
  139. DEFINE_EVENT(local_only_evt, drv_suspend,
  140. TP_PROTO(struct ieee80211_local *local),
  141. TP_ARGS(local)
  142. );
  143. DEFINE_EVENT(local_only_evt, drv_resume,
  144. TP_PROTO(struct ieee80211_local *local),
  145. TP_ARGS(local)
  146. );
  147. DEFINE_EVENT(local_only_evt, drv_stop,
  148. TP_PROTO(struct ieee80211_local *local),
  149. TP_ARGS(local)
  150. );
  151. DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
  152. TP_PROTO(struct ieee80211_local *local,
  153. struct ieee80211_sub_if_data *sdata),
  154. TP_ARGS(local, sdata)
  155. );
  156. TRACE_EVENT(drv_change_interface,
  157. TP_PROTO(struct ieee80211_local *local,
  158. struct ieee80211_sub_if_data *sdata,
  159. enum nl80211_iftype type, bool p2p),
  160. TP_ARGS(local, sdata, type, p2p),
  161. TP_STRUCT__entry(
  162. LOCAL_ENTRY
  163. VIF_ENTRY
  164. __field(u32, new_type)
  165. __field(bool, new_p2p)
  166. ),
  167. TP_fast_assign(
  168. LOCAL_ASSIGN;
  169. VIF_ASSIGN;
  170. __entry->new_type = type;
  171. __entry->new_p2p = p2p;
  172. ),
  173. TP_printk(
  174. LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
  175. LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
  176. __entry->new_p2p ? "/p2p" : ""
  177. )
  178. );
  179. DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
  180. TP_PROTO(struct ieee80211_local *local,
  181. struct ieee80211_sub_if_data *sdata),
  182. TP_ARGS(local, sdata)
  183. );
  184. TRACE_EVENT(drv_config,
  185. TP_PROTO(struct ieee80211_local *local,
  186. u32 changed),
  187. TP_ARGS(local, changed),
  188. TP_STRUCT__entry(
  189. LOCAL_ENTRY
  190. __field(u32, changed)
  191. __field(u32, flags)
  192. __field(int, power_level)
  193. __field(int, dynamic_ps_timeout)
  194. __field(int, max_sleep_period)
  195. __field(u16, listen_interval)
  196. __field(u8, long_frame_max_tx_count)
  197. __field(u8, short_frame_max_tx_count)
  198. __field(int, center_freq)
  199. __field(int, channel_type)
  200. __field(int, smps)
  201. ),
  202. TP_fast_assign(
  203. LOCAL_ASSIGN;
  204. __entry->changed = changed;
  205. __entry->flags = local->hw.conf.flags;
  206. __entry->power_level = local->hw.conf.power_level;
  207. __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
  208. __entry->max_sleep_period = local->hw.conf.max_sleep_period;
  209. __entry->listen_interval = local->hw.conf.listen_interval;
  210. __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
  211. __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
  212. __entry->center_freq = local->hw.conf.channel->center_freq;
  213. __entry->channel_type = local->hw.conf.channel_type;
  214. __entry->smps = local->hw.conf.smps_mode;
  215. ),
  216. TP_printk(
  217. LOCAL_PR_FMT " ch:%#x freq:%d",
  218. LOCAL_PR_ARG, __entry->changed, __entry->center_freq
  219. )
  220. );
  221. TRACE_EVENT(drv_bss_info_changed,
  222. TP_PROTO(struct ieee80211_local *local,
  223. struct ieee80211_sub_if_data *sdata,
  224. struct ieee80211_bss_conf *info,
  225. u32 changed),
  226. TP_ARGS(local, sdata, info, changed),
  227. TP_STRUCT__entry(
  228. LOCAL_ENTRY
  229. VIF_ENTRY
  230. __field(bool, assoc)
  231. __field(u16, aid)
  232. __field(bool, cts)
  233. __field(bool, shortpre)
  234. __field(bool, shortslot)
  235. __field(u8, dtimper)
  236. __field(u16, bcnint)
  237. __field(u16, assoc_cap)
  238. __field(u64, timestamp)
  239. __field(u32, basic_rates)
  240. __field(u32, changed)
  241. __field(bool, enable_beacon)
  242. __field(u16, ht_operation_mode)
  243. ),
  244. TP_fast_assign(
  245. LOCAL_ASSIGN;
  246. VIF_ASSIGN;
  247. __entry->changed = changed;
  248. __entry->aid = info->aid;
  249. __entry->assoc = info->assoc;
  250. __entry->shortpre = info->use_short_preamble;
  251. __entry->cts = info->use_cts_prot;
  252. __entry->shortslot = info->use_short_slot;
  253. __entry->dtimper = info->dtim_period;
  254. __entry->bcnint = info->beacon_int;
  255. __entry->assoc_cap = info->assoc_capability;
  256. __entry->timestamp = info->last_tsf;
  257. __entry->basic_rates = info->basic_rates;
  258. __entry->enable_beacon = info->enable_beacon;
  259. __entry->ht_operation_mode = info->ht_operation_mode;
  260. ),
  261. TP_printk(
  262. LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
  263. LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
  264. )
  265. );
  266. TRACE_EVENT(drv_prepare_multicast,
  267. TP_PROTO(struct ieee80211_local *local, int mc_count),
  268. TP_ARGS(local, mc_count),
  269. TP_STRUCT__entry(
  270. LOCAL_ENTRY
  271. __field(int, mc_count)
  272. ),
  273. TP_fast_assign(
  274. LOCAL_ASSIGN;
  275. __entry->mc_count = mc_count;
  276. ),
  277. TP_printk(
  278. LOCAL_PR_FMT " prepare mc (%d)",
  279. LOCAL_PR_ARG, __entry->mc_count
  280. )
  281. );
  282. TRACE_EVENT(drv_configure_filter,
  283. TP_PROTO(struct ieee80211_local *local,
  284. unsigned int changed_flags,
  285. unsigned int *total_flags,
  286. u64 multicast),
  287. TP_ARGS(local, changed_flags, total_flags, multicast),
  288. TP_STRUCT__entry(
  289. LOCAL_ENTRY
  290. __field(unsigned int, changed)
  291. __field(unsigned int, total)
  292. __field(u64, multicast)
  293. ),
  294. TP_fast_assign(
  295. LOCAL_ASSIGN;
  296. __entry->changed = changed_flags;
  297. __entry->total = *total_flags;
  298. __entry->multicast = multicast;
  299. ),
  300. TP_printk(
  301. LOCAL_PR_FMT " changed:%#x total:%#x",
  302. LOCAL_PR_ARG, __entry->changed, __entry->total
  303. )
  304. );
  305. TRACE_EVENT(drv_set_tim,
  306. TP_PROTO(struct ieee80211_local *local,
  307. struct ieee80211_sta *sta, bool set),
  308. TP_ARGS(local, sta, set),
  309. TP_STRUCT__entry(
  310. LOCAL_ENTRY
  311. STA_ENTRY
  312. __field(bool, set)
  313. ),
  314. TP_fast_assign(
  315. LOCAL_ASSIGN;
  316. STA_ASSIGN;
  317. __entry->set = set;
  318. ),
  319. TP_printk(
  320. LOCAL_PR_FMT STA_PR_FMT " set:%d",
  321. LOCAL_PR_ARG, STA_PR_FMT, __entry->set
  322. )
  323. );
  324. TRACE_EVENT(drv_set_key,
  325. TP_PROTO(struct ieee80211_local *local,
  326. enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
  327. struct ieee80211_sta *sta,
  328. struct ieee80211_key_conf *key),
  329. TP_ARGS(local, cmd, sdata, sta, key),
  330. TP_STRUCT__entry(
  331. LOCAL_ENTRY
  332. VIF_ENTRY
  333. STA_ENTRY
  334. __field(u32, cipher)
  335. __field(u8, hw_key_idx)
  336. __field(u8, flags)
  337. __field(s8, keyidx)
  338. ),
  339. TP_fast_assign(
  340. LOCAL_ASSIGN;
  341. VIF_ASSIGN;
  342. STA_ASSIGN;
  343. __entry->cipher = key->cipher;
  344. __entry->flags = key->flags;
  345. __entry->keyidx = key->keyidx;
  346. __entry->hw_key_idx = key->hw_key_idx;
  347. ),
  348. TP_printk(
  349. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
  350. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  351. )
  352. );
  353. TRACE_EVENT(drv_update_tkip_key,
  354. TP_PROTO(struct ieee80211_local *local,
  355. struct ieee80211_sub_if_data *sdata,
  356. struct ieee80211_key_conf *conf,
  357. struct ieee80211_sta *sta, u32 iv32),
  358. TP_ARGS(local, sdata, conf, sta, iv32),
  359. TP_STRUCT__entry(
  360. LOCAL_ENTRY
  361. VIF_ENTRY
  362. STA_ENTRY
  363. __field(u32, iv32)
  364. ),
  365. TP_fast_assign(
  366. LOCAL_ASSIGN;
  367. VIF_ASSIGN;
  368. STA_ASSIGN;
  369. __entry->iv32 = iv32;
  370. ),
  371. TP_printk(
  372. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
  373. LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
  374. )
  375. );
  376. DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
  377. TP_PROTO(struct ieee80211_local *local,
  378. struct ieee80211_sub_if_data *sdata),
  379. TP_ARGS(local, sdata)
  380. );
  381. DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
  382. TP_PROTO(struct ieee80211_local *local,
  383. struct ieee80211_sub_if_data *sdata),
  384. TP_ARGS(local, sdata)
  385. );
  386. DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
  387. TP_PROTO(struct ieee80211_local *local,
  388. struct ieee80211_sub_if_data *sdata),
  389. TP_ARGS(local, sdata)
  390. );
  391. DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
  392. TP_PROTO(struct ieee80211_local *local,
  393. struct ieee80211_sub_if_data *sdata),
  394. TP_ARGS(local, sdata)
  395. );
  396. DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
  397. TP_PROTO(struct ieee80211_local *local),
  398. TP_ARGS(local)
  399. );
  400. DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
  401. TP_PROTO(struct ieee80211_local *local),
  402. TP_ARGS(local)
  403. );
  404. TRACE_EVENT(drv_get_stats,
  405. TP_PROTO(struct ieee80211_local *local,
  406. struct ieee80211_low_level_stats *stats,
  407. int ret),
  408. TP_ARGS(local, stats, ret),
  409. TP_STRUCT__entry(
  410. LOCAL_ENTRY
  411. __field(int, ret)
  412. __field(unsigned int, ackfail)
  413. __field(unsigned int, rtsfail)
  414. __field(unsigned int, fcserr)
  415. __field(unsigned int, rtssucc)
  416. ),
  417. TP_fast_assign(
  418. LOCAL_ASSIGN;
  419. __entry->ret = ret;
  420. __entry->ackfail = stats->dot11ACKFailureCount;
  421. __entry->rtsfail = stats->dot11RTSFailureCount;
  422. __entry->fcserr = stats->dot11FCSErrorCount;
  423. __entry->rtssucc = stats->dot11RTSSuccessCount;
  424. ),
  425. TP_printk(
  426. LOCAL_PR_FMT " ret:%d",
  427. LOCAL_PR_ARG, __entry->ret
  428. )
  429. );
  430. TRACE_EVENT(drv_get_tkip_seq,
  431. TP_PROTO(struct ieee80211_local *local,
  432. u8 hw_key_idx, u32 *iv32, u16 *iv16),
  433. TP_ARGS(local, hw_key_idx, iv32, iv16),
  434. TP_STRUCT__entry(
  435. LOCAL_ENTRY
  436. __field(u8, hw_key_idx)
  437. __field(u32, iv32)
  438. __field(u16, iv16)
  439. ),
  440. TP_fast_assign(
  441. LOCAL_ASSIGN;
  442. __entry->hw_key_idx = hw_key_idx;
  443. __entry->iv32 = *iv32;
  444. __entry->iv16 = *iv16;
  445. ),
  446. TP_printk(
  447. LOCAL_PR_FMT, LOCAL_PR_ARG
  448. )
  449. );
  450. DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
  451. TP_PROTO(struct ieee80211_local *local, u32 value),
  452. TP_ARGS(local, value)
  453. );
  454. DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
  455. TP_PROTO(struct ieee80211_local *local, u32 value),
  456. TP_ARGS(local, value)
  457. );
  458. TRACE_EVENT(drv_set_coverage_class,
  459. TP_PROTO(struct ieee80211_local *local, u8 value),
  460. TP_ARGS(local, value),
  461. TP_STRUCT__entry(
  462. LOCAL_ENTRY
  463. __field(u8, value)
  464. ),
  465. TP_fast_assign(
  466. LOCAL_ASSIGN;
  467. __entry->value = value;
  468. ),
  469. TP_printk(
  470. LOCAL_PR_FMT " value:%d",
  471. LOCAL_PR_ARG, __entry->value
  472. )
  473. );
  474. TRACE_EVENT(drv_sta_notify,
  475. TP_PROTO(struct ieee80211_local *local,
  476. struct ieee80211_sub_if_data *sdata,
  477. enum sta_notify_cmd cmd,
  478. struct ieee80211_sta *sta),
  479. TP_ARGS(local, sdata, cmd, sta),
  480. TP_STRUCT__entry(
  481. LOCAL_ENTRY
  482. VIF_ENTRY
  483. STA_ENTRY
  484. __field(u32, cmd)
  485. ),
  486. TP_fast_assign(
  487. LOCAL_ASSIGN;
  488. VIF_ASSIGN;
  489. STA_ASSIGN;
  490. __entry->cmd = cmd;
  491. ),
  492. TP_printk(
  493. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
  494. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
  495. )
  496. );
  497. TRACE_EVENT(drv_sta_state,
  498. TP_PROTO(struct ieee80211_local *local,
  499. struct ieee80211_sub_if_data *sdata,
  500. struct ieee80211_sta *sta,
  501. enum ieee80211_sta_state old_state,
  502. enum ieee80211_sta_state new_state),
  503. TP_ARGS(local, sdata, sta, old_state, new_state),
  504. TP_STRUCT__entry(
  505. LOCAL_ENTRY
  506. VIF_ENTRY
  507. STA_ENTRY
  508. __field(u32, old_state)
  509. __field(u32, new_state)
  510. ),
  511. TP_fast_assign(
  512. LOCAL_ASSIGN;
  513. VIF_ASSIGN;
  514. STA_ASSIGN;
  515. __entry->old_state = old_state;
  516. __entry->new_state = new_state;
  517. ),
  518. TP_printk(
  519. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
  520. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
  521. __entry->old_state, __entry->new_state
  522. )
  523. );
  524. TRACE_EVENT(drv_sta_add,
  525. TP_PROTO(struct ieee80211_local *local,
  526. struct ieee80211_sub_if_data *sdata,
  527. struct ieee80211_sta *sta),
  528. TP_ARGS(local, sdata, sta),
  529. TP_STRUCT__entry(
  530. LOCAL_ENTRY
  531. VIF_ENTRY
  532. STA_ENTRY
  533. ),
  534. TP_fast_assign(
  535. LOCAL_ASSIGN;
  536. VIF_ASSIGN;
  537. STA_ASSIGN;
  538. ),
  539. TP_printk(
  540. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
  541. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  542. )
  543. );
  544. TRACE_EVENT(drv_sta_remove,
  545. TP_PROTO(struct ieee80211_local *local,
  546. struct ieee80211_sub_if_data *sdata,
  547. struct ieee80211_sta *sta),
  548. TP_ARGS(local, sdata, sta),
  549. TP_STRUCT__entry(
  550. LOCAL_ENTRY
  551. VIF_ENTRY
  552. STA_ENTRY
  553. ),
  554. TP_fast_assign(
  555. LOCAL_ASSIGN;
  556. VIF_ASSIGN;
  557. STA_ASSIGN;
  558. ),
  559. TP_printk(
  560. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
  561. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  562. )
  563. );
  564. TRACE_EVENT(drv_conf_tx,
  565. TP_PROTO(struct ieee80211_local *local,
  566. struct ieee80211_sub_if_data *sdata,
  567. u16 queue,
  568. const struct ieee80211_tx_queue_params *params),
  569. TP_ARGS(local, sdata, queue, params),
  570. TP_STRUCT__entry(
  571. LOCAL_ENTRY
  572. VIF_ENTRY
  573. __field(u16, queue)
  574. __field(u16, txop)
  575. __field(u16, cw_min)
  576. __field(u16, cw_max)
  577. __field(u8, aifs)
  578. __field(bool, uapsd)
  579. ),
  580. TP_fast_assign(
  581. LOCAL_ASSIGN;
  582. VIF_ASSIGN;
  583. __entry->queue = queue;
  584. __entry->txop = params->txop;
  585. __entry->cw_max = params->cw_max;
  586. __entry->cw_min = params->cw_min;
  587. __entry->aifs = params->aifs;
  588. __entry->uapsd = params->uapsd;
  589. ),
  590. TP_printk(
  591. LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
  592. LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
  593. )
  594. );
  595. DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
  596. TP_PROTO(struct ieee80211_local *local,
  597. struct ieee80211_sub_if_data *sdata),
  598. TP_ARGS(local, sdata)
  599. );
  600. TRACE_EVENT(drv_set_tsf,
  601. TP_PROTO(struct ieee80211_local *local,
  602. struct ieee80211_sub_if_data *sdata,
  603. u64 tsf),
  604. TP_ARGS(local, sdata, tsf),
  605. TP_STRUCT__entry(
  606. LOCAL_ENTRY
  607. VIF_ENTRY
  608. __field(u64, tsf)
  609. ),
  610. TP_fast_assign(
  611. LOCAL_ASSIGN;
  612. VIF_ASSIGN;
  613. __entry->tsf = tsf;
  614. ),
  615. TP_printk(
  616. LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
  617. LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
  618. )
  619. );
  620. DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
  621. TP_PROTO(struct ieee80211_local *local,
  622. struct ieee80211_sub_if_data *sdata),
  623. TP_ARGS(local, sdata)
  624. );
  625. DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
  626. TP_PROTO(struct ieee80211_local *local),
  627. TP_ARGS(local)
  628. );
  629. TRACE_EVENT(drv_ampdu_action,
  630. TP_PROTO(struct ieee80211_local *local,
  631. struct ieee80211_sub_if_data *sdata,
  632. enum ieee80211_ampdu_mlme_action action,
  633. struct ieee80211_sta *sta, u16 tid,
  634. u16 *ssn, u8 buf_size),
  635. TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
  636. TP_STRUCT__entry(
  637. LOCAL_ENTRY
  638. STA_ENTRY
  639. __field(u32, action)
  640. __field(u16, tid)
  641. __field(u16, ssn)
  642. __field(u8, buf_size)
  643. VIF_ENTRY
  644. ),
  645. TP_fast_assign(
  646. LOCAL_ASSIGN;
  647. VIF_ASSIGN;
  648. STA_ASSIGN;
  649. __entry->action = action;
  650. __entry->tid = tid;
  651. __entry->ssn = ssn ? *ssn : 0;
  652. __entry->buf_size = buf_size;
  653. ),
  654. TP_printk(
  655. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
  656. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
  657. __entry->tid, __entry->buf_size
  658. )
  659. );
  660. TRACE_EVENT(drv_get_survey,
  661. TP_PROTO(struct ieee80211_local *local, int idx,
  662. struct survey_info *survey),
  663. TP_ARGS(local, idx, survey),
  664. TP_STRUCT__entry(
  665. LOCAL_ENTRY
  666. __field(int, idx)
  667. ),
  668. TP_fast_assign(
  669. LOCAL_ASSIGN;
  670. __entry->idx = idx;
  671. ),
  672. TP_printk(
  673. LOCAL_PR_FMT " idx:%d",
  674. LOCAL_PR_ARG, __entry->idx
  675. )
  676. );
  677. TRACE_EVENT(drv_flush,
  678. TP_PROTO(struct ieee80211_local *local, bool drop),
  679. TP_ARGS(local, drop),
  680. TP_STRUCT__entry(
  681. LOCAL_ENTRY
  682. __field(bool, drop)
  683. ),
  684. TP_fast_assign(
  685. LOCAL_ASSIGN;
  686. __entry->drop = drop;
  687. ),
  688. TP_printk(
  689. LOCAL_PR_FMT " drop:%d",
  690. LOCAL_PR_ARG, __entry->drop
  691. )
  692. );
  693. TRACE_EVENT(drv_channel_switch,
  694. TP_PROTO(struct ieee80211_local *local,
  695. struct ieee80211_channel_switch *ch_switch),
  696. TP_ARGS(local, ch_switch),
  697. TP_STRUCT__entry(
  698. LOCAL_ENTRY
  699. __field(u64, timestamp)
  700. __field(bool, block_tx)
  701. __field(u16, freq)
  702. __field(u8, count)
  703. ),
  704. TP_fast_assign(
  705. LOCAL_ASSIGN;
  706. __entry->timestamp = ch_switch->timestamp;
  707. __entry->block_tx = ch_switch->block_tx;
  708. __entry->freq = ch_switch->channel->center_freq;
  709. __entry->count = ch_switch->count;
  710. ),
  711. TP_printk(
  712. LOCAL_PR_FMT " new freq:%u count:%d",
  713. LOCAL_PR_ARG, __entry->freq, __entry->count
  714. )
  715. );
  716. TRACE_EVENT(drv_set_antenna,
  717. TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  718. TP_ARGS(local, tx_ant, rx_ant, ret),
  719. TP_STRUCT__entry(
  720. LOCAL_ENTRY
  721. __field(u32, tx_ant)
  722. __field(u32, rx_ant)
  723. __field(int, ret)
  724. ),
  725. TP_fast_assign(
  726. LOCAL_ASSIGN;
  727. __entry->tx_ant = tx_ant;
  728. __entry->rx_ant = rx_ant;
  729. __entry->ret = ret;
  730. ),
  731. TP_printk(
  732. LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  733. LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  734. )
  735. );
  736. TRACE_EVENT(drv_get_antenna,
  737. TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  738. TP_ARGS(local, tx_ant, rx_ant, ret),
  739. TP_STRUCT__entry(
  740. LOCAL_ENTRY
  741. __field(u32, tx_ant)
  742. __field(u32, rx_ant)
  743. __field(int, ret)
  744. ),
  745. TP_fast_assign(
  746. LOCAL_ASSIGN;
  747. __entry->tx_ant = tx_ant;
  748. __entry->rx_ant = rx_ant;
  749. __entry->ret = ret;
  750. ),
  751. TP_printk(
  752. LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  753. LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  754. )
  755. );
  756. TRACE_EVENT(drv_remain_on_channel,
  757. TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
  758. enum nl80211_channel_type chantype, unsigned int duration),
  759. TP_ARGS(local, chan, chantype, duration),
  760. TP_STRUCT__entry(
  761. LOCAL_ENTRY
  762. __field(int, center_freq)
  763. __field(int, channel_type)
  764. __field(unsigned int, duration)
  765. ),
  766. TP_fast_assign(
  767. LOCAL_ASSIGN;
  768. __entry->center_freq = chan->center_freq;
  769. __entry->channel_type = chantype;
  770. __entry->duration = duration;
  771. ),
  772. TP_printk(
  773. LOCAL_PR_FMT " freq:%dMHz duration:%dms",
  774. LOCAL_PR_ARG, __entry->center_freq, __entry->duration
  775. )
  776. );
  777. DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
  778. TP_PROTO(struct ieee80211_local *local),
  779. TP_ARGS(local)
  780. );
  781. TRACE_EVENT(drv_offchannel_tx,
  782. TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
  783. struct ieee80211_channel *chan,
  784. enum nl80211_channel_type channel_type,
  785. unsigned int wait),
  786. TP_ARGS(local, skb, chan, channel_type, wait),
  787. TP_STRUCT__entry(
  788. LOCAL_ENTRY
  789. __field(int, center_freq)
  790. __field(int, channel_type)
  791. __field(unsigned int, wait)
  792. ),
  793. TP_fast_assign(
  794. LOCAL_ASSIGN;
  795. __entry->center_freq = chan->center_freq;
  796. __entry->channel_type = channel_type;
  797. __entry->wait = wait;
  798. ),
  799. TP_printk(
  800. LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
  801. LOCAL_PR_ARG, __entry->center_freq, __entry->wait
  802. )
  803. );
  804. TRACE_EVENT(drv_set_ringparam,
  805. TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
  806. TP_ARGS(local, tx, rx),
  807. TP_STRUCT__entry(
  808. LOCAL_ENTRY
  809. __field(u32, tx)
  810. __field(u32, rx)
  811. ),
  812. TP_fast_assign(
  813. LOCAL_ASSIGN;
  814. __entry->tx = tx;
  815. __entry->rx = rx;
  816. ),
  817. TP_printk(
  818. LOCAL_PR_FMT " tx:%d rx %d",
  819. LOCAL_PR_ARG, __entry->tx, __entry->rx
  820. )
  821. );
  822. TRACE_EVENT(drv_get_ringparam,
  823. TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
  824. u32 *rx, u32 *rx_max),
  825. TP_ARGS(local, tx, tx_max, rx, rx_max),
  826. TP_STRUCT__entry(
  827. LOCAL_ENTRY
  828. __field(u32, tx)
  829. __field(u32, tx_max)
  830. __field(u32, rx)
  831. __field(u32, rx_max)
  832. ),
  833. TP_fast_assign(
  834. LOCAL_ASSIGN;
  835. __entry->tx = *tx;
  836. __entry->tx_max = *tx_max;
  837. __entry->rx = *rx;
  838. __entry->rx_max = *rx_max;
  839. ),
  840. TP_printk(
  841. LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
  842. LOCAL_PR_ARG,
  843. __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
  844. )
  845. );
  846. DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
  847. TP_PROTO(struct ieee80211_local *local),
  848. TP_ARGS(local)
  849. );
  850. DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
  851. TP_PROTO(struct ieee80211_local *local),
  852. TP_ARGS(local)
  853. );
  854. TRACE_EVENT(drv_set_bitrate_mask,
  855. TP_PROTO(struct ieee80211_local *local,
  856. struct ieee80211_sub_if_data *sdata,
  857. const struct cfg80211_bitrate_mask *mask),
  858. TP_ARGS(local, sdata, mask),
  859. TP_STRUCT__entry(
  860. LOCAL_ENTRY
  861. VIF_ENTRY
  862. __field(u32, legacy_2g)
  863. __field(u32, legacy_5g)
  864. ),
  865. TP_fast_assign(
  866. LOCAL_ASSIGN;
  867. VIF_ASSIGN;
  868. __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
  869. __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
  870. ),
  871. TP_printk(
  872. LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
  873. LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
  874. )
  875. );
  876. TRACE_EVENT(drv_set_rekey_data,
  877. TP_PROTO(struct ieee80211_local *local,
  878. struct ieee80211_sub_if_data *sdata,
  879. struct cfg80211_gtk_rekey_data *data),
  880. TP_ARGS(local, sdata, data),
  881. TP_STRUCT__entry(
  882. LOCAL_ENTRY
  883. VIF_ENTRY
  884. __array(u8, kek, NL80211_KEK_LEN)
  885. __array(u8, kck, NL80211_KCK_LEN)
  886. __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
  887. ),
  888. TP_fast_assign(
  889. LOCAL_ASSIGN;
  890. VIF_ASSIGN;
  891. memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
  892. memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
  893. memcpy(__entry->replay_ctr, data->replay_ctr,
  894. NL80211_REPLAY_CTR_LEN);
  895. ),
  896. TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
  897. LOCAL_PR_ARG, VIF_PR_ARG)
  898. );
  899. TRACE_EVENT(drv_rssi_callback,
  900. TP_PROTO(struct ieee80211_local *local,
  901. enum ieee80211_rssi_event rssi_event),
  902. TP_ARGS(local, rssi_event),
  903. TP_STRUCT__entry(
  904. LOCAL_ENTRY
  905. __field(u32, rssi_event)
  906. ),
  907. TP_fast_assign(
  908. LOCAL_ASSIGN;
  909. __entry->rssi_event = rssi_event;
  910. ),
  911. TP_printk(
  912. LOCAL_PR_FMT " rssi_event:%d",
  913. LOCAL_PR_ARG, __entry->rssi_event
  914. )
  915. );
  916. DECLARE_EVENT_CLASS(release_evt,
  917. TP_PROTO(struct ieee80211_local *local,
  918. struct ieee80211_sta *sta,
  919. u16 tids, int num_frames,
  920. enum ieee80211_frame_release_type reason,
  921. bool more_data),
  922. TP_ARGS(local, sta, tids, num_frames, reason, more_data),
  923. TP_STRUCT__entry(
  924. LOCAL_ENTRY
  925. STA_ENTRY
  926. __field(u16, tids)
  927. __field(int, num_frames)
  928. __field(int, reason)
  929. __field(bool, more_data)
  930. ),
  931. TP_fast_assign(
  932. LOCAL_ASSIGN;
  933. STA_ASSIGN;
  934. __entry->tids = tids;
  935. __entry->num_frames = num_frames;
  936. __entry->reason = reason;
  937. __entry->more_data = more_data;
  938. ),
  939. TP_printk(
  940. LOCAL_PR_FMT STA_PR_FMT
  941. " TIDs:0x%.4x frames:%d reason:%d more:%d",
  942. LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
  943. __entry->reason, __entry->more_data
  944. )
  945. );
  946. DEFINE_EVENT(release_evt, drv_release_buffered_frames,
  947. TP_PROTO(struct ieee80211_local *local,
  948. struct ieee80211_sta *sta,
  949. u16 tids, int num_frames,
  950. enum ieee80211_frame_release_type reason,
  951. bool more_data),
  952. TP_ARGS(local, sta, tids, num_frames, reason, more_data)
  953. );
  954. DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
  955. TP_PROTO(struct ieee80211_local *local,
  956. struct ieee80211_sta *sta,
  957. u16 tids, int num_frames,
  958. enum ieee80211_frame_release_type reason,
  959. bool more_data),
  960. TP_ARGS(local, sta, tids, num_frames, reason, more_data)
  961. );
  962. /*
  963. * Tracing for API calls that drivers call.
  964. */
  965. TRACE_EVENT(api_start_tx_ba_session,
  966. TP_PROTO(struct ieee80211_sta *sta, u16 tid),
  967. TP_ARGS(sta, tid),
  968. TP_STRUCT__entry(
  969. STA_ENTRY
  970. __field(u16, tid)
  971. ),
  972. TP_fast_assign(
  973. STA_ASSIGN;
  974. __entry->tid = tid;
  975. ),
  976. TP_printk(
  977. STA_PR_FMT " tid:%d",
  978. STA_PR_ARG, __entry->tid
  979. )
  980. );
  981. TRACE_EVENT(api_start_tx_ba_cb,
  982. TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  983. TP_ARGS(sdata, ra, tid),
  984. TP_STRUCT__entry(
  985. VIF_ENTRY
  986. __array(u8, ra, ETH_ALEN)
  987. __field(u16, tid)
  988. ),
  989. TP_fast_assign(
  990. VIF_ASSIGN;
  991. memcpy(__entry->ra, ra, ETH_ALEN);
  992. __entry->tid = tid;
  993. ),
  994. TP_printk(
  995. VIF_PR_FMT " ra:%pM tid:%d",
  996. VIF_PR_ARG, __entry->ra, __entry->tid
  997. )
  998. );
  999. TRACE_EVENT(api_stop_tx_ba_session,
  1000. TP_PROTO(struct ieee80211_sta *sta, u16 tid),
  1001. TP_ARGS(sta, tid),
  1002. TP_STRUCT__entry(
  1003. STA_ENTRY
  1004. __field(u16, tid)
  1005. ),
  1006. TP_fast_assign(
  1007. STA_ASSIGN;
  1008. __entry->tid = tid;
  1009. ),
  1010. TP_printk(
  1011. STA_PR_FMT " tid:%d",
  1012. STA_PR_ARG, __entry->tid
  1013. )
  1014. );
  1015. TRACE_EVENT(api_stop_tx_ba_cb,
  1016. TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  1017. TP_ARGS(sdata, ra, tid),
  1018. TP_STRUCT__entry(
  1019. VIF_ENTRY
  1020. __array(u8, ra, ETH_ALEN)
  1021. __field(u16, tid)
  1022. ),
  1023. TP_fast_assign(
  1024. VIF_ASSIGN;
  1025. memcpy(__entry->ra, ra, ETH_ALEN);
  1026. __entry->tid = tid;
  1027. ),
  1028. TP_printk(
  1029. VIF_PR_FMT " ra:%pM tid:%d",
  1030. VIF_PR_ARG, __entry->ra, __entry->tid
  1031. )
  1032. );
  1033. DEFINE_EVENT(local_only_evt, api_restart_hw,
  1034. TP_PROTO(struct ieee80211_local *local),
  1035. TP_ARGS(local)
  1036. );
  1037. TRACE_EVENT(api_beacon_loss,
  1038. TP_PROTO(struct ieee80211_sub_if_data *sdata),
  1039. TP_ARGS(sdata),
  1040. TP_STRUCT__entry(
  1041. VIF_ENTRY
  1042. ),
  1043. TP_fast_assign(
  1044. VIF_ASSIGN;
  1045. ),
  1046. TP_printk(
  1047. VIF_PR_FMT,
  1048. VIF_PR_ARG
  1049. )
  1050. );
  1051. TRACE_EVENT(api_connection_loss,
  1052. TP_PROTO(struct ieee80211_sub_if_data *sdata),
  1053. TP_ARGS(sdata),
  1054. TP_STRUCT__entry(
  1055. VIF_ENTRY
  1056. ),
  1057. TP_fast_assign(
  1058. VIF_ASSIGN;
  1059. ),
  1060. TP_printk(
  1061. VIF_PR_FMT,
  1062. VIF_PR_ARG
  1063. )
  1064. );
  1065. TRACE_EVENT(api_cqm_rssi_notify,
  1066. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1067. enum nl80211_cqm_rssi_threshold_event rssi_event),
  1068. TP_ARGS(sdata, rssi_event),
  1069. TP_STRUCT__entry(
  1070. VIF_ENTRY
  1071. __field(u32, rssi_event)
  1072. ),
  1073. TP_fast_assign(
  1074. VIF_ASSIGN;
  1075. __entry->rssi_event = rssi_event;
  1076. ),
  1077. TP_printk(
  1078. VIF_PR_FMT " event:%d",
  1079. VIF_PR_ARG, __entry->rssi_event
  1080. )
  1081. );
  1082. TRACE_EVENT(api_scan_completed,
  1083. TP_PROTO(struct ieee80211_local *local, bool aborted),
  1084. TP_ARGS(local, aborted),
  1085. TP_STRUCT__entry(
  1086. LOCAL_ENTRY
  1087. __field(bool, aborted)
  1088. ),
  1089. TP_fast_assign(
  1090. LOCAL_ASSIGN;
  1091. __entry->aborted = aborted;
  1092. ),
  1093. TP_printk(
  1094. LOCAL_PR_FMT " aborted:%d",
  1095. LOCAL_PR_ARG, __entry->aborted
  1096. )
  1097. );
  1098. TRACE_EVENT(api_sched_scan_results,
  1099. TP_PROTO(struct ieee80211_local *local),
  1100. TP_ARGS(local),
  1101. TP_STRUCT__entry(
  1102. LOCAL_ENTRY
  1103. ),
  1104. TP_fast_assign(
  1105. LOCAL_ASSIGN;
  1106. ),
  1107. TP_printk(
  1108. LOCAL_PR_FMT, LOCAL_PR_ARG
  1109. )
  1110. );
  1111. TRACE_EVENT(api_sched_scan_stopped,
  1112. TP_PROTO(struct ieee80211_local *local),
  1113. TP_ARGS(local),
  1114. TP_STRUCT__entry(
  1115. LOCAL_ENTRY
  1116. ),
  1117. TP_fast_assign(
  1118. LOCAL_ASSIGN;
  1119. ),
  1120. TP_printk(
  1121. LOCAL_PR_FMT, LOCAL_PR_ARG
  1122. )
  1123. );
  1124. TRACE_EVENT(api_sta_block_awake,
  1125. TP_PROTO(struct ieee80211_local *local,
  1126. struct ieee80211_sta *sta, bool block),
  1127. TP_ARGS(local, sta, block),
  1128. TP_STRUCT__entry(
  1129. LOCAL_ENTRY
  1130. STA_ENTRY
  1131. __field(bool, block)
  1132. ),
  1133. TP_fast_assign(
  1134. LOCAL_ASSIGN;
  1135. STA_ASSIGN;
  1136. __entry->block = block;
  1137. ),
  1138. TP_printk(
  1139. LOCAL_PR_FMT STA_PR_FMT " block:%d",
  1140. LOCAL_PR_ARG, STA_PR_FMT, __entry->block
  1141. )
  1142. );
  1143. TRACE_EVENT(api_chswitch_done,
  1144. TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
  1145. TP_ARGS(sdata, success),
  1146. TP_STRUCT__entry(
  1147. VIF_ENTRY
  1148. __field(bool, success)
  1149. ),
  1150. TP_fast_assign(
  1151. VIF_ASSIGN;
  1152. __entry->success = success;
  1153. ),
  1154. TP_printk(
  1155. VIF_PR_FMT " success=%d",
  1156. VIF_PR_ARG, __entry->success
  1157. )
  1158. );
  1159. DEFINE_EVENT(local_only_evt, api_ready_on_channel,
  1160. TP_PROTO(struct ieee80211_local *local),
  1161. TP_ARGS(local)
  1162. );
  1163. DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
  1164. TP_PROTO(struct ieee80211_local *local),
  1165. TP_ARGS(local)
  1166. );
  1167. TRACE_EVENT(api_gtk_rekey_notify,
  1168. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1169. const u8 *bssid, const u8 *replay_ctr),
  1170. TP_ARGS(sdata, bssid, replay_ctr),
  1171. TP_STRUCT__entry(
  1172. VIF_ENTRY
  1173. __array(u8, bssid, ETH_ALEN)
  1174. __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
  1175. ),
  1176. TP_fast_assign(
  1177. VIF_ASSIGN;
  1178. memcpy(__entry->bssid, bssid, ETH_ALEN);
  1179. memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
  1180. ),
  1181. TP_printk(VIF_PR_FMT, VIF_PR_ARG)
  1182. );
  1183. TRACE_EVENT(api_enable_rssi_reports,
  1184. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1185. int rssi_min_thold, int rssi_max_thold),
  1186. TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
  1187. TP_STRUCT__entry(
  1188. VIF_ENTRY
  1189. __field(int, rssi_min_thold)
  1190. __field(int, rssi_max_thold)
  1191. ),
  1192. TP_fast_assign(
  1193. VIF_ASSIGN;
  1194. __entry->rssi_min_thold = rssi_min_thold;
  1195. __entry->rssi_max_thold = rssi_max_thold;
  1196. ),
  1197. TP_printk(
  1198. VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
  1199. VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
  1200. )
  1201. );
  1202. TRACE_EVENT(api_eosp,
  1203. TP_PROTO(struct ieee80211_local *local,
  1204. struct ieee80211_sta *sta),
  1205. TP_ARGS(local, sta),
  1206. TP_STRUCT__entry(
  1207. LOCAL_ENTRY
  1208. STA_ENTRY
  1209. ),
  1210. TP_fast_assign(
  1211. LOCAL_ASSIGN;
  1212. STA_ASSIGN;
  1213. ),
  1214. TP_printk(
  1215. LOCAL_PR_FMT STA_PR_FMT,
  1216. LOCAL_PR_ARG, STA_PR_FMT
  1217. )
  1218. );
  1219. /*
  1220. * Tracing for internal functions
  1221. * (which may also be called in response to driver calls)
  1222. */
  1223. TRACE_EVENT(wake_queue,
  1224. TP_PROTO(struct ieee80211_local *local, u16 queue,
  1225. enum queue_stop_reason reason),
  1226. TP_ARGS(local, queue, reason),
  1227. TP_STRUCT__entry(
  1228. LOCAL_ENTRY
  1229. __field(u16, queue)
  1230. __field(u32, reason)
  1231. ),
  1232. TP_fast_assign(
  1233. LOCAL_ASSIGN;
  1234. __entry->queue = queue;
  1235. __entry->reason = reason;
  1236. ),
  1237. TP_printk(
  1238. LOCAL_PR_FMT " queue:%d, reason:%d",
  1239. LOCAL_PR_ARG, __entry->queue, __entry->reason
  1240. )
  1241. );
  1242. TRACE_EVENT(stop_queue,
  1243. TP_PROTO(struct ieee80211_local *local, u16 queue,
  1244. enum queue_stop_reason reason),
  1245. TP_ARGS(local, queue, reason),
  1246. TP_STRUCT__entry(
  1247. LOCAL_ENTRY
  1248. __field(u16, queue)
  1249. __field(u32, reason)
  1250. ),
  1251. TP_fast_assign(
  1252. LOCAL_ASSIGN;
  1253. __entry->queue = queue;
  1254. __entry->reason = reason;
  1255. ),
  1256. TP_printk(
  1257. LOCAL_PR_FMT " queue:%d, reason:%d",
  1258. LOCAL_PR_ARG, __entry->queue, __entry->reason
  1259. )
  1260. );
  1261. #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
  1262. #undef TRACE_INCLUDE_PATH
  1263. #define TRACE_INCLUDE_PATH .
  1264. #undef TRACE_INCLUDE_FILE
  1265. #define TRACE_INCLUDE_FILE driver-trace
  1266. #include <trace/define_trace.h>