trace.h 54 KB

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