trace.h 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040
  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_set_cqm_rssi_config,
  1205. TP_PROTO(struct wiphy *wiphy,
  1206. struct net_device *netdev, s32 rssi_thold,
  1207. u32 rssi_hyst),
  1208. TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
  1209. TP_STRUCT__entry(
  1210. WIPHY_ENTRY
  1211. NETDEV_ENTRY
  1212. __field(s32, rssi_thold)
  1213. __field(u32, rssi_hyst)
  1214. ),
  1215. TP_fast_assign(
  1216. WIPHY_ASSIGN;
  1217. NETDEV_ASSIGN;
  1218. __entry->rssi_thold = rssi_thold;
  1219. __entry->rssi_hyst = rssi_hyst;
  1220. ),
  1221. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
  1222. ", rssi_thold: %d, rssi_hyst: %u ",
  1223. WIPHY_PR_ARG, NETDEV_PR_ARG,
  1224. __entry->rssi_thold, __entry->rssi_hyst)
  1225. );
  1226. TRACE_EVENT(rdev_set_cqm_txe_config,
  1227. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
  1228. u32 pkts, u32 intvl),
  1229. TP_ARGS(wiphy, netdev, rate, pkts, intvl),
  1230. TP_STRUCT__entry(
  1231. WIPHY_ENTRY
  1232. NETDEV_ENTRY
  1233. __field(u32, rate)
  1234. __field(u32, pkts)
  1235. __field(u32, intvl)
  1236. ),
  1237. TP_fast_assign(
  1238. WIPHY_ASSIGN;
  1239. NETDEV_ASSIGN;
  1240. __entry->rate = rate;
  1241. __entry->pkts = pkts;
  1242. __entry->intvl = intvl;
  1243. ),
  1244. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
  1245. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
  1246. __entry->intvl)
  1247. );
  1248. TRACE_EVENT(rdev_disconnect,
  1249. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1250. u16 reason_code),
  1251. TP_ARGS(wiphy, netdev, reason_code),
  1252. TP_STRUCT__entry(
  1253. WIPHY_ENTRY
  1254. NETDEV_ENTRY
  1255. __field(u16, reason_code)
  1256. ),
  1257. TP_fast_assign(
  1258. WIPHY_ASSIGN;
  1259. NETDEV_ASSIGN;
  1260. __entry->reason_code = reason_code;
  1261. ),
  1262. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
  1263. NETDEV_PR_ARG, __entry->reason_code)
  1264. );
  1265. TRACE_EVENT(rdev_join_ibss,
  1266. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1267. struct cfg80211_ibss_params *params),
  1268. TP_ARGS(wiphy, netdev, params),
  1269. TP_STRUCT__entry(
  1270. WIPHY_ENTRY
  1271. NETDEV_ENTRY
  1272. MAC_ENTRY(bssid)
  1273. __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
  1274. ),
  1275. TP_fast_assign(
  1276. WIPHY_ASSIGN;
  1277. NETDEV_ASSIGN;
  1278. MAC_ASSIGN(bssid, params->bssid);
  1279. memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
  1280. memcpy(__entry->ssid, params->ssid, params->ssid_len);
  1281. ),
  1282. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
  1283. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
  1284. );
  1285. TRACE_EVENT(rdev_join_ocb,
  1286. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1287. const struct ocb_setup *setup),
  1288. TP_ARGS(wiphy, netdev, setup),
  1289. TP_STRUCT__entry(
  1290. WIPHY_ENTRY
  1291. NETDEV_ENTRY
  1292. ),
  1293. TP_fast_assign(
  1294. WIPHY_ASSIGN;
  1295. NETDEV_ASSIGN;
  1296. ),
  1297. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
  1298. WIPHY_PR_ARG, NETDEV_PR_ARG)
  1299. );
  1300. TRACE_EVENT(rdev_set_wiphy_params,
  1301. TP_PROTO(struct wiphy *wiphy, u32 changed),
  1302. TP_ARGS(wiphy, changed),
  1303. TP_STRUCT__entry(
  1304. WIPHY_ENTRY
  1305. __field(u32, changed)
  1306. ),
  1307. TP_fast_assign(
  1308. WIPHY_ASSIGN;
  1309. __entry->changed = changed;
  1310. ),
  1311. TP_printk(WIPHY_PR_FMT ", changed: %u",
  1312. WIPHY_PR_ARG, __entry->changed)
  1313. );
  1314. DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
  1315. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1316. TP_ARGS(wiphy, wdev)
  1317. );
  1318. TRACE_EVENT(rdev_set_tx_power,
  1319. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1320. enum nl80211_tx_power_setting type, int mbm),
  1321. TP_ARGS(wiphy, wdev, type, mbm),
  1322. TP_STRUCT__entry(
  1323. WIPHY_ENTRY
  1324. WDEV_ENTRY
  1325. __field(enum nl80211_tx_power_setting, type)
  1326. __field(int, mbm)
  1327. ),
  1328. TP_fast_assign(
  1329. WIPHY_ASSIGN;
  1330. WDEV_ASSIGN;
  1331. __entry->type = type;
  1332. __entry->mbm = mbm;
  1333. ),
  1334. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
  1335. WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
  1336. );
  1337. TRACE_EVENT(rdev_return_int_int,
  1338. TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
  1339. TP_ARGS(wiphy, func_ret, func_fill),
  1340. TP_STRUCT__entry(
  1341. WIPHY_ENTRY
  1342. __field(int, func_ret)
  1343. __field(int, func_fill)
  1344. ),
  1345. TP_fast_assign(
  1346. WIPHY_ASSIGN;
  1347. __entry->func_ret = func_ret;
  1348. __entry->func_fill = func_fill;
  1349. ),
  1350. TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
  1351. WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
  1352. );
  1353. #ifdef CONFIG_NL80211_TESTMODE
  1354. TRACE_EVENT(rdev_testmode_cmd,
  1355. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1356. TP_ARGS(wiphy, wdev),
  1357. TP_STRUCT__entry(
  1358. WIPHY_ENTRY
  1359. WDEV_ENTRY
  1360. ),
  1361. TP_fast_assign(
  1362. WIPHY_ASSIGN;
  1363. WDEV_ASSIGN;
  1364. ),
  1365. TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
  1366. );
  1367. TRACE_EVENT(rdev_testmode_dump,
  1368. TP_PROTO(struct wiphy *wiphy),
  1369. TP_ARGS(wiphy),
  1370. TP_STRUCT__entry(
  1371. WIPHY_ENTRY
  1372. ),
  1373. TP_fast_assign(
  1374. WIPHY_ASSIGN;
  1375. ),
  1376. TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
  1377. );
  1378. #endif /* CONFIG_NL80211_TESTMODE */
  1379. TRACE_EVENT(rdev_set_bitrate_mask,
  1380. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1381. const u8 *peer, const struct cfg80211_bitrate_mask *mask),
  1382. TP_ARGS(wiphy, netdev, peer, mask),
  1383. TP_STRUCT__entry(
  1384. WIPHY_ENTRY
  1385. NETDEV_ENTRY
  1386. MAC_ENTRY(peer)
  1387. ),
  1388. TP_fast_assign(
  1389. WIPHY_ASSIGN;
  1390. NETDEV_ASSIGN;
  1391. MAC_ASSIGN(peer, peer);
  1392. ),
  1393. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
  1394. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
  1395. );
  1396. TRACE_EVENT(rdev_mgmt_frame_register,
  1397. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1398. u16 frame_type, bool reg),
  1399. TP_ARGS(wiphy, wdev, frame_type, reg),
  1400. TP_STRUCT__entry(
  1401. WIPHY_ENTRY
  1402. WDEV_ENTRY
  1403. __field(u16, frame_type)
  1404. __field(bool, reg)
  1405. ),
  1406. TP_fast_assign(
  1407. WIPHY_ASSIGN;
  1408. WDEV_ASSIGN;
  1409. __entry->frame_type = frame_type;
  1410. __entry->reg = reg;
  1411. ),
  1412. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
  1413. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
  1414. __entry->reg ? "true" : "false")
  1415. );
  1416. TRACE_EVENT(rdev_return_int_tx_rx,
  1417. TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
  1418. TP_ARGS(wiphy, ret, tx, rx),
  1419. TP_STRUCT__entry(
  1420. WIPHY_ENTRY
  1421. __field(int, ret)
  1422. __field(u32, tx)
  1423. __field(u32, rx)
  1424. ),
  1425. TP_fast_assign(
  1426. WIPHY_ASSIGN;
  1427. __entry->ret = ret;
  1428. __entry->tx = tx;
  1429. __entry->rx = rx;
  1430. ),
  1431. TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
  1432. WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
  1433. );
  1434. TRACE_EVENT(rdev_return_void_tx_rx,
  1435. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
  1436. u32 rx, u32 rx_max),
  1437. TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
  1438. TP_STRUCT__entry(
  1439. WIPHY_ENTRY
  1440. __field(u32, tx)
  1441. __field(u32, tx_max)
  1442. __field(u32, rx)
  1443. __field(u32, rx_max)
  1444. ),
  1445. TP_fast_assign(
  1446. WIPHY_ASSIGN;
  1447. __entry->tx = tx;
  1448. __entry->tx_max = tx_max;
  1449. __entry->rx = rx;
  1450. __entry->rx_max = rx_max;
  1451. ),
  1452. TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
  1453. WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
  1454. __entry->rx_max)
  1455. );
  1456. DECLARE_EVENT_CLASS(tx_rx_evt,
  1457. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
  1458. TP_ARGS(wiphy, rx, tx),
  1459. TP_STRUCT__entry(
  1460. WIPHY_ENTRY
  1461. __field(u32, tx)
  1462. __field(u32, rx)
  1463. ),
  1464. TP_fast_assign(
  1465. WIPHY_ASSIGN;
  1466. __entry->tx = tx;
  1467. __entry->rx = rx;
  1468. ),
  1469. TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
  1470. WIPHY_PR_ARG, __entry->tx, __entry->rx)
  1471. );
  1472. DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
  1473. TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
  1474. TP_ARGS(wiphy, rx, tx)
  1475. );
  1476. TRACE_EVENT(rdev_sched_scan_start,
  1477. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1478. struct cfg80211_sched_scan_request *request),
  1479. TP_ARGS(wiphy, netdev, request),
  1480. TP_STRUCT__entry(
  1481. WIPHY_ENTRY
  1482. NETDEV_ENTRY
  1483. ),
  1484. TP_fast_assign(
  1485. WIPHY_ASSIGN;
  1486. NETDEV_ASSIGN;
  1487. ),
  1488. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
  1489. WIPHY_PR_ARG, NETDEV_PR_ARG)
  1490. );
  1491. TRACE_EVENT(rdev_tdls_mgmt,
  1492. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1493. u8 *peer, u8 action_code, u8 dialog_token,
  1494. u16 status_code, u32 peer_capability,
  1495. bool initiator, const u8 *buf, size_t len),
  1496. TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
  1497. peer_capability, initiator, buf, len),
  1498. TP_STRUCT__entry(
  1499. WIPHY_ENTRY
  1500. NETDEV_ENTRY
  1501. MAC_ENTRY(peer)
  1502. __field(u8, action_code)
  1503. __field(u8, dialog_token)
  1504. __field(u16, status_code)
  1505. __field(u32, peer_capability)
  1506. __field(bool, initiator)
  1507. __dynamic_array(u8, buf, len)
  1508. ),
  1509. TP_fast_assign(
  1510. WIPHY_ASSIGN;
  1511. NETDEV_ASSIGN;
  1512. MAC_ASSIGN(peer, peer);
  1513. __entry->action_code = action_code;
  1514. __entry->dialog_token = dialog_token;
  1515. __entry->status_code = status_code;
  1516. __entry->peer_capability = peer_capability;
  1517. __entry->initiator = initiator;
  1518. memcpy(__get_dynamic_array(buf), buf, len);
  1519. ),
  1520. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
  1521. "dialog_token: %u, status_code: %u, peer_capability: %u "
  1522. "initiator: %s buf: %#.2x ",
  1523. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
  1524. __entry->action_code, __entry->dialog_token,
  1525. __entry->status_code, __entry->peer_capability,
  1526. BOOL_TO_STR(__entry->initiator),
  1527. ((u8 *)__get_dynamic_array(buf))[0])
  1528. );
  1529. TRACE_EVENT(rdev_dump_survey,
  1530. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
  1531. TP_ARGS(wiphy, netdev, idx),
  1532. TP_STRUCT__entry(
  1533. WIPHY_ENTRY
  1534. NETDEV_ENTRY
  1535. __field(int, idx)
  1536. ),
  1537. TP_fast_assign(
  1538. WIPHY_ASSIGN;
  1539. NETDEV_ASSIGN;
  1540. __entry->idx = idx;
  1541. ),
  1542. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
  1543. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
  1544. );
  1545. TRACE_EVENT(rdev_return_int_survey_info,
  1546. TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
  1547. TP_ARGS(wiphy, ret, info),
  1548. TP_STRUCT__entry(
  1549. WIPHY_ENTRY
  1550. CHAN_ENTRY
  1551. __field(int, ret)
  1552. __field(u64, time)
  1553. __field(u64, time_busy)
  1554. __field(u64, time_ext_busy)
  1555. __field(u64, time_rx)
  1556. __field(u64, time_tx)
  1557. __field(u64, time_scan)
  1558. __field(u32, filled)
  1559. __field(s8, noise)
  1560. ),
  1561. TP_fast_assign(
  1562. WIPHY_ASSIGN;
  1563. CHAN_ASSIGN(info->channel);
  1564. __entry->ret = ret;
  1565. __entry->time = info->time;
  1566. __entry->time_busy = info->time_busy;
  1567. __entry->time_ext_busy = info->time_ext_busy;
  1568. __entry->time_rx = info->time_rx;
  1569. __entry->time_tx = info->time_tx;
  1570. __entry->time_scan = info->time_scan;
  1571. __entry->filled = info->filled;
  1572. __entry->noise = info->noise;
  1573. ),
  1574. TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
  1575. ", channel time: %llu, channel time busy: %llu, "
  1576. "channel time extension busy: %llu, channel time rx: %llu, "
  1577. "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
  1578. WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
  1579. __entry->time, __entry->time_busy,
  1580. __entry->time_ext_busy, __entry->time_rx,
  1581. __entry->time_tx, __entry->time_scan,
  1582. __entry->filled, __entry->noise)
  1583. );
  1584. TRACE_EVENT(rdev_tdls_oper,
  1585. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1586. u8 *peer, enum nl80211_tdls_operation oper),
  1587. TP_ARGS(wiphy, netdev, peer, oper),
  1588. TP_STRUCT__entry(
  1589. WIPHY_ENTRY
  1590. NETDEV_ENTRY
  1591. MAC_ENTRY(peer)
  1592. __field(enum nl80211_tdls_operation, oper)
  1593. ),
  1594. TP_fast_assign(
  1595. WIPHY_ASSIGN;
  1596. NETDEV_ASSIGN;
  1597. MAC_ASSIGN(peer, peer);
  1598. __entry->oper = oper;
  1599. ),
  1600. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
  1601. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
  1602. );
  1603. DECLARE_EVENT_CLASS(rdev_pmksa,
  1604. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1605. struct cfg80211_pmksa *pmksa),
  1606. TP_ARGS(wiphy, netdev, pmksa),
  1607. TP_STRUCT__entry(
  1608. WIPHY_ENTRY
  1609. NETDEV_ENTRY
  1610. MAC_ENTRY(bssid)
  1611. ),
  1612. TP_fast_assign(
  1613. WIPHY_ASSIGN;
  1614. NETDEV_ASSIGN;
  1615. MAC_ASSIGN(bssid, pmksa->bssid);
  1616. ),
  1617. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
  1618. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
  1619. );
  1620. TRACE_EVENT(rdev_probe_client,
  1621. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1622. const u8 *peer),
  1623. TP_ARGS(wiphy, netdev, peer),
  1624. TP_STRUCT__entry(
  1625. WIPHY_ENTRY
  1626. NETDEV_ENTRY
  1627. MAC_ENTRY(peer)
  1628. ),
  1629. TP_fast_assign(
  1630. WIPHY_ASSIGN;
  1631. NETDEV_ASSIGN;
  1632. MAC_ASSIGN(peer, peer);
  1633. ),
  1634. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
  1635. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
  1636. );
  1637. DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
  1638. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1639. struct cfg80211_pmksa *pmksa),
  1640. TP_ARGS(wiphy, netdev, pmksa)
  1641. );
  1642. DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
  1643. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1644. struct cfg80211_pmksa *pmksa),
  1645. TP_ARGS(wiphy, netdev, pmksa)
  1646. );
  1647. TRACE_EVENT(rdev_remain_on_channel,
  1648. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1649. struct ieee80211_channel *chan,
  1650. unsigned int duration),
  1651. TP_ARGS(wiphy, wdev, chan, duration),
  1652. TP_STRUCT__entry(
  1653. WIPHY_ENTRY
  1654. WDEV_ENTRY
  1655. CHAN_ENTRY
  1656. __field(unsigned int, duration)
  1657. ),
  1658. TP_fast_assign(
  1659. WIPHY_ASSIGN;
  1660. WDEV_ASSIGN;
  1661. CHAN_ASSIGN(chan);
  1662. __entry->duration = duration;
  1663. ),
  1664. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
  1665. WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
  1666. );
  1667. TRACE_EVENT(rdev_return_int_cookie,
  1668. TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
  1669. TP_ARGS(wiphy, ret, cookie),
  1670. TP_STRUCT__entry(
  1671. WIPHY_ENTRY
  1672. __field(int, ret)
  1673. __field(u64, cookie)
  1674. ),
  1675. TP_fast_assign(
  1676. WIPHY_ASSIGN;
  1677. __entry->ret = ret;
  1678. __entry->cookie = cookie;
  1679. ),
  1680. TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
  1681. WIPHY_PR_ARG, __entry->ret, __entry->cookie)
  1682. );
  1683. TRACE_EVENT(rdev_cancel_remain_on_channel,
  1684. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
  1685. TP_ARGS(wiphy, wdev, cookie),
  1686. TP_STRUCT__entry(
  1687. WIPHY_ENTRY
  1688. WDEV_ENTRY
  1689. __field(u64, cookie)
  1690. ),
  1691. TP_fast_assign(
  1692. WIPHY_ASSIGN;
  1693. WDEV_ASSIGN;
  1694. __entry->cookie = cookie;
  1695. ),
  1696. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
  1697. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
  1698. );
  1699. TRACE_EVENT(rdev_mgmt_tx,
  1700. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1701. struct cfg80211_mgmt_tx_params *params),
  1702. TP_ARGS(wiphy, wdev, params),
  1703. TP_STRUCT__entry(
  1704. WIPHY_ENTRY
  1705. WDEV_ENTRY
  1706. CHAN_ENTRY
  1707. __field(bool, offchan)
  1708. __field(unsigned int, wait)
  1709. __field(bool, no_cck)
  1710. __field(bool, dont_wait_for_ack)
  1711. ),
  1712. TP_fast_assign(
  1713. WIPHY_ASSIGN;
  1714. WDEV_ASSIGN;
  1715. CHAN_ASSIGN(params->chan);
  1716. __entry->offchan = params->offchan;
  1717. __entry->wait = params->wait;
  1718. __entry->no_cck = params->no_cck;
  1719. __entry->dont_wait_for_ack = params->dont_wait_for_ack;
  1720. ),
  1721. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
  1722. " wait: %u, no cck: %s, dont wait for ack: %s",
  1723. WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
  1724. BOOL_TO_STR(__entry->offchan), __entry->wait,
  1725. BOOL_TO_STR(__entry->no_cck),
  1726. BOOL_TO_STR(__entry->dont_wait_for_ack))
  1727. );
  1728. TRACE_EVENT(rdev_set_noack_map,
  1729. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1730. u16 noack_map),
  1731. TP_ARGS(wiphy, netdev, noack_map),
  1732. TP_STRUCT__entry(
  1733. WIPHY_ENTRY
  1734. NETDEV_ENTRY
  1735. __field(u16, noack_map)
  1736. ),
  1737. TP_fast_assign(
  1738. WIPHY_ASSIGN;
  1739. NETDEV_ASSIGN;
  1740. __entry->noack_map = noack_map;
  1741. ),
  1742. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
  1743. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
  1744. );
  1745. DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
  1746. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1747. TP_ARGS(wiphy, wdev)
  1748. );
  1749. TRACE_EVENT(rdev_return_chandef,
  1750. TP_PROTO(struct wiphy *wiphy, int ret,
  1751. struct cfg80211_chan_def *chandef),
  1752. TP_ARGS(wiphy, ret, chandef),
  1753. TP_STRUCT__entry(
  1754. WIPHY_ENTRY
  1755. __field(int, ret)
  1756. CHAN_DEF_ENTRY
  1757. ),
  1758. TP_fast_assign(
  1759. WIPHY_ASSIGN;
  1760. if (ret == 0)
  1761. CHAN_DEF_ASSIGN(chandef);
  1762. else
  1763. CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
  1764. __entry->ret = ret;
  1765. ),
  1766. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
  1767. WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
  1768. );
  1769. DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
  1770. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1771. TP_ARGS(wiphy, wdev)
  1772. );
  1773. DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
  1774. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1775. TP_ARGS(wiphy, wdev)
  1776. );
  1777. TRACE_EVENT(rdev_start_nan,
  1778. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1779. struct cfg80211_nan_conf *conf),
  1780. TP_ARGS(wiphy, wdev, conf),
  1781. TP_STRUCT__entry(
  1782. WIPHY_ENTRY
  1783. WDEV_ENTRY
  1784. __field(u8, master_pref)
  1785. __field(u8, dual);
  1786. ),
  1787. TP_fast_assign(
  1788. WIPHY_ASSIGN;
  1789. WDEV_ASSIGN;
  1790. __entry->master_pref = conf->master_pref;
  1791. __entry->dual = conf->dual;
  1792. ),
  1793. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
  1794. ", master preference: %u, dual: %d",
  1795. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
  1796. __entry->dual)
  1797. );
  1798. TRACE_EVENT(rdev_nan_change_conf,
  1799. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1800. struct cfg80211_nan_conf *conf, u32 changes),
  1801. TP_ARGS(wiphy, wdev, conf, changes),
  1802. TP_STRUCT__entry(
  1803. WIPHY_ENTRY
  1804. WDEV_ENTRY
  1805. __field(u8, master_pref)
  1806. __field(u8, dual);
  1807. __field(u32, changes);
  1808. ),
  1809. TP_fast_assign(
  1810. WIPHY_ASSIGN;
  1811. WDEV_ASSIGN;
  1812. __entry->master_pref = conf->master_pref;
  1813. __entry->dual = conf->dual;
  1814. __entry->changes = changes;
  1815. ),
  1816. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
  1817. ", master preference: %u, dual: %d, changes: %x",
  1818. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
  1819. __entry->dual, __entry->changes)
  1820. );
  1821. DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
  1822. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1823. TP_ARGS(wiphy, wdev)
  1824. );
  1825. TRACE_EVENT(rdev_add_nan_func,
  1826. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1827. const struct cfg80211_nan_func *func),
  1828. TP_ARGS(wiphy, wdev, func),
  1829. TP_STRUCT__entry(
  1830. WIPHY_ENTRY
  1831. WDEV_ENTRY
  1832. __field(u8, func_type)
  1833. __field(u64, cookie)
  1834. ),
  1835. TP_fast_assign(
  1836. WIPHY_ASSIGN;
  1837. WDEV_ASSIGN;
  1838. __entry->func_type = func->type;
  1839. __entry->cookie = func->cookie
  1840. ),
  1841. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
  1842. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
  1843. __entry->cookie)
  1844. );
  1845. TRACE_EVENT(rdev_del_nan_func,
  1846. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1847. u64 cookie),
  1848. TP_ARGS(wiphy, wdev, cookie),
  1849. TP_STRUCT__entry(
  1850. WIPHY_ENTRY
  1851. WDEV_ENTRY
  1852. __field(u64, cookie)
  1853. ),
  1854. TP_fast_assign(
  1855. WIPHY_ASSIGN;
  1856. WDEV_ASSIGN;
  1857. __entry->cookie = cookie;
  1858. ),
  1859. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
  1860. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
  1861. );
  1862. TRACE_EVENT(rdev_set_mac_acl,
  1863. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1864. struct cfg80211_acl_data *params),
  1865. TP_ARGS(wiphy, netdev, params),
  1866. TP_STRUCT__entry(
  1867. WIPHY_ENTRY
  1868. NETDEV_ENTRY
  1869. __field(u32, acl_policy)
  1870. ),
  1871. TP_fast_assign(
  1872. WIPHY_ASSIGN;
  1873. NETDEV_ASSIGN;
  1874. __entry->acl_policy = params->acl_policy;
  1875. ),
  1876. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
  1877. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
  1878. );
  1879. TRACE_EVENT(rdev_update_ft_ies,
  1880. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1881. struct cfg80211_update_ft_ies_params *ftie),
  1882. TP_ARGS(wiphy, netdev, ftie),
  1883. TP_STRUCT__entry(
  1884. WIPHY_ENTRY
  1885. NETDEV_ENTRY
  1886. __field(u16, md)
  1887. __dynamic_array(u8, ie, ftie->ie_len)
  1888. ),
  1889. TP_fast_assign(
  1890. WIPHY_ASSIGN;
  1891. NETDEV_ASSIGN;
  1892. __entry->md = ftie->md;
  1893. memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
  1894. ),
  1895. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
  1896. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
  1897. );
  1898. TRACE_EVENT(rdev_crit_proto_start,
  1899. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  1900. enum nl80211_crit_proto_id protocol, u16 duration),
  1901. TP_ARGS(wiphy, wdev, protocol, duration),
  1902. TP_STRUCT__entry(
  1903. WIPHY_ENTRY
  1904. WDEV_ENTRY
  1905. __field(u16, proto)
  1906. __field(u16, duration)
  1907. ),
  1908. TP_fast_assign(
  1909. WIPHY_ASSIGN;
  1910. WDEV_ASSIGN;
  1911. __entry->proto = protocol;
  1912. __entry->duration = duration;
  1913. ),
  1914. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
  1915. WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
  1916. );
  1917. TRACE_EVENT(rdev_crit_proto_stop,
  1918. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  1919. TP_ARGS(wiphy, wdev),
  1920. TP_STRUCT__entry(
  1921. WIPHY_ENTRY
  1922. WDEV_ENTRY
  1923. ),
  1924. TP_fast_assign(
  1925. WIPHY_ASSIGN;
  1926. WDEV_ASSIGN;
  1927. ),
  1928. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
  1929. WIPHY_PR_ARG, WDEV_PR_ARG)
  1930. );
  1931. TRACE_EVENT(rdev_channel_switch,
  1932. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1933. struct cfg80211_csa_settings *params),
  1934. TP_ARGS(wiphy, netdev, params),
  1935. TP_STRUCT__entry(
  1936. WIPHY_ENTRY
  1937. NETDEV_ENTRY
  1938. CHAN_DEF_ENTRY
  1939. __field(bool, radar_required)
  1940. __field(bool, block_tx)
  1941. __field(u8, count)
  1942. __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
  1943. __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
  1944. ),
  1945. TP_fast_assign(
  1946. WIPHY_ASSIGN;
  1947. NETDEV_ASSIGN;
  1948. CHAN_DEF_ASSIGN(&params->chandef);
  1949. __entry->radar_required = params->radar_required;
  1950. __entry->block_tx = params->block_tx;
  1951. __entry->count = params->count;
  1952. memcpy(__get_dynamic_array(bcn_ofs),
  1953. params->counter_offsets_beacon,
  1954. params->n_counter_offsets_beacon * sizeof(u16));
  1955. /* probe response offsets are optional */
  1956. if (params->n_counter_offsets_presp)
  1957. memcpy(__get_dynamic_array(pres_ofs),
  1958. params->counter_offsets_presp,
  1959. params->n_counter_offsets_presp * sizeof(u16));
  1960. ),
  1961. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
  1962. ", block_tx: %d, count: %u, radar_required: %d",
  1963. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
  1964. __entry->block_tx, __entry->count, __entry->radar_required)
  1965. );
  1966. TRACE_EVENT(rdev_set_qos_map,
  1967. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1968. struct cfg80211_qos_map *qos_map),
  1969. TP_ARGS(wiphy, netdev, qos_map),
  1970. TP_STRUCT__entry(
  1971. WIPHY_ENTRY
  1972. NETDEV_ENTRY
  1973. QOS_MAP_ENTRY
  1974. ),
  1975. TP_fast_assign(
  1976. WIPHY_ASSIGN;
  1977. NETDEV_ASSIGN;
  1978. QOS_MAP_ASSIGN(qos_map);
  1979. ),
  1980. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
  1981. WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
  1982. );
  1983. TRACE_EVENT(rdev_set_ap_chanwidth,
  1984. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  1985. struct cfg80211_chan_def *chandef),
  1986. TP_ARGS(wiphy, netdev, chandef),
  1987. TP_STRUCT__entry(
  1988. WIPHY_ENTRY
  1989. NETDEV_ENTRY
  1990. CHAN_DEF_ENTRY
  1991. ),
  1992. TP_fast_assign(
  1993. WIPHY_ASSIGN;
  1994. NETDEV_ASSIGN;
  1995. CHAN_DEF_ASSIGN(chandef);
  1996. ),
  1997. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  1998. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  1999. );
  2000. TRACE_EVENT(rdev_add_tx_ts,
  2001. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2002. u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
  2003. TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
  2004. TP_STRUCT__entry(
  2005. WIPHY_ENTRY
  2006. NETDEV_ENTRY
  2007. MAC_ENTRY(peer)
  2008. __field(u8, tsid)
  2009. __field(u8, user_prio)
  2010. __field(u16, admitted_time)
  2011. ),
  2012. TP_fast_assign(
  2013. WIPHY_ASSIGN;
  2014. NETDEV_ASSIGN;
  2015. MAC_ASSIGN(peer, peer);
  2016. __entry->tsid = tsid;
  2017. __entry->user_prio = user_prio;
  2018. __entry->admitted_time = admitted_time;
  2019. ),
  2020. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
  2021. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
  2022. __entry->tsid, __entry->user_prio, __entry->admitted_time)
  2023. );
  2024. TRACE_EVENT(rdev_del_tx_ts,
  2025. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2026. u8 tsid, const u8 *peer),
  2027. TP_ARGS(wiphy, netdev, tsid, peer),
  2028. TP_STRUCT__entry(
  2029. WIPHY_ENTRY
  2030. NETDEV_ENTRY
  2031. MAC_ENTRY(peer)
  2032. __field(u8, tsid)
  2033. ),
  2034. TP_fast_assign(
  2035. WIPHY_ASSIGN;
  2036. NETDEV_ASSIGN;
  2037. MAC_ASSIGN(peer, peer);
  2038. __entry->tsid = tsid;
  2039. ),
  2040. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
  2041. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
  2042. );
  2043. TRACE_EVENT(rdev_tdls_channel_switch,
  2044. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2045. const u8 *addr, u8 oper_class,
  2046. struct cfg80211_chan_def *chandef),
  2047. TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
  2048. TP_STRUCT__entry(
  2049. WIPHY_ENTRY
  2050. NETDEV_ENTRY
  2051. MAC_ENTRY(addr)
  2052. __field(u8, oper_class)
  2053. CHAN_DEF_ENTRY
  2054. ),
  2055. TP_fast_assign(
  2056. WIPHY_ASSIGN;
  2057. NETDEV_ASSIGN;
  2058. MAC_ASSIGN(addr, addr);
  2059. CHAN_DEF_ASSIGN(chandef);
  2060. ),
  2061. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
  2062. " oper class %d, " CHAN_DEF_PR_FMT,
  2063. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
  2064. __entry->oper_class, CHAN_DEF_PR_ARG)
  2065. );
  2066. TRACE_EVENT(rdev_tdls_cancel_channel_switch,
  2067. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2068. const u8 *addr),
  2069. TP_ARGS(wiphy, netdev, addr),
  2070. TP_STRUCT__entry(
  2071. WIPHY_ENTRY
  2072. NETDEV_ENTRY
  2073. MAC_ENTRY(addr)
  2074. ),
  2075. TP_fast_assign(
  2076. WIPHY_ASSIGN;
  2077. NETDEV_ASSIGN;
  2078. MAC_ASSIGN(addr, addr);
  2079. ),
  2080. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
  2081. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
  2082. );
  2083. /*************************************************************
  2084. * cfg80211 exported functions traces *
  2085. *************************************************************/
  2086. TRACE_EVENT(cfg80211_return_bool,
  2087. TP_PROTO(bool ret),
  2088. TP_ARGS(ret),
  2089. TP_STRUCT__entry(
  2090. __field(bool, ret)
  2091. ),
  2092. TP_fast_assign(
  2093. __entry->ret = ret;
  2094. ),
  2095. TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
  2096. );
  2097. DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
  2098. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2099. TP_ARGS(netdev, macaddr),
  2100. TP_STRUCT__entry(
  2101. NETDEV_ENTRY
  2102. MAC_ENTRY(macaddr)
  2103. ),
  2104. TP_fast_assign(
  2105. NETDEV_ASSIGN;
  2106. MAC_ASSIGN(macaddr, macaddr);
  2107. ),
  2108. TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
  2109. NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
  2110. );
  2111. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
  2112. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2113. TP_ARGS(netdev, macaddr)
  2114. );
  2115. DECLARE_EVENT_CLASS(netdev_evt_only,
  2116. TP_PROTO(struct net_device *netdev),
  2117. TP_ARGS(netdev),
  2118. TP_STRUCT__entry(
  2119. NETDEV_ENTRY
  2120. ),
  2121. TP_fast_assign(
  2122. NETDEV_ASSIGN;
  2123. ),
  2124. TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
  2125. );
  2126. DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
  2127. TP_PROTO(struct net_device *netdev),
  2128. TP_ARGS(netdev)
  2129. );
  2130. TRACE_EVENT(cfg80211_send_rx_assoc,
  2131. TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
  2132. TP_ARGS(netdev, bss),
  2133. TP_STRUCT__entry(
  2134. NETDEV_ENTRY
  2135. MAC_ENTRY(bssid)
  2136. CHAN_ENTRY
  2137. ),
  2138. TP_fast_assign(
  2139. NETDEV_ASSIGN;
  2140. MAC_ASSIGN(bssid, bss->bssid);
  2141. CHAN_ASSIGN(bss->channel);
  2142. ),
  2143. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
  2144. NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2145. );
  2146. DECLARE_EVENT_CLASS(netdev_frame_event,
  2147. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2148. TP_ARGS(netdev, buf, len),
  2149. TP_STRUCT__entry(
  2150. NETDEV_ENTRY
  2151. __dynamic_array(u8, frame, len)
  2152. ),
  2153. TP_fast_assign(
  2154. NETDEV_ASSIGN;
  2155. memcpy(__get_dynamic_array(frame), buf, len);
  2156. ),
  2157. TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
  2158. NETDEV_PR_ARG,
  2159. le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
  2160. );
  2161. DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
  2162. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2163. TP_ARGS(netdev, buf, len)
  2164. );
  2165. DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
  2166. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2167. TP_ARGS(netdev, buf, len)
  2168. );
  2169. TRACE_EVENT(cfg80211_tx_mlme_mgmt,
  2170. TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
  2171. TP_ARGS(netdev, buf, len),
  2172. TP_STRUCT__entry(
  2173. NETDEV_ENTRY
  2174. __dynamic_array(u8, frame, len)
  2175. ),
  2176. TP_fast_assign(
  2177. NETDEV_ASSIGN;
  2178. memcpy(__get_dynamic_array(frame), buf, len);
  2179. ),
  2180. TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
  2181. NETDEV_PR_ARG,
  2182. le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
  2183. );
  2184. DECLARE_EVENT_CLASS(netdev_mac_evt,
  2185. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2186. TP_ARGS(netdev, mac),
  2187. TP_STRUCT__entry(
  2188. NETDEV_ENTRY
  2189. MAC_ENTRY(mac)
  2190. ),
  2191. TP_fast_assign(
  2192. NETDEV_ASSIGN;
  2193. MAC_ASSIGN(mac, mac)
  2194. ),
  2195. TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
  2196. NETDEV_PR_ARG, MAC_PR_ARG(mac))
  2197. );
  2198. DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
  2199. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2200. TP_ARGS(netdev, mac)
  2201. );
  2202. DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
  2203. TP_PROTO(struct net_device *netdev, const u8 *mac),
  2204. TP_ARGS(netdev, mac)
  2205. );
  2206. TRACE_EVENT(cfg80211_michael_mic_failure,
  2207. TP_PROTO(struct net_device *netdev, const u8 *addr,
  2208. enum nl80211_key_type key_type, int key_id, const u8 *tsc),
  2209. TP_ARGS(netdev, addr, key_type, key_id, tsc),
  2210. TP_STRUCT__entry(
  2211. NETDEV_ENTRY
  2212. MAC_ENTRY(addr)
  2213. __field(enum nl80211_key_type, key_type)
  2214. __field(int, key_id)
  2215. __array(u8, tsc, 6)
  2216. ),
  2217. TP_fast_assign(
  2218. NETDEV_ASSIGN;
  2219. MAC_ASSIGN(addr, addr);
  2220. __entry->key_type = key_type;
  2221. __entry->key_id = key_id;
  2222. if (tsc)
  2223. memcpy(__entry->tsc, tsc, 6);
  2224. ),
  2225. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
  2226. NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
  2227. __entry->key_id, __entry->tsc)
  2228. );
  2229. TRACE_EVENT(cfg80211_ready_on_channel,
  2230. TP_PROTO(struct wireless_dev *wdev, u64 cookie,
  2231. struct ieee80211_channel *chan,
  2232. unsigned int duration),
  2233. TP_ARGS(wdev, cookie, chan, duration),
  2234. TP_STRUCT__entry(
  2235. WDEV_ENTRY
  2236. __field(u64, cookie)
  2237. CHAN_ENTRY
  2238. __field(unsigned int, duration)
  2239. ),
  2240. TP_fast_assign(
  2241. WDEV_ASSIGN;
  2242. __entry->cookie = cookie;
  2243. CHAN_ASSIGN(chan);
  2244. __entry->duration = duration;
  2245. ),
  2246. TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
  2247. WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
  2248. __entry->duration)
  2249. );
  2250. TRACE_EVENT(cfg80211_ready_on_channel_expired,
  2251. TP_PROTO(struct wireless_dev *wdev, u64 cookie,
  2252. struct ieee80211_channel *chan),
  2253. TP_ARGS(wdev, cookie, chan),
  2254. TP_STRUCT__entry(
  2255. WDEV_ENTRY
  2256. __field(u64, cookie)
  2257. CHAN_ENTRY
  2258. ),
  2259. TP_fast_assign(
  2260. WDEV_ASSIGN;
  2261. __entry->cookie = cookie;
  2262. CHAN_ASSIGN(chan);
  2263. ),
  2264. TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
  2265. WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
  2266. );
  2267. TRACE_EVENT(cfg80211_new_sta,
  2268. TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
  2269. struct station_info *sinfo),
  2270. TP_ARGS(netdev, mac_addr, sinfo),
  2271. TP_STRUCT__entry(
  2272. NETDEV_ENTRY
  2273. MAC_ENTRY(mac_addr)
  2274. SINFO_ENTRY
  2275. ),
  2276. TP_fast_assign(
  2277. NETDEV_ASSIGN;
  2278. MAC_ASSIGN(mac_addr, mac_addr);
  2279. SINFO_ASSIGN;
  2280. ),
  2281. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
  2282. NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
  2283. );
  2284. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
  2285. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2286. TP_ARGS(netdev, macaddr)
  2287. );
  2288. TRACE_EVENT(cfg80211_rx_mgmt,
  2289. TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
  2290. TP_ARGS(wdev, freq, sig_mbm),
  2291. TP_STRUCT__entry(
  2292. WDEV_ENTRY
  2293. __field(int, freq)
  2294. __field(int, sig_mbm)
  2295. ),
  2296. TP_fast_assign(
  2297. WDEV_ASSIGN;
  2298. __entry->freq = freq;
  2299. __entry->sig_mbm = sig_mbm;
  2300. ),
  2301. TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
  2302. WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
  2303. );
  2304. TRACE_EVENT(cfg80211_mgmt_tx_status,
  2305. TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
  2306. TP_ARGS(wdev, cookie, ack),
  2307. TP_STRUCT__entry(
  2308. WDEV_ENTRY
  2309. __field(u64, cookie)
  2310. __field(bool, ack)
  2311. ),
  2312. TP_fast_assign(
  2313. WDEV_ASSIGN;
  2314. __entry->cookie = cookie;
  2315. __entry->ack = ack;
  2316. ),
  2317. TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
  2318. WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
  2319. );
  2320. TRACE_EVENT(cfg80211_cqm_rssi_notify,
  2321. TP_PROTO(struct net_device *netdev,
  2322. enum nl80211_cqm_rssi_threshold_event rssi_event),
  2323. TP_ARGS(netdev, rssi_event),
  2324. TP_STRUCT__entry(
  2325. NETDEV_ENTRY
  2326. __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
  2327. ),
  2328. TP_fast_assign(
  2329. NETDEV_ASSIGN;
  2330. __entry->rssi_event = rssi_event;
  2331. ),
  2332. TP_printk(NETDEV_PR_FMT ", rssi event: %d",
  2333. NETDEV_PR_ARG, __entry->rssi_event)
  2334. );
  2335. TRACE_EVENT(cfg80211_reg_can_beacon,
  2336. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
  2337. enum nl80211_iftype iftype, bool check_no_ir),
  2338. TP_ARGS(wiphy, chandef, iftype, check_no_ir),
  2339. TP_STRUCT__entry(
  2340. WIPHY_ENTRY
  2341. CHAN_DEF_ENTRY
  2342. __field(enum nl80211_iftype, iftype)
  2343. __field(bool, check_no_ir)
  2344. ),
  2345. TP_fast_assign(
  2346. WIPHY_ASSIGN;
  2347. CHAN_DEF_ASSIGN(chandef);
  2348. __entry->iftype = iftype;
  2349. __entry->check_no_ir = check_no_ir;
  2350. ),
  2351. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
  2352. WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
  2353. BOOL_TO_STR(__entry->check_no_ir))
  2354. );
  2355. TRACE_EVENT(cfg80211_chandef_dfs_required,
  2356. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
  2357. TP_ARGS(wiphy, chandef),
  2358. TP_STRUCT__entry(
  2359. WIPHY_ENTRY
  2360. CHAN_DEF_ENTRY
  2361. ),
  2362. TP_fast_assign(
  2363. WIPHY_ASSIGN;
  2364. CHAN_DEF_ASSIGN(chandef);
  2365. ),
  2366. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
  2367. WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
  2368. );
  2369. TRACE_EVENT(cfg80211_ch_switch_notify,
  2370. TP_PROTO(struct net_device *netdev,
  2371. struct cfg80211_chan_def *chandef),
  2372. TP_ARGS(netdev, chandef),
  2373. TP_STRUCT__entry(
  2374. NETDEV_ENTRY
  2375. CHAN_DEF_ENTRY
  2376. ),
  2377. TP_fast_assign(
  2378. NETDEV_ASSIGN;
  2379. CHAN_DEF_ASSIGN(chandef);
  2380. ),
  2381. TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  2382. NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  2383. );
  2384. TRACE_EVENT(cfg80211_ch_switch_started_notify,
  2385. TP_PROTO(struct net_device *netdev,
  2386. struct cfg80211_chan_def *chandef),
  2387. TP_ARGS(netdev, chandef),
  2388. TP_STRUCT__entry(
  2389. NETDEV_ENTRY
  2390. CHAN_DEF_ENTRY
  2391. ),
  2392. TP_fast_assign(
  2393. NETDEV_ASSIGN;
  2394. CHAN_DEF_ASSIGN(chandef);
  2395. ),
  2396. TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
  2397. NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
  2398. );
  2399. TRACE_EVENT(cfg80211_radar_event,
  2400. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
  2401. TP_ARGS(wiphy, chandef),
  2402. TP_STRUCT__entry(
  2403. WIPHY_ENTRY
  2404. CHAN_DEF_ENTRY
  2405. ),
  2406. TP_fast_assign(
  2407. WIPHY_ASSIGN;
  2408. CHAN_DEF_ASSIGN(chandef);
  2409. ),
  2410. TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
  2411. WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
  2412. );
  2413. TRACE_EVENT(cfg80211_cac_event,
  2414. TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
  2415. TP_ARGS(netdev, evt),
  2416. TP_STRUCT__entry(
  2417. NETDEV_ENTRY
  2418. __field(enum nl80211_radar_event, evt)
  2419. ),
  2420. TP_fast_assign(
  2421. NETDEV_ASSIGN;
  2422. __entry->evt = evt;
  2423. ),
  2424. TP_printk(NETDEV_PR_FMT ", event: %d",
  2425. NETDEV_PR_ARG, __entry->evt)
  2426. );
  2427. DECLARE_EVENT_CLASS(cfg80211_rx_evt,
  2428. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2429. TP_ARGS(netdev, addr),
  2430. TP_STRUCT__entry(
  2431. NETDEV_ENTRY
  2432. MAC_ENTRY(addr)
  2433. ),
  2434. TP_fast_assign(
  2435. NETDEV_ASSIGN;
  2436. MAC_ASSIGN(addr, addr);
  2437. ),
  2438. TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
  2439. );
  2440. DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
  2441. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2442. TP_ARGS(netdev, addr)
  2443. );
  2444. DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
  2445. TP_PROTO(struct net_device *netdev, const u8 *addr),
  2446. TP_ARGS(netdev, addr)
  2447. );
  2448. TRACE_EVENT(cfg80211_ibss_joined,
  2449. TP_PROTO(struct net_device *netdev, const u8 *bssid,
  2450. struct ieee80211_channel *channel),
  2451. TP_ARGS(netdev, bssid, channel),
  2452. TP_STRUCT__entry(
  2453. NETDEV_ENTRY
  2454. MAC_ENTRY(bssid)
  2455. CHAN_ENTRY
  2456. ),
  2457. TP_fast_assign(
  2458. NETDEV_ASSIGN;
  2459. MAC_ASSIGN(bssid, bssid);
  2460. CHAN_ASSIGN(channel);
  2461. ),
  2462. TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
  2463. NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2464. );
  2465. TRACE_EVENT(cfg80211_probe_status,
  2466. TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
  2467. bool acked),
  2468. TP_ARGS(netdev, addr, cookie, acked),
  2469. TP_STRUCT__entry(
  2470. NETDEV_ENTRY
  2471. MAC_ENTRY(addr)
  2472. __field(u64, cookie)
  2473. __field(bool, acked)
  2474. ),
  2475. TP_fast_assign(
  2476. NETDEV_ASSIGN;
  2477. MAC_ASSIGN(addr, addr);
  2478. __entry->cookie = cookie;
  2479. __entry->acked = acked;
  2480. ),
  2481. TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
  2482. NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
  2483. BOOL_TO_STR(__entry->acked))
  2484. );
  2485. TRACE_EVENT(cfg80211_cqm_pktloss_notify,
  2486. TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
  2487. TP_ARGS(netdev, peer, num_packets),
  2488. TP_STRUCT__entry(
  2489. NETDEV_ENTRY
  2490. MAC_ENTRY(peer)
  2491. __field(u32, num_packets)
  2492. ),
  2493. TP_fast_assign(
  2494. NETDEV_ASSIGN;
  2495. MAC_ASSIGN(peer, peer);
  2496. __entry->num_packets = num_packets;
  2497. ),
  2498. TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
  2499. NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
  2500. );
  2501. DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
  2502. TP_PROTO(struct net_device *netdev, const u8 *macaddr),
  2503. TP_ARGS(netdev, macaddr)
  2504. );
  2505. TRACE_EVENT(cfg80211_pmksa_candidate_notify,
  2506. TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
  2507. bool preauth),
  2508. TP_ARGS(netdev, index, bssid, preauth),
  2509. TP_STRUCT__entry(
  2510. NETDEV_ENTRY
  2511. __field(int, index)
  2512. MAC_ENTRY(bssid)
  2513. __field(bool, preauth)
  2514. ),
  2515. TP_fast_assign(
  2516. NETDEV_ASSIGN;
  2517. __entry->index = index;
  2518. MAC_ASSIGN(bssid, bssid);
  2519. __entry->preauth = preauth;
  2520. ),
  2521. TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
  2522. NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
  2523. BOOL_TO_STR(__entry->preauth))
  2524. );
  2525. TRACE_EVENT(cfg80211_report_obss_beacon,
  2526. TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
  2527. int freq, int sig_dbm),
  2528. TP_ARGS(wiphy, frame, len, freq, sig_dbm),
  2529. TP_STRUCT__entry(
  2530. WIPHY_ENTRY
  2531. __field(int, freq)
  2532. __field(int, sig_dbm)
  2533. ),
  2534. TP_fast_assign(
  2535. WIPHY_ASSIGN;
  2536. __entry->freq = freq;
  2537. __entry->sig_dbm = sig_dbm;
  2538. ),
  2539. TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
  2540. WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
  2541. );
  2542. TRACE_EVENT(cfg80211_tdls_oper_request,
  2543. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
  2544. enum nl80211_tdls_operation oper, u16 reason_code),
  2545. TP_ARGS(wiphy, netdev, peer, oper, reason_code),
  2546. TP_STRUCT__entry(
  2547. WIPHY_ENTRY
  2548. NETDEV_ENTRY
  2549. MAC_ENTRY(peer)
  2550. __field(enum nl80211_tdls_operation, oper)
  2551. __field(u16, reason_code)
  2552. ),
  2553. TP_fast_assign(
  2554. WIPHY_ASSIGN;
  2555. NETDEV_ASSIGN;
  2556. MAC_ASSIGN(peer, peer);
  2557. __entry->oper = oper;
  2558. __entry->reason_code = reason_code;
  2559. ),
  2560. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
  2561. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
  2562. __entry->reason_code)
  2563. );
  2564. TRACE_EVENT(cfg80211_scan_done,
  2565. TP_PROTO(struct cfg80211_scan_request *request,
  2566. struct cfg80211_scan_info *info),
  2567. TP_ARGS(request, info),
  2568. TP_STRUCT__entry(
  2569. __field(u32, n_channels)
  2570. __dynamic_array(u8, ie, request ? request->ie_len : 0)
  2571. __array(u32, rates, NUM_NL80211_BANDS)
  2572. __field(u32, wdev_id)
  2573. MAC_ENTRY(wiphy_mac)
  2574. __field(bool, no_cck)
  2575. __field(bool, aborted)
  2576. __field(u64, scan_start_tsf)
  2577. MAC_ENTRY(tsf_bssid)
  2578. ),
  2579. TP_fast_assign(
  2580. if (request) {
  2581. memcpy(__get_dynamic_array(ie), request->ie,
  2582. request->ie_len);
  2583. memcpy(__entry->rates, request->rates,
  2584. NUM_NL80211_BANDS);
  2585. __entry->wdev_id = request->wdev ?
  2586. request->wdev->identifier : 0;
  2587. if (request->wiphy)
  2588. MAC_ASSIGN(wiphy_mac,
  2589. request->wiphy->perm_addr);
  2590. __entry->no_cck = request->no_cck;
  2591. }
  2592. if (info) {
  2593. __entry->aborted = info->aborted;
  2594. __entry->scan_start_tsf = info->scan_start_tsf;
  2595. MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
  2596. }
  2597. ),
  2598. TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
  2599. BOOL_TO_STR(__entry->aborted),
  2600. (unsigned long long)__entry->scan_start_tsf,
  2601. MAC_PR_ARG(tsf_bssid))
  2602. );
  2603. DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
  2604. TP_PROTO(struct wiphy *wiphy),
  2605. TP_ARGS(wiphy)
  2606. );
  2607. DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
  2608. TP_PROTO(struct wiphy *wiphy),
  2609. TP_ARGS(wiphy)
  2610. );
  2611. TRACE_EVENT(cfg80211_get_bss,
  2612. TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
  2613. const u8 *bssid, const u8 *ssid, size_t ssid_len,
  2614. enum ieee80211_bss_type bss_type,
  2615. enum ieee80211_privacy privacy),
  2616. TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
  2617. TP_STRUCT__entry(
  2618. WIPHY_ENTRY
  2619. CHAN_ENTRY
  2620. MAC_ENTRY(bssid)
  2621. __dynamic_array(u8, ssid, ssid_len)
  2622. __field(enum ieee80211_bss_type, bss_type)
  2623. __field(enum ieee80211_privacy, privacy)
  2624. ),
  2625. TP_fast_assign(
  2626. WIPHY_ASSIGN;
  2627. CHAN_ASSIGN(channel);
  2628. MAC_ASSIGN(bssid, bssid);
  2629. memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
  2630. __entry->bss_type = bss_type;
  2631. __entry->privacy = privacy;
  2632. ),
  2633. TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
  2634. ", buf: %#.2x, bss_type: %d, privacy: %d",
  2635. WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
  2636. ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
  2637. __entry->privacy)
  2638. );
  2639. TRACE_EVENT(cfg80211_inform_bss_frame,
  2640. TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
  2641. struct ieee80211_mgmt *mgmt, size_t len),
  2642. TP_ARGS(wiphy, data, mgmt, len),
  2643. TP_STRUCT__entry(
  2644. WIPHY_ENTRY
  2645. CHAN_ENTRY
  2646. __field(enum nl80211_bss_scan_width, scan_width)
  2647. __dynamic_array(u8, mgmt, len)
  2648. __field(s32, signal)
  2649. __field(u64, ts_boottime)
  2650. __field(u64, parent_tsf)
  2651. MAC_ENTRY(parent_bssid)
  2652. ),
  2653. TP_fast_assign(
  2654. WIPHY_ASSIGN;
  2655. CHAN_ASSIGN(data->chan);
  2656. __entry->scan_width = data->scan_width;
  2657. if (mgmt)
  2658. memcpy(__get_dynamic_array(mgmt), mgmt, len);
  2659. __entry->signal = data->signal;
  2660. __entry->ts_boottime = data->boottime_ns;
  2661. __entry->parent_tsf = data->parent_tsf;
  2662. MAC_ASSIGN(parent_bssid, data->parent_bssid);
  2663. ),
  2664. TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
  2665. "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
  2666. MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
  2667. __entry->signal, (unsigned long long)__entry->ts_boottime,
  2668. (unsigned long long)__entry->parent_tsf,
  2669. MAC_PR_ARG(parent_bssid))
  2670. );
  2671. DECLARE_EVENT_CLASS(cfg80211_bss_evt,
  2672. TP_PROTO(struct cfg80211_bss *pub),
  2673. TP_ARGS(pub),
  2674. TP_STRUCT__entry(
  2675. MAC_ENTRY(bssid)
  2676. CHAN_ENTRY
  2677. ),
  2678. TP_fast_assign(
  2679. MAC_ASSIGN(bssid, pub->bssid);
  2680. CHAN_ASSIGN(pub->channel);
  2681. ),
  2682. TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
  2683. );
  2684. DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
  2685. TP_PROTO(struct cfg80211_bss *pub),
  2686. TP_ARGS(pub)
  2687. );
  2688. TRACE_EVENT(cfg80211_return_uint,
  2689. TP_PROTO(unsigned int ret),
  2690. TP_ARGS(ret),
  2691. TP_STRUCT__entry(
  2692. __field(unsigned int, ret)
  2693. ),
  2694. TP_fast_assign(
  2695. __entry->ret = ret;
  2696. ),
  2697. TP_printk("ret: %d", __entry->ret)
  2698. );
  2699. TRACE_EVENT(cfg80211_return_u32,
  2700. TP_PROTO(u32 ret),
  2701. TP_ARGS(ret),
  2702. TP_STRUCT__entry(
  2703. __field(u32, ret)
  2704. ),
  2705. TP_fast_assign(
  2706. __entry->ret = ret;
  2707. ),
  2708. TP_printk("ret: %u", __entry->ret)
  2709. );
  2710. TRACE_EVENT(cfg80211_report_wowlan_wakeup,
  2711. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
  2712. struct cfg80211_wowlan_wakeup *wakeup),
  2713. TP_ARGS(wiphy, wdev, wakeup),
  2714. TP_STRUCT__entry(
  2715. WIPHY_ENTRY
  2716. WDEV_ENTRY
  2717. __field(bool, non_wireless)
  2718. __field(bool, disconnect)
  2719. __field(bool, magic_pkt)
  2720. __field(bool, gtk_rekey_failure)
  2721. __field(bool, eap_identity_req)
  2722. __field(bool, four_way_handshake)
  2723. __field(bool, rfkill_release)
  2724. __field(s32, pattern_idx)
  2725. __field(u32, packet_len)
  2726. __dynamic_array(u8, packet,
  2727. wakeup ? wakeup->packet_present_len : 0)
  2728. ),
  2729. TP_fast_assign(
  2730. WIPHY_ASSIGN;
  2731. WDEV_ASSIGN;
  2732. __entry->non_wireless = !wakeup;
  2733. __entry->disconnect = wakeup ? wakeup->disconnect : false;
  2734. __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
  2735. __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
  2736. __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
  2737. __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
  2738. __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
  2739. __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
  2740. __entry->packet_len = wakeup ? wakeup->packet_len : false;
  2741. if (wakeup && wakeup->packet && wakeup->packet_present_len)
  2742. memcpy(__get_dynamic_array(packet), wakeup->packet,
  2743. wakeup->packet_present_len);
  2744. ),
  2745. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
  2746. );
  2747. TRACE_EVENT(cfg80211_ft_event,
  2748. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2749. struct cfg80211_ft_event_params *ft_event),
  2750. TP_ARGS(wiphy, netdev, ft_event),
  2751. TP_STRUCT__entry(
  2752. WIPHY_ENTRY
  2753. NETDEV_ENTRY
  2754. __dynamic_array(u8, ies, ft_event->ies_len)
  2755. MAC_ENTRY(target_ap)
  2756. __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
  2757. ),
  2758. TP_fast_assign(
  2759. WIPHY_ASSIGN;
  2760. NETDEV_ASSIGN;
  2761. if (ft_event->ies)
  2762. memcpy(__get_dynamic_array(ies), ft_event->ies,
  2763. ft_event->ies_len);
  2764. MAC_ASSIGN(target_ap, ft_event->target_ap);
  2765. if (ft_event->ric_ies)
  2766. memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
  2767. ft_event->ric_ies_len);
  2768. ),
  2769. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
  2770. WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
  2771. );
  2772. TRACE_EVENT(cfg80211_stop_iface,
  2773. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  2774. TP_ARGS(wiphy, wdev),
  2775. TP_STRUCT__entry(
  2776. WIPHY_ENTRY
  2777. WDEV_ENTRY
  2778. ),
  2779. TP_fast_assign(
  2780. WIPHY_ASSIGN;
  2781. WDEV_ASSIGN;
  2782. ),
  2783. TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
  2784. WIPHY_PR_ARG, WDEV_PR_ARG)
  2785. );
  2786. TRACE_EVENT(rdev_start_radar_detection,
  2787. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2788. struct cfg80211_chan_def *chandef,
  2789. u32 cac_time_ms),
  2790. TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
  2791. TP_STRUCT__entry(
  2792. WIPHY_ENTRY
  2793. NETDEV_ENTRY
  2794. CHAN_DEF_ENTRY
  2795. __field(u32, cac_time_ms)
  2796. ),
  2797. TP_fast_assign(
  2798. WIPHY_ASSIGN;
  2799. NETDEV_ASSIGN;
  2800. CHAN_DEF_ASSIGN(chandef);
  2801. __entry->cac_time_ms = cac_time_ms;
  2802. ),
  2803. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
  2804. ", cac_time_ms=%u",
  2805. WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
  2806. __entry->cac_time_ms)
  2807. );
  2808. TRACE_EVENT(rdev_set_mcast_rate,
  2809. TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
  2810. int mcast_rate[NUM_NL80211_BANDS]),
  2811. TP_ARGS(wiphy, netdev, mcast_rate),
  2812. TP_STRUCT__entry(
  2813. WIPHY_ENTRY
  2814. NETDEV_ENTRY
  2815. __array(int, mcast_rate, NUM_NL80211_BANDS)
  2816. ),
  2817. TP_fast_assign(
  2818. WIPHY_ASSIGN;
  2819. NETDEV_ASSIGN;
  2820. memcpy(__entry->mcast_rate, mcast_rate,
  2821. sizeof(int) * NUM_NL80211_BANDS);
  2822. ),
  2823. TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
  2824. "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
  2825. WIPHY_PR_ARG, NETDEV_PR_ARG,
  2826. __entry->mcast_rate[NL80211_BAND_2GHZ],
  2827. __entry->mcast_rate[NL80211_BAND_5GHZ],
  2828. __entry->mcast_rate[NL80211_BAND_60GHZ])
  2829. );
  2830. TRACE_EVENT(rdev_set_coalesce,
  2831. TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
  2832. TP_ARGS(wiphy, coalesce),
  2833. TP_STRUCT__entry(
  2834. WIPHY_ENTRY
  2835. __field(int, n_rules)
  2836. ),
  2837. TP_fast_assign(
  2838. WIPHY_ASSIGN;
  2839. __entry->n_rules = coalesce ? coalesce->n_rules : 0;
  2840. ),
  2841. TP_printk(WIPHY_PR_FMT ", n_rules=%d",
  2842. WIPHY_PR_ARG, __entry->n_rules)
  2843. );
  2844. DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
  2845. TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
  2846. TP_ARGS(wiphy, wdev)
  2847. );
  2848. #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
  2849. #undef TRACE_INCLUDE_PATH
  2850. #define TRACE_INCLUDE_PATH .
  2851. #undef TRACE_INCLUDE_FILE
  2852. #define TRACE_INCLUDE_FILE trace
  2853. #include <trace/define_trace.h>