trace.h 80 KB

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