bcmevent.h 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299
  1. /*
  2. * Broadcom Event protocol definitions
  3. *
  4. * Dependencies: bcmeth.h
  5. *
  6. * Portions of this code are copyright (c) 2020 Cypress Semiconductor Corporation
  7. *
  8. * Copyright (C) 1999-2020, Broadcom Corporation
  9. *
  10. * Unless you and Broadcom execute a separate written software license
  11. * agreement governing use of this software, this software is licensed to you
  12. * under the terms of the GNU General Public License version 2 (the "GPL"),
  13. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  14. * following added to such license:
  15. *
  16. * As a special exception, the copyright holders of this software give you
  17. * permission to link this software with independent modules, and to copy and
  18. * distribute the resulting executable under terms of your choice, provided that
  19. * you also meet, for each linked independent module, the terms and conditions of
  20. * the license of that module. An independent module is a module which is not
  21. * derived from this software. The special exception does not apply to any
  22. * modifications of the software.
  23. *
  24. * Notwithstanding the above, under no circumstances may you combine this
  25. * software in any way with any other Broadcom software provided under a license
  26. * other than the GPL, without Broadcom's express prior written consent.
  27. *
  28. *
  29. * <<Broadcom-WL-IPTag/Open:>>
  30. *
  31. * $Id: bcmevent.h 727117 2020-09-04 08:59:31Z $
  32. *
  33. */
  34. /*
  35. * Broadcom Ethernet Events protocol defines
  36. *
  37. */
  38. #ifndef _BCMEVENT_H_
  39. #define _BCMEVENT_H_
  40. #include <typedefs.h>
  41. /* #include <ethernet.h> -- TODO: req., excluded to overwhelming coupling (break up ethernet.h) */
  42. #include <bcmeth.h>
  43. #if defined(DNGL_EVENT_SUPPORT)
  44. #include <dnglevent.h>
  45. #endif // endif
  46. /* This marks the start of a packed structure section. */
  47. #include <packed_section_start.h>
  48. #define BCM_EVENT_MSG_VERSION 2 /* wl_event_msg_t struct version */
  49. #define BCM_MSG_IFNAME_MAX 16 /* max length of interface name */
  50. /* flags */
  51. #define WLC_EVENT_MSG_LINK 0x01 /* link is up */
  52. #define WLC_EVENT_MSG_FLUSHTXQ 0x02 /* flush tx queue on MIC error */
  53. #define WLC_EVENT_MSG_GROUP 0x04 /* group MIC error */
  54. #define WLC_EVENT_MSG_UNKBSS 0x08 /* unknown source bsscfg */
  55. #define WLC_EVENT_MSG_UNKIF 0x10 /* unknown source OS i/f */
  56. /* these fields are stored in network order */
  57. /* version 1 */
  58. typedef BWL_PRE_PACKED_STRUCT struct
  59. {
  60. uint16 version;
  61. uint16 flags; /* see flags below */
  62. uint32 event_type; /* Message (see below) */
  63. uint32 status; /* Status code (see below) */
  64. uint32 reason; /* Reason code (if applicable) */
  65. uint32 auth_type; /* WLC_E_AUTH */
  66. uint32 datalen; /* data buf */
  67. struct ether_addr addr; /* Station address (if applicable) */
  68. char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
  69. } BWL_POST_PACKED_STRUCT wl_event_msg_v1_t;
  70. /* the current version */
  71. typedef BWL_PRE_PACKED_STRUCT struct
  72. {
  73. uint16 version;
  74. uint16 flags; /* see flags below */
  75. uint32 event_type; /* Message (see below) */
  76. uint32 status; /* Status code (see below) */
  77. uint32 reason; /* Reason code (if applicable) */
  78. uint32 auth_type; /* WLC_E_AUTH */
  79. uint32 datalen; /* data buf */
  80. struct ether_addr addr; /* Station address (if applicable) */
  81. char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
  82. uint8 ifidx; /* destination OS i/f index */
  83. uint8 bsscfgidx; /* source bsscfg index */
  84. } BWL_POST_PACKED_STRUCT wl_event_msg_t;
  85. /* used by driver msgs */
  86. typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
  87. struct ether_header eth;
  88. bcmeth_hdr_t bcm_hdr;
  89. wl_event_msg_t event;
  90. /* data portion follows */
  91. } BWL_POST_PACKED_STRUCT bcm_event_t;
  92. /*
  93. * used by host event
  94. * note: if additional event types are added, it should go with is_wlc_event_frame() as well.
  95. */
  96. typedef union bcm_event_msg_u {
  97. wl_event_msg_t event;
  98. #if defined(DNGL_EVENT_SUPPORT)
  99. bcm_dngl_event_msg_t dngl_event;
  100. #endif // endif
  101. /* add new event here */
  102. } bcm_event_msg_u_t;
  103. #define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
  104. /* Event messages */
  105. #define WLC_E_SET_SSID 0 /* indicates status of set SSID */
  106. #define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */
  107. #define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */
  108. #define WLC_E_AUTH 3 /* 802.11 AUTH request */
  109. #define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */
  110. #define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */
  111. #define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */
  112. #define WLC_E_ASSOC 7 /* 802.11 ASSOC request */
  113. #define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */
  114. #define WLC_E_REASSOC 9 /* 802.11 REASSOC request */
  115. #define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */
  116. #define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */
  117. #define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */
  118. #define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */
  119. #define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */
  120. #define WLC_E_BEACON_RX 15 /* BEACONS received/lost indication */
  121. #define WLC_E_LINK 16 /* generic link indication */
  122. #define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */
  123. #define WLC_E_NDIS_LINK 18 /* NDIS style link indication */
  124. #define WLC_E_ROAM 19 /* roam complete: indicate status & reason */
  125. #define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */
  126. #define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */
  127. #define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */
  128. #define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */
  129. #define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */
  130. #define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */
  131. #define WLC_E_SCAN_COMPLETE 26 /* Scan results are ready or scan was aborted */
  132. #define WLC_E_ADDTS_IND 27 /* indicate to host addts fail/success */
  133. #define WLC_E_DELTS_IND 28 /* indicate to host delts fail/success */
  134. #define WLC_E_BCNSENT_IND 29 /* indicate to host of beacon transmit */
  135. #define WLC_E_BCNRX_MSG 30 /* Send the received beacon up to the host */
  136. #define WLC_E_BCNLOST_MSG 31 /* indicate to host loss of beacon */
  137. #define WLC_E_ROAM_PREP 32 /* before attempting to roam association */
  138. #define WLC_E_PFN_NET_FOUND 33 /* PFN network found event */
  139. #define WLC_E_PFN_NET_LOST 34 /* PFN network lost event */
  140. #define WLC_E_RESET_COMPLETE 35
  141. #define WLC_E_JOIN_START 36
  142. #define WLC_E_ROAM_START 37 /* roam attempt started: indicate reason */
  143. #define WLC_E_ASSOC_START 38
  144. #define WLC_E_IBSS_ASSOC 39
  145. #define WLC_E_RADIO 40
  146. #define WLC_E_PSM_WATCHDOG 41 /* PSM microcode watchdog fired */
  147. #define WLC_E_PROBREQ_MSG 44 /* probe request received */
  148. #define WLC_E_SCAN_CONFIRM_IND 45
  149. #define WLC_E_PSK_SUP 46 /* WPA Handshake fail */
  150. #define WLC_E_COUNTRY_CODE_CHANGED 47
  151. #define WLC_E_EXCEEDED_MEDIUM_TIME 48 /* WMMAC excedded medium time */
  152. #define WLC_E_ICV_ERROR 49 /* WEP ICV error occurred */
  153. #define WLC_E_UNICAST_DECODE_ERROR 50 /* Unsupported unicast encrypted frame */
  154. #define WLC_E_MULTICAST_DECODE_ERROR 51 /* Unsupported multicast encrypted frame */
  155. #define WLC_E_TRACE 52
  156. #define WLC_E_IF 54 /* I/F change (for dongle host notification) */
  157. #define WLC_E_P2P_DISC_LISTEN_COMPLETE 55 /* listen state expires */
  158. #define WLC_E_RSSI 56 /* indicate RSSI change based on configured levels */
  159. #define WLC_E_PFN_BEST_BATCHING 57 /* PFN best network batching event */
  160. #define WLC_E_EXTLOG_MSG 58
  161. #define WLC_E_ACTION_FRAME 59 /* Action frame Rx */
  162. #define WLC_E_ACTION_FRAME_COMPLETE 60 /* Action frame Tx complete */
  163. #define WLC_E_PRE_ASSOC_IND 61 /* assoc request received */
  164. #define WLC_E_PRE_REASSOC_IND 62 /* re-assoc request received */
  165. #define WLC_E_CHANNEL_ADOPTED 63
  166. #define WLC_E_AP_STARTED 64 /* AP started */
  167. #define WLC_E_DFS_AP_STOP 65 /* AP stopped due to DFS */
  168. #define WLC_E_DFS_AP_RESUME 66 /* AP resumed due to DFS */
  169. #define WLC_E_WAI_STA_EVENT 67 /* WAI stations event */
  170. #define WLC_E_WAI_MSG 68 /* event encapsulating an WAI message */
  171. #define WLC_E_ESCAN_RESULT 69 /* escan result event */
  172. #define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 70 /* action frame off channel complete */
  173. #define WLC_E_PROBRESP_MSG 71 /* probe response received */
  174. #define WLC_E_P2P_PROBREQ_MSG 72 /* P2P Probe request received */
  175. #define WLC_E_DCS_REQUEST 73
  176. #define WLC_E_FIFO_CREDIT_MAP 74 /* credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */
  177. #define WLC_E_ACTION_FRAME_RX 75 /* Received action frame event WITH
  178. * wl_event_rx_frame_data_t header
  179. */
  180. #define WLC_E_WAKE_EVENT 76 /* Wake Event timer fired, used for wake WLAN test mode */
  181. #define WLC_E_RM_COMPLETE 77 /* Radio measurement complete */
  182. #define WLC_E_HTSFSYNC 78 /* Synchronize TSF with the host */
  183. #define WLC_E_OVERLAY_REQ 79 /* request an overlay IOCTL/iovar from the host */
  184. #define WLC_E_CSA_COMPLETE_IND 80 /* 802.11 CHANNEL SWITCH ACTION completed */
  185. #define WLC_E_EXCESS_PM_WAKE_EVENT 81 /* excess PM Wake Event to inform host */
  186. #define WLC_E_PFN_SCAN_NONE 82 /* no PFN networks around */
  187. /* PFN BSSID network found event, conflict/share with WLC_E_PFN_SCAN_NONE */
  188. #define WLC_E_PFN_BSSID_NET_FOUND 82
  189. #define WLC_E_PFN_SCAN_ALLGONE 83 /* last found PFN network gets lost */
  190. /* PFN BSSID network lost event, conflict/share with WLC_E_PFN_SCAN_ALLGONE */
  191. #define WLC_E_PFN_BSSID_NET_LOST 83
  192. #define WLC_E_GTK_PLUMBED 84
  193. #define WLC_E_ASSOC_IND_NDIS 85 /* 802.11 ASSOC indication for NDIS only */
  194. #define WLC_E_REASSOC_IND_NDIS 86 /* 802.11 REASSOC indication for NDIS only */
  195. #define WLC_E_ASSOC_REQ_IE 87
  196. #define WLC_E_ASSOC_RESP_IE 88
  197. #define WLC_E_ASSOC_RECREATED 89 /* association recreated on resume */
  198. #define WLC_E_ACTION_FRAME_RX_NDIS 90 /* rx action frame event for NDIS only */
  199. #define WLC_E_AUTH_REQ 91 /* authentication request received */
  200. #define WLC_E_TDLS_PEER_EVENT 92 /* discovered peer, connected/disconnected peer */
  201. #define WLC_E_SPEEDY_RECREATE_FAIL 93 /* fast assoc recreation failed */
  202. #define WLC_E_NATIVE 94 /* port-specific event and payload (e.g. NDIS) */
  203. #define WLC_E_PKTDELAY_IND 95 /* event for tx pkt delay suddently jump */
  204. #define WLC_E_PSTA_PRIMARY_INTF_IND 99 /* psta primary interface indication */
  205. #define WLC_E_NAN 100 /* NAN event - Reserved for future */
  206. #define WLC_E_BEACON_FRAME_RX 101
  207. #define WLC_E_SERVICE_FOUND 102 /* desired service found */
  208. #define WLC_E_GAS_FRAGMENT_RX 103 /* GAS fragment received */
  209. #define WLC_E_GAS_COMPLETE 104 /* GAS sessions all complete */
  210. #define WLC_E_P2PO_ADD_DEVICE 105 /* New device found by p2p offload */
  211. #define WLC_E_P2PO_DEL_DEVICE 106 /* device has been removed by p2p offload */
  212. #define WLC_E_WNM_STA_SLEEP 107 /* WNM event to notify STA enter sleep mode */
  213. #define WLC_E_TXFAIL_THRESH 108 /* Indication of MAC tx failures (exhaustion of
  214. * 802.11 retries) exceeding threshold(s)
  215. */
  216. #define WLC_E_PROXD 109 /* Proximity Detection event */
  217. #define WLC_E_IBSS_COALESCE 110 /* IBSS Coalescing */
  218. #define WLC_E_AIBSS_TXFAIL 110 /* TXFAIL event for AIBSS, re using event 110 */
  219. #define WLC_E_BSS_LOAD 114 /* Inform host of beacon bss load */
  220. #define WLC_E_MIMO_PWR_SAVE 115 /* Inform host MIMO PWR SAVE learning events */
  221. #define WLC_E_LEAKY_AP_STATS 116 /* Inform host leaky Ap stats events */
  222. #define WLC_E_ALLOW_CREDIT_BORROW 117 /* Allow or disallow wlfc credit borrowing in DHD */
  223. #define WLC_E_MSCH 120 /* Multiple channel scheduler event */
  224. #define WLC_E_CSA_START_IND 121
  225. #define WLC_E_CSA_DONE_IND 122
  226. #define WLC_E_CSA_FAILURE_IND 123
  227. #define WLC_E_CCA_CHAN_QUAL 124 /* CCA based channel quality report */
  228. #define WLC_E_BSSID 125 /* to report change in BSSID while roaming */
  229. #define WLC_E_TX_STAT_ERROR 126 /* tx error indication */
  230. #define WLC_E_BCMC_CREDIT_SUPPORT 127 /* credit check for BCMC supported */
  231. #define WLC_E_PEER_TIMEOUT 128 /* silently drop a STA because of inactivity */
  232. #define WLC_E_BT_WIFI_HANDOVER_REQ 130 /* Handover Request Initiated */
  233. #define WLC_E_SPW_TXINHIBIT 131 /* Southpaw TxInhibit notification */
  234. #define WLC_E_FBT_AUTH_REQ_IND 132 /* FBT Authentication Request Indication */
  235. #define WLC_E_RSSI_LQM 133 /* Enhancement addition for WLC_E_RSSI */
  236. #define WLC_E_PFN_GSCAN_FULL_RESULT 134 /* Full probe/beacon (IEs etc) results */
  237. #define WLC_E_PFN_SWC 135 /* Significant change in rssi of bssids being tracked */
  238. #define WLC_E_AUTHORIZED 136 /* a STA been authroized for traffic */
  239. #define WLC_E_PROBREQ_MSG_RX 137 /* probe req with wl_event_rx_frame_data_t header */
  240. #define WLC_E_PFN_SCAN_COMPLETE 138 /* PFN completed scan of network list */
  241. #define WLC_E_RMC_EVENT 139 /* RMC Event */
  242. #define WLC_E_DPSTA_INTF_IND 140 /* DPSTA interface indication */
  243. #define WLC_E_RRM 141 /* RRM Event */
  244. #define WLC_E_PFN_SSID_EXT 142 /* SSID EXT event */
  245. #define WLC_E_ROAM_EXP_EVENT 143 /* Expanded roam event */
  246. #define WLC_E_ULP 146 /* ULP entered indication */
  247. #define WLC_E_MACDBG 147 /* Ucode debugging event */
  248. #define WLC_E_RESERVED 148 /* reserved */
  249. #define WLC_E_PRE_ASSOC_RSEP_IND 149 /* assoc resp received */
  250. #define WLC_E_PSK_AUTH 150 /* PSK AUTH WPA2-PSK 4 WAY Handshake failure */
  251. #define WLC_E_TKO 151 /* TCP keepalive offload */
  252. #define WLC_E_SDB_TRANSITION 152 /* SDB mode-switch event */
  253. #define WLC_E_NATOE_NFCT 153 /* natoe event */
  254. #define WLC_E_TEMP_THROTTLE 154 /* Temperature throttling control event */
  255. #define WLC_E_LINK_QUALITY 155 /* Link quality measurement complete */
  256. #define WLC_E_BSSTRANS_RESP 156 /* BSS Transition Response received */
  257. #define WLC_E_TWT_SETUP 157 /* TWT Setup Complete event */
  258. #define WLC_E_HE_TWT_SETUP 157 /* TODO:Remove after merging TWT changes to trunk */
  259. #define WLC_E_NAN_CRITICAL 158 /* NAN Critical Event */
  260. #define WLC_E_NAN_NON_CRITICAL 159 /* NAN Non-Critical Event */
  261. #define WLC_E_RADAR_DETECTED 160 /* Radar Detected event */
  262. #define WLC_E_RANGING_EVENT 161 /* Ranging event */
  263. #define WLC_E_INVALID_IE 162 /* Received invalid IE */
  264. #define WLC_E_MODE_SWITCH 163 /* Mode switch event */
  265. #define WLC_E_PKT_FILTER 164 /* Packet filter event */
  266. #define WLC_E_DMA_TXFLUSH_COMPLETE 165 /* TxFlush done before changing tx/rxchain */
  267. #define WLC_E_FBT 166 /* FBT event */
  268. #define WLC_E_PFN_SCAN_BACKOFF 167 /* PFN SCAN Backoff event */
  269. #define WLC_E_PFN_BSSID_SCAN_BACKOFF 168 /* PFN BSSID SCAN BAckoff event */
  270. #define WLC_E_AGGR_EVENT 169 /* Aggregated event */
  271. #define WLC_E_TVPM_MITIGATION 171 /* Change in mitigation applied by TVPM */
  272. #define WLC_E_SCAN_START 172 /* Deprecated */
  273. #define WLC_E_SCAN 172 /* Scan event */
  274. #define WLC_E_MBO 173 /* MBO event */
  275. #define WLC_E_PHY_CAL 174 /* Phy calibration start indication to host */
  276. #define WLC_E_RPSNOA 175 /* Radio power save start/end indication to host */
  277. #define WLC_E_ADPS 176 /* ADPS event */
  278. #define WLC_E_SLOTTED_BSS_PEER_OP 177 /* Per peer SCB delete */
  279. #define WLC_E_HWA 178 /* HWA events */
  280. #define WLC_E_GTK_KEYROT_NO_CHANSW 179 /* Avoid Chanswitch while GTK key rotation */
  281. #define WLC_E_ONBODY_STATUS_CHANGE 180 /* Indication of onbody status change */
  282. #define WLC_E_BCNRECV_ABORTED 181 /* Fake AP bcnrecv aborted roam event */
  283. #define WLC_E_PMK_INFO 182 /* PMK,PMKID information event */
  284. #define WLC_E_BSSTRANS 183 /* BSS Transition request / Response */
  285. #define WLC_E_WA_LQM 184 /* link quality monitoring */
  286. #define WLC_E_ACTION_FRAME_OFF_CHAN_DWELL_COMPLETE 185 /* action frame off channel
  287. * dwell time complete
  288. */
  289. #define WLC_E_WSEC 186 /* wsec keymgmt event */
  290. #define WLC_E_EXT_AUTH_REQ 187 /* authentication request received */
  291. #define WLC_E_EXT_AUTH_FRAME_RX 188 /* authentication request received */
  292. #define WLC_E_MGMT_FRAME_TXSTATUS 189 /* mgmt frame Tx complete */
  293. #define WLC_E_MGMT_FRAME_OFF_CHAN_COMPLETE 190
  294. #define WLC_E_IND_DOS_STATUS 191
  295. #define WLC_E_LAST 192 /* highest val + 1 for range checking */
  296. #if (WLC_E_LAST > 192)
  297. #error "WLC_E_LAST: Invalid value for last event; must be <= 191."
  298. #endif /* WLC_E_LAST */
  299. /* define an API for getting the string name of an event */
  300. extern const char *bcmevent_get_name(uint event_type);
  301. extern void wl_event_to_host_order(wl_event_msg_t * evt);
  302. extern void wl_event_to_network_order(wl_event_msg_t * evt);
  303. /* validate if the event is proper and if valid copy event header to event */
  304. extern int is_wlc_event_frame(void *pktdata, uint pktlen, uint16 exp_usr_subtype,
  305. bcm_event_msg_u_t *out_event);
  306. /* conversion between host and network order for events */
  307. void wl_event_to_host_order(wl_event_msg_t * evt);
  308. void wl_event_to_network_order(wl_event_msg_t * evt);
  309. /* Event status codes */
  310. #define WLC_E_STATUS_SUCCESS 0 /* operation was successful */
  311. #define WLC_E_STATUS_FAIL 1 /* operation failed */
  312. #define WLC_E_STATUS_TIMEOUT 2 /* operation timed out */
  313. #define WLC_E_STATUS_NO_NETWORKS 3 /* failed due to no matching network found */
  314. #define WLC_E_STATUS_ABORT 4 /* operation was aborted */
  315. #define WLC_E_STATUS_NO_ACK 5 /* protocol failure: packet not ack'd */
  316. #define WLC_E_STATUS_UNSOLICITED 6 /* AUTH or ASSOC packet was unsolicited */
  317. #define WLC_E_STATUS_ATTEMPT 7 /* attempt to assoc to an auto auth configuration */
  318. #define WLC_E_STATUS_PARTIAL 8 /* scan results are incomplete */
  319. #define WLC_E_STATUS_NEWSCAN 9 /* scan aborted by another scan */
  320. #define WLC_E_STATUS_NEWASSOC 10 /* scan aborted due to assoc in progress */
  321. #define WLC_E_STATUS_11HQUIET 11 /* 802.11h quiet period started */
  322. #define WLC_E_STATUS_SUPPRESS 12 /* user disabled scanning (WLC_SET_SCANSUPPRESS) */
  323. #define WLC_E_STATUS_NOCHANS 13 /* no allowable channels to scan */
  324. #ifdef BCMCCX
  325. #define WLC_E_STATUS_CCXFASTRM 14 /* scan aborted due to CCX fast roam */
  326. #endif /* BCMCCX */
  327. #define WLC_E_STATUS_CS_ABORT 15 /* abort channel select */
  328. #define WLC_E_STATUS_ERROR 16 /* request failed due to error */
  329. #define WLC_E_STATUS_SLOTTED_PEER_ADD 17 /* Slotted scb for peer addition status */
  330. #define WLC_E_STATUS_SLOTTED_PEER_DEL 18 /* Slotted scb for peer deletion status */
  331. #define WLC_E_STATUS_RXBCN 19 /* Rx Beacon event for FAKEAP feature */
  332. #define WLC_E_STATUS_RXBCN_ABORT 20 /* Rx Beacon abort event for FAKEAP feature */
  333. #define WLC_E_STATUS_INVALID 0xff /* Invalid status code to init variables. */
  334. /* 4-way handshake event type */
  335. #define WLC_E_PSK_AUTH_SUB_EAPOL_START 1 /* EAPOL start */
  336. #define WLC_E_PSK_AUTH_SUB_EAPOL_DONE 2 /* EAPOL end */
  337. /* GTK event type */
  338. #define WLC_E_PSK_AUTH_SUB_GTK_DONE 3 /* GTK end */
  339. /* 4-way handshake event status code */
  340. #define WLC_E_STATUS_PSK_AUTH_WPA_TIMOUT 1 /* operation timed out */
  341. #define WLC_E_STATUS_PSK_AUTH_MIC_WPA_ERR 2 /* MIC error */
  342. #define WLC_E_STATUS_PSK_AUTH_IE_MISMATCH_ERR 3 /* IE Missmatch error */
  343. #define WLC_E_STATUS_PSK_AUTH_REPLAY_COUNT_ERR 4
  344. #define WLC_E_STATUS_PSK_AUTH_PEER_BLACKISTED 5 /* Blaclisted peer */
  345. #define WLC_E_STATUS_PSK_AUTH_GTK_REKEY_FAIL 6 /* GTK event status code */
  346. /* SDB transition status code */
  347. #define WLC_E_STATUS_SDB_START 1
  348. #define WLC_E_STATUS_SDB_COMPLETE 2
  349. /* Slice-swap status code */
  350. #define WLC_E_STATUS_SLICE_SWAP_START 3
  351. #define WLC_E_STATUS_SLICE_SWAP_COMPLETE 4
  352. /* SDB transition reason code */
  353. #define WLC_E_REASON_HOST_DIRECT 0
  354. #define WLC_E_REASON_INFRA_ASSOC 1
  355. #define WLC_E_REASON_INFRA_ROAM 2
  356. #define WLC_E_REASON_INFRA_DISASSOC 3
  357. #define WLC_E_REASON_NO_MODE_CHANGE_NEEDED 4
  358. #define WLC_E_REASON_AWDL_ENABLE 5
  359. #define WLC_E_REASON_AWDL_DISABLE 6
  360. /* WLC_E_SDB_TRANSITION event data */
  361. #define WL_MAX_BSSCFG 4
  362. #define WL_EVENT_SDB_TRANSITION_VER 1
  363. typedef struct wl_event_sdb_data {
  364. uint8 wlunit; /* Core index */
  365. uint8 is_iftype; /* Interface Type(Station, SoftAP, P2P_GO, P2P_GC */
  366. uint16 chanspec; /* Interface Channel/Chanspec */
  367. char ssidbuf[(4 * 32) + 1]; /* SSID_FMT_BUF_LEN: ((4 * DOT11_MAX_SSID_LEN) + 1) */
  368. } wl_event_sdb_data_t;
  369. typedef struct wl_event_sdb_trans {
  370. uint8 version; /* Event Data Version */
  371. uint8 rsdb_mode;
  372. uint8 enable_bsscfg;
  373. uint8 reserved;
  374. struct wl_event_sdb_data values[WL_MAX_BSSCFG];
  375. } wl_event_sdb_trans_t;
  376. /* reason codes for WLC_E_GTK_KEYROT_NO_CHANSW event */
  377. #define WLC_E_GTKKEYROT_SCANDELAY 0 /* Delay scan while gtk in progress */
  378. #define WLC_E_GTKKEYROT_SKIPCHANSW_AWDL 1 /* Avoid chansw by awdl while gtk in progress */
  379. #define WLC_E_GTKKEYROT_SKIPCHANSW_P2P 2 /* Avoid chansw by p2p while gtk in progress */
  380. /* roam reason codes */
  381. #define WLC_E_REASON_INITIAL_ASSOC 0 /* initial assoc */
  382. #define WLC_E_REASON_LOW_RSSI 1 /* roamed due to low RSSI */
  383. #define WLC_E_REASON_DEAUTH 2 /* roamed due to DEAUTH indication */
  384. #define WLC_E_REASON_DISASSOC 3 /* roamed due to DISASSOC indication */
  385. #define WLC_E_REASON_BCNS_LOST 4 /* roamed due to lost beacons */
  386. #define WLC_E_REASON_FAST_ROAM_FAILED 5 /* roamed due to fast roam failure */
  387. #define WLC_E_REASON_DIRECTED_ROAM 6 /* roamed due to request by AP */
  388. #define WLC_E_REASON_TSPEC_REJECTED 7 /* roamed due to TSPEC rejection */
  389. #define WLC_E_REASON_BETTER_AP 8 /* roamed due to finding better AP */
  390. #define WLC_E_REASON_MINTXRATE 9 /* roamed because at mintxrate for too long */
  391. #define WLC_E_REASON_TXFAIL 10 /* We can hear AP, but AP can't hear us */
  392. /* retained for precommit auto-merging errors; remove once all branches are synced */
  393. #define WLC_E_REASON_REQUESTED_ROAM 11
  394. #define WLC_E_REASON_BSSTRANS_REQ 11 /* roamed due to BSS Transition request by AP */
  395. #define WLC_E_REASON_LOW_RSSI_CU 12 /* roamed due to low RSSI and Channel Usage */
  396. #define WLC_E_REASON_RADAR_DETECTED 13 /* roamed due to radar detection by STA */
  397. #define WLC_E_REASON_CSA 14 /* roamed due to CSA from AP */
  398. #define WLC_E_REASON_ESTM_LOW 15 /* roamed due to ESTM low tput */
  399. #define WLC_E_REASON_SILENT_ROAM 16 /* roamed due to Silent roam */
  400. #define WLC_E_REASON_LAST 17 /* NOTE: increment this as you add reasons above */
  401. /* prune reason codes */
  402. #define WLC_E_PRUNE_ENCR_MISMATCH 1 /* encryption mismatch */
  403. #define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */
  404. #define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */
  405. #define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */
  406. #define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */
  407. #define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */
  408. #define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */
  409. #define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */
  410. #define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */
  411. #define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */
  412. #ifdef BCMCCX
  413. #define WLC_E_PRUNE_CCXFAST_PREVAP 11 /* CCX FAST ROAM: prune previous AP */
  414. #endif /* def BCMCCX */
  415. #define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */
  416. #define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */
  417. #ifdef BCMCCX
  418. #define WLC_E_PRUNE_CCXFAST_DROAM 14 /* CCX FAST ROAM: prune unqualified AP */
  419. #endif /* def BCMCCX */
  420. #define WLC_E_PRUNE_WDS_PEER 15 /* AP is already known to us as a WDS peer */
  421. #define WLC_E_PRUNE_QBSS_LOAD 16 /* QBSS LOAD - AAC is too low */
  422. #define WLC_E_PRUNE_HOME_AP 17 /* prune home AP */
  423. #ifdef BCMCCX
  424. #define WLC_E_PRUNE_AP_BLOCKED 18 /* prune blocked AP */
  425. #define WLC_E_PRUNE_NO_DIAG_SUPPORT 19 /* prune due to diagnostic mode not supported */
  426. #endif /* BCMCCX */
  427. #define WLC_E_PRUNE_AUTH_RESP_MAC 20 /* suppress auth resp by MAC filter */
  428. #define WLC_E_PRUNE_ASSOC_RETRY_DELAY 21 /* MBO assoc retry delay */
  429. #define WLC_E_PRUNE_RSSI_ASSOC_REJ 22 /* OCE RSSI-based assoc rejection */
  430. /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
  431. #define WLC_E_SUP_OTHER 0 /* Other reason */
  432. #define WLC_E_SUP_DECRYPT_KEY_DATA 1 /* Decryption of key data failed */
  433. #define WLC_E_SUP_BAD_UCAST_WEP128 2 /* Illegal use of ucast WEP128 */
  434. #define WLC_E_SUP_BAD_UCAST_WEP40 3 /* Illegal use of ucast WEP40 */
  435. #define WLC_E_SUP_UNSUP_KEY_LEN 4 /* Unsupported key length */
  436. #define WLC_E_SUP_PW_KEY_CIPHER 5 /* Unicast cipher mismatch in pairwise key */
  437. #define WLC_E_SUP_MSG3_TOO_MANY_IE 6 /* WPA IE contains > 1 RSN IE in key msg 3 */
  438. #define WLC_E_SUP_MSG3_IE_MISMATCH 7 /* WPA IE mismatch in key message 3 */
  439. #define WLC_E_SUP_NO_INSTALL_FLAG 8 /* INSTALL flag unset in 4-way msg */
  440. #define WLC_E_SUP_MSG3_NO_GTK 9 /* encapsulated GTK missing from msg 3 */
  441. #define WLC_E_SUP_GRP_KEY_CIPHER 10 /* Multicast cipher mismatch in group key */
  442. #define WLC_E_SUP_GRP_MSG1_NO_GTK 11 /* encapsulated GTK missing from group msg 1 */
  443. #define WLC_E_SUP_GTK_DECRYPT_FAIL 12 /* GTK decrypt failure */
  444. #define WLC_E_SUP_SEND_FAIL 13 /* message send failure */
  445. #define WLC_E_SUP_DEAUTH 14 /* received FC_DEAUTH */
  446. #define WLC_E_SUP_WPA_PSK_TMO 15 /* WPA PSK 4-way handshake timeout */
  447. #define WLC_E_SUP_WPA_PSK_M1_TMO 16 /* WPA PSK 4-way handshake M1 timeout */
  448. #define WLC_E_SUP_WPA_PSK_M3_TMO 17 /* WPA PSK 4-way handshake M3 timeout */
  449. #define WLC_E_SUP_GTK_UPDATE_FAIL 18 /* GTK update failure */
  450. #define WLC_E_SUP_TK_UPDATE_FAIL 19 /* TK update failure */
  451. #define WLC_E_SUP_KEY_INSTALL_FAIL 20 /* Buffered key install failure */
  452. #define WLC_E_SUP_PTK_UPDATE 21 /* PTK update */
  453. /* event msg for WLC_E_SUP_PTK_UPDATE */
  454. typedef struct wlc_sup_ptk_update {
  455. uint16 version; /* 0x0001 */
  456. uint16 length; /* length of data that follows */
  457. uint32 tsf_low; /* tsf at which ptk updated by internal supplicant */
  458. uint32 tsf_high;
  459. uint8 key_id; /* always 0 for PTK update */
  460. uint8 tid; /* tid for the PN below - PTK refresh is per key */
  461. uint16 pn_low;
  462. uint32 pn_high; /* local highest PN of any tid of the key when M4 was sent */
  463. } wlc_sup_ptk_update_t;
  464. /* sub event of WLC_E_WSEC */
  465. typedef enum {
  466. WLC_WSEC_EVENT_PTK_PN_SYNC_ERROR = 0x01
  467. } wl_wsec_event_type_t;
  468. /* sub event msg - WLC_WSEC_EVENT_PTK_PN_SYNC_ERROR */
  469. struct wlc_wsec_ptk_pn_sync_error_v1 {
  470. uint32 tsf_low; /* tsf at which PN sync error happened */
  471. uint32 tsf_high;
  472. uint8 key_id; /* always 0 for PTK update */
  473. uint8 tid; /* tid for the PN below - PTK refresh is per key */
  474. uint16 PAD1;
  475. uint16 rx_seqn; /* d11 seq number */
  476. uint16 pn_low;
  477. uint32 pn_high; /* local PN window start for the tid */
  478. uint16 key_idx; /* key idx in the keymgmt */
  479. uint16 rx_pn_low;
  480. uint32 rx_pn_high; /* Rx PN window start for the tid */
  481. uint32 span_time; /* time elapsed since replay */
  482. uint32 span_pkts; /* pkt count since replay */
  483. };
  484. typedef struct wlc_wsec_ptk_pn_sync_error_v1 wlc_wsec_ptk_pn_sync_error_t;
  485. /* WLC_E_WSEC event msg */
  486. typedef struct wlc_wsec_event {
  487. uint16 version; /* 0x0001 */
  488. uint16 length; /* length of data that follows */
  489. uint16 type; /* wsec_event_type_t */
  490. uint16 PAD1;
  491. union {
  492. wlc_wsec_ptk_pn_sync_error_t pn_sync_err;
  493. } data;
  494. } wlc_wsec_event_t;
  495. /* Ucode reason codes carried in the WLC_E_MACDBG event */
  496. #define WLC_E_MACDBG_LIST_PSM 0 /* Dump list update for PSM registers */
  497. #define WLC_E_MACDBG_LIST_PSMX 1 /* Dump list update for PSMx registers */
  498. #define WLC_E_MACDBG_REGALL 2 /* Dump all registers */
  499. /* Event data for events that include frames received over the air */
  500. /* WLC_E_PROBRESP_MSG
  501. * WLC_E_P2P_PROBREQ_MSG
  502. * WLC_E_ACTION_FRAME_RX
  503. */
  504. #define MAX_PHY_CORE_NUM 4u
  505. #define BCM_RX_FRAME_DATA_VERSION_2 2u
  506. typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data_v2 {
  507. uint16 version;
  508. uint16 len;
  509. uint16 channel; /* Matches chanspec_t format from bcmwifi_channels.h */
  510. uint16 pad;
  511. int32 rssi;
  512. uint32 mactime;
  513. uint32 rate;
  514. int8 per_core_rssi[MAX_PHY_CORE_NUM];
  515. } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_v2_t;
  516. typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data_v1 {
  517. uint16 version;
  518. uint16 channel; /* Matches chanspec_t format from bcmwifi_channels.h */
  519. int32 rssi;
  520. uint32 mactime;
  521. uint32 rate;
  522. } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_v1_t;
  523. #define BCM_RX_FRAME_DATA_VERSION_1 1u
  524. #ifndef WL_EVENT_RX_FRAME_DATA_ALIAS
  525. #define BCM_RX_FRAME_DATA_VERSION BCM_RX_FRAME_DATA_VERSION_1
  526. typedef wl_event_rx_frame_data_v1_t wl_event_rx_frame_data_t;
  527. #endif // endif
  528. /* WLC_E_IF event data */
  529. typedef struct wl_event_data_if {
  530. uint8 ifidx; /* RTE virtual device index (for dongle) */
  531. uint8 opcode; /* see I/F opcode */
  532. uint8 reserved; /* bit mask (WLC_E_IF_FLAGS_XXX ) */
  533. uint8 bssidx; /* bsscfg index */
  534. uint8 role; /* see I/F role */
  535. } wl_event_data_if_t;
  536. /* WLC_E_NATOE event data */
  537. typedef struct wl_event_data_natoe {
  538. uint32 natoe_active;
  539. uint32 sta_ip;
  540. uint16 start_port;
  541. uint16 end_port;
  542. } wl_event_data_natoe_t;
  543. /* opcode in WLC_E_IF event */
  544. #define WLC_E_IF_ADD 1 /* bsscfg add */
  545. #define WLC_E_IF_DEL 2 /* bsscfg delete */
  546. #define WLC_E_IF_CHANGE 3 /* bsscfg role change */
  547. /* I/F role code in WLC_E_IF event */
  548. #define WLC_E_IF_ROLE_STA 0 /* Infra STA */
  549. #define WLC_E_IF_ROLE_AP 1 /* Access Point */
  550. #define WLC_E_IF_ROLE_WDS 2 /* WDS link */
  551. #define WLC_E_IF_ROLE_P2P_GO 3 /* P2P Group Owner */
  552. #define WLC_E_IF_ROLE_P2P_CLIENT 4 /* P2P Client */
  553. #define WLC_E_IF_ROLE_IBSS 8 /* IBSS */
  554. #define WLC_E_IF_ROLE_NAN 9 /* NAN */
  555. /* WLC_E_RSSI event data */
  556. typedef struct wl_event_data_rssi {
  557. int32 rssi;
  558. int32 snr;
  559. int32 noise;
  560. } wl_event_data_rssi_t;
  561. #define WL_EVENT_WA_LQM_VER 0 /* initial version */
  562. #define WL_EVENT_WA_LQM_BASIC 0 /* event sub-types */
  563. typedef struct { /* payload of subevent in xtlv */
  564. int32 rssi;
  565. int32 snr;
  566. uint32 tx_rate;
  567. uint32 rx_rate;
  568. } wl_event_wa_lqm_basic_t;
  569. typedef struct wl_event_wa_lqm {
  570. uint16 ver; /* version */
  571. uint16 len; /* total length structure */
  572. uint8 subevent[]; /* sub-event data in bcm_xtlv_t format */
  573. } wl_event_wa_lqm_t;
  574. /* WLC_E_IF flag */
  575. #define WLC_E_IF_FLAGS_BSSCFG_NOIF 0x1 /* no host I/F creation needed */
  576. /* Reason codes for LINK */
  577. #define WLC_E_LINK_BCN_LOSS 1 /* Link down because of beacon loss */
  578. #define WLC_E_LINK_DISASSOC 2 /* Link down because of disassoc */
  579. #define WLC_E_LINK_ASSOC_REC 3 /* Link down because assoc recreate failed */
  580. #define WLC_E_LINK_BSSCFG_DIS 4 /* Link down due to bsscfg down */
  581. /* WLC_E_NDIS_LINK event data */
  582. typedef BWL_PRE_PACKED_STRUCT struct ndis_link_parms {
  583. struct ether_addr peer_mac; /* 6 bytes */
  584. uint16 chanspec; /* 2 bytes */
  585. uint32 link_speed; /* current datarate in units of 500 Kbit/s */
  586. uint32 max_link_speed; /* max possible datarate for link in units of 500 Kbit/s */
  587. int32 rssi; /* average rssi */
  588. } BWL_POST_PACKED_STRUCT ndis_link_parms_t;
  589. /* reason codes for WLC_E_OVERLAY_REQ event */
  590. #define WLC_E_OVL_DOWNLOAD 0 /* overlay download request */
  591. #define WLC_E_OVL_UPDATE_IND 1 /* device indication of host overlay update */
  592. /* reason codes for WLC_E_TDLS_PEER_EVENT event */
  593. #define WLC_E_TDLS_PEER_DISCOVERED 0 /* peer is ready to establish TDLS */
  594. #define WLC_E_TDLS_PEER_CONNECTED 1
  595. #define WLC_E_TDLS_PEER_DISCONNECTED 2
  596. /* reason codes for WLC_E_RMC_EVENT event */
  597. #define WLC_E_REASON_RMC_NONE 0
  598. #define WLC_E_REASON_RMC_AR_LOST 1
  599. #define WLC_E_REASON_RMC_AR_NO_ACK 2
  600. #ifdef WLTDLS
  601. /* TDLS Action Category code */
  602. #define TDLS_AF_CATEGORY 12
  603. /* Wi-Fi Display (WFD) Vendor Specific Category */
  604. /* used for WFD Tunneled Probe Request and Response */
  605. #define TDLS_VENDOR_SPECIFIC 127
  606. /* TDLS Action Field Values */
  607. #define TDLS_ACTION_SETUP_REQ 0
  608. #define TDLS_ACTION_SETUP_RESP 1
  609. #define TDLS_ACTION_SETUP_CONFIRM 2
  610. #define TDLS_ACTION_TEARDOWN 3
  611. #define WLAN_TDLS_SET_PROBE_WFD_IE 11
  612. #define WLAN_TDLS_SET_SETUP_WFD_IE 12
  613. #define WLAN_TDLS_SET_WFD_ENABLED 13
  614. #define WLAN_TDLS_SET_WFD_DISABLED 14
  615. #endif // endif
  616. /* WLC_E_RANGING_EVENT subtypes */
  617. #define WLC_E_RANGING_RESULTS 0
  618. #define PHY_CAL_EVT_VERSION 1
  619. typedef struct wlc_phy_cal_info {
  620. uint16 version; /* structure version */
  621. uint16 length; /* length of the rest of the structure - pad */
  622. uint16 chanspec;
  623. uint8 start;
  624. uint8 phase;
  625. int16 temp;
  626. uint8 reason;
  627. uint8 pad;
  628. } wlc_phy_cal_info_t;
  629. /* GAS event data */
  630. typedef BWL_PRE_PACKED_STRUCT struct wl_event_gas {
  631. uint16 channel; /* channel of GAS protocol */
  632. uint8 dialog_token; /* GAS dialog token */
  633. uint8 fragment_id; /* fragment id */
  634. uint16 status_code; /* status code on GAS completion */
  635. uint16 data_len; /* length of data to follow */
  636. uint8 data[1]; /* variable length specified by data_len */
  637. } BWL_POST_PACKED_STRUCT wl_event_gas_t;
  638. /* service discovery TLV */
  639. typedef BWL_PRE_PACKED_STRUCT struct wl_sd_tlv {
  640. uint16 length; /* length of response_data */
  641. uint8 protocol; /* service protocol type */
  642. uint8 transaction_id; /* service transaction id */
  643. uint8 status_code; /* status code */
  644. uint8 data[1]; /* response data */
  645. } BWL_POST_PACKED_STRUCT wl_sd_tlv_t;
  646. /* service discovery event data */
  647. typedef BWL_PRE_PACKED_STRUCT struct wl_event_sd {
  648. uint16 channel; /* channel */
  649. uint8 count; /* number of tlvs */
  650. wl_sd_tlv_t tlv[1]; /* service discovery TLV */
  651. } BWL_POST_PACKED_STRUCT wl_event_sd_t;
  652. /* WLC_E_PKT_FILTER event sub-classification codes */
  653. #define WLC_E_PKT_FILTER_TIMEOUT 1 /* Matching packet not received in last timeout seconds */
  654. /* Note: proxd has a new API (ver 3.0) deprecates the following */
  655. /* Reason codes for WLC_E_PROXD */
  656. #define WLC_E_PROXD_FOUND 1 /* Found a proximity device */
  657. #define WLC_E_PROXD_GONE 2 /* Lost a proximity device */
  658. #define WLC_E_PROXD_START 3 /* used by: target */
  659. #define WLC_E_PROXD_STOP 4 /* used by: target */
  660. #define WLC_E_PROXD_COMPLETED 5 /* used by: initiator completed */
  661. #define WLC_E_PROXD_ERROR 6 /* used by both initiator and target */
  662. #define WLC_E_PROXD_COLLECT_START 7 /* used by: target & initiator */
  663. #define WLC_E_PROXD_COLLECT_STOP 8 /* used by: target */
  664. #define WLC_E_PROXD_COLLECT_COMPLETED 9 /* used by: initiator completed */
  665. #define WLC_E_PROXD_COLLECT_ERROR 10 /* used by both initiator and target */
  666. #define WLC_E_PROXD_NAN_EVENT 11 /* used by both initiator and target */
  667. #define WLC_E_PROXD_TS_RESULTS 12 /* used by: initiator completed */
  668. /* proxd_event data */
  669. typedef struct ftm_sample {
  670. uint32 value; /* RTT in ns */
  671. int8 rssi; /* RSSI */
  672. } ftm_sample_t;
  673. typedef struct ts_sample {
  674. uint32 t1;
  675. uint32 t2;
  676. uint32 t3;
  677. uint32 t4;
  678. } ts_sample_t;
  679. typedef BWL_PRE_PACKED_STRUCT struct proxd_event_data {
  680. uint16 ver; /* version */
  681. uint16 mode; /* mode: target/initiator */
  682. uint16 method; /* method: rssi/TOF/AOA */
  683. uint8 err_code; /* error classification */
  684. uint8 TOF_type; /* one way or two way TOF */
  685. uint8 OFDM_frame_type; /* legacy or VHT */
  686. uint8 bandwidth; /* Bandwidth is 20, 40,80, MHZ */
  687. struct ether_addr peer_mac; /* (e.g for tgt:initiator's */
  688. uint32 distance; /* dst to tgt, units meter */
  689. uint32 meanrtt; /* mean delta */
  690. uint32 modertt; /* Mode delta */
  691. uint32 medianrtt; /* median RTT */
  692. uint32 sdrtt; /* Standard deviation of RTT */
  693. int32 gdcalcresult; /* Software or Hardware Kind of redundant, but if */
  694. /* frame type is VHT, then we should do it by hardware */
  695. int16 avg_rssi; /* avg rssi accroos the ftm frames */
  696. int16 validfrmcnt; /* Firmware's valid frame counts */
  697. int32 peer_router_info; /* Peer router information if available in TLV, */
  698. /* We will add this field later */
  699. int32 var1; /* average of group delay */
  700. int32 var2; /* average of threshold crossing */
  701. int32 var3; /* difference between group delay and threshold crossing */
  702. /* raw Fine Time Measurements (ftm) data */
  703. uint16 ftm_unit; /* ftm cnt resolution in picoseconds , 6250ps - default */
  704. uint16 ftm_cnt; /* num of rtd measurments/length in the ftm buffer */
  705. ftm_sample_t ftm_buff[1]; /* 1 ... ftm_cnt */
  706. } BWL_POST_PACKED_STRUCT wl_proxd_event_data_t;
  707. typedef BWL_PRE_PACKED_STRUCT struct proxd_event_ts_results {
  708. uint16 ver; /* version */
  709. uint16 mode; /* mode: target/initiator */
  710. uint16 method; /* method: rssi/TOF/AOA */
  711. uint8 err_code; /* error classification */
  712. uint8 TOF_type; /* one way or two way TOF */
  713. uint16 ts_cnt; /* number of timestamp measurements */
  714. ts_sample_t ts_buff[1]; /* Timestamps */
  715. } BWL_POST_PACKED_STRUCT wl_proxd_event_ts_results_t;
  716. /* Video Traffic Interference Monitor Event */
  717. #define INTFER_EVENT_VERSION 1
  718. #define INTFER_STREAM_TYPE_NONTCP 1
  719. #define INTFER_STREAM_TYPE_TCP 2
  720. #define WLINTFER_STATS_NSMPLS 4
  721. typedef struct wl_intfer_event {
  722. uint16 version; /* version */
  723. uint16 status; /* status */
  724. uint8 txfail_histo[WLINTFER_STATS_NSMPLS]; /* txfail histo */
  725. } wl_intfer_event_t;
  726. #define RRM_EVENT_VERSION 0
  727. typedef struct wl_rrm_event {
  728. int16 version;
  729. int16 len;
  730. int16 cat; /* Category */
  731. int16 subevent;
  732. char payload[1]; /* Measurement payload */
  733. } wl_rrm_event_t;
  734. /* WLC_E_PSTA_PRIMARY_INTF_IND event data */
  735. typedef struct wl_psta_primary_intf_event {
  736. struct ether_addr prim_ea; /* primary intf ether addr */
  737. } wl_psta_primary_intf_event_t;
  738. /* WLC_E_DPSTA_INTF_IND event data */
  739. typedef enum {
  740. WL_INTF_PSTA = 1,
  741. WL_INTF_DWDS = 2
  742. } wl_dpsta_intf_type;
  743. typedef struct wl_dpsta_intf_event {
  744. wl_dpsta_intf_type intf_type; /* dwds/psta intf register */
  745. } wl_dpsta_intf_event_t;
  746. /* ********** NAN protocol events/subevents ********** */
  747. #ifndef NAN_EVENT_BUFFER_SIZE
  748. #define NAN_EVENT_BUFFER_SIZE 512 /* max size */
  749. #endif /* NAN_EVENT_BUFFER_SIZE */
  750. /* NAN Events sent by firmware */
  751. /*
  752. * If you make changes to this enum, dont forget to update the mask (if need be).
  753. */
  754. typedef enum wl_nan_events {
  755. WL_NAN_EVENT_START = 1, /* NAN cluster started */
  756. WL_NAN_EVENT_JOIN = 2, /* To be deprecated */
  757. WL_NAN_EVENT_ROLE = 3, /* Role changed */
  758. WL_NAN_EVENT_SCAN_COMPLETE = 4, /* To be deprecated */
  759. WL_NAN_EVENT_DISCOVERY_RESULT = 5, /* Subscribe Received */
  760. WL_NAN_EVENT_REPLIED = 6, /* Publish Sent */
  761. WL_NAN_EVENT_TERMINATED = 7, /* sub / pub is terminated */
  762. WL_NAN_EVENT_RECEIVE = 8, /* Follow up Received */
  763. WL_NAN_EVENT_STATUS_CHG = 9, /* change in nan_mac status */
  764. WL_NAN_EVENT_MERGE = 10, /* Merged to a NAN cluster */
  765. WL_NAN_EVENT_STOP = 11, /* To be deprecated */
  766. WL_NAN_EVENT_P2P = 12, /* Unused */
  767. WL_NAN_EVENT_WINDOW_BEGIN_P2P = 13, /* Unused */
  768. WL_NAN_EVENT_WINDOW_BEGIN_MESH = 14, /* Unused */
  769. WL_NAN_EVENT_WINDOW_BEGIN_IBSS = 15, /* Unused */
  770. WL_NAN_EVENT_WINDOW_BEGIN_RANGING = 16, /* Unused */
  771. WL_NAN_EVENT_POST_DISC = 17, /* Event for post discovery data */
  772. WL_NAN_EVENT_DATA_IF_ADD = 18, /* Unused */
  773. WL_NAN_EVENT_DATA_PEER_ADD = 19, /* Event for peer add */
  774. /* nan 2.0 */
  775. WL_NAN_EVENT_PEER_DATAPATH_IND = 20, /* Incoming DP req */
  776. WL_NAN_EVENT_DATAPATH_ESTB = 21, /* DP Established */
  777. WL_NAN_EVENT_SDF_RX = 22, /* SDF payload */
  778. WL_NAN_EVENT_DATAPATH_END = 23, /* DP Terminate recvd */
  779. WL_NAN_EVENT_BCN_RX = 24, /* received beacon payload */
  780. WL_NAN_EVENT_PEER_DATAPATH_RESP = 25, /* Peer's DP response */
  781. WL_NAN_EVENT_PEER_DATAPATH_CONF = 26, /* Peer's DP confirm */
  782. WL_NAN_EVENT_RNG_REQ_IND = 27, /* Range Request */
  783. WL_NAN_EVENT_RNG_RPT_IND = 28, /* Range Report */
  784. WL_NAN_EVENT_RNG_TERM_IND = 29, /* Range Termination */
  785. WL_NAN_EVENT_PEER_DATAPATH_SEC_INST = 30, /* Peer's DP sec install */
  786. WL_NAN_EVENT_TXS = 31, /* for tx status of follow-up and SDFs */
  787. WL_NAN_EVENT_DW_START = 32, /* dw start */
  788. WL_NAN_EVENT_DW_END = 33, /* dw end */
  789. WL_NAN_EVENT_CHAN_BOUNDARY = 34, /* channel switch event */
  790. WL_NAN_EVENT_MR_CHANGED = 35, /* AMR or IMR changed event during DW */
  791. WL_NAN_EVENT_RNG_RESP_IND = 36, /* Range Response Rx */
  792. WL_NAN_EVENT_PEER_SCHED_UPD_NOTIF = 37, /* Peer's schedule update notification */
  793. WL_NAN_EVENT_PEER_SCHED_REQ = 38, /* Peer's schedule request */
  794. WL_NAN_EVENT_PEER_SCHED_RESP = 39, /* Peer's schedule response */
  795. WL_NAN_EVENT_PEER_SCHED_CONF = 40, /* Peer's schedule confirm */
  796. WL_NAN_EVENT_SENT_DATAPATH_END = 41, /* Sent DP terminate frame */
  797. WL_NAN_EVENT_SLOT_START = 42, /* SLOT_START event */
  798. WL_NAN_EVENT_SLOT_END = 43, /* SLOT_END event */
  799. WL_NAN_EVENT_HOST_ASSIST_REQ = 44, /* Requesting host assist */
  800. WL_NAN_EVENT_RX_MGMT_FRM = 45, /* NAN management frame received */
  801. WL_NAN_EVENT_DISC_CACHE_TIMEOUT = 46, /* Disc cache timeout */
  802. WL_NAN_EVENT_INVALID /* delimiter for max value */
  803. } nan_app_events_e;
  804. #define NAN_EV_MASK(ev) (1 << (ev - 1))
  805. #define IS_NAN_EVT_ON(var, evt) ((var & (1 << (evt-1))) != 0)
  806. #define NAN_EV_MASK_SET(var, evt) \
  807. ((evt < WL_NAN_EVMASK_EXTN_LEN * 8) ? \
  808. ((*((uint8 *)var + ((evt - 1)/8))) |= (1 << ((evt - 1) %8))) : 0)
  809. #define IS_NAN_EVENT_ON(var, evt) \
  810. ((evt < WL_NAN_EVMASK_EXTN_LEN * 8) && \
  811. (((*((uint8 *)var + ((evt - 1)/8))) & (1 << ((evt - 1) %8))) != 0))
  812. /* ******************* end of NAN section *************** */
  813. typedef enum wl_scan_events {
  814. WL_SCAN_START = 1,
  815. WL_SCAN_END = 2
  816. } wl_scan_events;
  817. /* WLC_E_ULP event data */
  818. #define WL_ULP_EVENT_VERSION 1
  819. #define WL_ULP_DISABLE_CONSOLE 1 /* Disable console message on ULP entry */
  820. #define WL_ULP_UCODE_DOWNLOAD 2 /* Download ULP ucode file */
  821. typedef struct wl_ulp_event {
  822. uint16 version;
  823. uint16 ulp_dongle_action;
  824. } wl_ulp_event_t;
  825. /* TCP keepalive event data */
  826. typedef BWL_PRE_PACKED_STRUCT struct wl_event_tko {
  827. uint8 index; /* TCP connection index, 0 to max-1 */
  828. uint8 pad[3]; /* 4-byte struct alignment */
  829. } BWL_POST_PACKED_STRUCT wl_event_tko_t;
  830. typedef struct {
  831. uint8 radar_type; /* one of RADAR_TYPE_XXX */
  832. uint16 min_pw; /* minimum pulse-width (usec * 20) */
  833. uint16 max_pw; /* maximum pulse-width (usec * 20) */
  834. uint16 min_pri; /* minimum pulse repetition interval (usec) */
  835. uint16 max_pri; /* maximum pulse repetition interval (usec) */
  836. uint16 subband; /* subband/frequency */
  837. } radar_detected_event_info_t;
  838. typedef struct wl_event_radar_detect_data {
  839. uint32 version;
  840. uint16 current_chanspec; /* chanspec on which the radar is recieved */
  841. uint16 target_chanspec; /* Target chanspec after detection of radar on current_chanspec */
  842. radar_detected_event_info_t radar_info[2];
  843. } wl_event_radar_detect_data_t;
  844. #define WL_EVENT_MODESW_VER_1 1
  845. #define WL_EVENT_MODESW_VER_CURRENT WL_EVENT_MODESW_VER_1
  846. #define WL_E_MODESW_FLAG_MASK_DEVICE 0x01u /* mask of device: belongs to local or peer */
  847. #define WL_E_MODESW_FLAG_MASK_FROM 0x02u /* mask of origin: firmware or user */
  848. #define WL_E_MODESW_FLAG_MASK_STATE 0x0Cu /* mask of state: modesw progress state */
  849. #define WL_E_MODESW_FLAG_DEVICE_LOCAL 0x00u /* flag - device: info is about self/local */
  850. #define WL_E_MODESW_FLAG_DEVICE_PEER 0x01u /* flag - device: info is about peer */
  851. #define WL_E_MODESW_FLAG_FROM_FIRMWARE 0x00u /* flag - from: request is from firmware */
  852. #define WL_E_MODESW_FLAG_FROM_USER 0x02u /* flag - from: request is from user/iov */
  853. #define WL_E_MODESW_FLAG_STATE_REQUESTED 0x00u /* flag - state: mode switch request */
  854. #define WL_E_MODESW_FLAG_STATE_INITIATED 0x04u /* flag - state: switch initiated */
  855. #define WL_E_MODESW_FLAG_STATE_COMPLETE 0x08u /* flag - state: switch completed/success */
  856. #define WL_E_MODESW_FLAG_STATE_FAILURE 0x0Cu /* flag - state: failed to switch */
  857. /* Get sizeof *X including variable data's length where X is pointer to wl_event_mode_switch_t */
  858. #define WL_E_MODESW_SIZE(X) (sizeof(*(X)) + (X)->length)
  859. /* Get variable data's length where X is pointer to wl_event_mode_switch_t */
  860. #define WL_E_MODESW_DATA_SIZE(X) (((X)->length > sizeof(*(X))) ? ((X)->length - sizeof(*(X))) : 0)
  861. #define WL_E_MODESW_REASON_UNKNOWN 0u /* reason: UNKNOWN */
  862. #define WL_E_MODESW_REASON_ACSD 1u /* reason: ACSD (based on events from FW */
  863. #define WL_E_MODESW_REASON_OBSS_DBS 2u /* reason: OBSS DBS (eg. on interference) */
  864. #define WL_E_MODESW_REASON_DFS 3u /* reason: DFS (eg. on subband radar) */
  865. #define WL_E_MODESW_REASON_DYN160 4u /* reason: DYN160 (160/2x2 - 80/4x4) */
  866. /* event structure for WLC_E_MODE_SWITCH */
  867. typedef struct {
  868. uint16 version;
  869. uint16 length; /* size including 'data' field */
  870. uint16 opmode_from;
  871. uint16 opmode_to;
  872. uint32 flags; /* bit 0: peer(/local==0);
  873. * bit 1: user(/firmware==0);
  874. * bits 3,2: 00==requested, 01==initiated,
  875. * 10==complete, 11==failure;
  876. * rest: reserved
  877. */
  878. uint16 reason; /* value 0: unknown, 1: ACSD, 2: OBSS_DBS,
  879. * 3: DFS, 4: DYN160, rest: reserved
  880. */
  881. uint16 data_offset; /* offset to 'data' from beginning of this struct.
  882. * fields may be added between data_offset and data
  883. */
  884. /* ADD NEW FIELDS HERE */
  885. uint8 data[]; /* reason specific data; could be empty */
  886. } wl_event_mode_switch_t;
  887. /* when reason in WLC_E_MODE_SWITCH is DYN160, data will carry the following structure */
  888. typedef struct {
  889. uint16 trigger; /* value 0: MU to SU, 1: SU to MU, 2: metric_dyn160, 3:re-/assoc,
  890. * 4: disassoc, 5: rssi, 6: traffic, 7: interference,
  891. * 8: chanim_stats
  892. */
  893. struct ether_addr sta_addr; /* causal STA's MAC address when known */
  894. uint16 metric_160_80; /* latest dyn160 metric */
  895. uint8 nss; /* NSS of the STA */
  896. uint8 bw; /* BW of the STA */
  897. int8 rssi; /* RSSI of the STA */
  898. uint8 traffic; /* internal metric of traffic */
  899. } wl_event_mode_switch_dyn160;
  900. #define WL_EVENT_FBT_VER_1 1
  901. #define WL_E_FBT_TYPE_FBT_OTD_AUTH 1
  902. #define WL_E_FBT_TYPE_FBT_OTA_AUTH 2
  903. /* event structure for WLC_E_FBT */
  904. typedef struct {
  905. uint16 version;
  906. uint16 length; /* size including 'data' field */
  907. uint16 type; /* value 0: unknown, 1: FBT OTD Auth Req */
  908. uint16 data_offset; /* offset to 'data' from beginning of this struct.
  909. * fields may be added between data_offset and data
  910. */
  911. /* ADD NEW FIELDS HERE */
  912. uint8 data[]; /* type specific data; could be empty */
  913. } wl_event_fbt_t;
  914. /* TWT Setup Completion is designed to notify the user of TWT Setup process
  915. * status. When 'status' field is value of BCME_OK, the user must check the
  916. * 'setup_cmd' field value in 'wl_twt_sdesc_t' structure that at the end of
  917. * the event data to see the response from the TWT Responding STA; when
  918. * 'status' field is value of BCME_ERROR or non BCME_OK, user must not use
  919. * anything from 'wl_twt_sdesc_t' structure as it is the TWT Requesting STA's
  920. * own TWT parameter.
  921. */
  922. #define WL_TWT_SETUP_CPLT_VER 0
  923. /* TWT Setup Completion event data */
  924. typedef struct wl_twt_setup_cplt {
  925. uint16 version;
  926. uint16 length; /* the byte count of fields from 'dialog' onwards */
  927. uint8 dialog; /* the dialog token user supplied to the TWT setup API */
  928. uint8 pad[3];
  929. int32 status;
  930. /* wl_twt_sdesc_t desc; - defined in wlioctl.h */
  931. } wl_twt_setup_cplt_t;
  932. #define WL_INVALID_IE_EVENT_VERSION 0
  933. /* Invalid IE Event data */
  934. typedef struct wl_invalid_ie_event {
  935. uint16 version;
  936. uint16 len; /* Length of the invalid IE copy */
  937. uint16 type; /* Type/subtype of the frame which contains the invalid IE */
  938. uint16 error; /* error code of the wrong IE, defined in ie_error_code_t */
  939. uint8 ie[]; /* Variable length buffer for the invalid IE copy */
  940. } wl_invalid_ie_event_t;
  941. /* Fixed header portion of Invalid IE Event */
  942. typedef struct wl_invalid_ie_event_hdr {
  943. uint16 version;
  944. uint16 len; /* Length of the invalid IE copy */
  945. uint16 type; /* Type/subtype of the frame which contains the invalid IE */
  946. uint16 error; /* error code of the wrong IE, defined in ie_error_code_t */
  947. /* var length IE data follows */
  948. } wl_invalid_ie_event_hdr_t;
  949. typedef enum ie_error_code {
  950. IE_ERROR_OUT_OF_RANGE = 0x01
  951. } ie_error_code_t;
  952. /* This marks the end of a packed structure section. */
  953. #include <packed_section_end.h>
  954. /* reason of channel switch */
  955. typedef enum {
  956. CHANSW_DFS = 10, /* channel switch due to DFS module */
  957. CHANSW_HOMECH_REQ = 14, /* channel switch due to HOME Channel Request */
  958. CHANSW_STA = 15, /* channel switch due to STA */
  959. CHANSW_SOFTAP = 16, /* channel switch due to SodtAP */
  960. CHANSW_AIBSS = 17, /* channel switch due to AIBSS */
  961. CHANSW_NAN = 18, /* channel switch due to NAN */
  962. CHANSW_NAN_DISC = 19, /* channel switch due to NAN Disc */
  963. CHANSW_NAN_SCHED = 20, /* channel switch due to NAN Sched */
  964. CHANSW_AWDL_AW = 21, /* channel switch due to AWDL aw */
  965. CHANSW_AWDL_SYNC = 22, /* channel switch due to AWDL sync */
  966. CHANSW_AWDL_CAL = 23, /* channel switch due to AWDL Cal */
  967. CHANSW_AWDL_PSF = 24, /* channel switch due to AWDL PSF */
  968. CHANSW_AWDL_OOB_AF = 25, /* channel switch due to AWDL OOB action frame */
  969. CHANSW_TDLS = 26, /* channel switch due to TDLS */
  970. CHANSW_PROXD = 27, /* channel switch due to PROXD */
  971. CHANSW_SLOTTED_BSS = 28, /* channel switch due to slotted bss */
  972. CHANSW_SLOTTED_CMN_SYNC = 29, /* channel switch due to Common Sync Layer */
  973. CHANSW_SLOTTED_BSS_CAL = 30, /* channel switch due to Cal request from slotted bss */
  974. CHANSW_MAX_NUMBER = 31 /* max channel switch reason */
  975. } wl_chansw_reason_t;
  976. #define CHANSW_REASON(reason) (1 << reason)
  977. #define EVENT_AGGR_DATA_HDR_LEN 8
  978. typedef struct event_aggr_data {
  979. uint16 num_events; /* No of events aggregated */
  980. uint16 len; /* length of the aggregated events, excludes padding */
  981. uint8 pad[4]; /* Padding to make aggr event packet header aligned
  982. * on 64-bit boundary, for a 64-bit host system.
  983. */
  984. uint8 data[]; /* Aggregate buffer containing Events */
  985. } event_aggr_data_t;
  986. /* WLC_E_TVPM_MITIGATION event structure version */
  987. #define WL_TVPM_MITIGATION_VERSION 1
  988. /* TVPM mitigation on/off status bits */
  989. #define WL_TVPM_MITIGATION_TXDC 0x1
  990. #define WL_TVPM_MITIGATION_TXPOWER 0x2
  991. #define WL_TVPM_MITIGATION_TXCHAINS 0x4
  992. /* Event structure for WLC_E_TVPM_MITIGATION */
  993. typedef struct wl_event_tvpm_mitigation {
  994. uint16 version; /* structure version */
  995. uint16 length; /* length of this structure */
  996. uint32 timestamp_ms; /* millisecond timestamp */
  997. uint8 slice; /* slice number */
  998. uint8 pad;
  999. uint16 on_off; /* mitigation status bits */
  1000. } wl_event_tvpm_mitigation_t;
  1001. /* Event structures for sub health checks of PHY */
  1002. #define WL_PHY_HC_DESENSE_STATS_VER (1)
  1003. typedef struct wl_hc_desense_stats {
  1004. uint16 version;
  1005. uint16 chanspec;
  1006. int8 allowed_weakest_rssi; /* based on weakest link RSSI */
  1007. uint8 ofdm_desense; /* Desense requested for OFDM */
  1008. uint8 bphy_desense; /* Desense requested for bphy */
  1009. int8 glitch_upd_wait; /* wait post ACI mitigation */
  1010. } wl_hc_desense_stats_v1_t;
  1011. #define WL_PHY_HC_TEMP_STATS_VER (1)
  1012. typedef struct wl_hc_temp_stats {
  1013. uint16 version;
  1014. uint16 chanspec;
  1015. int16 curtemp; /* Temperature */
  1016. uint8 temp_disthresh; /* Threshold to reduce tx chain */
  1017. uint8 temp_enthresh; /* Threshold to increase tx chains */
  1018. uint tempsense_period; /* Temperature check period */
  1019. bool heatedup; /* 1: temp throttling on */
  1020. uint8 bitmap; /* Indicating rx and tx chains */
  1021. uint8 pad[2];
  1022. } wl_hc_temp_stats_v1_t;
  1023. #define WL_PHY_HC_TEMP_STATS_VER_2 (2)
  1024. typedef struct {
  1025. uint16 version;
  1026. uint16 chanspec;
  1027. int16 curtemp; /* Temperature */
  1028. uint8 pad[2];
  1029. } wl_hc_temp_stats_v2_t;
  1030. #define WL_PHY_HC_VCOCAL_STATS_VER (1)
  1031. typedef struct wl_hc_vcocal_stats {
  1032. uint16 version;
  1033. uint16 chanspec;
  1034. int16 curtemp; /* Temperature */
  1035. /* Ring buffer - Maintains history of previous 16 wake/sleep cycles */
  1036. uint16 vcocal_status_wake;
  1037. uint16 vcocal_status_sleep;
  1038. uint16 plllock_status_wake;
  1039. uint16 plllock_status_sleep;
  1040. /* Cal Codes */
  1041. uint16 cc_maincap;
  1042. uint16 cc_secondcap;
  1043. uint16 cc_auxcap;
  1044. } wl_hc_vcocal_stats_v1_t;
  1045. #define WL_PHY_HC_TXPWR_STATS_VER (1)
  1046. typedef struct wl_hc_tx_stats {
  1047. uint16 version;
  1048. uint16 chanspec;
  1049. int8 tgt_pwr[MAX_PHY_CORE_NUM]; /* Target pwr (qdBm) */
  1050. int8 estPwr[MAX_PHY_CORE_NUM]; /* Rate corrected (qdBm) */
  1051. int8 estPwr_adj[MAX_PHY_CORE_NUM]; /* Max power (qdBm) */
  1052. uint8 baseindex[MAX_PHY_CORE_NUM]; /* Tx base index */
  1053. int16 temp; /* Temperature */
  1054. uint16 TxCtrlWrd[3]; /* 6 PHY ctrl bytes */
  1055. int8 min_txpower; /* min tx power per ant */
  1056. uint8 pad[3];
  1057. } wl_hc_txpwr_stats_v1_t;
  1058. #define WL_PHY_HC_TXPWR_STATS_VER_2 (2)
  1059. typedef struct {
  1060. uint16 version;
  1061. uint16 chanspec;
  1062. int8 tgt_pwr[MAX_PHY_CORE_NUM]; /* Target pwr (qdBm) */
  1063. uint8 estPwr[MAX_PHY_CORE_NUM]; /* Rate corrected (qdBm) */
  1064. uint8 estPwr_adj[MAX_PHY_CORE_NUM]; /* Max power (qdBm) */
  1065. uint8 baseindex[MAX_PHY_CORE_NUM]; /* Tx base index */
  1066. int16 temp; /* Temperature */
  1067. uint16 TxCtrlWrd[3]; /* 6 PHY ctrl bytes */
  1068. int8 min_txpower; /* min tx power per ant */
  1069. uint8 pad[3];
  1070. } wl_hc_txpwr_stats_v2_t;
  1071. typedef enum wl_mbo_event_type {
  1072. WL_MBO_E_CELLULAR_NW_SWITCH = 1,
  1073. WL_MBO_E_BTM_RCVD = 2,
  1074. /* ADD before this */
  1075. WL_MBO_E_LAST = 3 /* highest val + 1 for range checking */
  1076. } wl_mbo_event_type_t;
  1077. /* WLC_E_MBO event structure version */
  1078. #define WL_MBO_EVT_VER 1
  1079. struct wl_event_mbo {
  1080. uint16 version; /* structure version */
  1081. uint16 length; /* length of the rest of the structure from type */
  1082. wl_mbo_event_type_t type; /* Event type */
  1083. uint8 data[]; /* Variable length data */
  1084. };
  1085. /* WLC_E_MBO_CELLULAR_NW_SWITCH event structure version */
  1086. #define WL_MBO_CELLULAR_NW_SWITCH_VER 1
  1087. /* WLC_E_MBO_CELLULAR_NW_SWITCH event data */
  1088. struct wl_event_mbo_cell_nw_switch {
  1089. uint16 version; /* structure version */
  1090. uint16 length; /* length of the rest of the structure from reason */
  1091. /* Reason of switch as per MBO Tech spec */
  1092. uint8 reason;
  1093. /* pad */
  1094. uint8 pad;
  1095. /* delay after which re-association can be tried to current BSS (seconds) */
  1096. uint16 reassoc_delay;
  1097. /* How long current association will be there (milli seconds).
  1098. * This is zero if not known or value is overflowing.
  1099. */
  1100. uint32 assoc_time_remain;
  1101. };
  1102. /* WLC_E_MBO_BTM_RCVD event structure version */
  1103. #define WL_BTM_EVENT_DATA_VER_1 1
  1104. /* Specific btm event type data */
  1105. struct wl_btm_event_type_data {
  1106. uint16 version;
  1107. uint16 len;
  1108. uint8 transition_reason; /* transition reason code */
  1109. uint8 pad[3]; /* pad */
  1110. };
  1111. /* WLC_E_PRUNE event structure version */
  1112. #define WL_BSSID_PRUNE_EVT_VER_1 1
  1113. /* MBO-OCE params */
  1114. struct wl_bssid_prune_evt_info {
  1115. uint16 version;
  1116. uint16 len;
  1117. uint8 SSID[32];
  1118. uint32 time_remaining; /* Time remaining */
  1119. struct ether_addr BSSID;
  1120. uint8 SSID_len;
  1121. uint8 reason; /* Reason code */
  1122. int8 rssi_threshold; /* RSSI threshold */
  1123. uint8 pad[3]; /* pad */
  1124. };
  1125. /* WLC_E_HWA Event structure */
  1126. typedef struct wl_event_hwa {
  1127. uint16 version; /* structure version */
  1128. uint16 length; /* length of structure */
  1129. uint32 sub_type; /* Sub event type */
  1130. uint8 data[0]; /* variable length data */
  1131. } wl_event_hwa_t;
  1132. #define WL_HWA_EVENT_VER 1
  1133. typedef enum wl_event_hwa_subtype {
  1134. WL_HWA_EVENT_SUBTYPE_ERROR = 1,
  1135. WL_HWA_EVENT_SUBTYPE_LAST = 2
  1136. } wl_event_hwa_subtype_t;
  1137. /* WLC_E_ADPS status */
  1138. enum {
  1139. WL_E_STATUS_ADPS_DEAUTH = 0,
  1140. WL_E_STATUS_ADPS_MAX
  1141. };
  1142. /* WLC_E_ADPS event data */
  1143. #define WL_EVENT_ADPS_VER_1 1
  1144. /* WLC_E_ADPS event type */
  1145. #define WL_E_TYPE_ADPS_BAD_AP 1
  1146. typedef struct wl_event_adps_bad_ap {
  1147. uint32 status;
  1148. uint32 reason;
  1149. struct ether_addr ea; /* bssid */
  1150. } wl_event_adps_bad_ap_t;
  1151. typedef struct wl_event_adps {
  1152. uint16 version; /* structure version */
  1153. uint16 length; /* length of structure */
  1154. uint32 type; /* event type */
  1155. uint8 data[]; /* variable length data */
  1156. } wl_event_adps_v1_t;
  1157. typedef wl_event_adps_v1_t wl_event_adps_t;
  1158. #define WLC_USER_E_KEY_UPDATE 1 /* Key add/remove */
  1159. #endif /* _BCMEVENT_H_ */