trace.h 70 KB

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