trace.h 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM cfg80211
  3. #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
  4. #define __RDEV_OPS_TRACE
  5. #include <linux/tracepoint.h>
  6. #include <linux/rtnetlink.h>
  7. #include <linux/etherdevice.h>
  8. #include <net/cfg80211.h>
  9. #include "core.h"
  10. #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
  11. #define MAC_ASSIGN(entry_mac, given_mac) do { \
  12. if (given_mac) \
  13. memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
  14. else \
  15. eth_zero_addr(__entry->entry_mac); \
  16. } while (0)
  17. #define MAC_PR_FMT "%pM"
  18. #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
  19. #define MAXNAME 32
  20. #define WIPHY_ENTRY __array(char, wiphy_name, 32)
  21. #define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
  22. #define WIPHY_PR_FMT "%s"
  23. #define WIPHY_PR_ARG __entry->wiphy_name
  24. #define WDEV_ENTRY __field(u32, id)
  25. #define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
  26. ? wdev->identifier : 0)
  27. #define WDEV_PR_FMT "wdev(%u)"
  28. #define WDEV_PR_ARG (__entry->id)
  29. #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
  30. __field(int, ifindex)
  31. #define NETDEV_ASSIGN \
  32. do { \
  33. memcpy(__entry->name, netdev->name, IFNAMSIZ); \
  34. (__entry->ifindex) = (netdev->ifindex); \
  35. } while (0)
  36. #define NETDEV_PR_FMT "netdev:%s(%d)"
  37. #define NETDEV_PR_ARG __entry->name, __entry->ifindex
  38. #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
  39. __field(u16, dot11MeshConfirmTimeout) \
  40. __field(u16, dot11MeshHoldingTimeout) \
  41. __field(u16, dot11MeshMaxPeerLinks) \
  42. __field(u8, dot11MeshMaxRetries) \
  43. __field(u8, dot11MeshTTL) \
  44. __field(u8, element_ttl) \
  45. __field(bool, auto_open_plinks) \
  46. __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
  47. __field(u8, dot11MeshHWMPmaxPREQretries) \
  48. __field(u32, path_refresh_time) \
  49. __field(u32, dot11MeshHWMPactivePathTimeout) \
  50. __field(u16, min_discovery_timeout) \
  51. __field(u16, dot11MeshHWMPpreqMinInterval) \
  52. __field(u16, dot11MeshHWMPperrMinInterval) \
  53. __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
  54. __field(u8, dot11MeshHWMPRootMode) \
  55. __field(u16, dot11MeshHWMPRannInterval) \
  56. __field(bool, dot11MeshGateAnnouncementProtocol) \
  57. __field(bool, dot11MeshForwarding) \
  58. __field(s32, rssi_threshold) \
  59. __field(u16, ht_opmode) \
  60. __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
  61. __field(u16, dot11MeshHWMProotInterval) \
  62. __field(u16, dot11MeshHWMPconfirmationInterval)
  63. #define MESH_CFG_ASSIGN \
  64. do { \
  65. __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
  66. __entry->dot11MeshConfirmTimeout = \
  67. conf->dot11MeshConfirmTimeout; \
  68. __entry->dot11MeshHoldingTimeout = \
  69. conf->dot11MeshHoldingTimeout; \
  70. __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
  71. __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
  72. __entry->dot11MeshTTL = conf->dot11MeshTTL; \
  73. __entry->element_ttl = conf->element_ttl; \
  74. __entry->auto_open_plinks = conf->auto_open_plinks; \
  75. __entry->dot11MeshNbrOffsetMaxNeighbor = \
  76. conf->dot11MeshNbrOffsetMaxNeighbor; \
  77. __entry->dot11MeshHWMPmaxPREQretries = \
  78. conf->dot11MeshHWMPmaxPREQretries; \
  79. __entry->path_refresh_time = conf->path_refresh_time; \
  80. __entry->dot11MeshHWMPactivePathTimeout = \
  81. conf->dot11MeshHWMPactivePathTimeout; \
  82. __entry->min_discovery_timeout = conf->min_discovery_timeout; \
  83. __entry->dot11MeshHWMPpreqMinInterval = \
  84. conf->dot11MeshHWMPpreqMinInterval; \
  85. __entry->dot11MeshHWMPperrMinInterval = \
  86. conf->dot11MeshHWMPperrMinInterval; \
  87. __entry->dot11MeshHWMPnetDiameterTraversalTime = \
  88. conf->dot11MeshHWMPnetDiameterTraversalTime; \
  89. __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
  90. __entry->dot11MeshHWMPRannInterval = \
  91. conf->dot11MeshHWMPRannInterval; \
  92. __entry->dot11MeshGateAnnouncementProtocol = \
  93. conf->dot11MeshGateAnnouncementProtocol; \
  94. __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
  95. __entry->rssi_threshold = conf->rssi_threshold; \
  96. __entry->ht_opmode = conf->ht_opmode; \
  97. __entry->dot11MeshHWMPactivePathToRootTimeout = \
  98. conf->dot11MeshHWMPactivePathToRootTimeout; \
  99. __entry->dot11MeshHWMProotInterval = \
  100. conf->dot11MeshHWMProotInterval; \
  101. __entry->dot11MeshHWMPconfirmationInterval = \
  102. conf->dot11MeshHWMPconfirmationInterval; \
  103. } while (0)
  104. #define CHAN_ENTRY __field(enum nl80211_band, band) \
  105. __field(u16, center_freq)
  106. #define CHAN_ASSIGN(chan) \
  107. do { \
  108. if (chan) { \
  109. __entry->band = chan->band; \
  110. __entry->center_freq = chan->center_freq; \
  111. } else { \
  112. __entry->band = 0; \
  113. __entry->center_freq = 0; \
  114. } \
  115. } while (0)
  116. #define CHAN_PR_FMT "band: %d, freq: %u"
  117. #define CHAN_PR_ARG __entry->band, __entry->center_freq
  118. #define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \
  119. __field(u32, control_freq) \
  120. __field(u32, width) \
  121. __field(u32, center_freq1) \
  122. __field(u32, center_freq2)
  123. #define CHAN_DEF_ASSIGN(chandef) \
  124. do { \
  125. if ((chandef) && (chandef)->chan) { \
  126. __entry->band = (chandef)->chan->band; \
  127. __entry->control_freq = \
  128. (chandef)->chan->center_freq; \
  129. __entry->width = (chandef)->width; \
  130. __entry->center_freq1 = (chandef)->center_freq1;\
  131. __entry->center_freq2 = (chandef)->center_freq2;\
  132. } else { \
  133. __entry->band = 0; \
  134. __entry->control_freq = 0; \
  135. __entry->width = 0; \
  136. __entry->center_freq1 = 0; \
  137. __entry->center_freq2 = 0; \
  138. } \
  139. } while (0)
  140. #define CHAN_DEF_PR_FMT \
  141. "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
  142. #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
  143. __entry->width, __entry->center_freq1, \
  144. __entry->center_freq2
  145. #define SINFO_ENTRY __field(int, generation) \
  146. __field(u32, connected_time) \
  147. __field(u32, inactive_time) \
  148. __field(u32, rx_bytes) \
  149. __field(u32, tx_bytes) \
  150. __field(u32, rx_packets) \
  151. __field(u32, tx_packets) \
  152. __field(u32, tx_retries) \
  153. __field(u32, tx_failed) \
  154. __field(u32, rx_dropped_misc) \
  155. __field(u32, beacon_loss_count) \
  156. __field(u16, llid) \
  157. __field(u16, plid) \
  158. __field(u8, plink_state)
  159. #define SINFO_ASSIGN \
  160. do { \
  161. __entry->generation = sinfo->generation; \
  162. __entry->connected_time = sinfo->connected_time; \
  163. __entry->inactive_time = sinfo->inactive_time; \
  164. __entry->rx_bytes = sinfo->rx_bytes; \
  165. __entry->tx_bytes = sinfo->tx_bytes; \
  166. __entry->rx_packets = sinfo->rx_packets; \
  167. __entry->tx_packets = sinfo->tx_packets; \
  168. __entry->tx_retries = sinfo->tx_retries; \
  169. __entry->tx_failed = sinfo->tx_failed; \
  170. __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
  171. __entry->beacon_loss_count = sinfo->beacon_loss_count; \
  172. __entry->llid = sinfo->llid; \
  173. __entry->plid = sinfo->plid; \
  174. __entry->plink_state = sinfo->plink_state; \
  175. } while (0)
  176. #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
  177. #define QOS_MAP_ENTRY __field(u8, num_des) \
  178. __array(u8, dscp_exception, \
  179. 2 * IEEE80211_QOS_MAP_MAX_EX) \
  180. __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
  181. #define QOS_MAP_ASSIGN(qos_map) \
  182. do { \
  183. if ((qos_map)) { \
  184. __entry->num_des = (qos_map)->num_des; \
  185. memcpy(__entry->dscp_exception, \
  186. &(qos_map)->dscp_exception, \
  187. 2 * IEEE80211_QOS_MAP_MAX_EX); \
  188. memcpy(__entry->up, &(qos_map)->up, \
  189. IEEE80211_QOS_MAP_LEN_MIN); \
  190. } else { \
  191. __entry->num_des = 0; \
  192. memset(__entry->dscp_exception, 0, \
  193. 2 * IEEE80211_QOS_MAP_MAX_EX); \
  194. memset(__entry->up, 0, \
  195. IEEE80211_QOS_MAP_LEN_MIN); \
  196. } \
  197. } while (0)
  198. /*************************************************************
  199. * rdev->ops traces *
  200. *************************************************************/
  201. TRACE_EVENT(rdev_suspend,
  202. TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
  203. TP_ARGS(wiphy, wow),
  204. TP_STRUCT__entry(
  205. WIPHY_ENTRY
  206. __field(bool, any)
  207. __field(bool, disconnect)
  208. __field(bool, magic_pkt)
  209. __field(bool, gtk_rekey_failure)
  210. __field(bool, eap_identity_req)
  211. __field(bool, four_way_handshake)
  212. __field(bool, rfkill_release)
  213. __field(bool, valid_wow)
  214. ),
  215. TP_fast_assign(
  216. WIPHY_ASSIGN;
  217. if (wow) {
  218. __entry->any = wow->any;
  219. __entry->disconnect = wow->disconnect;
  220. __entry->magic_pkt = wow->magic_pkt;
  221. __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
  222. __entry->eap_identity_req = wow->eap_identity_req;
  223. __entry->four_way_handshake = wow->four_way_handshake;
  224. __entry->rfkill_release = wow->rfkill_release;
  225. __entry->valid_wow = true;
  226. } else {
  227. __entry->valid_wow = false;
  228. }
  229. ),
  230. TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
  231. "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
  232. "four way handshake: %d, rfkill release: %d.",
  233. WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
  234. __entry->any, __entry->disconnect, __entry->magic_pkt,
  235. __entry->gtk_rekey_failure, __entry->eap_identity_req,
  236. __entry->four_way_handshake, __entry->rfkill_release)
  237. );
  238. TRACE_EVENT(rdev_return_int,
  239. TP_PROTO(struct wiphy *wiphy, int ret),
  240. TP_ARGS(wiphy, ret),
  241. TP_STRUCT__entry(
  242. WIPHY_ENTRY
  243. __field(int, ret)
  244. ),
  245. TP_fast_assign(
  246. WIPHY_ASSIGN;
  247. __entry->ret = ret;
  248. ),
  249. TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
  250. );
  251. TRACE_EVENT(rdev_scan,
  252. TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
  253. TP_ARGS(wiphy, request),
  254. TP_STRUCT__entry(
  255. WIPHY_ENTRY
  256. ),
  257. TP_fast_assign(
  258. WIPHY_ASSIGN;
  259. ),
  260. TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
  261. );
  262. DECLARE_EVENT_CLASS(wiphy_only_evt,
  263. TP_PROTO(struct wiphy *wiphy),
  264. TP_ARGS(wiphy),
  265. TP_STRUCT__entry(
  266. WIPHY_ENTRY
  267. ),
  268. TP_fast_assign(
  269. WIPHY_ASSIGN;
  270. ),
  271. TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
  272. );
  273. DEFINE_EVENT(wiphy_only_evt, rdev_resume,
  274. TP_PROTO(struct wiphy *wiphy),
  275. TP_ARGS(wiphy)
  276. );
  277. DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
  278. TP_PROTO(struct wiphy *wiphy),
  279. TP_ARGS(wiphy)
  280. );
  281. DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
  282. TP_PROTO(struct wiphy *wiphy),
  283. TP_ARGS(wiphy)
  284. );
  285. DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
  286. TP_PROTO(struct wiphy *wiphy),
  287. TP_ARGS(wiphy)
  288. );
  289. DECLARE_EVENT_CLASS(wiphy_enabled_evt,
  290. TP_PROTO(struct wiphy *wiphy, bool enabled),
  291. TP_ARGS(wiphy, enabled),
  292. TP_STRUCT__entry(
  293. WIPHY_ENTRY
  294. __field(bool, enabled)
  295. ),
  296. TP_fast_assign(
  297. WIPHY_ASSIGN;
  298. __entry->enabled = enabled;
  299. ),
  300. TP_printk(WIPHY_PR_FMT ", %senabled ",
  301. WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
  302. );
  303. DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
  304. TP_PROTO(struct wiphy *wiphy, bool enabled),
  305. TP_ARGS(wiphy, enabled)
  306. );
  307. TRACE_EVENT(rdev_add_virtual_intf,
  308. TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
  309. TP_ARGS(wiphy, name, type),
  310. TP_STRUCT__entry(
  311. WIPHY_ENTRY
  312. __string(vir_intf_name, name ? name : "<noname>")
  313. __field(enum nl80211_iftype, type)
  314. ),
  315. TP_fast_assign(
  316. WIPHY_ASSIGN;
  317. __assign_str(vir_intf_name, name ? name : "<noname>");
  318. __entry->type = type;
  319. ),
  320. TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
  321. WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
  322. );
  323. DECLARE_EVENT_CLASS(wiphy_wdev_evt,
  324. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  325. TP_ARGS(wiphy, wdev),
  326. TP_STRUCT__entry(
  327. WIPHY_ENTRY
  328. WDEV_ENTRY
  329. ),
  330. TP_fast_assign(
  331. WIPHY_ASSIGN;
  332. WDEV_ASSIGN;
  333. ),
  334. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
  335. );
  336. DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
  337. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  338. TP_ARGS(wiphy, wdev)
  339. );
  340. DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
  341. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  342. TP_ARGS(wiphy, wdev)
  343. );
  344. TRACE_EVENT(rdev_change_virtual_intf,
  345. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  346. enum nl80211_iftype type),
  347. TP_ARGS(wiphy, netdev, type),
  348. TP_STRUCT__entry(
  349. WIPHY_ENTRY
  350. NETDEV_ENTRY
  351. __field(enum nl80211_iftype, type)
  352. ),
  353. TP_fast_assign(
  354. WIPHY_ASSIGN;
  355. NETDEV_ASSIGN;
  356. __entry->type = type;
  357. ),
  358. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
  359. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
  360. );
  361. DECLARE_EVENT_CLASS(key_handle,
  362. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
  363. bool pairwise, const u8 *mac_addr),
  364. TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
  365. TP_STRUCT__entry(
  366. WIPHY_ENTRY
  367. NETDEV_ENTRY
  368. MAC_ENTRY(mac_addr)
  369. __field(u8, key_index)
  370. __field(bool, pairwise)
  371. ),
  372. TP_fast_assign(
  373. WIPHY_ASSIGN;
  374. NETDEV_ASSIGN;
  375. MAC_ASSIGN(mac_addr, mac_addr);
  376. __entry->key_index = key_index;
  377. __entry->pairwise = pairwise;
  378. ),
  379. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
  380. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
  381. BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
  382. );
  383. DEFINE_EVENT(key_handle, rdev_add_key,
  384. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
  385. bool pairwise, const u8 *mac_addr),
  386. TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
  387. );
  388. DEFINE_EVENT(key_handle, rdev_get_key,
  389. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
  390. bool pairwise, const u8 *mac_addr),
  391. TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
  392. );
  393. DEFINE_EVENT(key_handle, rdev_del_key,
  394. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
  395. bool pairwise, const u8 *mac_addr),
  396. TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
  397. );
  398. TRACE_EVENT(rdev_set_default_key,
  399. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
  400. bool unicast, bool multicast),
  401. TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
  402. TP_STRUCT__entry(
  403. WIPHY_ENTRY
  404. NETDEV_ENTRY
  405. __field(u8, key_index)
  406. __field(bool, unicast)
  407. __field(bool, multicast)
  408. ),
  409. TP_fast_assign(
  410. WIPHY_ASSIGN;
  411. NETDEV_ASSIGN;
  412. __entry->key_index = key_index;
  413. __entry->unicast = unicast;
  414. __entry->multicast = multicast;
  415. ),
  416. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
  417. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
  418. BOOL_TO_STR(__entry->unicast),
  419. BOOL_TO_STR(__entry->multicast))
  420. );
  421. TRACE_EVENT(rdev_set_default_mgmt_key,
  422. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
  423. TP_ARGS(wiphy, netdev, key_index),
  424. TP_STRUCT__entry(
  425. WIPHY_ENTRY
  426. NETDEV_ENTRY
  427. __field(u8, key_index)
  428. ),
  429. TP_fast_assign(
  430. WIPHY_ASSIGN;
  431. NETDEV_ASSIGN;
  432. __entry->key_index = key_index;
  433. ),
  434. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
  435. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
  436. );
  437. TRACE_EVENT(rdev_start_ap,
  438. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  439. struct cfg80211_ap_settings *settings),
  440. TP_ARGS(wiphy, netdev, settings),
  441. TP_STRUCT__entry(
  442. WIPHY_ENTRY
  443. NETDEV_ENTRY
  444. CHAN_DEF_ENTRY
  445. __field(int, beacon_interval)
  446. __field(int, dtim_period)
  447. __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
  448. __field(enum nl80211_hidden_ssid, hidden_ssid)
  449. __field(u32, wpa_ver)
  450. __field(bool, privacy)
  451. __field(enum nl80211_auth_type, auth_type)
  452. __field(int, inactivity_timeout)
  453. ),
  454. TP_fast_assign(
  455. WIPHY_ASSIGN;
  456. NETDEV_ASSIGN;
  457. CHAN_DEF_ASSIGN(&settings->chandef);
  458. __entry->beacon_interval = settings->beacon_interval;
  459. __entry->dtim_period = settings->dtim_period;
  460. __entry->hidden_ssid = settings->hidden_ssid;
  461. __entry->wpa_ver = settings->crypto.wpa_versions;
  462. __entry->privacy = settings->privacy;
  463. __entry->auth_type = settings->auth_type;
  464. __entry->inactivity_timeout = settings->inactivity_timeout;
  465. memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
  466. memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
  467. ),
  468. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
  469. CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
  470. "hidden ssid: %d, wpa versions: %u, privacy: %s, "
  471. "auth type: %d, inactivity timeout: %d",
  472. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
  473. __entry->beacon_interval, __entry->dtim_period,
  474. __entry->hidden_ssid, __entry->wpa_ver,
  475. BOOL_TO_STR(__entry->privacy), __entry->auth_type,
  476. __entry->inactivity_timeout)
  477. );
  478. TRACE_EVENT(rdev_change_beacon,
  479. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  480. struct cfg80211_beacon_data *info),
  481. TP_ARGS(wiphy, netdev, info),
  482. TP_STRUCT__entry(
  483. WIPHY_ENTRY
  484. NETDEV_ENTRY
  485. __dynamic_array(u8, head, info ? info->head_len : 0)
  486. __dynamic_array(u8, tail, info ? info->tail_len : 0)
  487. __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
  488. __dynamic_array(u8, proberesp_ies,
  489. info ? info->proberesp_ies_len : 0)
  490. __dynamic_array(u8, assocresp_ies,
  491. info ? info->assocresp_ies_len : 0)
  492. __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
  493. ),
  494. TP_fast_assign(
  495. WIPHY_ASSIGN;
  496. NETDEV_ASSIGN;
  497. if (info) {
  498. if (info->head)
  499. memcpy(__get_dynamic_array(head), info->head,
  500. info->head_len);
  501. if (info->tail)
  502. memcpy(__get_dynamic_array(tail), info->tail,
  503. info->tail_len);
  504. if (info->beacon_ies)
  505. memcpy(__get_dynamic_array(beacon_ies),
  506. info->beacon_ies, info->beacon_ies_len);
  507. if (info->proberesp_ies)
  508. memcpy(__get_dynamic_array(proberesp_ies),
  509. info->proberesp_ies,
  510. info->proberesp_ies_len);
  511. if (info->assocresp_ies)
  512. memcpy(__get_dynamic_array(assocresp_ies),
  513. info->assocresp_ies,
  514. info->assocresp_ies_len);
  515. if (info->probe_resp)
  516. memcpy(__get_dynamic_array(probe_resp),
  517. info->probe_resp, info->probe_resp_len);
  518. }
  519. ),
  520. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
  521. );
  522. DECLARE_EVENT_CLASS(wiphy_netdev_evt,
  523. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  524. TP_ARGS(wiphy, netdev),
  525. TP_STRUCT__entry(
  526. WIPHY_ENTRY
  527. NETDEV_ENTRY
  528. ),
  529. TP_fast_assign(
  530. WIPHY_ASSIGN;
  531. NETDEV_ASSIGN;
  532. ),
  533. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
  534. );
  535. DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
  536. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  537. TP_ARGS(wiphy, netdev)
  538. );
  539. DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
  540. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  541. TP_ARGS(wiphy, netdev)
  542. );
  543. DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
  544. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  545. TP_ARGS(wiphy, netdev)
  546. );
  547. DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
  548. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  549. TP_ARGS(wiphy, netdev)
  550. );
  551. DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
  552. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  553. TP_ARGS(wiphy, netdev)
  554. );
  555. DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
  556. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  557. TP_ARGS(wiphy, netdev)
  558. );
  559. DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
  560. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  561. TP_ARGS(wiphy, netdev)
  562. );
  563. DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
  564. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
  565. TP_ARGS(wiphy, netdev)
  566. );
  567. DECLARE_EVENT_CLASS(station_add_change,
  568. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
  569. struct station_parameters *params),
  570. TP_ARGS(wiphy, netdev, mac, params),
  571. TP_STRUCT__entry(
  572. WIPHY_ENTRY
  573. NETDEV_ENTRY
  574. MAC_ENTRY(sta_mac)
  575. __field(u32, sta_flags_mask)
  576. __field(u32, sta_flags_set)
  577. __field(u32, sta_modify_mask)
  578. __field(int, listen_interval)
  579. __field(u16, capability)
  580. __field(u16, aid)
  581. __field(u8, plink_action)
  582. __field(u8, plink_state)
  583. __field(u8, uapsd_queues)
  584. __field(u8, max_sp)
  585. __field(u8, opmode_notif)
  586. __field(bool, opmode_notif_used)
  587. __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
  588. __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
  589. __array(char, vlan, IFNAMSIZ)
  590. __dynamic_array(u8, supported_rates,
  591. params->supported_rates_len)
  592. __dynamic_array(u8, ext_capab, params->ext_capab_len)
  593. __dynamic_array(u8, supported_channels,
  594. params->supported_channels_len)
  595. __dynamic_array(u8, supported_oper_classes,
  596. params->supported_oper_classes_len)
  597. ),
  598. TP_fast_assign(
  599. WIPHY_ASSIGN;
  600. NETDEV_ASSIGN;
  601. MAC_ASSIGN(sta_mac, mac);
  602. __entry->sta_flags_mask = params->sta_flags_mask;
  603. __entry->sta_flags_set = params->sta_flags_set;
  604. __entry->sta_modify_mask = params->sta_modify_mask;
  605. __entry->listen_interval = params->listen_interval;
  606. __entry->aid = params->aid;
  607. __entry->plink_action = params->plink_action;
  608. __entry->plink_state = params->plink_state;
  609. __entry->uapsd_queues = params->uapsd_queues;
  610. memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
  611. if (params->ht_capa)
  612. memcpy(__entry->ht_capa, params->ht_capa,
  613. sizeof(struct ieee80211_ht_cap));
  614. memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
  615. if (params->vht_capa)
  616. memcpy(__entry->vht_capa, params->vht_capa,
  617. sizeof(struct ieee80211_vht_cap));
  618. memset(__entry->vlan, 0, sizeof(__entry->vlan));
  619. if (params->vlan)
  620. memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
  621. if (params->supported_rates && params->supported_rates_len)
  622. memcpy(__get_dynamic_array(supported_rates),
  623. params->supported_rates,
  624. params->supported_rates_len);
  625. if (params->ext_capab && params->ext_capab_len)
  626. memcpy(__get_dynamic_array(ext_capab),
  627. params->ext_capab,
  628. params->ext_capab_len);
  629. if (params->supported_channels &&
  630. params->supported_channels_len)
  631. memcpy(__get_dynamic_array(supported_channels),
  632. params->supported_channels,
  633. params->supported_channels_len);
  634. if (params->supported_oper_classes &&
  635. params->supported_oper_classes_len)
  636. memcpy(__get_dynamic_array(supported_oper_classes),
  637. params->supported_oper_classes,
  638. params->supported_oper_classes_len);
  639. __entry->max_sp = params->max_sp;
  640. __entry->capability = params->capability;
  641. __entry->opmode_notif = params->opmode_notif;
  642. __entry->opmode_notif_used = params->opmode_notif_used;
  643. ),
  644. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
  645. ", station flags mask: %u, station flags set: %u, "
  646. "station modify mask: %u, listen interval: %d, aid: %u, "
  647. "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
  648. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
  649. __entry->sta_flags_mask, __entry->sta_flags_set,
  650. __entry->sta_modify_mask, __entry->listen_interval,
  651. __entry->aid, __entry->plink_action, __entry->plink_state,
  652. __entry->uapsd_queues, __entry->vlan)
  653. );
  654. DEFINE_EVENT(station_add_change, rdev_add_station,
  655. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
  656. struct station_parameters *params),
  657. TP_ARGS(wiphy, netdev, mac, params)
  658. );
  659. DEFINE_EVENT(station_add_change, rdev_change_station,
  660. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
  661. struct station_parameters *params),
  662. TP_ARGS(wiphy, netdev, mac, params)
  663. );
  664. DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
  665. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
  666. TP_ARGS(wiphy, netdev, mac),
  667. TP_STRUCT__entry(
  668. WIPHY_ENTRY
  669. NETDEV_ENTRY
  670. MAC_ENTRY(sta_mac)
  671. ),
  672. TP_fast_assign(
  673. WIPHY_ASSIGN;
  674. NETDEV_ASSIGN;
  675. MAC_ASSIGN(sta_mac, mac);
  676. ),
  677. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
  678. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
  679. );
  680. DECLARE_EVENT_CLASS(station_del,
  681. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  682. struct station_del_parameters *params),
  683. TP_ARGS(wiphy, netdev, params),
  684. TP_STRUCT__entry(
  685. WIPHY_ENTRY
  686. NETDEV_ENTRY
  687. MAC_ENTRY(sta_mac)
  688. __field(u8, subtype)
  689. __field(u16, reason_code)
  690. ),
  691. TP_fast_assign(
  692. WIPHY_ASSIGN;
  693. NETDEV_ASSIGN;
  694. MAC_ASSIGN(sta_mac, params->mac);
  695. __entry->subtype = params->subtype;
  696. __entry->reason_code = params->reason_code;
  697. ),
  698. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
  699. ", subtype: %u, reason_code: %u",
  700. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
  701. __entry->subtype, __entry->reason_code)
  702. );
  703. DEFINE_EVENT(station_del, rdev_del_station,
  704. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  705. struct station_del_parameters *params),
  706. TP_ARGS(wiphy, netdev, params)
  707. );
  708. DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
  709. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
  710. TP_ARGS(wiphy, netdev, mac)
  711. );
  712. DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
  713. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
  714. TP_ARGS(wiphy, netdev, mac)
  715. );
  716. DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
  717. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
  718. TP_ARGS(wiphy, netdev, mac)
  719. );
  720. TRACE_EVENT(rdev_dump_station,
  721. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
  722. u8 *mac),
  723. TP_ARGS(wiphy, netdev, idx, mac),
  724. TP_STRUCT__entry(
  725. WIPHY_ENTRY
  726. NETDEV_ENTRY
  727. MAC_ENTRY(sta_mac)
  728. __field(int, idx)
  729. ),
  730. TP_fast_assign(
  731. WIPHY_ASSIGN;
  732. NETDEV_ASSIGN;
  733. MAC_ASSIGN(sta_mac, mac);
  734. __entry->idx = idx;
  735. ),
  736. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
  737. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
  738. __entry->idx)
  739. );
  740. TRACE_EVENT(rdev_return_int_station_info,
  741. TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
  742. TP_ARGS(wiphy, ret, sinfo),
  743. TP_STRUCT__entry(
  744. WIPHY_ENTRY
  745. __field(int, ret)
  746. SINFO_ENTRY
  747. ),
  748. TP_fast_assign(
  749. WIPHY_ASSIGN;
  750. __entry->ret = ret;
  751. SINFO_ASSIGN;
  752. ),
  753. TP_printk(WIPHY_PR_FMT ", returned %d" ,
  754. WIPHY_PR_ARG, __entry->ret)
  755. );
  756. DECLARE_EVENT_CLASS(mpath_evt,
  757. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
  758. u8 *next_hop),
  759. TP_ARGS(wiphy, netdev, dst, next_hop),
  760. TP_STRUCT__entry(
  761. WIPHY_ENTRY
  762. NETDEV_ENTRY
  763. MAC_ENTRY(dst)
  764. MAC_ENTRY(next_hop)
  765. ),
  766. TP_fast_assign(
  767. WIPHY_ASSIGN;
  768. NETDEV_ASSIGN;
  769. MAC_ASSIGN(dst, dst);
  770. MAC_ASSIGN(next_hop, next_hop);
  771. ),
  772. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
  773. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
  774. MAC_PR_ARG(next_hop))
  775. );
  776. DEFINE_EVENT(mpath_evt, rdev_add_mpath,
  777. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
  778. u8 *next_hop),
  779. TP_ARGS(wiphy, netdev, dst, next_hop)
  780. );
  781. DEFINE_EVENT(mpath_evt, rdev_change_mpath,
  782. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
  783. u8 *next_hop),
  784. TP_ARGS(wiphy, netdev, dst, next_hop)
  785. );
  786. DEFINE_EVENT(mpath_evt, rdev_get_mpath,
  787. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
  788. u8 *next_hop),
  789. TP_ARGS(wiphy, netdev, dst, next_hop)
  790. );
  791. TRACE_EVENT(rdev_dump_mpath,
  792. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
  793. u8 *dst, u8 *next_hop),
  794. TP_ARGS(wiphy, netdev, idx, dst, next_hop),
  795. TP_STRUCT__entry(
  796. WIPHY_ENTRY
  797. NETDEV_ENTRY
  798. MAC_ENTRY(dst)
  799. MAC_ENTRY(next_hop)
  800. __field(int, idx)
  801. ),
  802. TP_fast_assign(
  803. WIPHY_ASSIGN;
  804. NETDEV_ASSIGN;
  805. MAC_ASSIGN(dst, dst);
  806. MAC_ASSIGN(next_hop, next_hop);
  807. __entry->idx = idx;
  808. ),
  809. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
  810. MAC_PR_FMT ", next hop: " MAC_PR_FMT,
  811. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
  812. MAC_PR_ARG(next_hop))
  813. );
  814. TRACE_EVENT(rdev_get_mpp,
  815. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  816. u8 *dst, u8 *mpp),
  817. TP_ARGS(wiphy, netdev, dst, mpp),
  818. TP_STRUCT__entry(
  819. WIPHY_ENTRY
  820. NETDEV_ENTRY
  821. MAC_ENTRY(dst)
  822. MAC_ENTRY(mpp)
  823. ),
  824. TP_fast_assign(
  825. WIPHY_ASSIGN;
  826. NETDEV_ASSIGN;
  827. MAC_ASSIGN(dst, dst);
  828. MAC_ASSIGN(mpp, mpp);
  829. ),
  830. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
  831. ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
  832. MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
  833. );
  834. TRACE_EVENT(rdev_dump_mpp,
  835. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
  836. u8 *dst, u8 *mpp),
  837. TP_ARGS(wiphy, netdev, idx, mpp, dst),
  838. TP_STRUCT__entry(
  839. WIPHY_ENTRY
  840. NETDEV_ENTRY
  841. MAC_ENTRY(dst)
  842. MAC_ENTRY(mpp)
  843. __field(int, idx)
  844. ),
  845. TP_fast_assign(
  846. WIPHY_ASSIGN;
  847. NETDEV_ASSIGN;
  848. MAC_ASSIGN(dst, dst);
  849. MAC_ASSIGN(mpp, mpp);
  850. __entry->idx = idx;
  851. ),
  852. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
  853. MAC_PR_FMT ", mpp: " MAC_PR_FMT,
  854. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
  855. MAC_PR_ARG(mpp))
  856. );
  857. TRACE_EVENT(rdev_return_int_mpath_info,
  858. TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
  859. TP_ARGS(wiphy, ret, pinfo),
  860. TP_STRUCT__entry(
  861. WIPHY_ENTRY
  862. __field(int, ret)
  863. __field(int, generation)
  864. __field(u32, filled)
  865. __field(u32, frame_qlen)
  866. __field(u32, sn)
  867. __field(u32, metric)
  868. __field(u32, exptime)
  869. __field(u32, discovery_timeout)
  870. __field(u8, discovery_retries)
  871. __field(u8, flags)
  872. ),
  873. TP_fast_assign(
  874. WIPHY_ASSIGN;
  875. __entry->ret = ret;
  876. __entry->generation = pinfo->generation;
  877. __entry->filled = pinfo->filled;
  878. __entry->frame_qlen = pinfo->frame_qlen;
  879. __entry->sn = pinfo->sn;
  880. __entry->metric = pinfo->metric;
  881. __entry->exptime = pinfo->exptime;
  882. __entry->discovery_timeout = pinfo->discovery_timeout;
  883. __entry->discovery_retries = pinfo->discovery_retries;
  884. __entry->flags = pinfo->flags;
  885. ),
  886. TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
  887. "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
  888. " discovery timeout: %u, discovery retries: %u, flags: %u",
  889. WIPHY_PR_ARG, __entry->ret, __entry->generation,
  890. __entry->filled, __entry->frame_qlen, __entry->sn,
  891. __entry->metric, __entry->exptime, __entry->discovery_timeout,
  892. __entry->discovery_retries, __entry->flags)
  893. );
  894. TRACE_EVENT(rdev_return_int_mesh_config,
  895. TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
  896. TP_ARGS(wiphy, ret, conf),
  897. TP_STRUCT__entry(
  898. WIPHY_ENTRY
  899. MESH_CFG_ENTRY
  900. __field(int, ret)
  901. ),
  902. TP_fast_assign(
  903. WIPHY_ASSIGN;
  904. MESH_CFG_ASSIGN;
  905. __entry->ret = ret;
  906. ),
  907. TP_printk(WIPHY_PR_FMT ", returned: %d",
  908. WIPHY_PR_ARG, __entry->ret)
  909. );
  910. TRACE_EVENT(rdev_update_mesh_config,
  911. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
  912. const struct mesh_config *conf),
  913. TP_ARGS(wiphy, netdev, mask, conf),
  914. TP_STRUCT__entry(
  915. WIPHY_ENTRY
  916. NETDEV_ENTRY
  917. MESH_CFG_ENTRY
  918. __field(u32, mask)
  919. ),
  920. TP_fast_assign(
  921. WIPHY_ASSIGN;
  922. NETDEV_ASSIGN;
  923. MESH_CFG_ASSIGN;
  924. __entry->mask = mask;
  925. ),
  926. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
  927. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
  928. );
  929. TRACE_EVENT(rdev_join_mesh,
  930. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  931. const struct mesh_config *conf,
  932. const struct mesh_setup *setup),
  933. TP_ARGS(wiphy, netdev, conf, setup),
  934. TP_STRUCT__entry(
  935. WIPHY_ENTRY
  936. NETDEV_ENTRY
  937. MESH_CFG_ENTRY
  938. ),
  939. TP_fast_assign(
  940. WIPHY_ASSIGN;
  941. NETDEV_ASSIGN;
  942. MESH_CFG_ASSIGN;
  943. ),
  944. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
  945. WIPHY_PR_ARG, NETDEV_PR_ARG)
  946. );
  947. TRACE_EVENT(rdev_change_bss,
  948. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  949. struct bss_parameters *params),
  950. TP_ARGS(wiphy, netdev, params),
  951. TP_STRUCT__entry(
  952. WIPHY_ENTRY
  953. NETDEV_ENTRY
  954. __field(int, use_cts_prot)
  955. __field(int, use_short_preamble)
  956. __field(int, use_short_slot_time)
  957. __field(int, ap_isolate)
  958. __field(int, ht_opmode)
  959. ),
  960. TP_fast_assign(
  961. WIPHY_ASSIGN;
  962. NETDEV_ASSIGN;
  963. __entry->use_cts_prot = params->use_cts_prot;
  964. __entry->use_short_preamble = params->use_short_preamble;
  965. __entry->use_short_slot_time = params->use_short_slot_time;
  966. __entry->ap_isolate = params->ap_isolate;
  967. __entry->ht_opmode = params->ht_opmode;
  968. ),
  969. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
  970. "use short preamble: %d, use short slot time: %d, "
  971. "ap isolate: %d, ht opmode: %d",
  972. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
  973. __entry->use_short_preamble, __entry->use_short_slot_time,
  974. __entry->ap_isolate, __entry->ht_opmode)
  975. );
  976. TRACE_EVENT(rdev_set_txq_params,
  977. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  978. struct ieee80211_txq_params *params),
  979. TP_ARGS(wiphy, netdev, params),
  980. TP_STRUCT__entry(
  981. WIPHY_ENTRY
  982. NETDEV_ENTRY
  983. __field(enum nl80211_ac, ac)
  984. __field(u16, txop)
  985. __field(u16, cwmin)
  986. __field(u16, cwmax)
  987. __field(u8, aifs)
  988. ),
  989. TP_fast_assign(
  990. WIPHY_ASSIGN;
  991. NETDEV_ASSIGN;
  992. __entry->ac = params->ac;
  993. __entry->txop = params->txop;
  994. __entry->cwmin = params->cwmin;
  995. __entry->cwmax = params->cwmax;
  996. __entry->aifs = params->aifs;
  997. ),
  998. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
  999. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
  1000. __entry->cwmin, __entry->cwmax, __entry->aifs)
  1001. );
  1002. TRACE_EVENT(rdev_libertas_set_mesh_channel,
  1003. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1004. struct ieee80211_channel *chan),
  1005. TP_ARGS(wiphy, netdev, chan),
  1006. TP_STRUCT__entry(
  1007. WIPHY_ENTRY
  1008. NETDEV_ENTRY
  1009. CHAN_ENTRY
  1010. ),
  1011. TP_fast_assign(
  1012. WIPHY_ASSIGN;
  1013. NETDEV_ASSIGN;
  1014. CHAN_ASSIGN(chan);
  1015. ),
  1016. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
  1017. NETDEV_PR_ARG, CHAN_PR_ARG)
  1018. );
  1019. TRACE_EVENT(rdev_set_monitor_channel,
  1020. TP_PROTO(struct wiphy *wiphy,
  1021. struct cfg80211_chan_def *chandef),
  1022. TP_ARGS(wiphy, chandef),
  1023. TP_STRUCT__entry(
  1024. WIPHY_ENTRY
  1025. CHAN_DEF_ENTRY
  1026. ),
  1027. TP_fast_assign(
  1028. WIPHY_ASSIGN;
  1029. CHAN_DEF_ASSIGN(chandef);
  1030. ),
  1031. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
  1032. WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
  1033. );
  1034. TRACE_EVENT(rdev_auth,
  1035. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1036. struct cfg80211_auth_request *req),
  1037. TP_ARGS(wiphy, netdev, req),
  1038. TP_STRUCT__entry(
  1039. WIPHY_ENTRY
  1040. NETDEV_ENTRY
  1041. MAC_ENTRY(bssid)
  1042. __field(enum nl80211_auth_type, auth_type)
  1043. ),
  1044. TP_fast_assign(
  1045. WIPHY_ASSIGN;
  1046. NETDEV_ASSIGN;
  1047. if (req->bss)
  1048. MAC_ASSIGN(bssid, req->bss->bssid);
  1049. else
  1050. eth_zero_addr(__entry->bssid);
  1051. __entry->auth_type = req->auth_type;
  1052. ),
  1053. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
  1054. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
  1055. MAC_PR_ARG(bssid))
  1056. );
  1057. TRACE_EVENT(rdev_assoc,
  1058. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1059. struct cfg80211_assoc_request *req),
  1060. TP_ARGS(wiphy, netdev, req),
  1061. TP_STRUCT__entry(
  1062. WIPHY_ENTRY
  1063. NETDEV_ENTRY
  1064. MAC_ENTRY(bssid)
  1065. MAC_ENTRY(prev_bssid)
  1066. __field(bool, use_mfp)
  1067. __field(u32, flags)
  1068. ),
  1069. TP_fast_assign(
  1070. WIPHY_ASSIGN;
  1071. NETDEV_ASSIGN;
  1072. if (req->bss)
  1073. MAC_ASSIGN(bssid, req->bss->bssid);
  1074. else
  1075. eth_zero_addr(__entry->bssid);
  1076. MAC_ASSIGN(prev_bssid, req->prev_bssid);
  1077. __entry->use_mfp = req->use_mfp;
  1078. __entry->flags = req->flags;
  1079. ),
  1080. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
  1081. ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
  1082. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
  1083. MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
  1084. __entry->flags)
  1085. );
  1086. TRACE_EVENT(rdev_deauth,
  1087. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1088. struct cfg80211_deauth_request *req),
  1089. TP_ARGS(wiphy, netdev, req),
  1090. TP_STRUCT__entry(
  1091. WIPHY_ENTRY
  1092. NETDEV_ENTRY
  1093. MAC_ENTRY(bssid)
  1094. __field(u16, reason_code)
  1095. ),
  1096. TP_fast_assign(
  1097. WIPHY_ASSIGN;
  1098. NETDEV_ASSIGN;
  1099. MAC_ASSIGN(bssid, req->bssid);
  1100. __entry->reason_code = req->reason_code;
  1101. ),
  1102. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
  1103. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
  1104. __entry->reason_code)
  1105. );
  1106. TRACE_EVENT(rdev_disassoc,
  1107. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1108. struct cfg80211_disassoc_request *req),
  1109. TP_ARGS(wiphy, netdev, req),
  1110. TP_STRUCT__entry(
  1111. WIPHY_ENTRY
  1112. NETDEV_ENTRY
  1113. MAC_ENTRY(bssid)
  1114. __field(u16, reason_code)
  1115. __field(bool, local_state_change)
  1116. ),
  1117. TP_fast_assign(
  1118. WIPHY_ASSIGN;
  1119. NETDEV_ASSIGN;
  1120. if (req->bss)
  1121. MAC_ASSIGN(bssid, req->bss->bssid);
  1122. else
  1123. eth_zero_addr(__entry->bssid);
  1124. __entry->reason_code = req->reason_code;
  1125. __entry->local_state_change = req->local_state_change;
  1126. ),
  1127. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
  1128. ", reason: %u, local state change: %s",
  1129. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
  1130. __entry->reason_code,
  1131. BOOL_TO_STR(__entry->local_state_change))
  1132. );
  1133. TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
  1134. TP_PROTO(struct wiphy *wiphy,
  1135. struct wireless_dev *wdev, u64 cookie),
  1136. TP_ARGS(wiphy, wdev, cookie),
  1137. TP_STRUCT__entry(
  1138. WIPHY_ENTRY
  1139. WDEV_ENTRY
  1140. __field(u64, cookie)
  1141. ),
  1142. TP_fast_assign(
  1143. WIPHY_ASSIGN;
  1144. WDEV_ASSIGN;
  1145. __entry->cookie = cookie;
  1146. ),
  1147. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
  1148. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
  1149. );
  1150. TRACE_EVENT(rdev_set_power_mgmt,
  1151. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1152. bool enabled, int timeout),
  1153. TP_ARGS(wiphy, netdev, enabled, timeout),
  1154. TP_STRUCT__entry(
  1155. WIPHY_ENTRY
  1156. NETDEV_ENTRY
  1157. __field(bool, enabled)
  1158. __field(int, timeout)
  1159. ),
  1160. TP_fast_assign(
  1161. WIPHY_ASSIGN;
  1162. NETDEV_ASSIGN;
  1163. __entry->enabled = enabled;
  1164. __entry->timeout = timeout;
  1165. ),
  1166. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
  1167. WIPHY_PR_ARG, NETDEV_PR_ARG,
  1168. __entry->enabled ? "" : "not ", __entry->timeout)
  1169. );
  1170. TRACE_EVENT(rdev_connect,
  1171. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1172. struct cfg80211_connect_params *sme),
  1173. TP_ARGS(wiphy, netdev, sme),
  1174. TP_STRUCT__entry(
  1175. WIPHY_ENTRY
  1176. NETDEV_ENTRY
  1177. MAC_ENTRY(bssid)
  1178. __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
  1179. __field(enum nl80211_auth_type, auth_type)
  1180. __field(bool, privacy)
  1181. __field(u32, wpa_versions)
  1182. __field(u32, flags)
  1183. MAC_ENTRY(prev_bssid)
  1184. ),
  1185. TP_fast_assign(
  1186. WIPHY_ASSIGN;
  1187. NETDEV_ASSIGN;
  1188. MAC_ASSIGN(bssid, sme->bssid);
  1189. memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
  1190. memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
  1191. __entry->auth_type = sme->auth_type;
  1192. __entry->privacy = sme->privacy;
  1193. __entry->wpa_versions = sme->crypto.wpa_versions;
  1194. __entry->flags = sme->flags;
  1195. MAC_ASSIGN(prev_bssid, sme->prev_bssid);
  1196. ),
  1197. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
  1198. ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
  1199. "flags: %u, previous bssid: " MAC_PR_FMT,
  1200. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
  1201. __entry->auth_type, BOOL_TO_STR(__entry->privacy),
  1202. __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
  1203. );
  1204. TRACE_EVENT(rdev_update_connect_params,
  1205. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1206. struct cfg80211_connect_params *sme, u32 changed),
  1207. TP_ARGS(wiphy, netdev, sme, changed),
  1208. TP_STRUCT__entry(
  1209. WIPHY_ENTRY
  1210. NETDEV_ENTRY
  1211. __field(u32, changed)
  1212. ),
  1213. TP_fast_assign(
  1214. WIPHY_ASSIGN;
  1215. NETDEV_ASSIGN;
  1216. __entry->changed = changed;
  1217. ),
  1218. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
  1219. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->changed)
  1220. );
  1221. TRACE_EVENT(rdev_set_cqm_rssi_config,
  1222. TP_PROTO(struct wiphy *wiphy,
  1223. struct net_device *netdev, s32 rssi_thold,
  1224. u32 rssi_hyst),
  1225. TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
  1226. TP_STRUCT__entry(
  1227. WIPHY_ENTRY
  1228. NETDEV_ENTRY
  1229. __field(s32, rssi_thold)
  1230. __field(u32, rssi_hyst)
  1231. ),
  1232. TP_fast_assign(
  1233. WIPHY_ASSIGN;
  1234. NETDEV_ASSIGN;
  1235. __entry->rssi_thold = rssi_thold;
  1236. __entry->rssi_hyst = rssi_hyst;
  1237. ),
  1238. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
  1239. ", rssi_thold: %d, rssi_hyst: %u ",
  1240. WIPHY_PR_ARG, NETDEV_PR_ARG,
  1241. __entry->rssi_thold, __entry->rssi_hyst)
  1242. );
  1243. TRACE_EVENT(rdev_set_cqm_txe_config,
  1244. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
  1245. u32 pkts, u32 intvl),
  1246. TP_ARGS(wiphy, netdev, rate, pkts, intvl),
  1247. TP_STRUCT__entry(
  1248. WIPHY_ENTRY
  1249. NETDEV_ENTRY
  1250. __field(u32, rate)
  1251. __field(u32, pkts)
  1252. __field(u32, intvl)
  1253. ),
  1254. TP_fast_assign(
  1255. WIPHY_ASSIGN;
  1256. NETDEV_ASSIGN;
  1257. __entry->rate = rate;
  1258. __entry->pkts = pkts;
  1259. __entry->intvl = intvl;
  1260. ),
  1261. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
  1262. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
  1263. __entry->intvl)
  1264. );
  1265. TRACE_EVENT(rdev_disconnect,
  1266. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1267. u16 reason_code),
  1268. TP_ARGS(wiphy, netdev, reason_code),
  1269. TP_STRUCT__entry(
  1270. WIPHY_ENTRY
  1271. NETDEV_ENTRY
  1272. __field(u16, reason_code)
  1273. ),
  1274. TP_fast_assign(
  1275. WIPHY_ASSIGN;
  1276. NETDEV_ASSIGN;
  1277. __entry->reason_code = reason_code;
  1278. ),
  1279. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
  1280. NETDEV_PR_ARG, __entry->reason_code)
  1281. );
  1282. TRACE_EVENT(rdev_join_ibss,
  1283. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1284. struct cfg80211_ibss_params *params),
  1285. TP_ARGS(wiphy, netdev, params),
  1286. TP_STRUCT__entry(
  1287. WIPHY_ENTRY
  1288. NETDEV_ENTRY
  1289. MAC_ENTRY(bssid)
  1290. __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
  1291. ),
  1292. TP_fast_assign(
  1293. WIPHY_ASSIGN;
  1294. NETDEV_ASSIGN;
  1295. MAC_ASSIGN(bssid, params->bssid);
  1296. memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
  1297. memcpy(__entry->ssid, params->ssid, params->ssid_len);
  1298. ),
  1299. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
  1300. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
  1301. );
  1302. TRACE_EVENT(rdev_join_ocb,
  1303. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1304. const struct ocb_setup *setup),
  1305. TP_ARGS(wiphy, netdev, setup),
  1306. TP_STRUCT__entry(
  1307. WIPHY_ENTRY
  1308. NETDEV_ENTRY
  1309. ),
  1310. TP_fast_assign(
  1311. WIPHY_ASSIGN;
  1312. NETDEV_ASSIGN;
  1313. ),
  1314. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
  1315. WIPHY_PR_ARG, NETDEV_PR_ARG)
  1316. );
  1317. TRACE_EVENT(rdev_set_wiphy_params,
  1318. TP_PROTO(struct wiphy *wiphy, u32 changed),
  1319. TP_ARGS(wiphy, changed),
  1320. TP_STRUCT__entry(
  1321. WIPHY_ENTRY
  1322. __field(u32, changed)
  1323. ),
  1324. TP_fast_assign(
  1325. WIPHY_ASSIGN;
  1326. __entry->changed = changed;
  1327. ),
  1328. TP_printk(WIPHY_PR_FMT ", changed: %u",
  1329. WIPHY_PR_ARG, __entry->changed)
  1330. );
  1331. DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
  1332. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1333. TP_ARGS(wiphy, wdev)
  1334. );
  1335. TRACE_EVENT(rdev_set_tx_power,
  1336. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1337. enum nl80211_tx_power_setting type, int mbm),
  1338. TP_ARGS(wiphy, wdev, type, mbm),
  1339. TP_STRUCT__entry(
  1340. WIPHY_ENTRY
  1341. WDEV_ENTRY
  1342. __field(enum nl80211_tx_power_setting, type)
  1343. __field(int, mbm)
  1344. ),
  1345. TP_fast_assign(
  1346. WIPHY_ASSIGN;
  1347. WDEV_ASSIGN;
  1348. __entry->type = type;
  1349. __entry->mbm = mbm;
  1350. ),
  1351. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
  1352. WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
  1353. );
  1354. TRACE_EVENT(rdev_return_int_int,
  1355. TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
  1356. TP_ARGS(wiphy, func_ret, func_fill),
  1357. TP_STRUCT__entry(
  1358. WIPHY_ENTRY
  1359. __field(int, func_ret)
  1360. __field(int, func_fill)
  1361. ),
  1362. TP_fast_assign(
  1363. WIPHY_ASSIGN;
  1364. __entry->func_ret = func_ret;
  1365. __entry->func_fill = func_fill;
  1366. ),
  1367. TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
  1368. WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
  1369. );
  1370. #ifdef CONFIG_NL80211_TESTMODE
  1371. TRACE_EVENT(rdev_testmode_cmd,
  1372. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1373. TP_ARGS(wiphy, wdev),
  1374. TP_STRUCT__entry(
  1375. WIPHY_ENTRY
  1376. WDEV_ENTRY
  1377. ),
  1378. TP_fast_assign(
  1379. WIPHY_ASSIGN;
  1380. WDEV_ASSIGN;
  1381. ),
  1382. TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
  1383. );
  1384. TRACE_EVENT(rdev_testmode_dump,
  1385. TP_PROTO(struct wiphy *wiphy),
  1386. TP_ARGS(wiphy),
  1387. TP_STRUCT__entry(
  1388. WIPHY_ENTRY
  1389. ),
  1390. TP_fast_assign(
  1391. WIPHY_ASSIGN;
  1392. ),
  1393. TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
  1394. );
  1395. #endif /* CONFIG_NL80211_TESTMODE */
  1396. TRACE_EVENT(rdev_set_bitrate_mask,
  1397. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1398. const u8 *peer, const struct cfg80211_bitrate_mask *mask),
  1399. TP_ARGS(wiphy, netdev, peer, mask),
  1400. TP_STRUCT__entry(
  1401. WIPHY_ENTRY
  1402. NETDEV_ENTRY
  1403. MAC_ENTRY(peer)
  1404. ),
  1405. TP_fast_assign(
  1406. WIPHY_ASSIGN;
  1407. NETDEV_ASSIGN;
  1408. MAC_ASSIGN(peer, peer);
  1409. ),
  1410. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
  1411. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
  1412. );
  1413. TRACE_EVENT(rdev_mgmt_frame_register,
  1414. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1415. u16 frame_type, bool reg),
  1416. TP_ARGS(wiphy, wdev, frame_type, reg),
  1417. TP_STRUCT__entry(
  1418. WIPHY_ENTRY
  1419. WDEV_ENTRY
  1420. __field(u16, frame_type)
  1421. __field(bool, reg)
  1422. ),
  1423. TP_fast_assign(
  1424. WIPHY_ASSIGN;
  1425. WDEV_ASSIGN;
  1426. __entry->frame_type = frame_type;
  1427. __entry->reg = reg;
  1428. ),
  1429. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
  1430. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
  1431. __entry->reg ? "true" : "false")
  1432. );
  1433. TRACE_EVENT(rdev_return_int_tx_rx,
  1434. TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
  1435. TP_ARGS(wiphy, ret, tx, rx),
  1436. TP_STRUCT__entry(
  1437. WIPHY_ENTRY
  1438. __field(int, ret)
  1439. __field(u32, tx)
  1440. __field(u32, rx)
  1441. ),
  1442. TP_fast_assign(
  1443. WIPHY_ASSIGN;
  1444. __entry->ret = ret;
  1445. __entry->tx = tx;
  1446. __entry->rx = rx;
  1447. ),
  1448. TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
  1449. WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
  1450. );
  1451. TRACE_EVENT(rdev_return_void_tx_rx,
  1452. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
  1453. u32 rx, u32 rx_max),
  1454. TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
  1455. TP_STRUCT__entry(
  1456. WIPHY_ENTRY
  1457. __field(u32, tx)
  1458. __field(u32, tx_max)
  1459. __field(u32, rx)
  1460. __field(u32, rx_max)
  1461. ),
  1462. TP_fast_assign(
  1463. WIPHY_ASSIGN;
  1464. __entry->tx = tx;
  1465. __entry->tx_max = tx_max;
  1466. __entry->rx = rx;
  1467. __entry->rx_max = rx_max;
  1468. ),
  1469. TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
  1470. WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
  1471. __entry->rx_max)
  1472. );
  1473. DECLARE_EVENT_CLASS(tx_rx_evt,
  1474. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
  1475. TP_ARGS(wiphy, rx, tx),
  1476. TP_STRUCT__entry(
  1477. WIPHY_ENTRY
  1478. __field(u32, tx)
  1479. __field(u32, rx)
  1480. ),
  1481. TP_fast_assign(
  1482. WIPHY_ASSIGN;
  1483. __entry->tx = tx;
  1484. __entry->rx = rx;
  1485. ),
  1486. TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
  1487. WIPHY_PR_ARG, __entry->tx, __entry->rx)
  1488. );
  1489. DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
  1490. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
  1491. TP_ARGS(wiphy, rx, tx)
  1492. );
  1493. TRACE_EVENT(rdev_sched_scan_start,
  1494. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1495. struct cfg80211_sched_scan_request *request),
  1496. TP_ARGS(wiphy, netdev, request),
  1497. TP_STRUCT__entry(
  1498. WIPHY_ENTRY
  1499. NETDEV_ENTRY
  1500. ),
  1501. TP_fast_assign(
  1502. WIPHY_ASSIGN;
  1503. NETDEV_ASSIGN;
  1504. ),
  1505. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
  1506. WIPHY_PR_ARG, NETDEV_PR_ARG)
  1507. );
  1508. TRACE_EVENT(rdev_tdls_mgmt,
  1509. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1510. u8 *peer, u8 action_code, u8 dialog_token,
  1511. u16 status_code, u32 peer_capability,
  1512. bool initiator, const u8 *buf, size_t len),
  1513. TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
  1514. peer_capability, initiator, buf, len),
  1515. TP_STRUCT__entry(
  1516. WIPHY_ENTRY
  1517. NETDEV_ENTRY
  1518. MAC_ENTRY(peer)
  1519. __field(u8, action_code)
  1520. __field(u8, dialog_token)
  1521. __field(u16, status_code)
  1522. __field(u32, peer_capability)
  1523. __field(bool, initiator)
  1524. __dynamic_array(u8, buf, len)
  1525. ),
  1526. TP_fast_assign(
  1527. WIPHY_ASSIGN;
  1528. NETDEV_ASSIGN;
  1529. MAC_ASSIGN(peer, peer);
  1530. __entry->action_code = action_code;
  1531. __entry->dialog_token = dialog_token;
  1532. __entry->status_code = status_code;
  1533. __entry->peer_capability = peer_capability;
  1534. __entry->initiator = initiator;
  1535. memcpy(__get_dynamic_array(buf), buf, len);
  1536. ),
  1537. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
  1538. "dialog_token: %u, status_code: %u, peer_capability: %u "
  1539. "initiator: %s buf: %#.2x ",
  1540. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
  1541. __entry->action_code, __entry->dialog_token,
  1542. __entry->status_code, __entry->peer_capability,
  1543. BOOL_TO_STR(__entry->initiator),
  1544. ((u8 *)__get_dynamic_array(buf))[0])
  1545. );
  1546. TRACE_EVENT(rdev_dump_survey,
  1547. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
  1548. TP_ARGS(wiphy, netdev, idx),
  1549. TP_STRUCT__entry(
  1550. WIPHY_ENTRY
  1551. NETDEV_ENTRY
  1552. __field(int, idx)
  1553. ),
  1554. TP_fast_assign(
  1555. WIPHY_ASSIGN;
  1556. NETDEV_ASSIGN;
  1557. __entry->idx = idx;
  1558. ),
  1559. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
  1560. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
  1561. );
  1562. TRACE_EVENT(rdev_return_int_survey_info,
  1563. TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
  1564. TP_ARGS(wiphy, ret, info),
  1565. TP_STRUCT__entry(
  1566. WIPHY_ENTRY
  1567. CHAN_ENTRY
  1568. __field(int, ret)
  1569. __field(u64, time)
  1570. __field(u64, time_busy)
  1571. __field(u64, time_ext_busy)
  1572. __field(u64, time_rx)
  1573. __field(u64, time_tx)
  1574. __field(u64, time_scan)
  1575. __field(u32, filled)
  1576. __field(s8, noise)
  1577. ),
  1578. TP_fast_assign(
  1579. WIPHY_ASSIGN;
  1580. CHAN_ASSIGN(info->channel);
  1581. __entry->ret = ret;
  1582. __entry->time = info->time;
  1583. __entry->time_busy = info->time_busy;
  1584. __entry->time_ext_busy = info->time_ext_busy;
  1585. __entry->time_rx = info->time_rx;
  1586. __entry->time_tx = info->time_tx;
  1587. __entry->time_scan = info->time_scan;
  1588. __entry->filled = info->filled;
  1589. __entry->noise = info->noise;
  1590. ),
  1591. TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
  1592. ", channel time: %llu, channel time busy: %llu, "
  1593. "channel time extension busy: %llu, channel time rx: %llu, "
  1594. "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
  1595. WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
  1596. __entry->time, __entry->time_busy,
  1597. __entry->time_ext_busy, __entry->time_rx,
  1598. __entry->time_tx, __entry->time_scan,
  1599. __entry->filled, __entry->noise)
  1600. );
  1601. TRACE_EVENT(rdev_tdls_oper,
  1602. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1603. u8 *peer, enum nl80211_tdls_operation oper),
  1604. TP_ARGS(wiphy, netdev, peer, oper),
  1605. TP_STRUCT__entry(
  1606. WIPHY_ENTRY
  1607. NETDEV_ENTRY
  1608. MAC_ENTRY(peer)
  1609. __field(enum nl80211_tdls_operation, oper)
  1610. ),
  1611. TP_fast_assign(
  1612. WIPHY_ASSIGN;
  1613. NETDEV_ASSIGN;
  1614. MAC_ASSIGN(peer, peer);
  1615. __entry->oper = oper;
  1616. ),
  1617. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
  1618. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
  1619. );
  1620. DECLARE_EVENT_CLASS(rdev_pmksa,
  1621. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1622. struct cfg80211_pmksa *pmksa),
  1623. TP_ARGS(wiphy, netdev, pmksa),
  1624. TP_STRUCT__entry(
  1625. WIPHY_ENTRY
  1626. NETDEV_ENTRY
  1627. MAC_ENTRY(bssid)
  1628. ),
  1629. TP_fast_assign(
  1630. WIPHY_ASSIGN;
  1631. NETDEV_ASSIGN;
  1632. MAC_ASSIGN(bssid, pmksa->bssid);
  1633. ),
  1634. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
  1635. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
  1636. );
  1637. TRACE_EVENT(rdev_probe_client,
  1638. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1639. const u8 *peer),
  1640. TP_ARGS(wiphy, netdev, peer),
  1641. TP_STRUCT__entry(
  1642. WIPHY_ENTRY
  1643. NETDEV_ENTRY
  1644. MAC_ENTRY(peer)
  1645. ),
  1646. TP_fast_assign(
  1647. WIPHY_ASSIGN;
  1648. NETDEV_ASSIGN;
  1649. MAC_ASSIGN(peer, peer);
  1650. ),
  1651. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
  1652. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
  1653. );
  1654. DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
  1655. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1656. struct cfg80211_pmksa *pmksa),
  1657. TP_ARGS(wiphy, netdev, pmksa)
  1658. );
  1659. DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
  1660. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1661. struct cfg80211_pmksa *pmksa),
  1662. TP_ARGS(wiphy, netdev, pmksa)
  1663. );
  1664. TRACE_EVENT(rdev_remain_on_channel,
  1665. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1666. struct ieee80211_channel *chan,
  1667. unsigned int duration),
  1668. TP_ARGS(wiphy, wdev, chan, duration),
  1669. TP_STRUCT__entry(
  1670. WIPHY_ENTRY
  1671. WDEV_ENTRY
  1672. CHAN_ENTRY
  1673. __field(unsigned int, duration)
  1674. ),
  1675. TP_fast_assign(
  1676. WIPHY_ASSIGN;
  1677. WDEV_ASSIGN;
  1678. CHAN_ASSIGN(chan);
  1679. __entry->duration = duration;
  1680. ),
  1681. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
  1682. WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
  1683. );
  1684. TRACE_EVENT(rdev_return_int_cookie,
  1685. TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
  1686. TP_ARGS(wiphy, ret, cookie),
  1687. TP_STRUCT__entry(
  1688. WIPHY_ENTRY
  1689. __field(int, ret)
  1690. __field(u64, cookie)
  1691. ),
  1692. TP_fast_assign(
  1693. WIPHY_ASSIGN;
  1694. __entry->ret = ret;
  1695. __entry->cookie = cookie;
  1696. ),
  1697. TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
  1698. WIPHY_PR_ARG, __entry->ret, __entry->cookie)
  1699. );
  1700. TRACE_EVENT(rdev_cancel_remain_on_channel,
  1701. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
  1702. TP_ARGS(wiphy, wdev, cookie),
  1703. TP_STRUCT__entry(
  1704. WIPHY_ENTRY
  1705. WDEV_ENTRY
  1706. __field(u64, cookie)
  1707. ),
  1708. TP_fast_assign(
  1709. WIPHY_ASSIGN;
  1710. WDEV_ASSIGN;
  1711. __entry->cookie = cookie;
  1712. ),
  1713. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
  1714. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
  1715. );
  1716. TRACE_EVENT(rdev_mgmt_tx,
  1717. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1718. struct cfg80211_mgmt_tx_params *params),
  1719. TP_ARGS(wiphy, wdev, params),
  1720. TP_STRUCT__entry(
  1721. WIPHY_ENTRY
  1722. WDEV_ENTRY
  1723. CHAN_ENTRY
  1724. __field(bool, offchan)
  1725. __field(unsigned int, wait)
  1726. __field(bool, no_cck)
  1727. __field(bool, dont_wait_for_ack)
  1728. ),
  1729. TP_fast_assign(
  1730. WIPHY_ASSIGN;
  1731. WDEV_ASSIGN;
  1732. CHAN_ASSIGN(params->chan);
  1733. __entry->offchan = params->offchan;
  1734. __entry->wait = params->wait;
  1735. __entry->no_cck = params->no_cck;
  1736. __entry->dont_wait_for_ack = params->dont_wait_for_ack;
  1737. ),
  1738. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
  1739. " wait: %u, no cck: %s, dont wait for ack: %s",
  1740. WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
  1741. BOOL_TO_STR(__entry->offchan), __entry->wait,
  1742. BOOL_TO_STR(__entry->no_cck),
  1743. BOOL_TO_STR(__entry->dont_wait_for_ack))
  1744. );
  1745. TRACE_EVENT(rdev_set_noack_map,
  1746. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1747. u16 noack_map),
  1748. TP_ARGS(wiphy, netdev, noack_map),
  1749. TP_STRUCT__entry(
  1750. WIPHY_ENTRY
  1751. NETDEV_ENTRY
  1752. __field(u16, noack_map)
  1753. ),
  1754. TP_fast_assign(
  1755. WIPHY_ASSIGN;
  1756. NETDEV_ASSIGN;
  1757. __entry->noack_map = noack_map;
  1758. ),
  1759. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
  1760. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
  1761. );
  1762. DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
  1763. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1764. TP_ARGS(wiphy, wdev)
  1765. );
  1766. TRACE_EVENT(rdev_return_chandef,
  1767. TP_PROTO(struct wiphy *wiphy, int ret,
  1768. struct cfg80211_chan_def *chandef),
  1769. TP_ARGS(wiphy, ret, chandef),
  1770. TP_STRUCT__entry(
  1771. WIPHY_ENTRY
  1772. __field(int, ret)
  1773. CHAN_DEF_ENTRY
  1774. ),
  1775. TP_fast_assign(
  1776. WIPHY_ASSIGN;
  1777. if (ret == 0)
  1778. CHAN_DEF_ASSIGN(chandef);
  1779. else
  1780. CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
  1781. __entry->ret = ret;
  1782. ),
  1783. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
  1784. WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
  1785. );
  1786. DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
  1787. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1788. TP_ARGS(wiphy, wdev)
  1789. );
  1790. DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
  1791. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1792. TP_ARGS(wiphy, wdev)
  1793. );
  1794. TRACE_EVENT(rdev_start_nan,
  1795. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1796. struct cfg80211_nan_conf *conf),
  1797. TP_ARGS(wiphy, wdev, conf),
  1798. TP_STRUCT__entry(
  1799. WIPHY_ENTRY
  1800. WDEV_ENTRY
  1801. __field(u8, master_pref)
  1802. __field(u8, dual);
  1803. ),
  1804. TP_fast_assign(
  1805. WIPHY_ASSIGN;
  1806. WDEV_ASSIGN;
  1807. __entry->master_pref = conf->master_pref;
  1808. __entry->dual = conf->dual;
  1809. ),
  1810. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
  1811. ", master preference: %u, dual: %d",
  1812. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
  1813. __entry->dual)
  1814. );
  1815. TRACE_EVENT(rdev_nan_change_conf,
  1816. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1817. struct cfg80211_nan_conf *conf, u32 changes),
  1818. TP_ARGS(wiphy, wdev, conf, changes),
  1819. TP_STRUCT__entry(
  1820. WIPHY_ENTRY
  1821. WDEV_ENTRY
  1822. __field(u8, master_pref)
  1823. __field(u8, dual);
  1824. __field(u32, changes);
  1825. ),
  1826. TP_fast_assign(
  1827. WIPHY_ASSIGN;
  1828. WDEV_ASSIGN;
  1829. __entry->master_pref = conf->master_pref;
  1830. __entry->dual = conf->dual;
  1831. __entry->changes = changes;
  1832. ),
  1833. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
  1834. ", master preference: %u, dual: %d, changes: %x",
  1835. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
  1836. __entry->dual, __entry->changes)
  1837. );
  1838. DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
  1839. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1840. TP_ARGS(wiphy, wdev)
  1841. );
  1842. TRACE_EVENT(rdev_add_nan_func,
  1843. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1844. const struct cfg80211_nan_func *func),
  1845. TP_ARGS(wiphy, wdev, func),
  1846. TP_STRUCT__entry(
  1847. WIPHY_ENTRY
  1848. WDEV_ENTRY
  1849. __field(u8, func_type)
  1850. __field(u64, cookie)
  1851. ),
  1852. TP_fast_assign(
  1853. WIPHY_ASSIGN;
  1854. WDEV_ASSIGN;
  1855. __entry->func_type = func->type;
  1856. __entry->cookie = func->cookie
  1857. ),
  1858. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
  1859. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
  1860. __entry->cookie)
  1861. );
  1862. TRACE_EVENT(rdev_del_nan_func,
  1863. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1864. u64 cookie),
  1865. TP_ARGS(wiphy, wdev, cookie),
  1866. TP_STRUCT__entry(
  1867. WIPHY_ENTRY
  1868. WDEV_ENTRY
  1869. __field(u64, cookie)
  1870. ),
  1871. TP_fast_assign(
  1872. WIPHY_ASSIGN;
  1873. WDEV_ASSIGN;
  1874. __entry->cookie = cookie;
  1875. ),
  1876. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
  1877. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
  1878. );
  1879. TRACE_EVENT(rdev_set_mac_acl,
  1880. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1881. struct cfg80211_acl_data *params),
  1882. TP_ARGS(wiphy, netdev, params),
  1883. TP_STRUCT__entry(
  1884. WIPHY_ENTRY
  1885. NETDEV_ENTRY
  1886. __field(u32, acl_policy)
  1887. ),
  1888. TP_fast_assign(
  1889. WIPHY_ASSIGN;
  1890. NETDEV_ASSIGN;
  1891. __entry->acl_policy = params->acl_policy;
  1892. ),
  1893. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
  1894. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
  1895. );
  1896. TRACE_EVENT(rdev_update_ft_ies,
  1897. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1898. struct cfg80211_update_ft_ies_params *ftie),
  1899. TP_ARGS(wiphy, netdev, ftie),
  1900. TP_STRUCT__entry(
  1901. WIPHY_ENTRY
  1902. NETDEV_ENTRY
  1903. __field(u16, md)
  1904. __dynamic_array(u8, ie, ftie->ie_len)
  1905. ),
  1906. TP_fast_assign(
  1907. WIPHY_ASSIGN;
  1908. NETDEV_ASSIGN;
  1909. __entry->md = ftie->md;
  1910. memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
  1911. ),
  1912. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
  1913. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
  1914. );
  1915. TRACE_EVENT(rdev_crit_proto_start,
  1916. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1917. enum nl80211_crit_proto_id protocol, u16 duration),
  1918. TP_ARGS(wiphy, wdev, protocol, duration),
  1919. TP_STRUCT__entry(
  1920. WIPHY_ENTRY
  1921. WDEV_ENTRY
  1922. __field(u16, proto)
  1923. __field(u16, duration)
  1924. ),
  1925. TP_fast_assign(
  1926. WIPHY_ASSIGN;
  1927. WDEV_ASSIGN;
  1928. __entry->proto = protocol;
  1929. __entry->duration = duration;
  1930. ),
  1931. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
  1932. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
  1933. );
  1934. TRACE_EVENT(rdev_crit_proto_stop,
  1935. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1936. TP_ARGS(wiphy, wdev),
  1937. TP_STRUCT__entry(
  1938. WIPHY_ENTRY
  1939. WDEV_ENTRY
  1940. ),
  1941. TP_fast_assign(
  1942. WIPHY_ASSIGN;
  1943. WDEV_ASSIGN;
  1944. ),
  1945. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
  1946. WIPHY_PR_ARG, WDEV_PR_ARG)
  1947. );
  1948. TRACE_EVENT(rdev_channel_switch,
  1949. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1950. struct cfg80211_csa_settings *params),
  1951. TP_ARGS(wiphy, netdev, params),
  1952. TP_STRUCT__entry(
  1953. WIPHY_ENTRY
  1954. NETDEV_ENTRY
  1955. CHAN_DEF_ENTRY
  1956. __field(bool, radar_required)
  1957. __field(bool, block_tx)
  1958. __field(u8, count)
  1959. __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
  1960. __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
  1961. ),
  1962. TP_fast_assign(
  1963. WIPHY_ASSIGN;
  1964. NETDEV_ASSIGN;
  1965. CHAN_DEF_ASSIGN(&params->chandef);
  1966. __entry->radar_required = params->radar_required;
  1967. __entry->block_tx = params->block_tx;
  1968. __entry->count = params->count;
  1969. memcpy(__get_dynamic_array(bcn_ofs),
  1970. params->counter_offsets_beacon,
  1971. params->n_counter_offsets_beacon * sizeof(u16));
  1972. /* probe response offsets are optional */
  1973. if (params->n_counter_offsets_presp)
  1974. memcpy(__get_dynamic_array(pres_ofs),
  1975. params->counter_offsets_presp,
  1976. params->n_counter_offsets_presp * sizeof(u16));
  1977. ),
  1978. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
  1979. ", block_tx: %d, count: %u, radar_required: %d",
  1980. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
  1981. __entry->block_tx, __entry->count, __entry->radar_required)
  1982. );
  1983. TRACE_EVENT(rdev_set_qos_map,
  1984. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1985. struct cfg80211_qos_map *qos_map),
  1986. TP_ARGS(wiphy, netdev, qos_map),
  1987. TP_STRUCT__entry(
  1988. WIPHY_ENTRY
  1989. NETDEV_ENTRY
  1990. QOS_MAP_ENTRY
  1991. ),
  1992. TP_fast_assign(
  1993. WIPHY_ASSIGN;
  1994. NETDEV_ASSIGN;
  1995. QOS_MAP_ASSIGN(qos_map);
  1996. ),
  1997. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
  1998. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
  1999. );
  2000. TRACE_EVENT(rdev_set_ap_chanwidth,
  2001. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2002. struct cfg80211_chan_def *chandef),
  2003. TP_ARGS(wiphy, netdev, chandef),
  2004. TP_STRUCT__entry(
  2005. WIPHY_ENTRY
  2006. NETDEV_ENTRY
  2007. CHAN_DEF_ENTRY
  2008. ),
  2009. TP_fast_assign(
  2010. WIPHY_ASSIGN;
  2011. NETDEV_ASSIGN;
  2012. CHAN_DEF_ASSIGN(chandef);
  2013. ),
  2014. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  2015. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  2016. );
  2017. TRACE_EVENT(rdev_add_tx_ts,
  2018. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2019. u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
  2020. TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
  2021. TP_STRUCT__entry(
  2022. WIPHY_ENTRY
  2023. NETDEV_ENTRY
  2024. MAC_ENTRY(peer)
  2025. __field(u8, tsid)
  2026. __field(u8, user_prio)
  2027. __field(u16, admitted_time)
  2028. ),
  2029. TP_fast_assign(
  2030. WIPHY_ASSIGN;
  2031. NETDEV_ASSIGN;
  2032. MAC_ASSIGN(peer, peer);
  2033. __entry->tsid = tsid;
  2034. __entry->user_prio = user_prio;
  2035. __entry->admitted_time = admitted_time;
  2036. ),
  2037. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
  2038. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
  2039. __entry->tsid, __entry->user_prio, __entry->admitted_time)
  2040. );
  2041. TRACE_EVENT(rdev_del_tx_ts,
  2042. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2043. u8 tsid, const u8 *peer),
  2044. TP_ARGS(wiphy, netdev, tsid, peer),
  2045. TP_STRUCT__entry(
  2046. WIPHY_ENTRY
  2047. NETDEV_ENTRY
  2048. MAC_ENTRY(peer)
  2049. __field(u8, tsid)
  2050. ),
  2051. TP_fast_assign(
  2052. WIPHY_ASSIGN;
  2053. NETDEV_ASSIGN;
  2054. MAC_ASSIGN(peer, peer);
  2055. __entry->tsid = tsid;
  2056. ),
  2057. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
  2058. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
  2059. );
  2060. TRACE_EVENT(rdev_tdls_channel_switch,
  2061. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2062. const u8 *addr, u8 oper_class,
  2063. struct cfg80211_chan_def *chandef),
  2064. TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
  2065. TP_STRUCT__entry(
  2066. WIPHY_ENTRY
  2067. NETDEV_ENTRY
  2068. MAC_ENTRY(addr)
  2069. __field(u8, oper_class)
  2070. CHAN_DEF_ENTRY
  2071. ),
  2072. TP_fast_assign(
  2073. WIPHY_ASSIGN;
  2074. NETDEV_ASSIGN;
  2075. MAC_ASSIGN(addr, addr);
  2076. CHAN_DEF_ASSIGN(chandef);
  2077. ),
  2078. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
  2079. " oper class %d, " CHAN_DEF_PR_FMT,
  2080. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
  2081. __entry->oper_class, CHAN_DEF_PR_ARG)
  2082. );
  2083. TRACE_EVENT(rdev_tdls_cancel_channel_switch,
  2084. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2085. const u8 *addr),
  2086. TP_ARGS(wiphy, netdev, addr),
  2087. TP_STRUCT__entry(
  2088. WIPHY_ENTRY
  2089. NETDEV_ENTRY
  2090. MAC_ENTRY(addr)
  2091. ),
  2092. TP_fast_assign(
  2093. WIPHY_ASSIGN;
  2094. NETDEV_ASSIGN;
  2095. MAC_ASSIGN(addr, addr);
  2096. ),
  2097. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
  2098. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
  2099. );
  2100. TRACE_EVENT(rdev_external_auth,
  2101. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2102. struct cfg80211_external_auth_params *params),
  2103. TP_ARGS(wiphy, netdev, params),
  2104. TP_STRUCT__entry(WIPHY_ENTRY
  2105. NETDEV_ENTRY
  2106. MAC_ENTRY(bssid)
  2107. __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
  2108. __field(u16, status)
  2109. ),
  2110. TP_fast_assign(WIPHY_ASSIGN;
  2111. NETDEV_ASSIGN;
  2112. MAC_ASSIGN(bssid, params->bssid);
  2113. memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
  2114. memcpy(__entry->ssid, params->ssid.ssid,
  2115. params->ssid.ssid_len);
  2116. __entry->status = params->status;
  2117. ),
  2118. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
  2119. ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
  2120. __entry->bssid, __entry->ssid, __entry->status)
  2121. );
  2122. /*************************************************************
  2123. * cfg80211 exported functions traces *
  2124. *************************************************************/
  2125. TRACE_EVENT(cfg80211_return_bool,
  2126. TP_PROTO(bool ret),
  2127. TP_ARGS(ret),
  2128. TP_STRUCT__entry(
  2129. __field(bool, ret)
  2130. ),
  2131. TP_fast_assign(
  2132. __entry->ret = ret;
  2133. ),
  2134. TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
  2135. );
  2136. DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
  2137. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2138. TP_ARGS(netdev, macaddr),
  2139. TP_STRUCT__entry(
  2140. NETDEV_ENTRY
  2141. MAC_ENTRY(macaddr)
  2142. ),
  2143. TP_fast_assign(
  2144. NETDEV_ASSIGN;
  2145. MAC_ASSIGN(macaddr, macaddr);
  2146. ),
  2147. TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
  2148. NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
  2149. );
  2150. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
  2151. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2152. TP_ARGS(netdev, macaddr)
  2153. );
  2154. DECLARE_EVENT_CLASS(netdev_evt_only,
  2155. TP_PROTO(struct net_device *netdev),
  2156. TP_ARGS(netdev),
  2157. TP_STRUCT__entry(
  2158. NETDEV_ENTRY
  2159. ),
  2160. TP_fast_assign(
  2161. NETDEV_ASSIGN;
  2162. ),
  2163. TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
  2164. );
  2165. DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
  2166. TP_PROTO(struct net_device *netdev),
  2167. TP_ARGS(netdev)
  2168. );
  2169. TRACE_EVENT(cfg80211_send_rx_assoc,
  2170. TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
  2171. TP_ARGS(netdev, bss),
  2172. TP_STRUCT__entry(
  2173. NETDEV_ENTRY
  2174. MAC_ENTRY(bssid)
  2175. CHAN_ENTRY
  2176. ),
  2177. TP_fast_assign(
  2178. NETDEV_ASSIGN;
  2179. MAC_ASSIGN(bssid, bss->bssid);
  2180. CHAN_ASSIGN(bss->channel);
  2181. ),
  2182. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
  2183. NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2184. );
  2185. DECLARE_EVENT_CLASS(netdev_frame_event,
  2186. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2187. TP_ARGS(netdev, buf, len),
  2188. TP_STRUCT__entry(
  2189. NETDEV_ENTRY
  2190. __dynamic_array(u8, frame, len)
  2191. ),
  2192. TP_fast_assign(
  2193. NETDEV_ASSIGN;
  2194. memcpy(__get_dynamic_array(frame), buf, len);
  2195. ),
  2196. TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
  2197. NETDEV_PR_ARG,
  2198. le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
  2199. );
  2200. DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
  2201. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2202. TP_ARGS(netdev, buf, len)
  2203. );
  2204. DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
  2205. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2206. TP_ARGS(netdev, buf, len)
  2207. );
  2208. TRACE_EVENT(cfg80211_tx_mlme_mgmt,
  2209. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2210. TP_ARGS(netdev, buf, len),
  2211. TP_STRUCT__entry(
  2212. NETDEV_ENTRY
  2213. __dynamic_array(u8, frame, len)
  2214. ),
  2215. TP_fast_assign(
  2216. NETDEV_ASSIGN;
  2217. memcpy(__get_dynamic_array(frame), buf, len);
  2218. ),
  2219. TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
  2220. NETDEV_PR_ARG,
  2221. le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
  2222. );
  2223. DECLARE_EVENT_CLASS(netdev_mac_evt,
  2224. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2225. TP_ARGS(netdev, mac),
  2226. TP_STRUCT__entry(
  2227. NETDEV_ENTRY
  2228. MAC_ENTRY(mac)
  2229. ),
  2230. TP_fast_assign(
  2231. NETDEV_ASSIGN;
  2232. MAC_ASSIGN(mac, mac)
  2233. ),
  2234. TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
  2235. NETDEV_PR_ARG, MAC_PR_ARG(mac))
  2236. );
  2237. DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
  2238. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2239. TP_ARGS(netdev, mac)
  2240. );
  2241. DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
  2242. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2243. TP_ARGS(netdev, mac)
  2244. );
  2245. TRACE_EVENT(cfg80211_michael_mic_failure,
  2246. TP_PROTO(struct net_device *netdev, const u8 *addr,
  2247. enum nl80211_key_type key_type, int key_id, const u8 *tsc),
  2248. TP_ARGS(netdev, addr, key_type, key_id, tsc),
  2249. TP_STRUCT__entry(
  2250. NETDEV_ENTRY
  2251. MAC_ENTRY(addr)
  2252. __field(enum nl80211_key_type, key_type)
  2253. __field(int, key_id)
  2254. __array(u8, tsc, 6)
  2255. ),
  2256. TP_fast_assign(
  2257. NETDEV_ASSIGN;
  2258. MAC_ASSIGN(addr, addr);
  2259. __entry->key_type = key_type;
  2260. __entry->key_id = key_id;
  2261. if (tsc)
  2262. memcpy(__entry->tsc, tsc, 6);
  2263. ),
  2264. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
  2265. NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
  2266. __entry->key_id, __entry->tsc)
  2267. );
  2268. TRACE_EVENT(cfg80211_ready_on_channel,
  2269. TP_PROTO(struct wireless_dev *wdev, u64 cookie,
  2270. struct ieee80211_channel *chan,
  2271. unsigned int duration),
  2272. TP_ARGS(wdev, cookie, chan, duration),
  2273. TP_STRUCT__entry(
  2274. WDEV_ENTRY
  2275. __field(u64, cookie)
  2276. CHAN_ENTRY
  2277. __field(unsigned int, duration)
  2278. ),
  2279. TP_fast_assign(
  2280. WDEV_ASSIGN;
  2281. __entry->cookie = cookie;
  2282. CHAN_ASSIGN(chan);
  2283. __entry->duration = duration;
  2284. ),
  2285. TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
  2286. WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
  2287. __entry->duration)
  2288. );
  2289. TRACE_EVENT(cfg80211_ready_on_channel_expired,
  2290. TP_PROTO(struct wireless_dev *wdev, u64 cookie,
  2291. struct ieee80211_channel *chan),
  2292. TP_ARGS(wdev, cookie, chan),
  2293. TP_STRUCT__entry(
  2294. WDEV_ENTRY
  2295. __field(u64, cookie)
  2296. CHAN_ENTRY
  2297. ),
  2298. TP_fast_assign(
  2299. WDEV_ASSIGN;
  2300. __entry->cookie = cookie;
  2301. CHAN_ASSIGN(chan);
  2302. ),
  2303. TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
  2304. WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
  2305. );
  2306. TRACE_EVENT(cfg80211_new_sta,
  2307. TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
  2308. struct station_info *sinfo),
  2309. TP_ARGS(netdev, mac_addr, sinfo),
  2310. TP_STRUCT__entry(
  2311. NETDEV_ENTRY
  2312. MAC_ENTRY(mac_addr)
  2313. SINFO_ENTRY
  2314. ),
  2315. TP_fast_assign(
  2316. NETDEV_ASSIGN;
  2317. MAC_ASSIGN(mac_addr, mac_addr);
  2318. SINFO_ASSIGN;
  2319. ),
  2320. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
  2321. NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
  2322. );
  2323. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
  2324. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2325. TP_ARGS(netdev, macaddr)
  2326. );
  2327. TRACE_EVENT(cfg80211_rx_mgmt,
  2328. TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
  2329. TP_ARGS(wdev, freq, sig_mbm),
  2330. TP_STRUCT__entry(
  2331. WDEV_ENTRY
  2332. __field(int, freq)
  2333. __field(int, sig_mbm)
  2334. ),
  2335. TP_fast_assign(
  2336. WDEV_ASSIGN;
  2337. __entry->freq = freq;
  2338. __entry->sig_mbm = sig_mbm;
  2339. ),
  2340. TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
  2341. WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
  2342. );
  2343. TRACE_EVENT(cfg80211_mgmt_tx_status,
  2344. TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
  2345. TP_ARGS(wdev, cookie, ack),
  2346. TP_STRUCT__entry(
  2347. WDEV_ENTRY
  2348. __field(u64, cookie)
  2349. __field(bool, ack)
  2350. ),
  2351. TP_fast_assign(
  2352. WDEV_ASSIGN;
  2353. __entry->cookie = cookie;
  2354. __entry->ack = ack;
  2355. ),
  2356. TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
  2357. WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
  2358. );
  2359. TRACE_EVENT(cfg80211_cqm_rssi_notify,
  2360. TP_PROTO(struct net_device *netdev,
  2361. enum nl80211_cqm_rssi_threshold_event rssi_event),
  2362. TP_ARGS(netdev, rssi_event),
  2363. TP_STRUCT__entry(
  2364. NETDEV_ENTRY
  2365. __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
  2366. ),
  2367. TP_fast_assign(
  2368. NETDEV_ASSIGN;
  2369. __entry->rssi_event = rssi_event;
  2370. ),
  2371. TP_printk(NETDEV_PR_FMT ", rssi event: %d",
  2372. NETDEV_PR_ARG, __entry->rssi_event)
  2373. );
  2374. TRACE_EVENT(cfg80211_reg_can_beacon,
  2375. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
  2376. enum nl80211_iftype iftype, bool check_no_ir),
  2377. TP_ARGS(wiphy, chandef, iftype, check_no_ir),
  2378. TP_STRUCT__entry(
  2379. WIPHY_ENTRY
  2380. CHAN_DEF_ENTRY
  2381. __field(enum nl80211_iftype, iftype)
  2382. __field(bool, check_no_ir)
  2383. ),
  2384. TP_fast_assign(
  2385. WIPHY_ASSIGN;
  2386. CHAN_DEF_ASSIGN(chandef);
  2387. __entry->iftype = iftype;
  2388. __entry->check_no_ir = check_no_ir;
  2389. ),
  2390. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
  2391. WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
  2392. BOOL_TO_STR(__entry->check_no_ir))
  2393. );
  2394. TRACE_EVENT(cfg80211_chandef_dfs_required,
  2395. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
  2396. TP_ARGS(wiphy, chandef),
  2397. TP_STRUCT__entry(
  2398. WIPHY_ENTRY
  2399. CHAN_DEF_ENTRY
  2400. ),
  2401. TP_fast_assign(
  2402. WIPHY_ASSIGN;
  2403. CHAN_DEF_ASSIGN(chandef);
  2404. ),
  2405. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
  2406. WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
  2407. );
  2408. TRACE_EVENT(cfg80211_ch_switch_notify,
  2409. TP_PROTO(struct net_device *netdev,
  2410. struct cfg80211_chan_def *chandef),
  2411. TP_ARGS(netdev, chandef),
  2412. TP_STRUCT__entry(
  2413. NETDEV_ENTRY
  2414. CHAN_DEF_ENTRY
  2415. ),
  2416. TP_fast_assign(
  2417. NETDEV_ASSIGN;
  2418. CHAN_DEF_ASSIGN(chandef);
  2419. ),
  2420. TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  2421. NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  2422. );
  2423. TRACE_EVENT(cfg80211_ch_switch_started_notify,
  2424. TP_PROTO(struct net_device *netdev,
  2425. struct cfg80211_chan_def *chandef),
  2426. TP_ARGS(netdev, chandef),
  2427. TP_STRUCT__entry(
  2428. NETDEV_ENTRY
  2429. CHAN_DEF_ENTRY
  2430. ),
  2431. TP_fast_assign(
  2432. NETDEV_ASSIGN;
  2433. CHAN_DEF_ASSIGN(chandef);
  2434. ),
  2435. TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  2436. NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  2437. );
  2438. TRACE_EVENT(cfg80211_radar_event,
  2439. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
  2440. TP_ARGS(wiphy, chandef),
  2441. TP_STRUCT__entry(
  2442. WIPHY_ENTRY
  2443. CHAN_DEF_ENTRY
  2444. ),
  2445. TP_fast_assign(
  2446. WIPHY_ASSIGN;
  2447. CHAN_DEF_ASSIGN(chandef);
  2448. ),
  2449. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
  2450. WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
  2451. );
  2452. TRACE_EVENT(cfg80211_cac_event,
  2453. TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
  2454. TP_ARGS(netdev, evt),
  2455. TP_STRUCT__entry(
  2456. NETDEV_ENTRY
  2457. __field(enum nl80211_radar_event, evt)
  2458. ),
  2459. TP_fast_assign(
  2460. NETDEV_ASSIGN;
  2461. __entry->evt = evt;
  2462. ),
  2463. TP_printk(NETDEV_PR_FMT ", event: %d",
  2464. NETDEV_PR_ARG, __entry->evt)
  2465. );
  2466. DECLARE_EVENT_CLASS(cfg80211_rx_evt,
  2467. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2468. TP_ARGS(netdev, addr),
  2469. TP_STRUCT__entry(
  2470. NETDEV_ENTRY
  2471. MAC_ENTRY(addr)
  2472. ),
  2473. TP_fast_assign(
  2474. NETDEV_ASSIGN;
  2475. MAC_ASSIGN(addr, addr);
  2476. ),
  2477. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
  2478. );
  2479. DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
  2480. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2481. TP_ARGS(netdev, addr)
  2482. );
  2483. DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
  2484. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2485. TP_ARGS(netdev, addr)
  2486. );
  2487. TRACE_EVENT(cfg80211_ibss_joined,
  2488. TP_PROTO(struct net_device *netdev, const u8 *bssid,
  2489. struct ieee80211_channel *channel),
  2490. TP_ARGS(netdev, bssid, channel),
  2491. TP_STRUCT__entry(
  2492. NETDEV_ENTRY
  2493. MAC_ENTRY(bssid)
  2494. CHAN_ENTRY
  2495. ),
  2496. TP_fast_assign(
  2497. NETDEV_ASSIGN;
  2498. MAC_ASSIGN(bssid, bssid);
  2499. CHAN_ASSIGN(channel);
  2500. ),
  2501. TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
  2502. NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2503. );
  2504. TRACE_EVENT(cfg80211_probe_status,
  2505. TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
  2506. bool acked),
  2507. TP_ARGS(netdev, addr, cookie, acked),
  2508. TP_STRUCT__entry(
  2509. NETDEV_ENTRY
  2510. MAC_ENTRY(addr)
  2511. __field(u64, cookie)
  2512. __field(bool, acked)
  2513. ),
  2514. TP_fast_assign(
  2515. NETDEV_ASSIGN;
  2516. MAC_ASSIGN(addr, addr);
  2517. __entry->cookie = cookie;
  2518. __entry->acked = acked;
  2519. ),
  2520. TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
  2521. NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
  2522. BOOL_TO_STR(__entry->acked))
  2523. );
  2524. TRACE_EVENT(cfg80211_cqm_pktloss_notify,
  2525. TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
  2526. TP_ARGS(netdev, peer, num_packets),
  2527. TP_STRUCT__entry(
  2528. NETDEV_ENTRY
  2529. MAC_ENTRY(peer)
  2530. __field(u32, num_packets)
  2531. ),
  2532. TP_fast_assign(
  2533. NETDEV_ASSIGN;
  2534. MAC_ASSIGN(peer, peer);
  2535. __entry->num_packets = num_packets;
  2536. ),
  2537. TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
  2538. NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
  2539. );
  2540. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
  2541. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2542. TP_ARGS(netdev, macaddr)
  2543. );
  2544. TRACE_EVENT(cfg80211_pmksa_candidate_notify,
  2545. TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
  2546. bool preauth),
  2547. TP_ARGS(netdev, index, bssid, preauth),
  2548. TP_STRUCT__entry(
  2549. NETDEV_ENTRY
  2550. __field(int, index)
  2551. MAC_ENTRY(bssid)
  2552. __field(bool, preauth)
  2553. ),
  2554. TP_fast_assign(
  2555. NETDEV_ASSIGN;
  2556. __entry->index = index;
  2557. MAC_ASSIGN(bssid, bssid);
  2558. __entry->preauth = preauth;
  2559. ),
  2560. TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
  2561. NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
  2562. BOOL_TO_STR(__entry->preauth))
  2563. );
  2564. TRACE_EVENT(cfg80211_report_obss_beacon,
  2565. TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
  2566. int freq, int sig_dbm),
  2567. TP_ARGS(wiphy, frame, len, freq, sig_dbm),
  2568. TP_STRUCT__entry(
  2569. WIPHY_ENTRY
  2570. __field(int, freq)
  2571. __field(int, sig_dbm)
  2572. ),
  2573. TP_fast_assign(
  2574. WIPHY_ASSIGN;
  2575. __entry->freq = freq;
  2576. __entry->sig_dbm = sig_dbm;
  2577. ),
  2578. TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
  2579. WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
  2580. );
  2581. TRACE_EVENT(cfg80211_tdls_oper_request,
  2582. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
  2583. enum nl80211_tdls_operation oper, u16 reason_code),
  2584. TP_ARGS(wiphy, netdev, peer, oper, reason_code),
  2585. TP_STRUCT__entry(
  2586. WIPHY_ENTRY
  2587. NETDEV_ENTRY
  2588. MAC_ENTRY(peer)
  2589. __field(enum nl80211_tdls_operation, oper)
  2590. __field(u16, reason_code)
  2591. ),
  2592. TP_fast_assign(
  2593. WIPHY_ASSIGN;
  2594. NETDEV_ASSIGN;
  2595. MAC_ASSIGN(peer, peer);
  2596. __entry->oper = oper;
  2597. __entry->reason_code = reason_code;
  2598. ),
  2599. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
  2600. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
  2601. __entry->reason_code)
  2602. );
  2603. TRACE_EVENT(cfg80211_scan_done,
  2604. TP_PROTO(struct cfg80211_scan_request *request,
  2605. struct cfg80211_scan_info *info),
  2606. TP_ARGS(request, info),
  2607. TP_STRUCT__entry(
  2608. __field(u32, n_channels)
  2609. __dynamic_array(u8, ie, request ? request->ie_len : 0)
  2610. __array(u32, rates, NUM_NL80211_BANDS)
  2611. __field(u32, wdev_id)
  2612. MAC_ENTRY(wiphy_mac)
  2613. __field(bool, no_cck)
  2614. __field(bool, aborted)
  2615. __field(u64, scan_start_tsf)
  2616. MAC_ENTRY(tsf_bssid)
  2617. ),
  2618. TP_fast_assign(
  2619. if (request) {
  2620. memcpy(__get_dynamic_array(ie), request->ie,
  2621. request->ie_len);
  2622. memcpy(__entry->rates, request->rates,
  2623. NUM_NL80211_BANDS);
  2624. __entry->wdev_id = request->wdev ?
  2625. request->wdev->identifier : 0;
  2626. if (request->wiphy)
  2627. MAC_ASSIGN(wiphy_mac,
  2628. request->wiphy->perm_addr);
  2629. __entry->no_cck = request->no_cck;
  2630. }
  2631. if (info) {
  2632. __entry->aborted = info->aborted;
  2633. __entry->scan_start_tsf = info->scan_start_tsf;
  2634. MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
  2635. }
  2636. ),
  2637. TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
  2638. BOOL_TO_STR(__entry->aborted),
  2639. (unsigned long long)__entry->scan_start_tsf,
  2640. MAC_PR_ARG(tsf_bssid))
  2641. );
  2642. DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
  2643. TP_PROTO(struct wiphy *wiphy),
  2644. TP_ARGS(wiphy)
  2645. );
  2646. DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
  2647. TP_PROTO(struct wiphy *wiphy),
  2648. TP_ARGS(wiphy)
  2649. );
  2650. TRACE_EVENT(cfg80211_get_bss,
  2651. TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
  2652. const u8 *bssid, const u8 *ssid, size_t ssid_len,
  2653. enum ieee80211_bss_type bss_type,
  2654. enum ieee80211_privacy privacy),
  2655. TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
  2656. TP_STRUCT__entry(
  2657. WIPHY_ENTRY
  2658. CHAN_ENTRY
  2659. MAC_ENTRY(bssid)
  2660. __dynamic_array(u8, ssid, ssid_len)
  2661. __field(enum ieee80211_bss_type, bss_type)
  2662. __field(enum ieee80211_privacy, privacy)
  2663. ),
  2664. TP_fast_assign(
  2665. WIPHY_ASSIGN;
  2666. CHAN_ASSIGN(channel);
  2667. MAC_ASSIGN(bssid, bssid);
  2668. memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
  2669. __entry->bss_type = bss_type;
  2670. __entry->privacy = privacy;
  2671. ),
  2672. TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
  2673. ", buf: %#.2x, bss_type: %d, privacy: %d",
  2674. WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
  2675. ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
  2676. __entry->privacy)
  2677. );
  2678. TRACE_EVENT(cfg80211_inform_bss_frame,
  2679. TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
  2680. struct ieee80211_mgmt *mgmt, size_t len),
  2681. TP_ARGS(wiphy, data, mgmt, len),
  2682. TP_STRUCT__entry(
  2683. WIPHY_ENTRY
  2684. CHAN_ENTRY
  2685. __field(enum nl80211_bss_scan_width, scan_width)
  2686. __dynamic_array(u8, mgmt, len)
  2687. __field(s32, signal)
  2688. __field(u64, ts_boottime)
  2689. __field(u64, parent_tsf)
  2690. MAC_ENTRY(parent_bssid)
  2691. ),
  2692. TP_fast_assign(
  2693. WIPHY_ASSIGN;
  2694. CHAN_ASSIGN(data->chan);
  2695. __entry->scan_width = data->scan_width;
  2696. if (mgmt)
  2697. memcpy(__get_dynamic_array(mgmt), mgmt, len);
  2698. __entry->signal = data->signal;
  2699. __entry->ts_boottime = data->boottime_ns;
  2700. __entry->parent_tsf = data->parent_tsf;
  2701. MAC_ASSIGN(parent_bssid, data->parent_bssid);
  2702. ),
  2703. TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
  2704. "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
  2705. MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
  2706. __entry->signal, (unsigned long long)__entry->ts_boottime,
  2707. (unsigned long long)__entry->parent_tsf,
  2708. MAC_PR_ARG(parent_bssid))
  2709. );
  2710. DECLARE_EVENT_CLASS(cfg80211_bss_evt,
  2711. TP_PROTO(struct cfg80211_bss *pub),
  2712. TP_ARGS(pub),
  2713. TP_STRUCT__entry(
  2714. MAC_ENTRY(bssid)
  2715. CHAN_ENTRY
  2716. ),
  2717. TP_fast_assign(
  2718. MAC_ASSIGN(bssid, pub->bssid);
  2719. CHAN_ASSIGN(pub->channel);
  2720. ),
  2721. TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2722. );
  2723. DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
  2724. TP_PROTO(struct cfg80211_bss *pub),
  2725. TP_ARGS(pub)
  2726. );
  2727. TRACE_EVENT(cfg80211_return_uint,
  2728. TP_PROTO(unsigned int ret),
  2729. TP_ARGS(ret),
  2730. TP_STRUCT__entry(
  2731. __field(unsigned int, ret)
  2732. ),
  2733. TP_fast_assign(
  2734. __entry->ret = ret;
  2735. ),
  2736. TP_printk("ret: %d", __entry->ret)
  2737. );
  2738. TRACE_EVENT(cfg80211_return_u32,
  2739. TP_PROTO(u32 ret),
  2740. TP_ARGS(ret),
  2741. TP_STRUCT__entry(
  2742. __field(u32, ret)
  2743. ),
  2744. TP_fast_assign(
  2745. __entry->ret = ret;
  2746. ),
  2747. TP_printk("ret: %u", __entry->ret)
  2748. );
  2749. TRACE_EVENT(cfg80211_report_wowlan_wakeup,
  2750. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  2751. struct cfg80211_wowlan_wakeup *wakeup),
  2752. TP_ARGS(wiphy, wdev, wakeup),
  2753. TP_STRUCT__entry(
  2754. WIPHY_ENTRY
  2755. WDEV_ENTRY
  2756. __field(bool, non_wireless)
  2757. __field(bool, disconnect)
  2758. __field(bool, magic_pkt)
  2759. __field(bool, gtk_rekey_failure)
  2760. __field(bool, eap_identity_req)
  2761. __field(bool, four_way_handshake)
  2762. __field(bool, rfkill_release)
  2763. __field(s32, pattern_idx)
  2764. __field(u32, packet_len)
  2765. __dynamic_array(u8, packet,
  2766. wakeup ? wakeup->packet_present_len : 0)
  2767. ),
  2768. TP_fast_assign(
  2769. WIPHY_ASSIGN;
  2770. WDEV_ASSIGN;
  2771. __entry->non_wireless = !wakeup;
  2772. __entry->disconnect = wakeup ? wakeup->disconnect : false;
  2773. __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
  2774. __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
  2775. __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
  2776. __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
  2777. __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
  2778. __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
  2779. __entry->packet_len = wakeup ? wakeup->packet_len : false;
  2780. if (wakeup && wakeup->packet && wakeup->packet_present_len)
  2781. memcpy(__get_dynamic_array(packet), wakeup->packet,
  2782. wakeup->packet_present_len);
  2783. ),
  2784. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
  2785. );
  2786. TRACE_EVENT(cfg80211_ft_event,
  2787. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2788. struct cfg80211_ft_event_params *ft_event),
  2789. TP_ARGS(wiphy, netdev, ft_event),
  2790. TP_STRUCT__entry(
  2791. WIPHY_ENTRY
  2792. NETDEV_ENTRY
  2793. __dynamic_array(u8, ies, ft_event->ies_len)
  2794. MAC_ENTRY(target_ap)
  2795. __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
  2796. ),
  2797. TP_fast_assign(
  2798. WIPHY_ASSIGN;
  2799. NETDEV_ASSIGN;
  2800. if (ft_event->ies)
  2801. memcpy(__get_dynamic_array(ies), ft_event->ies,
  2802. ft_event->ies_len);
  2803. MAC_ASSIGN(target_ap, ft_event->target_ap);
  2804. if (ft_event->ric_ies)
  2805. memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
  2806. ft_event->ric_ies_len);
  2807. ),
  2808. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
  2809. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
  2810. );
  2811. TRACE_EVENT(cfg80211_stop_iface,
  2812. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  2813. TP_ARGS(wiphy, wdev),
  2814. TP_STRUCT__entry(
  2815. WIPHY_ENTRY
  2816. WDEV_ENTRY
  2817. ),
  2818. TP_fast_assign(
  2819. WIPHY_ASSIGN;
  2820. WDEV_ASSIGN;
  2821. ),
  2822. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
  2823. WIPHY_PR_ARG, WDEV_PR_ARG)
  2824. );
  2825. TRACE_EVENT(rdev_start_radar_detection,
  2826. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2827. struct cfg80211_chan_def *chandef,
  2828. u32 cac_time_ms),
  2829. TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
  2830. TP_STRUCT__entry(
  2831. WIPHY_ENTRY
  2832. NETDEV_ENTRY
  2833. CHAN_DEF_ENTRY
  2834. __field(u32, cac_time_ms)
  2835. ),
  2836. TP_fast_assign(
  2837. WIPHY_ASSIGN;
  2838. NETDEV_ASSIGN;
  2839. CHAN_DEF_ASSIGN(chandef);
  2840. __entry->cac_time_ms = cac_time_ms;
  2841. ),
  2842. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
  2843. ", cac_time_ms=%u",
  2844. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
  2845. __entry->cac_time_ms)
  2846. );
  2847. TRACE_EVENT(rdev_set_mcast_rate,
  2848. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2849. int mcast_rate[NUM_NL80211_BANDS]),
  2850. TP_ARGS(wiphy, netdev, mcast_rate),
  2851. TP_STRUCT__entry(
  2852. WIPHY_ENTRY
  2853. NETDEV_ENTRY
  2854. __array(int, mcast_rate, NUM_NL80211_BANDS)
  2855. ),
  2856. TP_fast_assign(
  2857. WIPHY_ASSIGN;
  2858. NETDEV_ASSIGN;
  2859. memcpy(__entry->mcast_rate, mcast_rate,
  2860. sizeof(int) * NUM_NL80211_BANDS);
  2861. ),
  2862. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
  2863. "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
  2864. WIPHY_PR_ARG, NETDEV_PR_ARG,
  2865. __entry->mcast_rate[NL80211_BAND_2GHZ],
  2866. __entry->mcast_rate[NL80211_BAND_5GHZ],
  2867. __entry->mcast_rate[NL80211_BAND_60GHZ])
  2868. );
  2869. TRACE_EVENT(rdev_set_coalesce,
  2870. TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
  2871. TP_ARGS(wiphy, coalesce),
  2872. TP_STRUCT__entry(
  2873. WIPHY_ENTRY
  2874. __field(int, n_rules)
  2875. ),
  2876. TP_fast_assign(
  2877. WIPHY_ASSIGN;
  2878. __entry->n_rules = coalesce ? coalesce->n_rules : 0;
  2879. ),
  2880. TP_printk(WIPHY_PR_FMT ", n_rules=%d",
  2881. WIPHY_PR_ARG, __entry->n_rules)
  2882. );
  2883. DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
  2884. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  2885. TP_ARGS(wiphy, wdev)
  2886. );
  2887. TRACE_EVENT(rdev_set_multicast_to_unicast,
  2888. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2889. const bool enabled),
  2890. TP_ARGS(wiphy, netdev, enabled),
  2891. TP_STRUCT__entry(
  2892. WIPHY_ENTRY
  2893. NETDEV_ENTRY
  2894. __field(bool, enabled)
  2895. ),
  2896. TP_fast_assign(
  2897. WIPHY_ASSIGN;
  2898. NETDEV_ASSIGN;
  2899. __entry->enabled = enabled;
  2900. ),
  2901. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
  2902. WIPHY_PR_ARG, NETDEV_PR_ARG,
  2903. BOOL_TO_STR(__entry->enabled))
  2904. );
  2905. #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
  2906. #undef TRACE_INCLUDE_PATH
  2907. #define TRACE_INCLUDE_PATH .
  2908. #undef TRACE_INCLUDE_FILE
  2909. #define TRACE_INCLUDE_FILE trace
  2910. #include <trace/define_trace.h>