trace.h 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584
  1. /*
  2. * Portions of this file
  3. * Copyright(c) 2016 Intel Deutschland GmbH
  4. */
  5. #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
  6. #define __MAC80211_DRIVER_TRACE
  7. #include <linux/tracepoint.h>
  8. #include <net/mac80211.h>
  9. #include "ieee80211_i.h"
  10. #undef TRACE_SYSTEM
  11. #define TRACE_SYSTEM mac80211
  12. #define MAXNAME 32
  13. #define LOCAL_ENTRY __array(char, wiphy_name, 32)
  14. #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
  15. #define LOCAL_PR_FMT "%s"
  16. #define LOCAL_PR_ARG __entry->wiphy_name
  17. #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
  18. #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
  19. #define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
  20. #define STA_PR_FMT " sta:%pM"
  21. #define STA_PR_ARG __entry->sta_addr
  22. #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
  23. __field(bool, p2p) \
  24. __string(vif_name, sdata->name)
  25. #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
  26. __entry->p2p = sdata->vif.p2p; \
  27. __assign_str(vif_name, sdata->name)
  28. #define VIF_PR_FMT " vif:%s(%d%s)"
  29. #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
  30. #define CHANDEF_ENTRY __field(u32, control_freq) \
  31. __field(u32, chan_width) \
  32. __field(u32, center_freq1) \
  33. __field(u32, center_freq2)
  34. #define CHANDEF_ASSIGN(c) \
  35. __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
  36. __entry->chan_width = (c) ? (c)->width : 0; \
  37. __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
  38. __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
  39. #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
  40. #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
  41. __entry->center_freq1, __entry->center_freq2
  42. #define MIN_CHANDEF_ENTRY \
  43. __field(u32, min_control_freq) \
  44. __field(u32, min_chan_width) \
  45. __field(u32, min_center_freq1) \
  46. __field(u32, min_center_freq2)
  47. #define MIN_CHANDEF_ASSIGN(c) \
  48. __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
  49. __entry->min_chan_width = (c)->width; \
  50. __entry->min_center_freq1 = (c)->center_freq1; \
  51. __entry->min_center_freq2 = (c)->center_freq2;
  52. #define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
  53. #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
  54. __entry->min_center_freq1, __entry->min_center_freq2
  55. #define CHANCTX_ENTRY CHANDEF_ENTRY \
  56. MIN_CHANDEF_ENTRY \
  57. __field(u8, rx_chains_static) \
  58. __field(u8, rx_chains_dynamic)
  59. #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
  60. MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
  61. __entry->rx_chains_static = ctx->conf.rx_chains_static; \
  62. __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
  63. #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
  64. #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
  65. __entry->rx_chains_static, __entry->rx_chains_dynamic
  66. #define KEY_ENTRY __field(u32, cipher) \
  67. __field(u8, hw_key_idx) \
  68. __field(u8, flags) \
  69. __field(s8, keyidx)
  70. #define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
  71. __entry->flags = (k)->flags; \
  72. __entry->keyidx = (k)->keyidx; \
  73. __entry->hw_key_idx = (k)->hw_key_idx;
  74. #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
  75. #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
  76. #define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
  77. ieee80211_ampdu_mlme_action) \
  78. STA_ENTRY \
  79. __field(u16, tid) \
  80. __field(u16, ssn) \
  81. __field(u8, buf_size) \
  82. __field(bool, amsdu) \
  83. __field(u16, timeout)
  84. #define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
  85. __entry->tid = params->tid; \
  86. __entry->ssn = params->ssn; \
  87. __entry->buf_size = params->buf_size; \
  88. __entry->amsdu = params->amsdu; \
  89. __entry->timeout = params->timeout;
  90. #define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d"
  91. #define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
  92. __entry->buf_size, __entry->amsdu, __entry->timeout
  93. /*
  94. * Tracing for driver callbacks.
  95. */
  96. DECLARE_EVENT_CLASS(local_only_evt,
  97. TP_PROTO(struct ieee80211_local *local),
  98. TP_ARGS(local),
  99. TP_STRUCT__entry(
  100. LOCAL_ENTRY
  101. ),
  102. TP_fast_assign(
  103. LOCAL_ASSIGN;
  104. ),
  105. TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
  106. );
  107. DECLARE_EVENT_CLASS(local_sdata_addr_evt,
  108. TP_PROTO(struct ieee80211_local *local,
  109. struct ieee80211_sub_if_data *sdata),
  110. TP_ARGS(local, sdata),
  111. TP_STRUCT__entry(
  112. LOCAL_ENTRY
  113. VIF_ENTRY
  114. __array(char, addr, ETH_ALEN)
  115. ),
  116. TP_fast_assign(
  117. LOCAL_ASSIGN;
  118. VIF_ASSIGN;
  119. memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
  120. ),
  121. TP_printk(
  122. LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
  123. LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
  124. )
  125. );
  126. DECLARE_EVENT_CLASS(local_u32_evt,
  127. TP_PROTO(struct ieee80211_local *local, u32 value),
  128. TP_ARGS(local, value),
  129. TP_STRUCT__entry(
  130. LOCAL_ENTRY
  131. __field(u32, value)
  132. ),
  133. TP_fast_assign(
  134. LOCAL_ASSIGN;
  135. __entry->value = value;
  136. ),
  137. TP_printk(
  138. LOCAL_PR_FMT " value:%d",
  139. LOCAL_PR_ARG, __entry->value
  140. )
  141. );
  142. DECLARE_EVENT_CLASS(local_sdata_evt,
  143. TP_PROTO(struct ieee80211_local *local,
  144. struct ieee80211_sub_if_data *sdata),
  145. TP_ARGS(local, sdata),
  146. TP_STRUCT__entry(
  147. LOCAL_ENTRY
  148. VIF_ENTRY
  149. ),
  150. TP_fast_assign(
  151. LOCAL_ASSIGN;
  152. VIF_ASSIGN;
  153. ),
  154. TP_printk(
  155. LOCAL_PR_FMT VIF_PR_FMT,
  156. LOCAL_PR_ARG, VIF_PR_ARG
  157. )
  158. );
  159. DEFINE_EVENT(local_only_evt, drv_return_void,
  160. TP_PROTO(struct ieee80211_local *local),
  161. TP_ARGS(local)
  162. );
  163. TRACE_EVENT(drv_return_int,
  164. TP_PROTO(struct ieee80211_local *local, int ret),
  165. TP_ARGS(local, ret),
  166. TP_STRUCT__entry(
  167. LOCAL_ENTRY
  168. __field(int, ret)
  169. ),
  170. TP_fast_assign(
  171. LOCAL_ASSIGN;
  172. __entry->ret = ret;
  173. ),
  174. TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
  175. );
  176. TRACE_EVENT(drv_return_bool,
  177. TP_PROTO(struct ieee80211_local *local, bool ret),
  178. TP_ARGS(local, ret),
  179. TP_STRUCT__entry(
  180. LOCAL_ENTRY
  181. __field(bool, ret)
  182. ),
  183. TP_fast_assign(
  184. LOCAL_ASSIGN;
  185. __entry->ret = ret;
  186. ),
  187. TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
  188. "true" : "false")
  189. );
  190. TRACE_EVENT(drv_return_u32,
  191. TP_PROTO(struct ieee80211_local *local, u32 ret),
  192. TP_ARGS(local, ret),
  193. TP_STRUCT__entry(
  194. LOCAL_ENTRY
  195. __field(u32, ret)
  196. ),
  197. TP_fast_assign(
  198. LOCAL_ASSIGN;
  199. __entry->ret = ret;
  200. ),
  201. TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
  202. );
  203. TRACE_EVENT(drv_return_u64,
  204. TP_PROTO(struct ieee80211_local *local, u64 ret),
  205. TP_ARGS(local, ret),
  206. TP_STRUCT__entry(
  207. LOCAL_ENTRY
  208. __field(u64, ret)
  209. ),
  210. TP_fast_assign(
  211. LOCAL_ASSIGN;
  212. __entry->ret = ret;
  213. ),
  214. TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
  215. );
  216. DEFINE_EVENT(local_only_evt, drv_start,
  217. TP_PROTO(struct ieee80211_local *local),
  218. TP_ARGS(local)
  219. );
  220. DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
  221. TP_PROTO(struct ieee80211_local *local, u32 sset),
  222. TP_ARGS(local, sset)
  223. );
  224. DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
  225. TP_PROTO(struct ieee80211_local *local, u32 sset),
  226. TP_ARGS(local, sset)
  227. );
  228. DEFINE_EVENT(local_only_evt, drv_get_et_stats,
  229. TP_PROTO(struct ieee80211_local *local),
  230. TP_ARGS(local)
  231. );
  232. DEFINE_EVENT(local_only_evt, drv_suspend,
  233. TP_PROTO(struct ieee80211_local *local),
  234. TP_ARGS(local)
  235. );
  236. DEFINE_EVENT(local_only_evt, drv_resume,
  237. TP_PROTO(struct ieee80211_local *local),
  238. TP_ARGS(local)
  239. );
  240. TRACE_EVENT(drv_set_wakeup,
  241. TP_PROTO(struct ieee80211_local *local, bool enabled),
  242. TP_ARGS(local, enabled),
  243. TP_STRUCT__entry(
  244. LOCAL_ENTRY
  245. __field(bool, enabled)
  246. ),
  247. TP_fast_assign(
  248. LOCAL_ASSIGN;
  249. __entry->enabled = enabled;
  250. ),
  251. TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
  252. );
  253. DEFINE_EVENT(local_only_evt, drv_stop,
  254. TP_PROTO(struct ieee80211_local *local),
  255. TP_ARGS(local)
  256. );
  257. DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
  258. TP_PROTO(struct ieee80211_local *local,
  259. struct ieee80211_sub_if_data *sdata),
  260. TP_ARGS(local, sdata)
  261. );
  262. TRACE_EVENT(drv_change_interface,
  263. TP_PROTO(struct ieee80211_local *local,
  264. struct ieee80211_sub_if_data *sdata,
  265. enum nl80211_iftype type, bool p2p),
  266. TP_ARGS(local, sdata, type, p2p),
  267. TP_STRUCT__entry(
  268. LOCAL_ENTRY
  269. VIF_ENTRY
  270. __field(u32, new_type)
  271. __field(bool, new_p2p)
  272. ),
  273. TP_fast_assign(
  274. LOCAL_ASSIGN;
  275. VIF_ASSIGN;
  276. __entry->new_type = type;
  277. __entry->new_p2p = p2p;
  278. ),
  279. TP_printk(
  280. LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
  281. LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
  282. __entry->new_p2p ? "/p2p" : ""
  283. )
  284. );
  285. DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
  286. TP_PROTO(struct ieee80211_local *local,
  287. struct ieee80211_sub_if_data *sdata),
  288. TP_ARGS(local, sdata)
  289. );
  290. TRACE_EVENT(drv_config,
  291. TP_PROTO(struct ieee80211_local *local,
  292. u32 changed),
  293. TP_ARGS(local, changed),
  294. TP_STRUCT__entry(
  295. LOCAL_ENTRY
  296. __field(u32, changed)
  297. __field(u32, flags)
  298. __field(int, power_level)
  299. __field(int, dynamic_ps_timeout)
  300. __field(u16, listen_interval)
  301. __field(u8, long_frame_max_tx_count)
  302. __field(u8, short_frame_max_tx_count)
  303. CHANDEF_ENTRY
  304. __field(int, smps)
  305. ),
  306. TP_fast_assign(
  307. LOCAL_ASSIGN;
  308. __entry->changed = changed;
  309. __entry->flags = local->hw.conf.flags;
  310. __entry->power_level = local->hw.conf.power_level;
  311. __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
  312. __entry->listen_interval = local->hw.conf.listen_interval;
  313. __entry->long_frame_max_tx_count =
  314. local->hw.conf.long_frame_max_tx_count;
  315. __entry->short_frame_max_tx_count =
  316. local->hw.conf.short_frame_max_tx_count;
  317. CHANDEF_ASSIGN(&local->hw.conf.chandef)
  318. __entry->smps = local->hw.conf.smps_mode;
  319. ),
  320. TP_printk(
  321. LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
  322. LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
  323. )
  324. );
  325. TRACE_EVENT(drv_bss_info_changed,
  326. TP_PROTO(struct ieee80211_local *local,
  327. struct ieee80211_sub_if_data *sdata,
  328. struct ieee80211_bss_conf *info,
  329. u32 changed),
  330. TP_ARGS(local, sdata, info, changed),
  331. TP_STRUCT__entry(
  332. LOCAL_ENTRY
  333. VIF_ENTRY
  334. __field(u32, changed)
  335. __field(bool, assoc)
  336. __field(bool, ibss_joined)
  337. __field(bool, ibss_creator)
  338. __field(u16, aid)
  339. __field(bool, cts)
  340. __field(bool, shortpre)
  341. __field(bool, shortslot)
  342. __field(bool, enable_beacon)
  343. __field(u8, dtimper)
  344. __field(u16, bcnint)
  345. __field(u16, assoc_cap)
  346. __field(u64, sync_tsf)
  347. __field(u32, sync_device_ts)
  348. __field(u8, sync_dtim_count)
  349. __field(u32, basic_rates)
  350. __array(int, mcast_rate, NUM_NL80211_BANDS)
  351. __field(u16, ht_operation_mode)
  352. __field(s32, cqm_rssi_thold);
  353. __field(s32, cqm_rssi_hyst);
  354. __field(u32, channel_width);
  355. __field(u32, channel_cfreq1);
  356. __dynamic_array(u32, arp_addr_list,
  357. info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
  358. IEEE80211_BSS_ARP_ADDR_LIST_LEN :
  359. info->arp_addr_cnt);
  360. __field(int, arp_addr_cnt);
  361. __field(bool, qos);
  362. __field(bool, idle);
  363. __field(bool, ps);
  364. __dynamic_array(u8, ssid, info->ssid_len);
  365. __field(bool, hidden_ssid);
  366. __field(int, txpower)
  367. __field(u8, p2p_oppps_ctwindow)
  368. ),
  369. TP_fast_assign(
  370. LOCAL_ASSIGN;
  371. VIF_ASSIGN;
  372. __entry->changed = changed;
  373. __entry->aid = info->aid;
  374. __entry->assoc = info->assoc;
  375. __entry->ibss_joined = info->ibss_joined;
  376. __entry->ibss_creator = info->ibss_creator;
  377. __entry->shortpre = info->use_short_preamble;
  378. __entry->cts = info->use_cts_prot;
  379. __entry->shortslot = info->use_short_slot;
  380. __entry->enable_beacon = info->enable_beacon;
  381. __entry->dtimper = info->dtim_period;
  382. __entry->bcnint = info->beacon_int;
  383. __entry->assoc_cap = info->assoc_capability;
  384. __entry->sync_tsf = info->sync_tsf;
  385. __entry->sync_device_ts = info->sync_device_ts;
  386. __entry->sync_dtim_count = info->sync_dtim_count;
  387. __entry->basic_rates = info->basic_rates;
  388. memcpy(__entry->mcast_rate, info->mcast_rate,
  389. sizeof(__entry->mcast_rate));
  390. __entry->ht_operation_mode = info->ht_operation_mode;
  391. __entry->cqm_rssi_thold = info->cqm_rssi_thold;
  392. __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
  393. __entry->channel_width = info->chandef.width;
  394. __entry->channel_cfreq1 = info->chandef.center_freq1;
  395. __entry->arp_addr_cnt = info->arp_addr_cnt;
  396. memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
  397. sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
  398. IEEE80211_BSS_ARP_ADDR_LIST_LEN :
  399. info->arp_addr_cnt));
  400. __entry->qos = info->qos;
  401. __entry->idle = info->idle;
  402. __entry->ps = info->ps;
  403. memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
  404. __entry->hidden_ssid = info->hidden_ssid;
  405. __entry->txpower = info->txpower;
  406. __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
  407. ),
  408. TP_printk(
  409. LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
  410. LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
  411. )
  412. );
  413. TRACE_EVENT(drv_prepare_multicast,
  414. TP_PROTO(struct ieee80211_local *local, int mc_count),
  415. TP_ARGS(local, mc_count),
  416. TP_STRUCT__entry(
  417. LOCAL_ENTRY
  418. __field(int, mc_count)
  419. ),
  420. TP_fast_assign(
  421. LOCAL_ASSIGN;
  422. __entry->mc_count = mc_count;
  423. ),
  424. TP_printk(
  425. LOCAL_PR_FMT " prepare mc (%d)",
  426. LOCAL_PR_ARG, __entry->mc_count
  427. )
  428. );
  429. TRACE_EVENT(drv_configure_filter,
  430. TP_PROTO(struct ieee80211_local *local,
  431. unsigned int changed_flags,
  432. unsigned int *total_flags,
  433. u64 multicast),
  434. TP_ARGS(local, changed_flags, total_flags, multicast),
  435. TP_STRUCT__entry(
  436. LOCAL_ENTRY
  437. __field(unsigned int, changed)
  438. __field(unsigned int, total)
  439. __field(u64, multicast)
  440. ),
  441. TP_fast_assign(
  442. LOCAL_ASSIGN;
  443. __entry->changed = changed_flags;
  444. __entry->total = *total_flags;
  445. __entry->multicast = multicast;
  446. ),
  447. TP_printk(
  448. LOCAL_PR_FMT " changed:%#x total:%#x",
  449. LOCAL_PR_ARG, __entry->changed, __entry->total
  450. )
  451. );
  452. TRACE_EVENT(drv_config_iface_filter,
  453. TP_PROTO(struct ieee80211_local *local,
  454. struct ieee80211_sub_if_data *sdata,
  455. unsigned int filter_flags,
  456. unsigned int changed_flags),
  457. TP_ARGS(local, sdata, filter_flags, changed_flags),
  458. TP_STRUCT__entry(
  459. LOCAL_ENTRY
  460. VIF_ENTRY
  461. __field(unsigned int, filter_flags)
  462. __field(unsigned int, changed_flags)
  463. ),
  464. TP_fast_assign(
  465. LOCAL_ASSIGN;
  466. VIF_ASSIGN;
  467. __entry->filter_flags = filter_flags;
  468. __entry->changed_flags = changed_flags;
  469. ),
  470. TP_printk(
  471. LOCAL_PR_FMT VIF_PR_FMT
  472. " filter_flags: %#x changed_flags: %#x",
  473. LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
  474. __entry->changed_flags
  475. )
  476. );
  477. TRACE_EVENT(drv_set_tim,
  478. TP_PROTO(struct ieee80211_local *local,
  479. struct ieee80211_sta *sta, bool set),
  480. TP_ARGS(local, sta, set),
  481. TP_STRUCT__entry(
  482. LOCAL_ENTRY
  483. STA_ENTRY
  484. __field(bool, set)
  485. ),
  486. TP_fast_assign(
  487. LOCAL_ASSIGN;
  488. STA_ASSIGN;
  489. __entry->set = set;
  490. ),
  491. TP_printk(
  492. LOCAL_PR_FMT STA_PR_FMT " set:%d",
  493. LOCAL_PR_ARG, STA_PR_ARG, __entry->set
  494. )
  495. );
  496. TRACE_EVENT(drv_set_key,
  497. TP_PROTO(struct ieee80211_local *local,
  498. enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
  499. struct ieee80211_sta *sta,
  500. struct ieee80211_key_conf *key),
  501. TP_ARGS(local, cmd, sdata, sta, key),
  502. TP_STRUCT__entry(
  503. LOCAL_ENTRY
  504. VIF_ENTRY
  505. STA_ENTRY
  506. KEY_ENTRY
  507. ),
  508. TP_fast_assign(
  509. LOCAL_ASSIGN;
  510. VIF_ASSIGN;
  511. STA_ASSIGN;
  512. KEY_ASSIGN(key);
  513. ),
  514. TP_printk(
  515. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
  516. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
  517. )
  518. );
  519. TRACE_EVENT(drv_update_tkip_key,
  520. TP_PROTO(struct ieee80211_local *local,
  521. struct ieee80211_sub_if_data *sdata,
  522. struct ieee80211_key_conf *conf,
  523. struct ieee80211_sta *sta, u32 iv32),
  524. TP_ARGS(local, sdata, conf, sta, iv32),
  525. TP_STRUCT__entry(
  526. LOCAL_ENTRY
  527. VIF_ENTRY
  528. STA_ENTRY
  529. __field(u32, iv32)
  530. ),
  531. TP_fast_assign(
  532. LOCAL_ASSIGN;
  533. VIF_ASSIGN;
  534. STA_ASSIGN;
  535. __entry->iv32 = iv32;
  536. ),
  537. TP_printk(
  538. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
  539. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
  540. )
  541. );
  542. DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
  543. TP_PROTO(struct ieee80211_local *local,
  544. struct ieee80211_sub_if_data *sdata),
  545. TP_ARGS(local, sdata)
  546. );
  547. DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
  548. TP_PROTO(struct ieee80211_local *local,
  549. struct ieee80211_sub_if_data *sdata),
  550. TP_ARGS(local, sdata)
  551. );
  552. DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
  553. TP_PROTO(struct ieee80211_local *local,
  554. struct ieee80211_sub_if_data *sdata),
  555. TP_ARGS(local, sdata)
  556. );
  557. DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
  558. TP_PROTO(struct ieee80211_local *local,
  559. struct ieee80211_sub_if_data *sdata),
  560. TP_ARGS(local, sdata)
  561. );
  562. TRACE_EVENT(drv_sw_scan_start,
  563. TP_PROTO(struct ieee80211_local *local,
  564. struct ieee80211_sub_if_data *sdata,
  565. const u8 *mac_addr),
  566. TP_ARGS(local, sdata, mac_addr),
  567. TP_STRUCT__entry(
  568. LOCAL_ENTRY
  569. VIF_ENTRY
  570. __array(char, mac_addr, ETH_ALEN)
  571. ),
  572. TP_fast_assign(
  573. LOCAL_ASSIGN;
  574. VIF_ASSIGN;
  575. memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
  576. ),
  577. TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
  578. LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
  579. );
  580. DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
  581. TP_PROTO(struct ieee80211_local *local,
  582. struct ieee80211_sub_if_data *sdata),
  583. TP_ARGS(local, sdata)
  584. );
  585. TRACE_EVENT(drv_get_stats,
  586. TP_PROTO(struct ieee80211_local *local,
  587. struct ieee80211_low_level_stats *stats,
  588. int ret),
  589. TP_ARGS(local, stats, ret),
  590. TP_STRUCT__entry(
  591. LOCAL_ENTRY
  592. __field(int, ret)
  593. __field(unsigned int, ackfail)
  594. __field(unsigned int, rtsfail)
  595. __field(unsigned int, fcserr)
  596. __field(unsigned int, rtssucc)
  597. ),
  598. TP_fast_assign(
  599. LOCAL_ASSIGN;
  600. __entry->ret = ret;
  601. __entry->ackfail = stats->dot11ACKFailureCount;
  602. __entry->rtsfail = stats->dot11RTSFailureCount;
  603. __entry->fcserr = stats->dot11FCSErrorCount;
  604. __entry->rtssucc = stats->dot11RTSSuccessCount;
  605. ),
  606. TP_printk(
  607. LOCAL_PR_FMT " ret:%d",
  608. LOCAL_PR_ARG, __entry->ret
  609. )
  610. );
  611. TRACE_EVENT(drv_get_key_seq,
  612. TP_PROTO(struct ieee80211_local *local,
  613. struct ieee80211_key_conf *key),
  614. TP_ARGS(local, key),
  615. TP_STRUCT__entry(
  616. LOCAL_ENTRY
  617. KEY_ENTRY
  618. ),
  619. TP_fast_assign(
  620. LOCAL_ASSIGN;
  621. KEY_ASSIGN(key);
  622. ),
  623. TP_printk(
  624. LOCAL_PR_FMT KEY_PR_FMT,
  625. LOCAL_PR_ARG, KEY_PR_ARG
  626. )
  627. );
  628. DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
  629. TP_PROTO(struct ieee80211_local *local, u32 value),
  630. TP_ARGS(local, value)
  631. );
  632. DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
  633. TP_PROTO(struct ieee80211_local *local, u32 value),
  634. TP_ARGS(local, value)
  635. );
  636. TRACE_EVENT(drv_set_coverage_class,
  637. TP_PROTO(struct ieee80211_local *local, s16 value),
  638. TP_ARGS(local, value),
  639. TP_STRUCT__entry(
  640. LOCAL_ENTRY
  641. __field(s16, value)
  642. ),
  643. TP_fast_assign(
  644. LOCAL_ASSIGN;
  645. __entry->value = value;
  646. ),
  647. TP_printk(
  648. LOCAL_PR_FMT " value:%d",
  649. LOCAL_PR_ARG, __entry->value
  650. )
  651. );
  652. TRACE_EVENT(drv_sta_notify,
  653. TP_PROTO(struct ieee80211_local *local,
  654. struct ieee80211_sub_if_data *sdata,
  655. enum sta_notify_cmd cmd,
  656. struct ieee80211_sta *sta),
  657. TP_ARGS(local, sdata, cmd, sta),
  658. TP_STRUCT__entry(
  659. LOCAL_ENTRY
  660. VIF_ENTRY
  661. STA_ENTRY
  662. __field(u32, cmd)
  663. ),
  664. TP_fast_assign(
  665. LOCAL_ASSIGN;
  666. VIF_ASSIGN;
  667. STA_ASSIGN;
  668. __entry->cmd = cmd;
  669. ),
  670. TP_printk(
  671. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
  672. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
  673. )
  674. );
  675. TRACE_EVENT(drv_sta_state,
  676. TP_PROTO(struct ieee80211_local *local,
  677. struct ieee80211_sub_if_data *sdata,
  678. struct ieee80211_sta *sta,
  679. enum ieee80211_sta_state old_state,
  680. enum ieee80211_sta_state new_state),
  681. TP_ARGS(local, sdata, sta, old_state, new_state),
  682. TP_STRUCT__entry(
  683. LOCAL_ENTRY
  684. VIF_ENTRY
  685. STA_ENTRY
  686. __field(u32, old_state)
  687. __field(u32, new_state)
  688. ),
  689. TP_fast_assign(
  690. LOCAL_ASSIGN;
  691. VIF_ASSIGN;
  692. STA_ASSIGN;
  693. __entry->old_state = old_state;
  694. __entry->new_state = new_state;
  695. ),
  696. TP_printk(
  697. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
  698. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
  699. __entry->old_state, __entry->new_state
  700. )
  701. );
  702. TRACE_EVENT(drv_sta_rc_update,
  703. TP_PROTO(struct ieee80211_local *local,
  704. struct ieee80211_sub_if_data *sdata,
  705. struct ieee80211_sta *sta,
  706. u32 changed),
  707. TP_ARGS(local, sdata, sta, changed),
  708. TP_STRUCT__entry(
  709. LOCAL_ENTRY
  710. VIF_ENTRY
  711. STA_ENTRY
  712. __field(u32, changed)
  713. ),
  714. TP_fast_assign(
  715. LOCAL_ASSIGN;
  716. VIF_ASSIGN;
  717. STA_ASSIGN;
  718. __entry->changed = changed;
  719. ),
  720. TP_printk(
  721. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
  722. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
  723. )
  724. );
  725. DECLARE_EVENT_CLASS(sta_event,
  726. TP_PROTO(struct ieee80211_local *local,
  727. struct ieee80211_sub_if_data *sdata,
  728. struct ieee80211_sta *sta),
  729. TP_ARGS(local, sdata, sta),
  730. TP_STRUCT__entry(
  731. LOCAL_ENTRY
  732. VIF_ENTRY
  733. STA_ENTRY
  734. ),
  735. TP_fast_assign(
  736. LOCAL_ASSIGN;
  737. VIF_ASSIGN;
  738. STA_ASSIGN;
  739. ),
  740. TP_printk(
  741. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
  742. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  743. )
  744. );
  745. DEFINE_EVENT(sta_event, drv_sta_statistics,
  746. TP_PROTO(struct ieee80211_local *local,
  747. struct ieee80211_sub_if_data *sdata,
  748. struct ieee80211_sta *sta),
  749. TP_ARGS(local, sdata, sta)
  750. );
  751. DEFINE_EVENT(sta_event, drv_sta_add,
  752. TP_PROTO(struct ieee80211_local *local,
  753. struct ieee80211_sub_if_data *sdata,
  754. struct ieee80211_sta *sta),
  755. TP_ARGS(local, sdata, sta)
  756. );
  757. DEFINE_EVENT(sta_event, drv_sta_remove,
  758. TP_PROTO(struct ieee80211_local *local,
  759. struct ieee80211_sub_if_data *sdata,
  760. struct ieee80211_sta *sta),
  761. TP_ARGS(local, sdata, sta)
  762. );
  763. DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
  764. TP_PROTO(struct ieee80211_local *local,
  765. struct ieee80211_sub_if_data *sdata,
  766. struct ieee80211_sta *sta),
  767. TP_ARGS(local, sdata, sta)
  768. );
  769. DEFINE_EVENT(sta_event, drv_sync_rx_queues,
  770. TP_PROTO(struct ieee80211_local *local,
  771. struct ieee80211_sub_if_data *sdata,
  772. struct ieee80211_sta *sta),
  773. TP_ARGS(local, sdata, sta)
  774. );
  775. DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
  776. TP_PROTO(struct ieee80211_local *local,
  777. struct ieee80211_sub_if_data *sdata,
  778. struct ieee80211_sta *sta),
  779. TP_ARGS(local, sdata, sta)
  780. );
  781. TRACE_EVENT(drv_conf_tx,
  782. TP_PROTO(struct ieee80211_local *local,
  783. struct ieee80211_sub_if_data *sdata,
  784. u16 ac, const struct ieee80211_tx_queue_params *params),
  785. TP_ARGS(local, sdata, ac, params),
  786. TP_STRUCT__entry(
  787. LOCAL_ENTRY
  788. VIF_ENTRY
  789. __field(u16, ac)
  790. __field(u16, txop)
  791. __field(u16, cw_min)
  792. __field(u16, cw_max)
  793. __field(u8, aifs)
  794. __field(bool, uapsd)
  795. ),
  796. TP_fast_assign(
  797. LOCAL_ASSIGN;
  798. VIF_ASSIGN;
  799. __entry->ac = ac;
  800. __entry->txop = params->txop;
  801. __entry->cw_max = params->cw_max;
  802. __entry->cw_min = params->cw_min;
  803. __entry->aifs = params->aifs;
  804. __entry->uapsd = params->uapsd;
  805. ),
  806. TP_printk(
  807. LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
  808. LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
  809. )
  810. );
  811. DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
  812. TP_PROTO(struct ieee80211_local *local,
  813. struct ieee80211_sub_if_data *sdata),
  814. TP_ARGS(local, sdata)
  815. );
  816. TRACE_EVENT(drv_set_tsf,
  817. TP_PROTO(struct ieee80211_local *local,
  818. struct ieee80211_sub_if_data *sdata,
  819. u64 tsf),
  820. TP_ARGS(local, sdata, tsf),
  821. TP_STRUCT__entry(
  822. LOCAL_ENTRY
  823. VIF_ENTRY
  824. __field(u64, tsf)
  825. ),
  826. TP_fast_assign(
  827. LOCAL_ASSIGN;
  828. VIF_ASSIGN;
  829. __entry->tsf = tsf;
  830. ),
  831. TP_printk(
  832. LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
  833. LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
  834. )
  835. );
  836. TRACE_EVENT(drv_offset_tsf,
  837. TP_PROTO(struct ieee80211_local *local,
  838. struct ieee80211_sub_if_data *sdata,
  839. s64 offset),
  840. TP_ARGS(local, sdata, offset),
  841. TP_STRUCT__entry(
  842. LOCAL_ENTRY
  843. VIF_ENTRY
  844. __field(s64, tsf_offset)
  845. ),
  846. TP_fast_assign(
  847. LOCAL_ASSIGN;
  848. VIF_ASSIGN;
  849. __entry->tsf_offset = offset;
  850. ),
  851. TP_printk(
  852. LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
  853. LOCAL_PR_ARG, VIF_PR_ARG,
  854. (unsigned long long)__entry->tsf_offset
  855. )
  856. );
  857. DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
  858. TP_PROTO(struct ieee80211_local *local,
  859. struct ieee80211_sub_if_data *sdata),
  860. TP_ARGS(local, sdata)
  861. );
  862. DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
  863. TP_PROTO(struct ieee80211_local *local),
  864. TP_ARGS(local)
  865. );
  866. TRACE_EVENT(drv_ampdu_action,
  867. TP_PROTO(struct ieee80211_local *local,
  868. struct ieee80211_sub_if_data *sdata,
  869. struct ieee80211_ampdu_params *params),
  870. TP_ARGS(local, sdata, params),
  871. TP_STRUCT__entry(
  872. LOCAL_ENTRY
  873. VIF_ENTRY
  874. AMPDU_ACTION_ENTRY
  875. ),
  876. TP_fast_assign(
  877. LOCAL_ASSIGN;
  878. VIF_ASSIGN;
  879. AMPDU_ACTION_ASSIGN;
  880. ),
  881. TP_printk(
  882. LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
  883. LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
  884. )
  885. );
  886. TRACE_EVENT(drv_get_survey,
  887. TP_PROTO(struct ieee80211_local *local, int idx,
  888. struct survey_info *survey),
  889. TP_ARGS(local, idx, survey),
  890. TP_STRUCT__entry(
  891. LOCAL_ENTRY
  892. __field(int, idx)
  893. ),
  894. TP_fast_assign(
  895. LOCAL_ASSIGN;
  896. __entry->idx = idx;
  897. ),
  898. TP_printk(
  899. LOCAL_PR_FMT " idx:%d",
  900. LOCAL_PR_ARG, __entry->idx
  901. )
  902. );
  903. TRACE_EVENT(drv_flush,
  904. TP_PROTO(struct ieee80211_local *local,
  905. u32 queues, bool drop),
  906. TP_ARGS(local, queues, drop),
  907. TP_STRUCT__entry(
  908. LOCAL_ENTRY
  909. __field(bool, drop)
  910. __field(u32, queues)
  911. ),
  912. TP_fast_assign(
  913. LOCAL_ASSIGN;
  914. __entry->drop = drop;
  915. __entry->queues = queues;
  916. ),
  917. TP_printk(
  918. LOCAL_PR_FMT " queues:0x%x drop:%d",
  919. LOCAL_PR_ARG, __entry->queues, __entry->drop
  920. )
  921. );
  922. TRACE_EVENT(drv_channel_switch,
  923. TP_PROTO(struct ieee80211_local *local,
  924. struct ieee80211_sub_if_data *sdata,
  925. struct ieee80211_channel_switch *ch_switch),
  926. TP_ARGS(local, sdata, ch_switch),
  927. TP_STRUCT__entry(
  928. LOCAL_ENTRY
  929. VIF_ENTRY
  930. CHANDEF_ENTRY
  931. __field(u64, timestamp)
  932. __field(u32, device_timestamp)
  933. __field(bool, block_tx)
  934. __field(u8, count)
  935. ),
  936. TP_fast_assign(
  937. LOCAL_ASSIGN;
  938. VIF_ASSIGN;
  939. CHANDEF_ASSIGN(&ch_switch->chandef)
  940. __entry->timestamp = ch_switch->timestamp;
  941. __entry->device_timestamp = ch_switch->device_timestamp;
  942. __entry->block_tx = ch_switch->block_tx;
  943. __entry->count = ch_switch->count;
  944. ),
  945. TP_printk(
  946. LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
  947. LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
  948. )
  949. );
  950. TRACE_EVENT(drv_set_antenna,
  951. TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  952. TP_ARGS(local, tx_ant, rx_ant, ret),
  953. TP_STRUCT__entry(
  954. LOCAL_ENTRY
  955. __field(u32, tx_ant)
  956. __field(u32, rx_ant)
  957. __field(int, ret)
  958. ),
  959. TP_fast_assign(
  960. LOCAL_ASSIGN;
  961. __entry->tx_ant = tx_ant;
  962. __entry->rx_ant = rx_ant;
  963. __entry->ret = ret;
  964. ),
  965. TP_printk(
  966. LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  967. LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  968. )
  969. );
  970. TRACE_EVENT(drv_get_antenna,
  971. TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  972. TP_ARGS(local, tx_ant, rx_ant, ret),
  973. TP_STRUCT__entry(
  974. LOCAL_ENTRY
  975. __field(u32, tx_ant)
  976. __field(u32, rx_ant)
  977. __field(int, ret)
  978. ),
  979. TP_fast_assign(
  980. LOCAL_ASSIGN;
  981. __entry->tx_ant = tx_ant;
  982. __entry->rx_ant = rx_ant;
  983. __entry->ret = ret;
  984. ),
  985. TP_printk(
  986. LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  987. LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  988. )
  989. );
  990. TRACE_EVENT(drv_remain_on_channel,
  991. TP_PROTO(struct ieee80211_local *local,
  992. struct ieee80211_sub_if_data *sdata,
  993. struct ieee80211_channel *chan,
  994. unsigned int duration,
  995. enum ieee80211_roc_type type),
  996. TP_ARGS(local, sdata, chan, duration, type),
  997. TP_STRUCT__entry(
  998. LOCAL_ENTRY
  999. VIF_ENTRY
  1000. __field(int, center_freq)
  1001. __field(unsigned int, duration)
  1002. __field(u32, type)
  1003. ),
  1004. TP_fast_assign(
  1005. LOCAL_ASSIGN;
  1006. VIF_ASSIGN;
  1007. __entry->center_freq = chan->center_freq;
  1008. __entry->duration = duration;
  1009. __entry->type = type;
  1010. ),
  1011. TP_printk(
  1012. LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
  1013. LOCAL_PR_ARG, VIF_PR_ARG,
  1014. __entry->center_freq, __entry->duration, __entry->type
  1015. )
  1016. );
  1017. DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
  1018. TP_PROTO(struct ieee80211_local *local),
  1019. TP_ARGS(local)
  1020. );
  1021. TRACE_EVENT(drv_set_ringparam,
  1022. TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
  1023. TP_ARGS(local, tx, rx),
  1024. TP_STRUCT__entry(
  1025. LOCAL_ENTRY
  1026. __field(u32, tx)
  1027. __field(u32, rx)
  1028. ),
  1029. TP_fast_assign(
  1030. LOCAL_ASSIGN;
  1031. __entry->tx = tx;
  1032. __entry->rx = rx;
  1033. ),
  1034. TP_printk(
  1035. LOCAL_PR_FMT " tx:%d rx %d",
  1036. LOCAL_PR_ARG, __entry->tx, __entry->rx
  1037. )
  1038. );
  1039. TRACE_EVENT(drv_get_ringparam,
  1040. TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
  1041. u32 *rx, u32 *rx_max),
  1042. TP_ARGS(local, tx, tx_max, rx, rx_max),
  1043. TP_STRUCT__entry(
  1044. LOCAL_ENTRY
  1045. __field(u32, tx)
  1046. __field(u32, tx_max)
  1047. __field(u32, rx)
  1048. __field(u32, rx_max)
  1049. ),
  1050. TP_fast_assign(
  1051. LOCAL_ASSIGN;
  1052. __entry->tx = *tx;
  1053. __entry->tx_max = *tx_max;
  1054. __entry->rx = *rx;
  1055. __entry->rx_max = *rx_max;
  1056. ),
  1057. TP_printk(
  1058. LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
  1059. LOCAL_PR_ARG,
  1060. __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
  1061. )
  1062. );
  1063. DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
  1064. TP_PROTO(struct ieee80211_local *local),
  1065. TP_ARGS(local)
  1066. );
  1067. DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
  1068. TP_PROTO(struct ieee80211_local *local),
  1069. TP_ARGS(local)
  1070. );
  1071. TRACE_EVENT(drv_set_bitrate_mask,
  1072. TP_PROTO(struct ieee80211_local *local,
  1073. struct ieee80211_sub_if_data *sdata,
  1074. const struct cfg80211_bitrate_mask *mask),
  1075. TP_ARGS(local, sdata, mask),
  1076. TP_STRUCT__entry(
  1077. LOCAL_ENTRY
  1078. VIF_ENTRY
  1079. __field(u32, legacy_2g)
  1080. __field(u32, legacy_5g)
  1081. ),
  1082. TP_fast_assign(
  1083. LOCAL_ASSIGN;
  1084. VIF_ASSIGN;
  1085. __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
  1086. __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
  1087. ),
  1088. TP_printk(
  1089. LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
  1090. LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
  1091. )
  1092. );
  1093. TRACE_EVENT(drv_set_rekey_data,
  1094. TP_PROTO(struct ieee80211_local *local,
  1095. struct ieee80211_sub_if_data *sdata,
  1096. struct cfg80211_gtk_rekey_data *data),
  1097. TP_ARGS(local, sdata, data),
  1098. TP_STRUCT__entry(
  1099. LOCAL_ENTRY
  1100. VIF_ENTRY
  1101. __array(u8, kek, NL80211_KEK_LEN)
  1102. __array(u8, kck, NL80211_KCK_LEN)
  1103. __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
  1104. ),
  1105. TP_fast_assign(
  1106. LOCAL_ASSIGN;
  1107. VIF_ASSIGN;
  1108. memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
  1109. memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
  1110. memcpy(__entry->replay_ctr, data->replay_ctr,
  1111. NL80211_REPLAY_CTR_LEN);
  1112. ),
  1113. TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
  1114. LOCAL_PR_ARG, VIF_PR_ARG)
  1115. );
  1116. TRACE_EVENT(drv_event_callback,
  1117. TP_PROTO(struct ieee80211_local *local,
  1118. struct ieee80211_sub_if_data *sdata,
  1119. const struct ieee80211_event *_event),
  1120. TP_ARGS(local, sdata, _event),
  1121. TP_STRUCT__entry(
  1122. LOCAL_ENTRY
  1123. VIF_ENTRY
  1124. __field(u32, type)
  1125. ),
  1126. TP_fast_assign(
  1127. LOCAL_ASSIGN;
  1128. VIF_ASSIGN;
  1129. __entry->type = _event->type;
  1130. ),
  1131. TP_printk(
  1132. LOCAL_PR_FMT VIF_PR_FMT " event:%d",
  1133. LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
  1134. )
  1135. );
  1136. DECLARE_EVENT_CLASS(release_evt,
  1137. TP_PROTO(struct ieee80211_local *local,
  1138. struct ieee80211_sta *sta,
  1139. u16 tids, int num_frames,
  1140. enum ieee80211_frame_release_type reason,
  1141. bool more_data),
  1142. TP_ARGS(local, sta, tids, num_frames, reason, more_data),
  1143. TP_STRUCT__entry(
  1144. LOCAL_ENTRY
  1145. STA_ENTRY
  1146. __field(u16, tids)
  1147. __field(int, num_frames)
  1148. __field(int, reason)
  1149. __field(bool, more_data)
  1150. ),
  1151. TP_fast_assign(
  1152. LOCAL_ASSIGN;
  1153. STA_ASSIGN;
  1154. __entry->tids = tids;
  1155. __entry->num_frames = num_frames;
  1156. __entry->reason = reason;
  1157. __entry->more_data = more_data;
  1158. ),
  1159. TP_printk(
  1160. LOCAL_PR_FMT STA_PR_FMT
  1161. " TIDs:0x%.4x frames:%d reason:%d more:%d",
  1162. LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
  1163. __entry->reason, __entry->more_data
  1164. )
  1165. );
  1166. DEFINE_EVENT(release_evt, drv_release_buffered_frames,
  1167. TP_PROTO(struct ieee80211_local *local,
  1168. struct ieee80211_sta *sta,
  1169. u16 tids, int num_frames,
  1170. enum ieee80211_frame_release_type reason,
  1171. bool more_data),
  1172. TP_ARGS(local, sta, tids, num_frames, reason, more_data)
  1173. );
  1174. DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
  1175. TP_PROTO(struct ieee80211_local *local,
  1176. struct ieee80211_sta *sta,
  1177. u16 tids, int num_frames,
  1178. enum ieee80211_frame_release_type reason,
  1179. bool more_data),
  1180. TP_ARGS(local, sta, tids, num_frames, reason, more_data)
  1181. );
  1182. DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
  1183. TP_PROTO(struct ieee80211_local *local,
  1184. struct ieee80211_sub_if_data *sdata),
  1185. TP_ARGS(local, sdata)
  1186. );
  1187. DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
  1188. TP_PROTO(struct ieee80211_local *local,
  1189. struct ieee80211_sub_if_data *sdata),
  1190. TP_ARGS(local, sdata)
  1191. );
  1192. DECLARE_EVENT_CLASS(local_chanctx,
  1193. TP_PROTO(struct ieee80211_local *local,
  1194. struct ieee80211_chanctx *ctx),
  1195. TP_ARGS(local, ctx),
  1196. TP_STRUCT__entry(
  1197. LOCAL_ENTRY
  1198. CHANCTX_ENTRY
  1199. ),
  1200. TP_fast_assign(
  1201. LOCAL_ASSIGN;
  1202. CHANCTX_ASSIGN;
  1203. ),
  1204. TP_printk(
  1205. LOCAL_PR_FMT CHANCTX_PR_FMT,
  1206. LOCAL_PR_ARG, CHANCTX_PR_ARG
  1207. )
  1208. );
  1209. DEFINE_EVENT(local_chanctx, drv_add_chanctx,
  1210. TP_PROTO(struct ieee80211_local *local,
  1211. struct ieee80211_chanctx *ctx),
  1212. TP_ARGS(local, ctx)
  1213. );
  1214. DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
  1215. TP_PROTO(struct ieee80211_local *local,
  1216. struct ieee80211_chanctx *ctx),
  1217. TP_ARGS(local, ctx)
  1218. );
  1219. TRACE_EVENT(drv_change_chanctx,
  1220. TP_PROTO(struct ieee80211_local *local,
  1221. struct ieee80211_chanctx *ctx,
  1222. u32 changed),
  1223. TP_ARGS(local, ctx, changed),
  1224. TP_STRUCT__entry(
  1225. LOCAL_ENTRY
  1226. CHANCTX_ENTRY
  1227. __field(u32, changed)
  1228. ),
  1229. TP_fast_assign(
  1230. LOCAL_ASSIGN;
  1231. CHANCTX_ASSIGN;
  1232. __entry->changed = changed;
  1233. ),
  1234. TP_printk(
  1235. LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
  1236. LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
  1237. )
  1238. );
  1239. #if !defined(__TRACE_VIF_ENTRY)
  1240. #define __TRACE_VIF_ENTRY
  1241. struct trace_vif_entry {
  1242. enum nl80211_iftype vif_type;
  1243. bool p2p;
  1244. char vif_name[IFNAMSIZ];
  1245. } __packed;
  1246. struct trace_chandef_entry {
  1247. u32 control_freq;
  1248. u32 chan_width;
  1249. u32 center_freq1;
  1250. u32 center_freq2;
  1251. } __packed;
  1252. struct trace_switch_entry {
  1253. struct trace_vif_entry vif;
  1254. struct trace_chandef_entry old_chandef;
  1255. struct trace_chandef_entry new_chandef;
  1256. } __packed;
  1257. #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
  1258. #endif
  1259. TRACE_EVENT(drv_switch_vif_chanctx,
  1260. TP_PROTO(struct ieee80211_local *local,
  1261. struct ieee80211_vif_chanctx_switch *vifs,
  1262. int n_vifs, enum ieee80211_chanctx_switch_mode mode),
  1263. TP_ARGS(local, vifs, n_vifs, mode),
  1264. TP_STRUCT__entry(
  1265. LOCAL_ENTRY
  1266. __field(int, n_vifs)
  1267. __field(u32, mode)
  1268. __dynamic_array(u8, vifs,
  1269. sizeof(struct trace_switch_entry) * n_vifs)
  1270. ),
  1271. TP_fast_assign(
  1272. LOCAL_ASSIGN;
  1273. __entry->n_vifs = n_vifs;
  1274. __entry->mode = mode;
  1275. {
  1276. struct trace_switch_entry *local_vifs =
  1277. __get_dynamic_array(vifs);
  1278. int i;
  1279. for (i = 0; i < n_vifs; i++) {
  1280. struct ieee80211_sub_if_data *sdata;
  1281. sdata = container_of(vifs[i].vif,
  1282. struct ieee80211_sub_if_data,
  1283. vif);
  1284. SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
  1285. SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
  1286. strncpy(local_vifs[i].vif.vif_name,
  1287. sdata->name,
  1288. sizeof(local_vifs[i].vif.vif_name));
  1289. SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
  1290. old_ctx->def.chan->center_freq);
  1291. SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
  1292. old_ctx->def.width);
  1293. SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
  1294. old_ctx->def.center_freq1);
  1295. SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
  1296. old_ctx->def.center_freq2);
  1297. SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
  1298. new_ctx->def.chan->center_freq);
  1299. SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
  1300. new_ctx->def.width);
  1301. SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
  1302. new_ctx->def.center_freq1);
  1303. SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
  1304. new_ctx->def.center_freq2);
  1305. }
  1306. }
  1307. ),
  1308. TP_printk(
  1309. LOCAL_PR_FMT " n_vifs:%d mode:%d",
  1310. LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
  1311. )
  1312. );
  1313. DECLARE_EVENT_CLASS(local_sdata_chanctx,
  1314. TP_PROTO(struct ieee80211_local *local,
  1315. struct ieee80211_sub_if_data *sdata,
  1316. struct ieee80211_chanctx *ctx),
  1317. TP_ARGS(local, sdata, ctx),
  1318. TP_STRUCT__entry(
  1319. LOCAL_ENTRY
  1320. VIF_ENTRY
  1321. CHANCTX_ENTRY
  1322. ),
  1323. TP_fast_assign(
  1324. LOCAL_ASSIGN;
  1325. VIF_ASSIGN;
  1326. CHANCTX_ASSIGN;
  1327. ),
  1328. TP_printk(
  1329. LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
  1330. LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
  1331. )
  1332. );
  1333. DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
  1334. TP_PROTO(struct ieee80211_local *local,
  1335. struct ieee80211_sub_if_data *sdata,
  1336. struct ieee80211_chanctx *ctx),
  1337. TP_ARGS(local, sdata, ctx)
  1338. );
  1339. DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
  1340. TP_PROTO(struct ieee80211_local *local,
  1341. struct ieee80211_sub_if_data *sdata,
  1342. struct ieee80211_chanctx *ctx),
  1343. TP_ARGS(local, sdata, ctx)
  1344. );
  1345. TRACE_EVENT(drv_start_ap,
  1346. TP_PROTO(struct ieee80211_local *local,
  1347. struct ieee80211_sub_if_data *sdata,
  1348. struct ieee80211_bss_conf *info),
  1349. TP_ARGS(local, sdata, info),
  1350. TP_STRUCT__entry(
  1351. LOCAL_ENTRY
  1352. VIF_ENTRY
  1353. __field(u8, dtimper)
  1354. __field(u16, bcnint)
  1355. __dynamic_array(u8, ssid, info->ssid_len);
  1356. __field(bool, hidden_ssid);
  1357. ),
  1358. TP_fast_assign(
  1359. LOCAL_ASSIGN;
  1360. VIF_ASSIGN;
  1361. __entry->dtimper = info->dtim_period;
  1362. __entry->bcnint = info->beacon_int;
  1363. memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
  1364. __entry->hidden_ssid = info->hidden_ssid;
  1365. ),
  1366. TP_printk(
  1367. LOCAL_PR_FMT VIF_PR_FMT,
  1368. LOCAL_PR_ARG, VIF_PR_ARG
  1369. )
  1370. );
  1371. DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
  1372. TP_PROTO(struct ieee80211_local *local,
  1373. struct ieee80211_sub_if_data *sdata),
  1374. TP_ARGS(local, sdata)
  1375. );
  1376. TRACE_EVENT(drv_reconfig_complete,
  1377. TP_PROTO(struct ieee80211_local *local,
  1378. enum ieee80211_reconfig_type reconfig_type),
  1379. TP_ARGS(local, reconfig_type),
  1380. TP_STRUCT__entry(
  1381. LOCAL_ENTRY
  1382. __field(u8, reconfig_type)
  1383. ),
  1384. TP_fast_assign(
  1385. LOCAL_ASSIGN;
  1386. __entry->reconfig_type = reconfig_type;
  1387. ),
  1388. TP_printk(
  1389. LOCAL_PR_FMT " reconfig_type:%d",
  1390. LOCAL_PR_ARG, __entry->reconfig_type
  1391. )
  1392. );
  1393. #if IS_ENABLED(CONFIG_IPV6)
  1394. DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
  1395. TP_PROTO(struct ieee80211_local *local,
  1396. struct ieee80211_sub_if_data *sdata),
  1397. TP_ARGS(local, sdata)
  1398. );
  1399. #endif
  1400. TRACE_EVENT(drv_join_ibss,
  1401. TP_PROTO(struct ieee80211_local *local,
  1402. struct ieee80211_sub_if_data *sdata,
  1403. struct ieee80211_bss_conf *info),
  1404. TP_ARGS(local, sdata, info),
  1405. TP_STRUCT__entry(
  1406. LOCAL_ENTRY
  1407. VIF_ENTRY
  1408. __field(u8, dtimper)
  1409. __field(u16, bcnint)
  1410. __dynamic_array(u8, ssid, info->ssid_len);
  1411. ),
  1412. TP_fast_assign(
  1413. LOCAL_ASSIGN;
  1414. VIF_ASSIGN;
  1415. __entry->dtimper = info->dtim_period;
  1416. __entry->bcnint = info->beacon_int;
  1417. memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
  1418. ),
  1419. TP_printk(
  1420. LOCAL_PR_FMT VIF_PR_FMT,
  1421. LOCAL_PR_ARG, VIF_PR_ARG
  1422. )
  1423. );
  1424. DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
  1425. TP_PROTO(struct ieee80211_local *local,
  1426. struct ieee80211_sub_if_data *sdata),
  1427. TP_ARGS(local, sdata)
  1428. );
  1429. TRACE_EVENT(drv_get_expected_throughput,
  1430. TP_PROTO(struct ieee80211_sta *sta),
  1431. TP_ARGS(sta),
  1432. TP_STRUCT__entry(
  1433. STA_ENTRY
  1434. ),
  1435. TP_fast_assign(
  1436. STA_ASSIGN;
  1437. ),
  1438. TP_printk(
  1439. STA_PR_FMT, STA_PR_ARG
  1440. )
  1441. );
  1442. TRACE_EVENT(drv_start_nan,
  1443. TP_PROTO(struct ieee80211_local *local,
  1444. struct ieee80211_sub_if_data *sdata,
  1445. struct cfg80211_nan_conf *conf),
  1446. TP_ARGS(local, sdata, conf),
  1447. TP_STRUCT__entry(
  1448. LOCAL_ENTRY
  1449. VIF_ENTRY
  1450. __field(u8, master_pref)
  1451. __field(u8, dual)
  1452. ),
  1453. TP_fast_assign(
  1454. LOCAL_ASSIGN;
  1455. VIF_ASSIGN;
  1456. __entry->master_pref = conf->master_pref;
  1457. __entry->dual = conf->dual;
  1458. ),
  1459. TP_printk(
  1460. LOCAL_PR_FMT VIF_PR_FMT
  1461. ", master preference: %u, dual: %d",
  1462. LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
  1463. __entry->dual
  1464. )
  1465. );
  1466. TRACE_EVENT(drv_stop_nan,
  1467. TP_PROTO(struct ieee80211_local *local,
  1468. struct ieee80211_sub_if_data *sdata),
  1469. TP_ARGS(local, sdata),
  1470. TP_STRUCT__entry(
  1471. LOCAL_ENTRY
  1472. VIF_ENTRY
  1473. ),
  1474. TP_fast_assign(
  1475. LOCAL_ASSIGN;
  1476. VIF_ASSIGN;
  1477. ),
  1478. TP_printk(
  1479. LOCAL_PR_FMT VIF_PR_FMT,
  1480. LOCAL_PR_ARG, VIF_PR_ARG
  1481. )
  1482. );
  1483. TRACE_EVENT(drv_nan_change_conf,
  1484. TP_PROTO(struct ieee80211_local *local,
  1485. struct ieee80211_sub_if_data *sdata,
  1486. struct cfg80211_nan_conf *conf,
  1487. u32 changes),
  1488. TP_ARGS(local, sdata, conf, changes),
  1489. TP_STRUCT__entry(
  1490. LOCAL_ENTRY
  1491. VIF_ENTRY
  1492. __field(u8, master_pref)
  1493. __field(u8, dual)
  1494. __field(u32, changes)
  1495. ),
  1496. TP_fast_assign(
  1497. LOCAL_ASSIGN;
  1498. VIF_ASSIGN;
  1499. __entry->master_pref = conf->master_pref;
  1500. __entry->dual = conf->dual;
  1501. __entry->changes = changes;
  1502. ),
  1503. TP_printk(
  1504. LOCAL_PR_FMT VIF_PR_FMT
  1505. ", master preference: %u, dual: %d, changes: 0x%x",
  1506. LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
  1507. __entry->dual, __entry->changes
  1508. )
  1509. );
  1510. TRACE_EVENT(drv_add_nan_func,
  1511. TP_PROTO(struct ieee80211_local *local,
  1512. struct ieee80211_sub_if_data *sdata,
  1513. const struct cfg80211_nan_func *func),
  1514. TP_ARGS(local, sdata, func),
  1515. TP_STRUCT__entry(
  1516. LOCAL_ENTRY
  1517. VIF_ENTRY
  1518. __field(u8, type)
  1519. __field(u8, inst_id)
  1520. ),
  1521. TP_fast_assign(
  1522. LOCAL_ASSIGN;
  1523. VIF_ASSIGN;
  1524. __entry->type = func->type;
  1525. __entry->inst_id = func->instance_id;
  1526. ),
  1527. TP_printk(
  1528. LOCAL_PR_FMT VIF_PR_FMT
  1529. ", type: %u, inst_id: %u",
  1530. LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
  1531. )
  1532. );
  1533. TRACE_EVENT(drv_del_nan_func,
  1534. TP_PROTO(struct ieee80211_local *local,
  1535. struct ieee80211_sub_if_data *sdata,
  1536. u8 instance_id),
  1537. TP_ARGS(local, sdata, instance_id),
  1538. TP_STRUCT__entry(
  1539. LOCAL_ENTRY
  1540. VIF_ENTRY
  1541. __field(u8, instance_id)
  1542. ),
  1543. TP_fast_assign(
  1544. LOCAL_ASSIGN;
  1545. VIF_ASSIGN;
  1546. __entry->instance_id = instance_id;
  1547. ),
  1548. TP_printk(
  1549. LOCAL_PR_FMT VIF_PR_FMT
  1550. ", instance_id: %u",
  1551. LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
  1552. )
  1553. );
  1554. /*
  1555. * Tracing for API calls that drivers call.
  1556. */
  1557. TRACE_EVENT(api_start_tx_ba_session,
  1558. TP_PROTO(struct ieee80211_sta *sta, u16 tid),
  1559. TP_ARGS(sta, tid),
  1560. TP_STRUCT__entry(
  1561. STA_ENTRY
  1562. __field(u16, tid)
  1563. ),
  1564. TP_fast_assign(
  1565. STA_ASSIGN;
  1566. __entry->tid = tid;
  1567. ),
  1568. TP_printk(
  1569. STA_PR_FMT " tid:%d",
  1570. STA_PR_ARG, __entry->tid
  1571. )
  1572. );
  1573. TRACE_EVENT(api_start_tx_ba_cb,
  1574. TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  1575. TP_ARGS(sdata, ra, tid),
  1576. TP_STRUCT__entry(
  1577. VIF_ENTRY
  1578. __array(u8, ra, ETH_ALEN)
  1579. __field(u16, tid)
  1580. ),
  1581. TP_fast_assign(
  1582. VIF_ASSIGN;
  1583. memcpy(__entry->ra, ra, ETH_ALEN);
  1584. __entry->tid = tid;
  1585. ),
  1586. TP_printk(
  1587. VIF_PR_FMT " ra:%pM tid:%d",
  1588. VIF_PR_ARG, __entry->ra, __entry->tid
  1589. )
  1590. );
  1591. TRACE_EVENT(api_stop_tx_ba_session,
  1592. TP_PROTO(struct ieee80211_sta *sta, u16 tid),
  1593. TP_ARGS(sta, tid),
  1594. TP_STRUCT__entry(
  1595. STA_ENTRY
  1596. __field(u16, tid)
  1597. ),
  1598. TP_fast_assign(
  1599. STA_ASSIGN;
  1600. __entry->tid = tid;
  1601. ),
  1602. TP_printk(
  1603. STA_PR_FMT " tid:%d",
  1604. STA_PR_ARG, __entry->tid
  1605. )
  1606. );
  1607. TRACE_EVENT(api_stop_tx_ba_cb,
  1608. TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  1609. TP_ARGS(sdata, ra, tid),
  1610. TP_STRUCT__entry(
  1611. VIF_ENTRY
  1612. __array(u8, ra, ETH_ALEN)
  1613. __field(u16, tid)
  1614. ),
  1615. TP_fast_assign(
  1616. VIF_ASSIGN;
  1617. memcpy(__entry->ra, ra, ETH_ALEN);
  1618. __entry->tid = tid;
  1619. ),
  1620. TP_printk(
  1621. VIF_PR_FMT " ra:%pM tid:%d",
  1622. VIF_PR_ARG, __entry->ra, __entry->tid
  1623. )
  1624. );
  1625. DEFINE_EVENT(local_only_evt, api_restart_hw,
  1626. TP_PROTO(struct ieee80211_local *local),
  1627. TP_ARGS(local)
  1628. );
  1629. TRACE_EVENT(api_beacon_loss,
  1630. TP_PROTO(struct ieee80211_sub_if_data *sdata),
  1631. TP_ARGS(sdata),
  1632. TP_STRUCT__entry(
  1633. VIF_ENTRY
  1634. ),
  1635. TP_fast_assign(
  1636. VIF_ASSIGN;
  1637. ),
  1638. TP_printk(
  1639. VIF_PR_FMT,
  1640. VIF_PR_ARG
  1641. )
  1642. );
  1643. TRACE_EVENT(api_connection_loss,
  1644. TP_PROTO(struct ieee80211_sub_if_data *sdata),
  1645. TP_ARGS(sdata),
  1646. TP_STRUCT__entry(
  1647. VIF_ENTRY
  1648. ),
  1649. TP_fast_assign(
  1650. VIF_ASSIGN;
  1651. ),
  1652. TP_printk(
  1653. VIF_PR_FMT,
  1654. VIF_PR_ARG
  1655. )
  1656. );
  1657. TRACE_EVENT(api_cqm_rssi_notify,
  1658. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1659. enum nl80211_cqm_rssi_threshold_event rssi_event),
  1660. TP_ARGS(sdata, rssi_event),
  1661. TP_STRUCT__entry(
  1662. VIF_ENTRY
  1663. __field(u32, rssi_event)
  1664. ),
  1665. TP_fast_assign(
  1666. VIF_ASSIGN;
  1667. __entry->rssi_event = rssi_event;
  1668. ),
  1669. TP_printk(
  1670. VIF_PR_FMT " event:%d",
  1671. VIF_PR_ARG, __entry->rssi_event
  1672. )
  1673. );
  1674. DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
  1675. TP_PROTO(struct ieee80211_local *local,
  1676. struct ieee80211_sub_if_data *sdata),
  1677. TP_ARGS(local, sdata)
  1678. );
  1679. TRACE_EVENT(api_scan_completed,
  1680. TP_PROTO(struct ieee80211_local *local, bool aborted),
  1681. TP_ARGS(local, aborted),
  1682. TP_STRUCT__entry(
  1683. LOCAL_ENTRY
  1684. __field(bool, aborted)
  1685. ),
  1686. TP_fast_assign(
  1687. LOCAL_ASSIGN;
  1688. __entry->aborted = aborted;
  1689. ),
  1690. TP_printk(
  1691. LOCAL_PR_FMT " aborted:%d",
  1692. LOCAL_PR_ARG, __entry->aborted
  1693. )
  1694. );
  1695. TRACE_EVENT(api_sched_scan_results,
  1696. TP_PROTO(struct ieee80211_local *local),
  1697. TP_ARGS(local),
  1698. TP_STRUCT__entry(
  1699. LOCAL_ENTRY
  1700. ),
  1701. TP_fast_assign(
  1702. LOCAL_ASSIGN;
  1703. ),
  1704. TP_printk(
  1705. LOCAL_PR_FMT, LOCAL_PR_ARG
  1706. )
  1707. );
  1708. TRACE_EVENT(api_sched_scan_stopped,
  1709. TP_PROTO(struct ieee80211_local *local),
  1710. TP_ARGS(local),
  1711. TP_STRUCT__entry(
  1712. LOCAL_ENTRY
  1713. ),
  1714. TP_fast_assign(
  1715. LOCAL_ASSIGN;
  1716. ),
  1717. TP_printk(
  1718. LOCAL_PR_FMT, LOCAL_PR_ARG
  1719. )
  1720. );
  1721. TRACE_EVENT(api_sta_block_awake,
  1722. TP_PROTO(struct ieee80211_local *local,
  1723. struct ieee80211_sta *sta, bool block),
  1724. TP_ARGS(local, sta, block),
  1725. TP_STRUCT__entry(
  1726. LOCAL_ENTRY
  1727. STA_ENTRY
  1728. __field(bool, block)
  1729. ),
  1730. TP_fast_assign(
  1731. LOCAL_ASSIGN;
  1732. STA_ASSIGN;
  1733. __entry->block = block;
  1734. ),
  1735. TP_printk(
  1736. LOCAL_PR_FMT STA_PR_FMT " block:%d",
  1737. LOCAL_PR_ARG, STA_PR_ARG, __entry->block
  1738. )
  1739. );
  1740. TRACE_EVENT(api_chswitch_done,
  1741. TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
  1742. TP_ARGS(sdata, success),
  1743. TP_STRUCT__entry(
  1744. VIF_ENTRY
  1745. __field(bool, success)
  1746. ),
  1747. TP_fast_assign(
  1748. VIF_ASSIGN;
  1749. __entry->success = success;
  1750. ),
  1751. TP_printk(
  1752. VIF_PR_FMT " success=%d",
  1753. VIF_PR_ARG, __entry->success
  1754. )
  1755. );
  1756. DEFINE_EVENT(local_only_evt, api_ready_on_channel,
  1757. TP_PROTO(struct ieee80211_local *local),
  1758. TP_ARGS(local)
  1759. );
  1760. DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
  1761. TP_PROTO(struct ieee80211_local *local),
  1762. TP_ARGS(local)
  1763. );
  1764. TRACE_EVENT(api_gtk_rekey_notify,
  1765. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1766. const u8 *bssid, const u8 *replay_ctr),
  1767. TP_ARGS(sdata, bssid, replay_ctr),
  1768. TP_STRUCT__entry(
  1769. VIF_ENTRY
  1770. __array(u8, bssid, ETH_ALEN)
  1771. __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
  1772. ),
  1773. TP_fast_assign(
  1774. VIF_ASSIGN;
  1775. memcpy(__entry->bssid, bssid, ETH_ALEN);
  1776. memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
  1777. ),
  1778. TP_printk(VIF_PR_FMT, VIF_PR_ARG)
  1779. );
  1780. TRACE_EVENT(api_enable_rssi_reports,
  1781. TP_PROTO(struct ieee80211_sub_if_data *sdata,
  1782. int rssi_min_thold, int rssi_max_thold),
  1783. TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
  1784. TP_STRUCT__entry(
  1785. VIF_ENTRY
  1786. __field(int, rssi_min_thold)
  1787. __field(int, rssi_max_thold)
  1788. ),
  1789. TP_fast_assign(
  1790. VIF_ASSIGN;
  1791. __entry->rssi_min_thold = rssi_min_thold;
  1792. __entry->rssi_max_thold = rssi_max_thold;
  1793. ),
  1794. TP_printk(
  1795. VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
  1796. VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
  1797. )
  1798. );
  1799. TRACE_EVENT(api_eosp,
  1800. TP_PROTO(struct ieee80211_local *local,
  1801. struct ieee80211_sta *sta),
  1802. TP_ARGS(local, sta),
  1803. TP_STRUCT__entry(
  1804. LOCAL_ENTRY
  1805. STA_ENTRY
  1806. ),
  1807. TP_fast_assign(
  1808. LOCAL_ASSIGN;
  1809. STA_ASSIGN;
  1810. ),
  1811. TP_printk(
  1812. LOCAL_PR_FMT STA_PR_FMT,
  1813. LOCAL_PR_ARG, STA_PR_ARG
  1814. )
  1815. );
  1816. TRACE_EVENT(api_send_eosp_nullfunc,
  1817. TP_PROTO(struct ieee80211_local *local,
  1818. struct ieee80211_sta *sta,
  1819. u8 tid),
  1820. TP_ARGS(local, sta, tid),
  1821. TP_STRUCT__entry(
  1822. LOCAL_ENTRY
  1823. STA_ENTRY
  1824. __field(u8, tid)
  1825. ),
  1826. TP_fast_assign(
  1827. LOCAL_ASSIGN;
  1828. STA_ASSIGN;
  1829. __entry->tid = tid;
  1830. ),
  1831. TP_printk(
  1832. LOCAL_PR_FMT STA_PR_FMT " tid:%d",
  1833. LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
  1834. )
  1835. );
  1836. TRACE_EVENT(api_sta_set_buffered,
  1837. TP_PROTO(struct ieee80211_local *local,
  1838. struct ieee80211_sta *sta,
  1839. u8 tid, bool buffered),
  1840. TP_ARGS(local, sta, tid, buffered),
  1841. TP_STRUCT__entry(
  1842. LOCAL_ENTRY
  1843. STA_ENTRY
  1844. __field(u8, tid)
  1845. __field(bool, buffered)
  1846. ),
  1847. TP_fast_assign(
  1848. LOCAL_ASSIGN;
  1849. STA_ASSIGN;
  1850. __entry->tid = tid;
  1851. __entry->buffered = buffered;
  1852. ),
  1853. TP_printk(
  1854. LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
  1855. LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
  1856. )
  1857. );
  1858. /*
  1859. * Tracing for internal functions
  1860. * (which may also be called in response to driver calls)
  1861. */
  1862. TRACE_EVENT(wake_queue,
  1863. TP_PROTO(struct ieee80211_local *local, u16 queue,
  1864. enum queue_stop_reason reason),
  1865. TP_ARGS(local, queue, reason),
  1866. TP_STRUCT__entry(
  1867. LOCAL_ENTRY
  1868. __field(u16, queue)
  1869. __field(u32, reason)
  1870. ),
  1871. TP_fast_assign(
  1872. LOCAL_ASSIGN;
  1873. __entry->queue = queue;
  1874. __entry->reason = reason;
  1875. ),
  1876. TP_printk(
  1877. LOCAL_PR_FMT " queue:%d, reason:%d",
  1878. LOCAL_PR_ARG, __entry->queue, __entry->reason
  1879. )
  1880. );
  1881. TRACE_EVENT(stop_queue,
  1882. TP_PROTO(struct ieee80211_local *local, u16 queue,
  1883. enum queue_stop_reason reason),
  1884. TP_ARGS(local, queue, reason),
  1885. TP_STRUCT__entry(
  1886. LOCAL_ENTRY
  1887. __field(u16, queue)
  1888. __field(u32, reason)
  1889. ),
  1890. TP_fast_assign(
  1891. LOCAL_ASSIGN;
  1892. __entry->queue = queue;
  1893. __entry->reason = reason;
  1894. ),
  1895. TP_printk(
  1896. LOCAL_PR_FMT " queue:%d, reason:%d",
  1897. LOCAL_PR_ARG, __entry->queue, __entry->reason
  1898. )
  1899. );
  1900. TRACE_EVENT(drv_set_default_unicast_key,
  1901. TP_PROTO(struct ieee80211_local *local,
  1902. struct ieee80211_sub_if_data *sdata,
  1903. int key_idx),
  1904. TP_ARGS(local, sdata, key_idx),
  1905. TP_STRUCT__entry(
  1906. LOCAL_ENTRY
  1907. VIF_ENTRY
  1908. __field(int, key_idx)
  1909. ),
  1910. TP_fast_assign(
  1911. LOCAL_ASSIGN;
  1912. VIF_ASSIGN;
  1913. __entry->key_idx = key_idx;
  1914. ),
  1915. TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
  1916. LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
  1917. );
  1918. TRACE_EVENT(api_radar_detected,
  1919. TP_PROTO(struct ieee80211_local *local),
  1920. TP_ARGS(local),
  1921. TP_STRUCT__entry(
  1922. LOCAL_ENTRY
  1923. ),
  1924. TP_fast_assign(
  1925. LOCAL_ASSIGN;
  1926. ),
  1927. TP_printk(
  1928. LOCAL_PR_FMT " radar detected",
  1929. LOCAL_PR_ARG
  1930. )
  1931. );
  1932. TRACE_EVENT(drv_channel_switch_beacon,
  1933. TP_PROTO(struct ieee80211_local *local,
  1934. struct ieee80211_sub_if_data *sdata,
  1935. struct cfg80211_chan_def *chandef),
  1936. TP_ARGS(local, sdata, chandef),
  1937. TP_STRUCT__entry(
  1938. LOCAL_ENTRY
  1939. VIF_ENTRY
  1940. CHANDEF_ENTRY
  1941. ),
  1942. TP_fast_assign(
  1943. LOCAL_ASSIGN;
  1944. VIF_ASSIGN;
  1945. CHANDEF_ASSIGN(chandef);
  1946. ),
  1947. TP_printk(
  1948. LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
  1949. LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
  1950. )
  1951. );
  1952. TRACE_EVENT(drv_pre_channel_switch,
  1953. TP_PROTO(struct ieee80211_local *local,
  1954. struct ieee80211_sub_if_data *sdata,
  1955. struct ieee80211_channel_switch *ch_switch),
  1956. TP_ARGS(local, sdata, ch_switch),
  1957. TP_STRUCT__entry(
  1958. LOCAL_ENTRY
  1959. VIF_ENTRY
  1960. CHANDEF_ENTRY
  1961. __field(u64, timestamp)
  1962. __field(u32, device_timestamp)
  1963. __field(bool, block_tx)
  1964. __field(u8, count)
  1965. ),
  1966. TP_fast_assign(
  1967. LOCAL_ASSIGN;
  1968. VIF_ASSIGN;
  1969. CHANDEF_ASSIGN(&ch_switch->chandef)
  1970. __entry->timestamp = ch_switch->timestamp;
  1971. __entry->device_timestamp = ch_switch->device_timestamp;
  1972. __entry->block_tx = ch_switch->block_tx;
  1973. __entry->count = ch_switch->count;
  1974. ),
  1975. TP_printk(
  1976. LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
  1977. CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
  1978. LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
  1979. __entry->block_tx, __entry->timestamp
  1980. )
  1981. );
  1982. DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
  1983. TP_PROTO(struct ieee80211_local *local,
  1984. struct ieee80211_sub_if_data *sdata),
  1985. TP_ARGS(local, sdata)
  1986. );
  1987. TRACE_EVENT(drv_get_txpower,
  1988. TP_PROTO(struct ieee80211_local *local,
  1989. struct ieee80211_sub_if_data *sdata,
  1990. int dbm, int ret),
  1991. TP_ARGS(local, sdata, dbm, ret),
  1992. TP_STRUCT__entry(
  1993. LOCAL_ENTRY
  1994. VIF_ENTRY
  1995. __field(int, dbm)
  1996. __field(int, ret)
  1997. ),
  1998. TP_fast_assign(
  1999. LOCAL_ASSIGN;
  2000. VIF_ASSIGN;
  2001. __entry->dbm = dbm;
  2002. __entry->ret = ret;
  2003. ),
  2004. TP_printk(
  2005. LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
  2006. LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
  2007. )
  2008. );
  2009. TRACE_EVENT(drv_tdls_channel_switch,
  2010. TP_PROTO(struct ieee80211_local *local,
  2011. struct ieee80211_sub_if_data *sdata,
  2012. struct ieee80211_sta *sta, u8 oper_class,
  2013. struct cfg80211_chan_def *chandef),
  2014. TP_ARGS(local, sdata, sta, oper_class, chandef),
  2015. TP_STRUCT__entry(
  2016. LOCAL_ENTRY
  2017. VIF_ENTRY
  2018. STA_ENTRY
  2019. __field(u8, oper_class)
  2020. CHANDEF_ENTRY
  2021. ),
  2022. TP_fast_assign(
  2023. LOCAL_ASSIGN;
  2024. VIF_ASSIGN;
  2025. STA_ASSIGN;
  2026. __entry->oper_class = oper_class;
  2027. CHANDEF_ASSIGN(chandef)
  2028. ),
  2029. TP_printk(
  2030. LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
  2031. CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
  2032. LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
  2033. STA_PR_ARG
  2034. )
  2035. );
  2036. TRACE_EVENT(drv_tdls_cancel_channel_switch,
  2037. TP_PROTO(struct ieee80211_local *local,
  2038. struct ieee80211_sub_if_data *sdata,
  2039. struct ieee80211_sta *sta),
  2040. TP_ARGS(local, sdata, sta),
  2041. TP_STRUCT__entry(
  2042. LOCAL_ENTRY
  2043. VIF_ENTRY
  2044. STA_ENTRY
  2045. ),
  2046. TP_fast_assign(
  2047. LOCAL_ASSIGN;
  2048. VIF_ASSIGN;
  2049. STA_ASSIGN;
  2050. ),
  2051. TP_printk(
  2052. LOCAL_PR_FMT VIF_PR_FMT
  2053. " tdls cancel channel switch with " STA_PR_FMT,
  2054. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  2055. )
  2056. );
  2057. TRACE_EVENT(drv_tdls_recv_channel_switch,
  2058. TP_PROTO(struct ieee80211_local *local,
  2059. struct ieee80211_sub_if_data *sdata,
  2060. struct ieee80211_tdls_ch_sw_params *params),
  2061. TP_ARGS(local, sdata, params),
  2062. TP_STRUCT__entry(
  2063. LOCAL_ENTRY
  2064. VIF_ENTRY
  2065. __field(u8, action_code)
  2066. STA_ENTRY
  2067. CHANDEF_ENTRY
  2068. __field(u32, status)
  2069. __field(bool, peer_initiator)
  2070. __field(u32, timestamp)
  2071. __field(u16, switch_time)
  2072. __field(u16, switch_timeout)
  2073. ),
  2074. TP_fast_assign(
  2075. LOCAL_ASSIGN;
  2076. VIF_ASSIGN;
  2077. STA_NAMED_ASSIGN(params->sta);
  2078. CHANDEF_ASSIGN(params->chandef)
  2079. __entry->peer_initiator = params->sta->tdls_initiator;
  2080. __entry->action_code = params->action_code;
  2081. __entry->status = params->status;
  2082. __entry->timestamp = params->timestamp;
  2083. __entry->switch_time = params->switch_time;
  2084. __entry->switch_timeout = params->switch_timeout;
  2085. ),
  2086. TP_printk(
  2087. LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
  2088. " action:%d status:%d time:%d switch time:%d switch"
  2089. " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
  2090. LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
  2091. __entry->timestamp, __entry->switch_time,
  2092. __entry->switch_timeout, __entry->peer_initiator,
  2093. CHANDEF_PR_ARG, STA_PR_ARG
  2094. )
  2095. );
  2096. TRACE_EVENT(drv_wake_tx_queue,
  2097. TP_PROTO(struct ieee80211_local *local,
  2098. struct ieee80211_sub_if_data *sdata,
  2099. struct txq_info *txq),
  2100. TP_ARGS(local, sdata, txq),
  2101. TP_STRUCT__entry(
  2102. LOCAL_ENTRY
  2103. VIF_ENTRY
  2104. STA_ENTRY
  2105. __field(u8, ac)
  2106. __field(u8, tid)
  2107. ),
  2108. TP_fast_assign(
  2109. struct ieee80211_sta *sta = txq->txq.sta;
  2110. LOCAL_ASSIGN;
  2111. VIF_ASSIGN;
  2112. STA_ASSIGN;
  2113. __entry->ac = txq->txq.ac;
  2114. __entry->tid = txq->txq.tid;
  2115. ),
  2116. TP_printk(
  2117. LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
  2118. LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
  2119. )
  2120. );
  2121. #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
  2122. #undef TRACE_INCLUDE_PATH
  2123. #define TRACE_INCLUDE_PATH .
  2124. #undef TRACE_INCLUDE_FILE
  2125. #define TRACE_INCLUDE_FILE trace
  2126. #include <trace/define_trace.h>