wlioctl_defs.h 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473
  1. /*
  2. * Custom OID/ioctl definitions for
  3. * Broadcom 802.11abg Networking Device Driver
  4. *
  5. * Definitions subject to change without notice.
  6. *
  7. * Portions of this code are copyright (c) 2020 Cypress Semiconductor Corporation
  8. *
  9. * Copyright (C) 1999-2020, Broadcom Corporation
  10. *
  11. * Unless you and Broadcom execute a separate written software license
  12. * agreement governing use of this software, this software is licensed to you
  13. * under the terms of the GNU General Public License version 2 (the "GPL"),
  14. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  15. * following added to such license:
  16. *
  17. * As a special exception, the copyright holders of this software give you
  18. * permission to link this software with independent modules, and to copy and
  19. * distribute the resulting executable under terms of your choice, provided that
  20. * you also meet, for each linked independent module, the terms and conditions of
  21. * the license of that module. An independent module is a module which is not
  22. * derived from this software. The special exception does not apply to any
  23. * modifications of the software.
  24. *
  25. * Notwithstanding the above, under no circumstances may you combine this
  26. * software in any way with any other Broadcom software provided under a license
  27. * other than the GPL, without Broadcom's express prior written consent.
  28. *
  29. *
  30. * <<Broadcom-WL-IPTag/Open:>>
  31. *
  32. * $Id: wlioctl_defs.h 725552 2020-05-07 09:18:14Z $
  33. */
  34. #ifndef wlioctl_defs_h
  35. #define wlioctl_defs_h
  36. /* All builds use the new 11ac ratespec/chanspec */
  37. #undef D11AC_IOTYPES
  38. #define D11AC_IOTYPES
  39. #ifndef USE_NEW_RSPEC_DEFS
  40. /* Remove when no referencing branches exist.
  41. * These macros will be used only in older branches (prior to K branch).
  42. * Wl layer in newer branches and trunk use those defined in bcmwifi_rspec.h.
  43. * Non-wl layer in newer branches and trunk may use these as well
  44. * until they are removed.
  45. */
  46. /* WL_RSPEC defines for rate information */
  47. #define WL_RSPEC_RATE_MASK 0x000000FF /* rate or HT MCS value */
  48. #define WL_RSPEC_VHT_MCS_MASK 0x0000000F /* VHT MCS value */
  49. #define WL_RSPEC_VHT_NSS_MASK 0x000000F0 /* VHT Nss value */
  50. #define WL_RSPEC_VHT_NSS_SHIFT 4 /* VHT Nss value shift */
  51. #define WL_RSPEC_TXEXP_MASK 0x00000300
  52. #define WL_RSPEC_TXEXP_SHIFT 8
  53. #define WL_RSPEC_BW_MASK 0x00070000 /* bandwidth mask */
  54. #define WL_RSPEC_BW_SHIFT 16 /* bandwidth shift */
  55. #define WL_RSPEC_STBC 0x00100000 /* STBC encoding, Nsts = 2 x Nss */
  56. #define WL_RSPEC_TXBF 0x00200000 /* bit indicates TXBF mode */
  57. #define WL_RSPEC_LDPC 0x00400000 /* bit indicates adv coding in use */
  58. #define WL_RSPEC_SGI 0x00800000 /* Short GI mode */
  59. #define WL_RSPEC_ENCODING_MASK 0x03000000 /* Encoding of Rate/MCS field */
  60. #define WL_RSPEC_OVERRIDE_RATE 0x40000000 /* bit indicate to override mcs only */
  61. #define WL_RSPEC_OVERRIDE_MODE 0x80000000 /* bit indicates override rate & mode */
  62. /* WL_RSPEC_ENCODING field defs */
  63. #define WL_RSPEC_ENCODE_RATE 0x00000000 /* Legacy rate is stored in RSPEC_RATE_MASK */
  64. #define WL_RSPEC_ENCODE_HT 0x01000000 /* HT MCS is stored in RSPEC_RATE_MASK */
  65. #define WL_RSPEC_ENCODE_VHT 0x02000000 /* VHT MCS and Nss is stored in RSPEC_RATE_MASK */
  66. /* WL_RSPEC_BW field defs */
  67. #define WL_RSPEC_BW_UNSPECIFIED 0
  68. #define WL_RSPEC_BW_20MHZ 0x00010000
  69. #define WL_RSPEC_BW_40MHZ 0x00020000
  70. #define WL_RSPEC_BW_80MHZ 0x00030000
  71. #define WL_RSPEC_BW_160MHZ 0x00040000
  72. #define WL_RSPEC_BW_10MHZ 0x00050000
  73. #define WL_RSPEC_BW_5MHZ 0x00060000
  74. #define WL_RSPEC_BW_2P5MHZ 0x00070000
  75. #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
  76. #ifndef OEM_ANDROID
  77. /* given a proprietary MCS, get number of spatial streams */
  78. #define GET_PROPRIETARY_11N_MCS_NSS(mcs) (1 + ((mcs) - 85) / 8)
  79. #define GET_11N_MCS_NSS(mcs) ((mcs) < 32 ? (1 + ((mcs) / 8)) \
  80. : ((mcs) == 32 ? 1 : GET_PROPRIETARY_11N_MCS_NSS(mcs)))
  81. #endif /* !OEM_ANDROID */
  82. #endif /* !USE_NEW_RSPEC_DEFS */
  83. /* Legacy defines for the nrate iovar */
  84. #define OLD_NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
  85. #define OLD_NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
  86. #define OLD_NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
  87. #define OLD_NRATE_STF_SHIFT 8 /* stf mode shift */
  88. #define OLD_NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
  89. #define OLD_NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
  90. #define OLD_NRATE_SGI 0x00800000 /* sgi mode */
  91. #define OLD_NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
  92. #define OLD_NRATE_STF_SISO 0 /* stf mode SISO */
  93. #define OLD_NRATE_STF_CDD 1 /* stf mode CDD */
  94. #define OLD_NRATE_STF_STBC 2 /* stf mode STBC */
  95. #define OLD_NRATE_STF_SDM 3 /* stf mode SDM */
  96. #define WLC_11N_N_PROP_MCS 6
  97. #define WLC_11N_FIRST_PROP_MCS 87
  98. #define WLC_11N_LAST_PROP_MCS 102
  99. #define MAX_CCA_CHANNELS 38 /* Max number of 20 Mhz wide channels */
  100. #define MAX_CCA_SECS 60 /* CCA keeps this many seconds history */
  101. #define IBSS_MED 15 /* Mediom in-bss congestion percentage */
  102. #define IBSS_HI 25 /* Hi in-bss congestion percentage */
  103. #define OBSS_MED 12
  104. #define OBSS_HI 25
  105. #define INTERFER_MED 5
  106. #define INTERFER_HI 10
  107. #define CCA_FLAG_2G_ONLY 0x01 /* Return a channel from 2.4 Ghz band */
  108. #define CCA_FLAG_5G_ONLY 0x02 /* Return a channel from 2.4 Ghz band */
  109. #define CCA_FLAG_IGNORE_DURATION 0x04 /* Ignore dwell time for each channel */
  110. #define CCA_FLAGS_PREFER_1_6_11 0x10
  111. #define CCA_FLAG_IGNORE_INTERFER 0x20 /* do not exlude channel based on interfer level */
  112. #define CCA_ERRNO_BAND 1 /* After filtering for band pref, no choices left */
  113. #define CCA_ERRNO_DURATION 2 /* After filtering for duration, no choices left */
  114. #define CCA_ERRNO_PREF_CHAN 3 /* After filtering for chan pref, no choices left */
  115. #define CCA_ERRNO_INTERFER 4 /* After filtering for interference, no choices left */
  116. #define CCA_ERRNO_TOO_FEW 5 /* Only 1 channel was input */
  117. #define WL_STA_AID(a) ((a) &~ 0xc000)
  118. /* Flags for sta_info_t indicating properties of STA */
  119. #define WL_STA_BRCM 0x00000001 /* Running a Broadcom driver */
  120. #define WL_STA_WME 0x00000002 /* WMM association */
  121. #define WL_STA_NONERP 0x00000004 /* No ERP */
  122. #define WL_STA_AUTHE 0x00000008 /* Authenticated */
  123. #define WL_STA_ASSOC 0x00000010 /* Associated */
  124. #define WL_STA_AUTHO 0x00000020 /* Authorized */
  125. #define WL_STA_WDS 0x00000040 /* Wireless Distribution System */
  126. #define WL_STA_WDS_LINKUP 0x00000080 /* WDS traffic/probes flowing properly */
  127. #define WL_STA_PS 0x00000100 /* STA is in power save mode from AP's viewpoint */
  128. #define WL_STA_APSD_BE 0x00000200 /* APSD delv/trigger for AC_BE is default enabled */
  129. #define WL_STA_APSD_BK 0x00000400 /* APSD delv/trigger for AC_BK is default enabled */
  130. #define WL_STA_APSD_VI 0x00000800 /* APSD delv/trigger for AC_VI is default enabled */
  131. #define WL_STA_APSD_VO 0x00001000 /* APSD delv/trigger for AC_VO is default enabled */
  132. #define WL_STA_N_CAP 0x00002000 /* STA 802.11n capable */
  133. #define WL_STA_SCBSTATS 0x00004000 /* Per STA debug stats */
  134. #define WL_STA_AMPDU_CAP 0x00008000 /* STA AMPDU capable */
  135. #define WL_STA_AMSDU_CAP 0x00010000 /* STA AMSDU capable */
  136. #define WL_STA_MIMO_PS 0x00020000 /* mimo ps mode is enabled */
  137. #define WL_STA_MIMO_RTS 0x00040000 /* send rts in mimo ps mode */
  138. #define WL_STA_RIFS_CAP 0x00080000 /* rifs enabled */
  139. #define WL_STA_VHT_CAP 0x00100000 /* STA VHT(11ac) capable */
  140. #define WL_STA_WPS 0x00200000 /* WPS state */
  141. #define WL_STA_DWDS_CAP 0x01000000 /* DWDS CAP */
  142. #define WL_STA_DWDS 0x02000000 /* DWDS active */
  143. #define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */
  144. /* STA HT cap fields */
  145. #define WL_STA_CAP_LDPC_CODING 0x0001 /* Support for rx of LDPC coded pkts */
  146. #define WL_STA_CAP_40MHZ 0x0002 /* FALSE:20Mhz, TRUE:20/40MHZ supported */
  147. #define WL_STA_CAP_MIMO_PS_MASK 0x000C /* Mimo PS mask */
  148. #define WL_STA_CAP_MIMO_PS_SHIFT 0x0002 /* Mimo PS shift */
  149. #define WL_STA_CAP_MIMO_PS_OFF 0x0003 /* Mimo PS, no restriction */
  150. #define WL_STA_CAP_MIMO_PS_RTS 0x0001 /* Mimo PS, send RTS/CTS around MIMO frames */
  151. #define WL_STA_CAP_MIMO_PS_ON 0x0000 /* Mimo PS, MIMO disallowed */
  152. #define WL_STA_CAP_GF 0x0010 /* Greenfield preamble support */
  153. #define WL_STA_CAP_SHORT_GI_20 0x0020 /* 20MHZ short guard interval support */
  154. #define WL_STA_CAP_SHORT_GI_40 0x0040 /* 40Mhz short guard interval support */
  155. #define WL_STA_CAP_TX_STBC 0x0080 /* Tx STBC support */
  156. #define WL_STA_CAP_RX_STBC_MASK 0x0300 /* Rx STBC mask */
  157. #define WL_STA_CAP_RX_STBC_SHIFT 8 /* Rx STBC shift */
  158. #define WL_STA_CAP_DELAYED_BA 0x0400 /* delayed BA support */
  159. #define WL_STA_CAP_MAX_AMSDU 0x0800 /* Max AMSDU size in bytes , 0=3839, 1=7935 */
  160. #define WL_STA_CAP_DSSS_CCK 0x1000 /* DSSS/CCK supported by the BSS */
  161. #define WL_STA_CAP_PSMP 0x2000 /* Power Save Multi Poll support */
  162. #define WL_STA_CAP_40MHZ_INTOLERANT 0x4000 /* 40MHz Intolerant */
  163. #define WL_STA_CAP_LSIG_TXOP 0x8000 /* L-SIG TXOP protection support */
  164. #define WL_STA_CAP_RX_STBC_NO 0x0 /* no rx STBC support */
  165. #define WL_STA_CAP_RX_STBC_ONE_STREAM 0x1 /* rx STBC support of 1 spatial stream */
  166. #define WL_STA_CAP_RX_STBC_TWO_STREAM 0x2 /* rx STBC support of 1-2 spatial streams */
  167. #define WL_STA_CAP_RX_STBC_THREE_STREAM 0x3 /* rx STBC support of 1-3 spatial streams */
  168. /* scb vht flags */
  169. #define WL_STA_VHT_LDPCCAP 0x0001
  170. #define WL_STA_SGI80 0x0002
  171. #define WL_STA_SGI160 0x0004
  172. #define WL_STA_VHT_TX_STBCCAP 0x0008
  173. #define WL_STA_VHT_RX_STBCCAP 0x0010
  174. #define WL_STA_SU_BEAMFORMER 0x0020
  175. #define WL_STA_SU_BEAMFORMEE 0x0040
  176. #define WL_STA_MU_BEAMFORMER 0x0080
  177. #define WL_STA_MU_BEAMFORMEE 0x0100
  178. #define WL_STA_VHT_TXOP_PS 0x0200
  179. #define WL_STA_HTC_VHT_CAP 0x0400
  180. /* Values for TX Filter override mode */
  181. #define WLC_TXFILTER_OVERRIDE_DISABLED 0
  182. #define WLC_TXFILTER_OVERRIDE_ENABLED 1
  183. #define WL_IOCTL_ACTION_GET 0x0
  184. #define WL_IOCTL_ACTION_SET 0x1
  185. #define WL_IOCTL_ACTION_OVL_IDX_MASK 0x1e
  186. #define WL_IOCTL_ACTION_OVL_RSV 0x20
  187. #define WL_IOCTL_ACTION_OVL 0x40
  188. #define WL_IOCTL_ACTION_MASK 0x7e
  189. #define WL_IOCTL_ACTION_OVL_SHIFT 1
  190. /* For WLC_SET_INFRA ioctl & infra_configuration iovar SET/GET operations */
  191. #define WL_BSSTYPE_INDEP 0
  192. #define WL_BSSTYPE_INFRA 1
  193. #define WL_BSSTYPE_ANY 2 /* deprecated */
  194. #define WL_BSSTYPE_MESH 3
  195. /* Bit definitions of mws_active_scan_throttle iovar */
  196. #define WL_SCAN_THROTTLE_MASK 0xF
  197. #define WL_SCAN_THROTTLE_ASSOCSCAN (1U << 0)
  198. #define WL_SCAN_THROTTLE_ROAMSCAN (1U << 1)
  199. #define WL_SCAN_THROTTLE_OTHER_FW_SCAN (1U << 2) /* for other scans like pno etc */
  200. #define WL_SCAN_THROTTLE_HOSTSCAN (1U << 3)
  201. #define WL_SCANFLAGS_CLIENT_MASK 0xF00
  202. #define WL_SCANFLAGS_CLIENT_SHIFT 8
  203. /* Bitmask for scan_type */
  204. /* Reserved flag precludes the use of 0xff for scan_type which is
  205. * interpreted as default for backward compatibility.
  206. * Low priority scan uses currently reserved bit,
  207. * this should be changed as scan_type extended.
  208. * So, reserved flag definition removed.
  209. */
  210. /* Use lower 16 bit for scan flags, the upper 16 bits are for internal use */
  211. #define WL_SCANFLAGS_PASSIVE 0x01 /* force passive scan */
  212. #define WL_SCANFLAGS_LOW_PRIO 0x02 /* Low priority scan */
  213. #define WL_SCANFLAGS_PROHIBITED 0x04 /* allow scanning prohibited channels */
  214. #define WL_SCANFLAGS_OFFCHAN 0x08 /* allow scanning/reporting off-channel APs */
  215. #define WL_SCANFLAGS_HOTSPOT 0x10 /* automatic ANQP to hotspot APs */
  216. #define WL_SCANFLAGS_SWTCHAN 0x20 /* Force channel switch for differerent bandwidth */
  217. #define WL_SCANFLAGS_FORCE_PARALLEL 0x40 /* Force parallel scan even when actcb_fn_t is on.
  218. * by default parallel scan will be disabled if actcb_fn_t
  219. * is provided.
  220. */
  221. #define WL_SCANFLAGS_SISO 0x40 /* Use 1 RX chain for scanning */
  222. #define WL_SCANFLAGS_MIMO 0x80 /* Force MIMO scanning */
  223. #define WL_SCANFLAGS_ASSOCSCAN 0x100 /* Assoc scan */
  224. #define WL_SCANFLAGS_ROAMSCAN 0x200 /* Roam scan */
  225. #define WL_SCANFLAGS_FWSCAN 0x400 /* Other FW scan */
  226. #define WL_SCANFLAGS_HOSTSCAN 0x800 /* Host scan */
  227. #define WL_SCANFLAGS_LOW_POWER_SCAN 0x1000 /* LOW power scan, scheduled scan
  228. * only on scancore
  229. */
  230. #define WL_SCANFLAGS_HIGH_ACCURACY 0x2000 /* High accuracy scan, which needs
  231. * reliable scan results
  232. */
  233. #define WL_SCANFLAGS_LOW_SPAN 0x4000 /* LOW span scan, which expects
  234. * scan to be completed ASAP
  235. */
  236. /* wl_iscan_results status values */
  237. #define WL_SCAN_RESULTS_SUCCESS 0
  238. #define WL_SCAN_RESULTS_PARTIAL 1
  239. #define WL_SCAN_RESULTS_PENDING 2
  240. #define WL_SCAN_RESULTS_ABORTED 3
  241. #define WL_SCAN_RESULTS_NO_MEM 4
  242. /* Flags for parallel scan */
  243. /* Bitmap to enable/disable rsdb parallel scan, 5g-5g/2g-2g parallel scan
  244. * SCAN_PARALLEL_PASSIVE_5G ==> 5g-5g parallel scan
  245. * SCAN_PARALLEL_PASSIVE_2G ==> 2g-2g parallel scan
  246. */
  247. #define SCAN_PARALLEL_PASSIVE_5G (0x40)
  248. #define SCAN_PARALLEL_PASSIVE_2G (0x80)
  249. #define SCANOL_ENABLED (1 << 0)
  250. #define SCANOL_BCAST_SSID (1 << 1)
  251. #define SCANOL_NOTIFY_BCAST_SSID (1 << 2)
  252. #define SCANOL_RESULTS_PER_CYCLE (1 << 3)
  253. /* scan times in milliseconds */
  254. #define SCANOL_HOME_TIME 45 /* for home channel processing */
  255. #define SCANOL_ASSOC_TIME 20 /* dwell on a channel while associated */
  256. #define SCANOL_UNASSOC_TIME 40 /* dwell on a channel while unassociated */
  257. #define SCANOL_PASSIVE_TIME 110 /* listen on a channelfor passive scan */
  258. #define SCANOL_AWAY_LIMIT 100 /* max time to be away from home channel */
  259. #define SCANOL_IDLE_REST_TIME 40
  260. #define SCANOL_IDLE_REST_MULTIPLIER 0
  261. #define SCANOL_ACTIVE_REST_TIME 20
  262. #define SCANOL_ACTIVE_REST_MULTIPLIER 0
  263. #define SCANOL_CYCLE_IDLE_REST_TIME 300000 /* Idle Rest Time between Scan Cycle (msec) */
  264. #define SCANOL_CYCLE_IDLE_REST_MULTIPLIER 0 /* Idle Rest Time Multiplier */
  265. #define SCANOL_CYCLE_ACTIVE_REST_TIME 200
  266. #define SCANOL_CYCLE_ACTIVE_REST_MULTIPLIER 0
  267. #define SCANOL_MAX_REST_TIME 3600000 /* max rest time between scan cycle (msec) */
  268. #define SCANOL_CYCLE_DEFAULT 0 /* default for Max Scan Cycle, 0 = forever */
  269. #define SCANOL_CYCLE_MAX 864000 /* Max Scan Cycle */
  270. /* 10 sec/scan cycle => 100 days */
  271. #define SCANOL_NPROBES 2 /* for Active scan; send n probes on each channel */
  272. #define SCANOL_NPROBES_MAX 5 /* for Active scan; send n probes on each channel */
  273. #define SCANOL_SCAN_START_DLY 10 /* delay start of offload scan (sec) */
  274. #define SCANOL_SCAN_START_DLY_MAX 240 /* delay start of offload scan (sec) */
  275. #define SCANOL_MULTIPLIER_MAX 10 /* Max Multiplier */
  276. #define SCANOL_UNASSOC_TIME_MAX 100 /* max dwell on a channel while unassociated */
  277. #define SCANOL_PASSIVE_TIME_MAX 500 /* max listen on a channel for passive scan */
  278. #define SCANOL_SSID_MAX 16 /* max supported preferred SSID */
  279. /* masks for channel and ssid count */
  280. #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
  281. #define WL_SCAN_PARAMS_NSSID_SHIFT 16
  282. #define WL_SCAN_ACTION_START 1
  283. #define WL_SCAN_ACTION_CONTINUE 2
  284. #define WL_SCAN_ACTION_ABORT 3
  285. #if defined(SIMPLE_ISCAN)
  286. #define ISCAN_RETRY_CNT 5
  287. #define ISCAN_STATE_IDLE 0
  288. #define ISCAN_STATE_SCANING 1
  289. #define ISCAN_STATE_PENDING 2
  290. #endif /* SIMPLE_ISCAN */
  291. #define ANTENNA_NUM_1 1 /* total number of antennas to be used */
  292. #define ANTENNA_NUM_2 2
  293. #define ANTENNA_NUM_3 3
  294. #define ANTENNA_NUM_4 4
  295. #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
  296. #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
  297. #define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
  298. #define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
  299. #define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
  300. #define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
  301. /* interference source detection and identification mode */
  302. #define ITFR_MODE_DISABLE 0 /* disable feature */
  303. #define ITFR_MODE_MANUAL_ENABLE 1 /* enable manual detection */
  304. #define ITFR_MODE_AUTO_ENABLE 2 /* enable auto detection */
  305. /* bit definitions for flags in interference source report */
  306. #define ITFR_INTERFERENCED 1 /* interference detected */
  307. #define ITFR_HOME_CHANNEL 2 /* home channel has interference */
  308. #define ITFR_NOISY_ENVIRONMENT 4 /* noisy environemnt so feature stopped */
  309. #define WL_NUM_RPI_BINS 8
  310. #define WL_RM_TYPE_BASIC 1
  311. #define WL_RM_TYPE_CCA 2
  312. #define WL_RM_TYPE_RPI 3
  313. #define WL_RM_TYPE_ABORT -1 /* ABORT any in-progress RM request */
  314. #define WL_RM_FLAG_PARALLEL (1<<0)
  315. #define WL_RM_FLAG_LATE (1<<1)
  316. #define WL_RM_FLAG_INCAPABLE (1<<2)
  317. #define WL_RM_FLAG_REFUSED (1<<3)
  318. /* flags */
  319. #define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
  320. #define WLC_CIS_DEFAULT 0 /* built-in default */
  321. #define WLC_CIS_SROM 1 /* source is sprom */
  322. #define WLC_CIS_OTP 2 /* source is otp */
  323. /* PCL - Power Control Loop */
  324. /* current gain setting is replaced by user input */
  325. #define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */
  326. #define WL_ATTEN_PCL_ON 1 /* turn on PCL */
  327. /* current gain setting is maintained */
  328. #define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
  329. /* defines used by poweridx iovar - it controls power in a-band */
  330. /* current gain setting is maintained */
  331. #define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */
  332. #define WL_PWRIDX_PCL_ON -1 /* turn on PCL */
  333. #define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */
  334. #define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */
  335. /* value >= 0 causes
  336. * - input to be set to that value
  337. * - PCL to be off
  338. */
  339. #define BCM_MAC_STATUS_INDICATION (0x40010200L)
  340. /* Values for TX Filter override mode */
  341. #define WLC_TXFILTER_OVERRIDE_DISABLED 0
  342. #define WLC_TXFILTER_OVERRIDE_ENABLED 1
  343. /* magic pattern used for mismatch driver and wl */
  344. #define WL_TXFIFO_SZ_MAGIC 0xa5a5
  345. /* check this magic number */
  346. #define WLC_IOCTL_MAGIC 0x14e46c77
  347. /* bss_info_cap_t flags */
  348. #define WL_BSS_FLAGS_FROM_BEACON 0x01 /* bss_info derived from beacon */
  349. #define WL_BSS_FLAGS_FROM_CACHE 0x02 /* bss_info collected from cache */
  350. #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info received on channel (vs offchannel) */
  351. #define WL_BSS_FLAGS_HS20 0x08 /* hotspot 2.0 capable */
  352. #define WL_BSS_FLAGS_RSSI_INVALID 0x10 /* BSS contains invalid RSSI */
  353. #define WL_BSS_FLAGS_RSSI_INACCURATE 0x20 /* BSS contains inaccurate RSSI */
  354. #define WL_BSS_FLAGS_SNR_INVALID 0x40 /* BSS contains invalid SNR */
  355. #define WL_BSS_FLAGS_NF_INVALID 0x80 /* BSS contains invalid noise floor */
  356. /* bit definitions for bcnflags in wl_bss_info */
  357. #define WL_BSS_BCNFLAGS_INTERWORK_PRESENT 0x01 /* beacon had IE, accessnet valid */
  358. #define WL_BSS_BCNFLAGS_INTERWORK_PRESENT_VALID 0x02 /* on indicates support for this API */
  359. #define WL_BSS_BCNFLAGS_MULTIPLE_BSSID_SET 0x4 /* this AP belongs to a multiple BSSID set */
  360. #define WL_BSS_BCNFLAGS_NONTRANSMITTED_BSSID 0x8 /* this AP is the transmitted BSSID */
  361. /* bssinfo flag for nbss_cap */
  362. #define VHT_BI_SGI_80MHZ 0x00000100
  363. #define VHT_BI_80MHZ 0x00000200
  364. #define VHT_BI_160MHZ 0x00000400
  365. #define VHT_BI_8080MHZ 0x00000800
  366. /* reference to wl_ioctl_t struct used by usermode driver */
  367. #define ioctl_subtype set /* subtype param */
  368. #define ioctl_pid used /* pid param */
  369. #define ioctl_status needed /* status param */
  370. /* Enumerate crypto algorithms */
  371. #define CRYPTO_ALGO_OFF 0
  372. #define CRYPTO_ALGO_WEP1 1
  373. #define CRYPTO_ALGO_TKIP 2
  374. #define CRYPTO_ALGO_WEP128 3
  375. #define CRYPTO_ALGO_AES_CCM 4
  376. #define CRYPTO_ALGO_AES_OCB_MSDU 5
  377. #define CRYPTO_ALGO_AES_OCB_MPDU 6
  378. #if !defined(BCMCCX) && !defined(BCMEXTCCX)
  379. #define CRYPTO_ALGO_NALG 7
  380. #else
  381. #define CRYPTO_ALGO_CKIP 7
  382. #define CRYPTO_ALGO_CKIP_MMH 8
  383. #define CRYPTO_ALGO_WEP_MMH 9
  384. #define CRYPTO_ALGO_NALG 10
  385. #endif /* !BCMCCX && !BCMEXTCCX */
  386. #define CRYPTO_ALGO_SMS4 11
  387. #define CRYPTO_ALGO_PMK 12 /* for 802.1x supp to set PMK before 4-way */
  388. #define CRYPTO_ALGO_BIP 13 /* 802.11w BIP (aes cmac) */
  389. #define CRYPTO_ALGO_AES_GCM 14 /* 128 bit GCM */
  390. #define CRYPTO_ALGO_AES_CCM256 15 /* 256 bit CCM */
  391. #define CRYPTO_ALGO_AES_GCM256 16 /* 256 bit GCM */
  392. #define CRYPTO_ALGO_BIP_CMAC256 17 /* 256 bit BIP CMAC */
  393. #define CRYPTO_ALGO_BIP_GMAC 18 /* 128 bit BIP GMAC */
  394. #define CRYPTO_ALGO_BIP_GMAC256 19 /* 256 bit BIP GMAC */
  395. #define CRYPTO_ALGO_NONE CRYPTO_ALGO_OFF
  396. /* algo bit vector */
  397. #define KEY_ALGO_MASK(_algo) (1 << _algo)
  398. #if defined(BCMCCX) || defined(BCMEXTCCX)
  399. #define KEY_ALGO_MASK_CCX (KEY_ALGO_MASK(CRYPTO_ALGO_CKIP) | \
  400. KEY_ALGO_MASK(CRYPTO_ALGO_CKIP_MMH) | \
  401. KEY_ALGO_MASK(CRYPTO_ALGO_WEP_MMH))
  402. #endif /* defined(BCMCCX) || defined(BCMEXTCCX) */
  403. #define KEY_ALGO_MASK_WEP (KEY_ALGO_MASK(CRYPTO_ALGO_WEP1) | \
  404. KEY_ALGO_MASK(CRYPTO_ALGO_WEP128) | \
  405. KEY_ALGO_MASK(CRYPTO_ALGO_NALG))
  406. #define KEY_ALGO_MASK_AES (KEY_ALGO_MASK(CRYPTO_ALGO_AES_CCM) | \
  407. KEY_ALGO_MASK(CRYPTO_ALGO_AES_CCM256) | \
  408. KEY_ALGO_MASK(CRYPTO_ALGO_AES_GCM) | \
  409. KEY_ALGO_MASK(CRYPTO_ALGO_AES_GCM256))
  410. #define KEY_ALGO_MASK_TKIP (KEY_ALGO_MASK(CRYPTO_ALGO_TKIP))
  411. #define KEY_ALGO_MASK_WAPI (KEY_ALGO_MASK(CRYPTO_ALGO_SMS4))
  412. #define WSEC_GEN_MIC_ERROR 0x0001
  413. #define WSEC_GEN_REPLAY 0x0002
  414. #define WSEC_GEN_ICV_ERROR 0x0004
  415. #define WSEC_GEN_MFP_ACT_ERROR 0x0008
  416. #define WSEC_GEN_MFP_DISASSOC_ERROR 0x0010
  417. #define WSEC_GEN_MFP_DEAUTH_ERROR 0x0020
  418. #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
  419. #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
  420. #if defined(BCMCCX) || defined(BCMEXTCCX)
  421. #define WL_CKIP_KP (1 << 4) /* CMIC */
  422. #define WL_CKIP_MMH (1 << 5) /* CKIP */
  423. #else
  424. #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
  425. #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
  426. #endif /* BCMCCX || BCMEXTCCX */
  427. #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
  428. #define WL_LINK_KEY (1 << 7) /* For linking keys of both cores */
  429. #define WL_UNLINK_KEY (1 << 8) /* For unlinking keys of both cores */
  430. /* wireless security bitvec */
  431. #define WSEC_NONE 0x0
  432. #define WEP_ENABLED 0x0001
  433. #define TKIP_ENABLED 0x0002
  434. #define AES_ENABLED 0x0004
  435. #define WSEC_SWFLAG 0x0008
  436. #ifdef BCMCCX
  437. #define CKIP_KP_ENABLED 0x0010
  438. #define CKIP_MIC_ENABLED 0x0020
  439. #endif /* BCMCCX */
  440. #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
  441. #ifdef BCMWAPI_WPI
  442. #define SMS4_ENABLED 0x0100
  443. #endif /* BCMWAPI_WPI */
  444. #define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
  445. #define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
  446. #define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
  447. /* Macros to check if algorithm is enabled */
  448. #define WSEC_INFO_ALGO_ENABLED(_wi, _algo) \
  449. (_wi).cur_algos & (1 << CRYPTO_ALGO_##_algo)
  450. #define WSEC_INFO_ALGO_NONE(_wi) (((_wi).cur_algos) == 0)
  451. #ifdef BCMCCX
  452. #define WSEC_CKIP_KP_ENABLED(wsec) ((wsec) & CKIP_KP_ENABLED)
  453. #define WSEC_CKIP_MIC_ENABLED(wsec) ((wsec) & CKIP_MIC_ENABLED)
  454. #define WSEC_CKIP_ENABLED(wsec) ((wsec) & (CKIP_KP_ENABLED|CKIP_MIC_ENABLED))
  455. #ifdef BCMWAPI_WPI
  456. #define WSEC_ENABLED(wsec) \
  457. ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED | CKIP_KP_ENABLED | \
  458. CKIP_MIC_ENABLED | SMS4_ENABLED))
  459. #else /* BCMWAPI_WPI */
  460. #define WSEC_ENABLED(wsec) \
  461. ((wsec) & \
  462. (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED | CKIP_KP_ENABLED | CKIP_MIC_ENABLED))
  463. #endif /* BCMWAPI_WPI */
  464. #else /* defined BCMCCX */
  465. #ifdef BCMWAPI_WPI
  466. #define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED | SMS4_ENABLED))
  467. #else /* BCMWAPI_WPI */
  468. #define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
  469. #endif /* BCMWAPI_WPI */
  470. #endif /* BCMCCX */
  471. #define WSEC_SES_OW_ENABLED(wsec) ((wsec) & SES_OW_ENABLED)
  472. #ifdef BCMWAPI_WAI
  473. #define WSEC_SMS4_ENABLED(wsec) ((wsec) & SMS4_ENABLED)
  474. #endif /* BCMWAPI_WAI */
  475. /* Following macros are not used any more. Just kept here to
  476. * avoid build issue in BISON/CARIBOU branch
  477. */
  478. #define MFP_CAPABLE 0x0200
  479. #define MFP_REQUIRED 0x0400
  480. #define MFP_SHA256 0x0800 /* a special configuration for STA for WIFI test tool */
  481. /* WPA authentication mode bitvec */
  482. #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
  483. #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
  484. #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
  485. #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
  486. #if defined(BCMCCX) || defined(BCMEXTCCX)
  487. #define WPA_AUTH_CCKM 0x0008 /* CCKM */
  488. #define WPA2_AUTH_CCKM 0x0010 /* CCKM2 */
  489. #endif /* BCMCCX || BCMEXTCCX */
  490. /* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */
  491. #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
  492. #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
  493. #define BRCM_AUTH_PSK 0x0100 /* BRCM specific PSK */
  494. #define BRCM_AUTH_DPT 0x0200 /* DPT PSK without group keys */
  495. #if defined(BCMWAPI_WAI) || defined(BCMWAPI_WPI)
  496. #define WPA_AUTH_WAPI 0x0400 /* why it is same as WAPI_AUTH_UNSPECIFIED */
  497. #define WAPI_AUTH_NONE WPA_AUTH_NONE /* none (IBSS) */
  498. #define WAPI_AUTH_UNSPECIFIED 0x0400 /* over AS */
  499. #define WAPI_AUTH_PSK 0x0800 /* Pre-shared key */
  500. #endif /* BCMWAPI_WAI || BCMWAPI_WPI */
  501. #define WPA2_AUTH_1X_SHA256 0x1000 /* 1X with SHA256 key derivation */
  502. #define WPA2_AUTH_TPK 0x2000 /* TDLS Peer Key */
  503. #define WPA2_AUTH_FT 0x4000 /* Fast Transition. */
  504. #define WPA2_AUTH_PSK_SHA256 0x8000 /* PSK with SHA256 key derivation */
  505. #define WPA2_AUTH_FILS_SHA256 0x10000 /* FILS with SHA256 key derivation */
  506. #define WPA2_AUTH_FILS_SHA384 0x20000 /* FILS with SHA384 key derivation */
  507. #define WPA2_AUTH_IS_FILS(auth) ((auth) & (WPA2_AUTH_FILS_SHA256 | WPA2_AUTH_FILS_SHA384))
  508. #define WPA3_AUTH_SAE_PSK 0x40000 /* SAE with 4-way handshake */
  509. #define WPA3_AUTH_SAE_FBT 0x80000 /* SAE with FT */
  510. #define WPA3_AUTH_OWE 0x100000 /* OWE */
  511. #define WPA3_AUTH_1X_SUITE_B_SHA256 0x200000 /* Suite B SHA256 */
  512. #define WPA3_AUTH_1X_SUITE_B_SHA384 0x400000 /* Suite B-192 SHA384 */
  513. #define WPA3_AUTH_PSK_SHA384 0x800000 /* PSK with SHA384 key derivation */
  514. #define WPA3_AUTH_SAE_AP_ONLY 0x1000000 /* SAE restriction to connect to pure SAE APs */
  515. #define WPA3_AUTH_1X_SHA384 0x2000000 /* 1x with SHA384 key derivation */
  516. /* WPA2_AUTH_SHA256 not used anymore. Just kept here to avoid build issue in DINGO */
  517. #define WPA2_AUTH_SHA256 0x8000
  518. #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
  519. /* pmkid */
  520. #define MAXPMKID 16 /* max # PMKID cache entries NDIS */
  521. /* SROM12 changes */
  522. #define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
  523. #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
  524. #define WLC_IOCTL_MEDLEN 1896 /* "med" length ioctl buffer required */
  525. #if defined(LCNCONF) || defined(LCN40CONF) || defined(LCN20CONF)
  526. #define WLC_SAMPLECOLLECT_MAXLEN 8192 /* Max Sample Collect buffer */
  527. #else
  528. #define WLC_SAMPLECOLLECT_MAXLEN 10240 /* Max Sample Collect buffer for two cores */
  529. #endif // endif
  530. #define WLC_SAMPLECOLLECT_MAXLEN_LCN40 8192
  531. #define WLC_IOCTL_NANRESP_MAXLEN 4096u /* "max" length nan ioctl resp buffer required */
  532. #define WLC_IOCTL_NANRESP_MEDLEN 800u /* "med" length nan ioctl resp buffer required */
  533. /* common ioctl definitions */
  534. #define WLC_GET_MAGIC 0
  535. #define WLC_GET_VERSION 1
  536. #define WLC_UP 2
  537. #define WLC_DOWN 3
  538. #define WLC_GET_LOOP 4
  539. #define WLC_SET_LOOP 5
  540. #define WLC_DUMP 6
  541. #define WLC_GET_MSGLEVEL 7
  542. #define WLC_SET_MSGLEVEL 8
  543. #define WLC_GET_PROMISC 9
  544. #define WLC_SET_PROMISC 10
  545. /* #define WLC_OVERLAY_IOCTL 11 */ /* not supported */
  546. #define WLC_GET_RATE 12
  547. #define WLC_GET_MAX_RATE 13
  548. #define WLC_GET_INSTANCE 14
  549. /* #define WLC_GET_FRAG 15 */ /* no longer supported */
  550. /* #define WLC_SET_FRAG 16 */ /* no longer supported */
  551. /* #define WLC_GET_RTS 17 */ /* no longer supported */
  552. /* #define WLC_SET_RTS 18 */ /* no longer supported */
  553. #define WLC_GET_INFRA 19
  554. #define WLC_SET_INFRA 20
  555. #define WLC_GET_AUTH 21
  556. #define WLC_SET_AUTH 22
  557. #define WLC_GET_BSSID 23
  558. #define WLC_SET_BSSID 24
  559. #define WLC_GET_SSID 25
  560. #define WLC_SET_SSID 26
  561. #define WLC_RESTART 27
  562. #define WLC_TERMINATED 28
  563. /* #define WLC_DUMP_SCB 28 */ /* no longer supported */
  564. #define WLC_GET_CHANNEL 29
  565. #define WLC_SET_CHANNEL 30
  566. #define WLC_GET_SRL 31
  567. #define WLC_SET_SRL 32
  568. #define WLC_GET_LRL 33
  569. #define WLC_SET_LRL 34
  570. #define WLC_GET_PLCPHDR 35
  571. #define WLC_SET_PLCPHDR 36
  572. #define WLC_GET_RADIO 37
  573. #define WLC_SET_RADIO 38
  574. #define WLC_GET_PHYTYPE 39
  575. #define WLC_DUMP_RATE 40
  576. #define WLC_SET_RATE_PARAMS 41
  577. #define WLC_GET_FIXRATE 42
  578. #define WLC_SET_FIXRATE 43
  579. /* #define WLC_GET_WEP 42 */ /* no longer supported */
  580. /* #define WLC_SET_WEP 43 */ /* no longer supported */
  581. #define WLC_GET_KEY 44
  582. #define WLC_SET_KEY 45
  583. #define WLC_GET_REGULATORY 46
  584. #define WLC_SET_REGULATORY 47
  585. #define WLC_GET_PASSIVE_SCAN 48
  586. #define WLC_SET_PASSIVE_SCAN 49
  587. #define WLC_SCAN 50
  588. #define WLC_SCAN_RESULTS 51
  589. #define WLC_DISASSOC 52
  590. #define WLC_REASSOC 53
  591. #define WLC_GET_ROAM_TRIGGER 54
  592. #define WLC_SET_ROAM_TRIGGER 55
  593. #define WLC_GET_ROAM_DELTA 56
  594. #define WLC_SET_ROAM_DELTA 57
  595. #define WLC_GET_ROAM_SCAN_PERIOD 58
  596. #define WLC_SET_ROAM_SCAN_PERIOD 59
  597. #define WLC_EVM 60 /* diag */
  598. #define WLC_GET_TXANT 61
  599. #define WLC_SET_TXANT 62
  600. #define WLC_GET_ANTDIV 63
  601. #define WLC_SET_ANTDIV 64
  602. /* #define WLC_GET_TXPWR 65 */ /* no longer supported */
  603. /* #define WLC_SET_TXPWR 66 */ /* no longer supported */
  604. #define WLC_GET_CLOSED 67
  605. #define WLC_SET_CLOSED 68
  606. #define WLC_GET_MACLIST 69
  607. #define WLC_SET_MACLIST 70
  608. #define WLC_GET_RATESET 71
  609. #define WLC_SET_RATESET 72
  610. /* #define WLC_GET_LOCALE 73 */ /* no longer supported */
  611. #define WLC_LONGTRAIN 74
  612. #define WLC_GET_BCNPRD 75
  613. #define WLC_SET_BCNPRD 76
  614. #define WLC_GET_DTIMPRD 77
  615. #define WLC_SET_DTIMPRD 78
  616. #define WLC_GET_SROM 79
  617. #define WLC_SET_SROM 80
  618. #define WLC_GET_WEP_RESTRICT 81
  619. #define WLC_SET_WEP_RESTRICT 82
  620. #define WLC_GET_COUNTRY 83
  621. #define WLC_SET_COUNTRY 84
  622. #define WLC_GET_PM 85
  623. #define WLC_SET_PM 86
  624. #define WLC_GET_WAKE 87
  625. #define WLC_SET_WAKE 88
  626. /* #define WLC_GET_D11CNTS 89 */ /* -> "counters" iovar */
  627. #define WLC_GET_FORCELINK 90 /* ndis only */
  628. #define WLC_SET_FORCELINK 91 /* ndis only */
  629. #define WLC_FREQ_ACCURACY 92 /* diag */
  630. #define WLC_CARRIER_SUPPRESS 93 /* diag */
  631. #define WLC_GET_PHYREG 94
  632. #define WLC_SET_PHYREG 95
  633. #define WLC_GET_RADIOREG 96
  634. #define WLC_SET_RADIOREG 97
  635. #define WLC_GET_REVINFO 98
  636. #define WLC_GET_UCANTDIV 99
  637. #define WLC_SET_UCANTDIV 100
  638. #define WLC_R_REG 101
  639. #define WLC_W_REG 102
  640. /* #define WLC_DIAG_LOOPBACK 103 old tray diag */
  641. /* #define WLC_RESET_D11CNTS 104 */ /* -> "reset_d11cnts" iovar */
  642. #define WLC_GET_MACMODE 105
  643. #define WLC_SET_MACMODE 106
  644. #define WLC_GET_MONITOR 107
  645. #define WLC_SET_MONITOR 108
  646. #define WLC_GET_GMODE 109
  647. #define WLC_SET_GMODE 110
  648. #define WLC_GET_LEGACY_ERP 111
  649. #define WLC_SET_LEGACY_ERP 112
  650. #define WLC_GET_RX_ANT 113
  651. #define WLC_GET_CURR_RATESET 114 /* current rateset */
  652. #define WLC_GET_SCANSUPPRESS 115
  653. #define WLC_SET_SCANSUPPRESS 116
  654. #define WLC_GET_AP 117
  655. #define WLC_SET_AP 118
  656. #define WLC_GET_EAP_RESTRICT 119
  657. #define WLC_SET_EAP_RESTRICT 120
  658. #define WLC_SCB_AUTHORIZE 121
  659. #define WLC_SCB_DEAUTHORIZE 122
  660. #define WLC_GET_WDSLIST 123
  661. #define WLC_SET_WDSLIST 124
  662. #define WLC_GET_ATIM 125
  663. #define WLC_SET_ATIM 126
  664. #define WLC_GET_RSSI 127
  665. #define WLC_GET_PHYANTDIV 128
  666. #define WLC_SET_PHYANTDIV 129
  667. #define WLC_AP_RX_ONLY 130
  668. #define WLC_GET_TX_PATH_PWR 131
  669. #define WLC_SET_TX_PATH_PWR 132
  670. #define WLC_GET_WSEC 133
  671. #define WLC_SET_WSEC 134
  672. #define WLC_GET_PHY_NOISE 135
  673. #define WLC_GET_BSS_INFO 136
  674. #define WLC_GET_PKTCNTS 137
  675. #define WLC_GET_LAZYWDS 138
  676. #define WLC_SET_LAZYWDS 139
  677. #define WLC_GET_BANDLIST 140
  678. #define WLC_GET_BAND 141
  679. #define WLC_SET_BAND 142
  680. #define WLC_SCB_DEAUTHENTICATE 143
  681. #define WLC_GET_SHORTSLOT 144
  682. #define WLC_GET_SHORTSLOT_OVERRIDE 145
  683. #define WLC_SET_SHORTSLOT_OVERRIDE 146
  684. #define WLC_GET_SHORTSLOT_RESTRICT 147
  685. #define WLC_SET_SHORTSLOT_RESTRICT 148
  686. #define WLC_GET_GMODE_PROTECTION 149
  687. #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
  688. #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
  689. #define WLC_UPGRADE 152
  690. /* #define WLC_GET_MRATE 153 */ /* no longer supported */
  691. /* #define WLC_SET_MRATE 154 */ /* no longer supported */
  692. #define WLC_GET_IGNORE_BCNS 155
  693. #define WLC_SET_IGNORE_BCNS 156
  694. #define WLC_GET_SCB_TIMEOUT 157
  695. #define WLC_SET_SCB_TIMEOUT 158
  696. #define WLC_GET_ASSOCLIST 159
  697. #define WLC_GET_CLK 160
  698. #define WLC_SET_CLK 161
  699. #define WLC_GET_UP 162
  700. #define WLC_OUT 163
  701. #define WLC_GET_WPA_AUTH 164
  702. #define WLC_SET_WPA_AUTH 165
  703. #define WLC_GET_UCFLAGS 166
  704. #define WLC_SET_UCFLAGS 167
  705. #define WLC_GET_PWRIDX 168
  706. #define WLC_SET_PWRIDX 169
  707. #define WLC_GET_TSSI 170
  708. #define WLC_GET_SUP_RATESET_OVERRIDE 171
  709. #define WLC_SET_SUP_RATESET_OVERRIDE 172
  710. /* #define WLC_SET_FAST_TIMER 173 */ /* no longer supported */
  711. /* #define WLC_GET_FAST_TIMER 174 */ /* no longer supported */
  712. /* #define WLC_SET_SLOW_TIMER 175 */ /* no longer supported */
  713. /* #define WLC_GET_SLOW_TIMER 176 */ /* no longer supported */
  714. /* #define WLC_DUMP_PHYREGS 177 */ /* no longer supported */
  715. #define WLC_GET_PROTECTION_CONTROL 178
  716. #define WLC_SET_PROTECTION_CONTROL 179
  717. #define WLC_GET_PHYLIST 180
  718. #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
  719. #define WLC_DECRYPT_STATUS 182 /* ndis only */
  720. #define WLC_GET_KEY_SEQ 183
  721. #define WLC_GET_SCAN_CHANNEL_TIME 184
  722. #define WLC_SET_SCAN_CHANNEL_TIME 185
  723. #define WLC_GET_SCAN_UNASSOC_TIME 186
  724. #define WLC_SET_SCAN_UNASSOC_TIME 187
  725. #define WLC_GET_SCAN_HOME_TIME 188
  726. #define WLC_SET_SCAN_HOME_TIME 189
  727. #define WLC_GET_SCAN_NPROBES 190
  728. #define WLC_SET_SCAN_NPROBES 191
  729. #define WLC_GET_PRB_RESP_TIMEOUT 192
  730. #define WLC_SET_PRB_RESP_TIMEOUT 193
  731. #define WLC_GET_ATTEN 194
  732. #define WLC_SET_ATTEN 195
  733. #define WLC_GET_SHMEM 196 /* diag */
  734. #define WLC_SET_SHMEM 197 /* diag */
  735. /* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */
  736. /* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */
  737. #define WLC_SET_WSEC_TEST 200
  738. #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
  739. #define WLC_TKIP_COUNTERMEASURES 202
  740. #define WLC_GET_PIOMODE 203
  741. #define WLC_SET_PIOMODE 204
  742. #define WLC_SET_ASSOC_PREFER 205
  743. #define WLC_GET_ASSOC_PREFER 206
  744. #define WLC_SET_ROAM_PREFER 207
  745. #define WLC_GET_ROAM_PREFER 208
  746. #define WLC_SET_LED 209
  747. #define WLC_GET_LED 210
  748. #define WLC_GET_INTERFERENCE_MODE 211
  749. #define WLC_SET_INTERFERENCE_MODE 212
  750. #define WLC_GET_CHANNEL_QA 213
  751. #define WLC_START_CHANNEL_QA 214
  752. #define WLC_GET_CHANNEL_SEL 215
  753. #define WLC_START_CHANNEL_SEL 216
  754. #define WLC_GET_VALID_CHANNELS 217
  755. #define WLC_GET_FAKEFRAG 218
  756. #define WLC_SET_FAKEFRAG 219
  757. #define WLC_GET_PWROUT_PERCENTAGE 220
  758. #define WLC_SET_PWROUT_PERCENTAGE 221
  759. #define WLC_SET_BAD_FRAME_PREEMPT 222
  760. #define WLC_GET_BAD_FRAME_PREEMPT 223
  761. #define WLC_SET_LEAP_LIST 224
  762. #define WLC_GET_LEAP_LIST 225
  763. #define WLC_GET_CWMIN 226
  764. #define WLC_SET_CWMIN 227
  765. #define WLC_GET_CWMAX 228
  766. #define WLC_SET_CWMAX 229
  767. #define WLC_GET_WET 230
  768. #define WLC_SET_WET 231
  769. #define WLC_GET_PUB 232
  770. /* #define WLC_SET_GLACIAL_TIMER 233 */ /* no longer supported */
  771. /* #define WLC_GET_GLACIAL_TIMER 234 */ /* no longer supported */
  772. #define WLC_GET_KEY_PRIMARY 235
  773. #define WLC_SET_KEY_PRIMARY 236
  774. /* #define WLC_DUMP_RADIOREGS 237 */ /* no longer supported */
  775. #define WLC_GET_ACI_ARGS 238
  776. #define WLC_SET_ACI_ARGS 239
  777. #define WLC_UNSET_CALLBACK 240
  778. #define WLC_SET_CALLBACK 241
  779. #define WLC_GET_RADAR 242
  780. #define WLC_SET_RADAR 243
  781. #define WLC_SET_SPECT_MANAGMENT 244
  782. #define WLC_GET_SPECT_MANAGMENT 245
  783. #define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
  784. #define WLC_WDS_GET_WPA_SUP 247
  785. #define WLC_SET_CS_SCAN_TIMER 248
  786. #define WLC_GET_CS_SCAN_TIMER 249
  787. #define WLC_MEASURE_REQUEST 250
  788. #define WLC_INIT 251
  789. #define WLC_SEND_QUIET 252
  790. #define WLC_KEEPALIVE 253
  791. #define WLC_SEND_PWR_CONSTRAINT 254
  792. #define WLC_UPGRADE_STATUS 255
  793. #define WLC_CURRENT_PWR 256
  794. #define WLC_GET_SCAN_PASSIVE_TIME 257
  795. #define WLC_SET_SCAN_PASSIVE_TIME 258
  796. #define WLC_LEGACY_LINK_BEHAVIOR 259
  797. #define WLC_GET_CHANNELS_IN_COUNTRY 260
  798. #define WLC_GET_COUNTRY_LIST 261
  799. #define WLC_GET_VAR 262 /* get value of named variable */
  800. #define WLC_SET_VAR 263 /* set named variable to value */
  801. #define WLC_NVRAM_GET 264 /* deprecated */
  802. #define WLC_NVRAM_SET 265
  803. #define WLC_NVRAM_DUMP 266
  804. #define WLC_REBOOT 267
  805. #define WLC_SET_WSEC_PMK 268
  806. #define WLC_GET_AUTH_MODE 269
  807. #define WLC_SET_AUTH_MODE 270
  808. #define WLC_GET_WAKEENTRY 271
  809. #define WLC_SET_WAKEENTRY 272
  810. #define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
  811. #define WLC_NVOTPW 274
  812. #define WLC_OTPW 275
  813. #define WLC_IOV_BLOCK_GET 276
  814. #define WLC_IOV_MODULES_GET 277
  815. #define WLC_SOFT_RESET 278
  816. #define WLC_GET_ALLOW_MODE 279
  817. #define WLC_SET_ALLOW_MODE 280
  818. #define WLC_GET_DESIRED_BSSID 281
  819. #define WLC_SET_DESIRED_BSSID 282
  820. #define WLC_DISASSOC_MYAP 283
  821. #define WLC_GET_NBANDS 284 /* for Dongle EXT_STA support */
  822. #define WLC_GET_BANDSTATES 285 /* for Dongle EXT_STA support */
  823. #define WLC_GET_WLC_BSS_INFO 286 /* for Dongle EXT_STA support */
  824. #define WLC_GET_ASSOC_INFO 287 /* for Dongle EXT_STA support */
  825. #define WLC_GET_OID_PHY 288 /* for Dongle EXT_STA support */
  826. #define WLC_SET_OID_PHY 289 /* for Dongle EXT_STA support */
  827. #define WLC_SET_ASSOC_TIME 290 /* for Dongle EXT_STA support */
  828. #define WLC_GET_DESIRED_SSID 291 /* for Dongle EXT_STA support */
  829. #define WLC_GET_CHANSPEC 292 /* for Dongle EXT_STA support */
  830. #define WLC_GET_ASSOC_STATE 293 /* for Dongle EXT_STA support */
  831. #define WLC_SET_PHY_STATE 294 /* for Dongle EXT_STA support */
  832. #define WLC_GET_SCAN_PENDING 295 /* for Dongle EXT_STA support */
  833. #define WLC_GET_SCANREQ_PENDING 296 /* for Dongle EXT_STA support */
  834. #define WLC_GET_PREV_ROAM_REASON 297 /* for Dongle EXT_STA support */
  835. #define WLC_SET_PREV_ROAM_REASON 298 /* for Dongle EXT_STA support */
  836. #define WLC_GET_BANDSTATES_PI 299 /* for Dongle EXT_STA support */
  837. #define WLC_GET_PHY_STATE 300 /* for Dongle EXT_STA support */
  838. #define WLC_GET_BSS_WPA_RSN 301 /* for Dongle EXT_STA support */
  839. #define WLC_GET_BSS_WPA2_RSN 302 /* for Dongle EXT_STA support */
  840. #define WLC_GET_BSS_BCN_TS 303 /* for Dongle EXT_STA support */
  841. #define WLC_GET_INT_DISASSOC 304 /* for Dongle EXT_STA support */
  842. #define WLC_SET_NUM_PEERS 305 /* for Dongle EXT_STA support */
  843. #define WLC_GET_NUM_BSS 306 /* for Dongle EXT_STA support */
  844. #define WLC_PHY_SAMPLE_COLLECT 307 /* phy sample collect mode */
  845. /* #define WLC_UM_PRIV 308 */ /* Deprecated: usermode driver */
  846. #define WLC_GET_CMD 309
  847. /* #define WLC_LAST 310 */ /* Never used - can be reused */
  848. #define WLC_SET_INTERFERENCE_OVERRIDE_MODE 311 /* set inter mode override */
  849. #define WLC_GET_INTERFERENCE_OVERRIDE_MODE 312 /* get inter mode override */
  850. /* #define WLC_GET_WAI_RESTRICT 313 */
  851. /* #define WLC_SET_WAI_RESTRICT 314 */
  852. /* #define WLC_SET_WAI_REKEY 315 */
  853. #define WLC_SET_NAT_CONFIG 316 /* for configuring NAT filter driver */
  854. #define WLC_GET_NAT_STATE 317
  855. #define WLC_GET_TXBF_RATESET 318
  856. #define WLC_SET_TXBF_RATESET 319
  857. #define WLC_SCAN_CQ 320
  858. #define WLC_GET_RSSI_QDB 321 /* qdB portion of the RSSI */
  859. #define WLC_DUMP_RATESET 322
  860. #define WLC_ECHO 323
  861. #define WLC_LAST 324 /* The last ioctl. Also push this
  862. * number when adding new ioctls
  863. */
  864. /*
  865. * Alert:
  866. * Duplicate a few definitions that irelay requires from epiioctl.h here
  867. * so caller doesn't have to include this file and epiioctl.h .
  868. * If this grows any more, it would be time to move these irelay-specific
  869. * definitions out of the epiioctl.h and into a separate driver common file.
  870. */
  871. #ifndef EPICTRL_COOKIE
  872. #define EPICTRL_COOKIE 0xABADCEDE
  873. #endif // endif
  874. /* vx wlc ioctl's offset */
  875. #define CMN_IOCTL_OFF 0x180
  876. /*
  877. * custom OID support
  878. *
  879. * 0xFF - implementation specific OID
  880. * 0xE4 - first byte of Broadcom PCI vendor ID
  881. * 0x14 - second byte of Broadcom PCI vendor ID
  882. * 0xXX - the custom OID number
  883. */
  884. /* begin 0x1f values beyond the start of the ET driver range. */
  885. #define WL_OID_BASE 0xFFE41420
  886. /* NDIS overrides */
  887. #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
  888. #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
  889. #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
  890. #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
  891. #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
  892. #define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
  893. #define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
  894. /* EXT_STA Dongle suuport */
  895. #define OID_STA_CHANSPEC (WL_OID_BASE + WLC_GET_CHANSPEC)
  896. #define OID_STA_NBANDS (WL_OID_BASE + WLC_GET_NBANDS)
  897. #define OID_STA_GET_PHY (WL_OID_BASE + WLC_GET_OID_PHY)
  898. #define OID_STA_SET_PHY (WL_OID_BASE + WLC_SET_OID_PHY)
  899. #define OID_STA_ASSOC_TIME (WL_OID_BASE + WLC_SET_ASSOC_TIME)
  900. #define OID_STA_DESIRED_SSID (WL_OID_BASE + WLC_GET_DESIRED_SSID)
  901. #define OID_STA_SET_PHY_STATE (WL_OID_BASE + WLC_SET_PHY_STATE)
  902. #define OID_STA_SCAN_PENDING (WL_OID_BASE + WLC_GET_SCAN_PENDING)
  903. #define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
  904. #define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
  905. #define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
  906. #define OID_STA_GET_PHY_STATE (WL_OID_BASE + WLC_GET_PHY_STATE)
  907. #define OID_STA_INT_DISASSOC (WL_OID_BASE + WLC_GET_INT_DISASSOC)
  908. #define OID_STA_SET_NUM_PEERS (WL_OID_BASE + WLC_SET_NUM_PEERS)
  909. #define OID_STA_GET_NUM_BSS (WL_OID_BASE + WLC_GET_NUM_BSS)
  910. /* NAT filter driver support */
  911. #define OID_NAT_SET_CONFIG (WL_OID_BASE + WLC_SET_NAT_CONFIG)
  912. #define OID_NAT_GET_STATE (WL_OID_BASE + WLC_GET_NAT_STATE)
  913. #define WL_DECRYPT_STATUS_SUCCESS 1
  914. #define WL_DECRYPT_STATUS_FAILURE 2
  915. #define WL_DECRYPT_STATUS_UNKNOWN 3
  916. /* allows user-mode app to poll the status of USB image upgrade */
  917. #define WLC_UPGRADE_SUCCESS 0
  918. #define WLC_UPGRADE_PENDING 1
  919. /* WLC_GET_AUTH, WLC_SET_AUTH values */
  920. #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
  921. #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
  922. #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
  923. #define WL_AUTH_SAE 3
  924. #define WL_AUTH_FILS_SHARED 4 /* d11 fils shared key authentication */
  925. #define WL_AUTH_FILS_SHARED_PFS 5 /* d11 fils shared key w/ pfs authentication */
  926. #define WL_AUTH_FILS_PUBLIC 6 /* d11 fils public key authentication */
  927. /* a large TX Power as an init value to factor out of MIN() calculations,
  928. * keep low enough to fit in an int8, units are .25 dBm
  929. */
  930. #define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
  931. /* "diag" iovar argument and error code */
  932. #define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
  933. #define WL_DIAG_LOOPBACK 2 /* d11 loopback data test */
  934. #define WL_DIAG_MEMORY 3 /* d11 memory test */
  935. #define WL_DIAG_LED 4 /* LED test */
  936. #define WL_DIAG_REG 5 /* d11/phy register test */
  937. #define WL_DIAG_SROM 6 /* srom read/crc test */
  938. #define WL_DIAG_DMA 7 /* DMA test */
  939. #define WL_DIAG_LOOPBACK_EXT 8 /* enhenced d11 loopback data test */
  940. #define WL_DIAGERR_SUCCESS 0
  941. #define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
  942. #define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
  943. #define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
  944. #define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
  945. #define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
  946. #define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
  947. #define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
  948. #define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
  949. #define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
  950. #define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
  951. #define WL_DIAGERR_MEMORY_TIMEOUT 11 /* d11 memory test didn't finish in time */
  952. #define WL_DIAGERR_MEMORY_BADPATTERN 12 /* d11 memory test result in bad pattern */
  953. /* band types */
  954. #define WLC_BAND_AUTO 0 /* auto-select */
  955. #define WLC_BAND_5G 1 /* 5 Ghz */
  956. #define WLC_BAND_2G 2 /* 2.4 Ghz */
  957. #define WLC_BAND_ALL 3 /* all bands */
  958. #define WLC_BAND_6G 4 /* 6 Ghz */
  959. #define WLC_BAND_INVALID -1 /* Invalid band */
  960. /* band range returned by band_range iovar */
  961. #define WL_CHAN_FREQ_RANGE_2G 0
  962. #define WL_CHAN_FREQ_RANGE_5GL 1
  963. #define WL_CHAN_FREQ_RANGE_5GM 2
  964. #define WL_CHAN_FREQ_RANGE_5GH 3
  965. #define WL_CHAN_FREQ_RANGE_5GLL_5BAND 4
  966. #define WL_CHAN_FREQ_RANGE_5GLH_5BAND 5
  967. #define WL_CHAN_FREQ_RANGE_5GML_5BAND 6
  968. #define WL_CHAN_FREQ_RANGE_5GMH_5BAND 7
  969. #define WL_CHAN_FREQ_RANGE_5GH_5BAND 8
  970. #define WL_CHAN_FREQ_RANGE_5G_BAND0 1
  971. #define WL_CHAN_FREQ_RANGE_5G_BAND1 2
  972. #define WL_CHAN_FREQ_RANGE_5G_BAND2 3
  973. #define WL_CHAN_FREQ_RANGE_5G_BAND3 4
  974. #define WL_CHAN_FREQ_RANGE_5G_4BAND 5
  975. /* SROM12 */
  976. #define WL_CHAN_FREQ_RANGE_5G_BAND4 5
  977. #define WL_CHAN_FREQ_RANGE_2G_40 6
  978. #define WL_CHAN_FREQ_RANGE_5G_BAND0_40 7
  979. #define WL_CHAN_FREQ_RANGE_5G_BAND1_40 8
  980. #define WL_CHAN_FREQ_RANGE_5G_BAND2_40 9
  981. #define WL_CHAN_FREQ_RANGE_5G_BAND3_40 10
  982. #define WL_CHAN_FREQ_RANGE_5G_BAND4_40 11
  983. #define WL_CHAN_FREQ_RANGE_5G_BAND0_80 12
  984. #define WL_CHAN_FREQ_RANGE_5G_BAND1_80 13
  985. #define WL_CHAN_FREQ_RANGE_5G_BAND2_80 14
  986. #define WL_CHAN_FREQ_RANGE_5G_BAND3_80 15
  987. #define WL_CHAN_FREQ_RANGE_5G_BAND4_80 16
  988. #define WL_CHAN_FREQ_RANGE_5G_5BAND 18
  989. #define WL_CHAN_FREQ_RANGE_5G_5BAND_40 19
  990. #define WL_CHAN_FREQ_RANGE_5G_5BAND_80 20
  991. #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
  992. #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
  993. #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
  994. /*
  995. * 54g modes (basic bits may still be overridden)
  996. *
  997. * GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11
  998. * Preamble: Long
  999. * Shortslot: Off
  1000. * GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
  1001. * Extended Rateset: 6, 9, 12, 48
  1002. * Preamble: Long
  1003. * Shortslot: Auto
  1004. * GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
  1005. * Extended Rateset: 6b, 9, 12b, 48
  1006. * Preamble: Short required
  1007. * Shortslot: Auto
  1008. * GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
  1009. * Extended Rateset: 6, 9, 12, 48
  1010. * Preamble: Long
  1011. * Shortslot: On
  1012. * GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
  1013. * Preamble: Short required
  1014. * Shortslot: On and required
  1015. * GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b
  1016. * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
  1017. * Preamble: Long
  1018. * Shortslot: Auto
  1019. */
  1020. #define GMODE_LEGACY_B 0
  1021. #define GMODE_AUTO 1
  1022. #define GMODE_ONLY 2
  1023. #define GMODE_B_DEFERRED 3
  1024. #define GMODE_PERFORMANCE 4
  1025. #define GMODE_LRS 5
  1026. #define GMODE_MAX 6
  1027. /* values for PLCPHdr_override */
  1028. #define WLC_PLCP_AUTO -1
  1029. #define WLC_PLCP_SHORT 0
  1030. #define WLC_PLCP_LONG 1
  1031. /* values for g_protection_override and n_protection_override */
  1032. #define WLC_PROTECTION_AUTO -1
  1033. #define WLC_PROTECTION_OFF 0
  1034. #define WLC_PROTECTION_ON 1
  1035. #define WLC_PROTECTION_MMHDR_ONLY 2
  1036. #define WLC_PROTECTION_CTS_ONLY 3
  1037. /* values for g_protection_control and n_protection_control */
  1038. #define WLC_PROTECTION_CTL_OFF 0
  1039. #define WLC_PROTECTION_CTL_LOCAL 1
  1040. #define WLC_PROTECTION_CTL_OVERLAP 2
  1041. /* values for n_protection */
  1042. #define WLC_N_PROTECTION_OFF 0
  1043. #define WLC_N_PROTECTION_OPTIONAL 1
  1044. #define WLC_N_PROTECTION_20IN40 2
  1045. #define WLC_N_PROTECTION_MIXEDMODE 3
  1046. /* values for n_preamble_type */
  1047. #define WLC_N_PREAMBLE_MIXEDMODE 0
  1048. #define WLC_N_PREAMBLE_GF 1
  1049. #define WLC_N_PREAMBLE_GF_BRCM 2
  1050. /* values for band specific 40MHz capabilities (deprecated) */
  1051. #define WLC_N_BW_20ALL 0
  1052. #define WLC_N_BW_40ALL 1
  1053. #define WLC_N_BW_20IN2G_40IN5G 2
  1054. #define WLC_BW_20MHZ_BIT (1<<0)
  1055. #define WLC_BW_40MHZ_BIT (1<<1)
  1056. #define WLC_BW_80MHZ_BIT (1<<2)
  1057. #define WLC_BW_160MHZ_BIT (1<<3)
  1058. #define WLC_BW_10MHZ_BIT (1<<4)
  1059. #define WLC_BW_5MHZ_BIT (1<<5)
  1060. #define WLC_BW_2P5MHZ_BIT (1<<6)
  1061. /* Bandwidth capabilities */
  1062. #define WLC_BW_CAP_20MHZ (WLC_BW_20MHZ_BIT)
  1063. #define WLC_BW_CAP_40MHZ (WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
  1064. #define WLC_BW_CAP_80MHZ (WLC_BW_80MHZ_BIT|WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
  1065. #define WLC_BW_CAP_160MHZ (WLC_BW_160MHZ_BIT|WLC_BW_80MHZ_BIT| \
  1066. WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
  1067. #define WLC_BW_CAP_2P5MHZ (WLC_BW_2P5MHZ_BIT)
  1068. #define WLC_BW_CAP_5MHZ (WLC_BW_5MHZ_BIT)
  1069. #define WLC_BW_CAP_10MHZ (WLC_BW_10MHZ_BIT)
  1070. #define WLC_BW_CAP_UNRESTRICTED 0xFF
  1071. #define WL_BW_CAP_20MHZ(bw_cap) (((bw_cap) & WLC_BW_20MHZ_BIT) ? TRUE : FALSE)
  1072. #define WL_BW_CAP_40MHZ(bw_cap) (((bw_cap) & WLC_BW_40MHZ_BIT) ? TRUE : FALSE)
  1073. #define WL_BW_CAP_80MHZ(bw_cap) (((bw_cap) & WLC_BW_80MHZ_BIT) ? TRUE : FALSE)
  1074. #define WL_BW_CAP_160MHZ(bw_cap)(((bw_cap) & WLC_BW_160MHZ_BIT) ? TRUE : FALSE)
  1075. #define WL_BW_CAP_2P5MHZ(bw_cap)(((bw_cap) & WLC_BW_2P5MHZ_BIT) ? TRUE : FALSE)
  1076. #define WL_BW_CAP_5MHZ(bw_cap) (((bw_cap) & WLC_BW_5MHZ_BIT) ? TRUE : FALSE)
  1077. #define WL_BW_CAP_10MHZ(bw_cap) (((bw_cap) & WLC_BW_10MHZ_BIT) ? TRUE : FALSE)
  1078. /* values to force tx/rx chain */
  1079. #define WLC_N_TXRX_CHAIN0 0
  1080. #define WLC_N_TXRX_CHAIN1 1
  1081. /* bitflags for SGI support (sgi_rx iovar) */
  1082. #define WLC_N_SGI_20 0x01
  1083. #define WLC_N_SGI_40 0x02
  1084. #define WLC_VHT_SGI_80 0x04
  1085. #define WLC_VHT_SGI_160 0x08
  1086. /* when sgi_tx==WLC_SGI_ALL, bypass rate selection, enable sgi for all mcs */
  1087. #define WLC_SGI_ALL 0x02
  1088. #define LISTEN_INTERVAL 10
  1089. /* interference mitigation options */
  1090. #define INTERFERE_OVRRIDE_OFF -1 /* interference override off */
  1091. #define INTERFERE_NONE 0 /* off */
  1092. #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
  1093. #define WLAN_MANUAL 2 /* ACI: no auto detection */
  1094. #define WLAN_AUTO 3 /* ACI: auto detect */
  1095. #define WLAN_AUTO_W_NOISE 4 /* ACI: auto - detect and non 802.11 interference */
  1096. #define AUTO_ACTIVE (1 << 7) /* Auto is currently active */
  1097. /* interfernece mode bit-masks (ACPHY) */
  1098. #define ACPHY_ACI_GLITCHBASED_DESENSE 1 /* bit 0 */
  1099. #define ACPHY_ACI_HWACI_PKTGAINLMT 2 /* bit 1 */
  1100. #define ACPHY_ACI_W2NB_PKTGAINLMT 4 /* bit 2 */
  1101. #define ACPHY_ACI_PREEMPTION 8 /* bit 3 */
  1102. #define ACPHY_HWACI_MITIGATION 16 /* bit 4 */
  1103. #define ACPHY_LPD_PREEMPTION 32 /* bit 5 */
  1104. #define ACPHY_HWOBSS_MITIGATION 64 /* bit 6 */
  1105. #define ACPHY_ACI_MAX_MODE 127
  1106. /* AP environment */
  1107. #define AP_ENV_DETECT_NOT_USED 0 /* We aren't using AP environment detection */
  1108. #define AP_ENV_DENSE 1 /* "Corporate" or other AP dense environment */
  1109. #define AP_ENV_SPARSE 2 /* "Home" or other sparse environment */
  1110. #define AP_ENV_INDETERMINATE 3 /* AP environment hasn't been identified */
  1111. #define TRIGGER_NOW 0
  1112. #define TRIGGER_CRS 0x01
  1113. #define TRIGGER_CRSDEASSERT 0x02
  1114. #define TRIGGER_GOODFCS 0x04
  1115. #define TRIGGER_BADFCS 0x08
  1116. #define TRIGGER_BADPLCP 0x10
  1117. #define TRIGGER_CRSGLITCH 0x20
  1118. #define TRIGGER_ASYNC 0x40
  1119. #define WL_SAMPLEDATA_HEADER_TYPE 1
  1120. #define WL_SAMPLEDATA_HEADER_SIZE 80 /* sample collect header size (bytes) */
  1121. #define WL_SAMPLEDATA_TYPE 2
  1122. #define WL_SAMPLEDATA_SEQ 0xff /* sequence # */
  1123. #define WL_SAMPLEDATA_MORE_DATA 0x100 /* more data mask */
  1124. /* WL_OTA START */
  1125. #define WL_OTA_ARG_PARSE_BLK_SIZE 1200
  1126. #define WL_OTA_TEST_MAX_NUM_RATE 30
  1127. #define WL_OTA_TEST_MAX_NUM_SEQ 100
  1128. #define WL_OTA_TEST_MAX_NUM_RSSI 85
  1129. #define WL_THRESHOLD_LO_BAND 70 /* range from 5250MHz - 5350MHz */
  1130. /* radar iovar SET defines */
  1131. #define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */
  1132. #define WL_RADAR_DETECTOR_ON 1 /* radar detector on */
  1133. #define WL_RADAR_SIMULATED 2 /* force radar detector to declare
  1134. * detection once
  1135. */
  1136. #define WL_RADAR_SIMULATED_SC 3 /* force radar detector to declare
  1137. * detection once on scan core
  1138. * if available and active
  1139. */
  1140. #define WL_RSSI_ANT_VERSION 1 /* current version of wl_rssi_ant_t */
  1141. #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
  1142. #define WL_ANT_HT_RX_MAX 4 /* max 4 receive antennas/cores */
  1143. #define WL_ANT_IDX_1 0 /* antenna index 1 */
  1144. #define WL_ANT_IDX_2 1 /* antenna index 2 */
  1145. #ifndef WL_RSSI_ANT_MAX
  1146. #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
  1147. #elif WL_RSSI_ANT_MAX != 4
  1148. #error "WL_RSSI_ANT_MAX does not match"
  1149. #endif // endif
  1150. /* dfs_status iovar-related defines */
  1151. /* cac - channel availability check,
  1152. * ism - in-service monitoring
  1153. * csa - channel switching announcement
  1154. */
  1155. /* cac state values */
  1156. #define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */
  1157. #define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */
  1158. #define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */
  1159. #define WL_DFS_CACSTATE_CSA 3 /* csa */
  1160. #define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */
  1161. #define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */
  1162. #define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */
  1163. #define WL_DFS_CACSTATES 7 /* this many states exist */
  1164. /* Defines used with channel_bandwidth for curpower */
  1165. #define WL_BW_20MHZ 0
  1166. #define WL_BW_40MHZ 1
  1167. #define WL_BW_80MHZ 2
  1168. #define WL_BW_160MHZ 3
  1169. #define WL_BW_8080MHZ 4
  1170. #define WL_BW_2P5MHZ 5
  1171. #define WL_BW_5MHZ 6
  1172. #define WL_BW_10MHZ 7
  1173. /* tx_power_t.flags bits */
  1174. #define WL_TX_POWER_F_ENABLED 1
  1175. #define WL_TX_POWER_F_HW 2
  1176. #define WL_TX_POWER_F_MIMO 4
  1177. #define WL_TX_POWER_F_SISO 8
  1178. #define WL_TX_POWER_F_HT 0x10
  1179. #define WL_TX_POWER_F_VHT 0x20
  1180. #define WL_TX_POWER_F_OPENLOOP 0x40
  1181. #define WL_TX_POWER_F_PROP11NRATES 0x80
  1182. #define WL_TX_POWER_F_UNIT_QDBM 0x100
  1183. #define WL_TX_POWER_F_TXCAP 0x200
  1184. #define WL_TX_POWER_F_HE 0x400
  1185. #define WL_TX_POWER_F_RU_RATE 0x800
  1186. /* Message levels */
  1187. #define WL_ERROR_VAL 0x00000001
  1188. #define WL_TRACE_VAL 0x00000002
  1189. #define WL_PRHDRS_VAL 0x00000004
  1190. #define WL_PRPKT_VAL 0x00000008
  1191. #define WL_INFORM_VAL 0x00000010
  1192. #define WL_TMP_VAL 0x00000020
  1193. #define WL_OID_VAL 0x00000040
  1194. #define WL_RATE_VAL 0x00000080
  1195. #define WL_ASSOC_VAL 0x00000100
  1196. #define WL_PRUSR_VAL 0x00000200
  1197. #define WL_PS_VAL 0x00000400
  1198. #define WL_TXPWR_VAL 0x00000000 /* retired in TOT on 6/10/2009 */
  1199. #define WL_MODE_SWITCH_VAL 0x00000800 /* Using retired TXPWR val */
  1200. #define WL_PORT_VAL 0x00001000
  1201. #define WL_DUAL_VAL 0x00002000
  1202. #define WL_WSEC_VAL 0x00004000
  1203. #define WL_WSEC_DUMP_VAL 0x00008000
  1204. #define WL_LOG_VAL 0x00010000
  1205. #define WL_NRSSI_VAL 0x00000000 /* retired in TOT on 6/10/2009 */
  1206. #define WL_BCNTRIM_VAL 0x00020000 /* Using retired NRSSI VAL */
  1207. #define WL_LOFT_VAL 0x00000000 /* retired in TOT on 6/10/2009 */
  1208. #define WL_PFN_VAL 0x00040000 /* Using retired LOFT_VAL */
  1209. #define WL_REGULATORY_VAL 0x00080000
  1210. #define WL_CSA_VAL 0x00080000 /* Reusing REGULATORY_VAL due to lackof bits */
  1211. #define WL_TAF_VAL 0x00100000
  1212. #define WL_RADAR_VAL 0x00000000 /* retired in TOT on 6/10/2009 */
  1213. #define WL_WDI_VAL 0x00200000 /* Using retired WL_RADAR_VAL VAL */
  1214. #define WL_MPC_VAL 0x00400000
  1215. #define WL_APSTA_VAL 0x00800000
  1216. #define WL_DFS_VAL 0x01000000
  1217. #define WL_BA_VAL 0x00000000 /* retired in TOT on 6/14/2010 */
  1218. #define WL_MUMIMO_VAL 0x02000000 /* Using retired WL_BA_VAL */
  1219. #define WL_ACI_VAL 0x04000000
  1220. #define WL_PRMAC_VAL 0x04000000
  1221. #define WL_MBSS_VAL 0x04000000
  1222. #define WL_CAC_VAL 0x08000000
  1223. #define WL_AMSDU_VAL 0x10000000
  1224. #define WL_AMPDU_VAL 0x20000000
  1225. #define WL_FFPLD_VAL 0x40000000
  1226. #define WL_ROAM_EXP_VAL 0x80000000
  1227. /* wl_msg_level is full. For new bits take the next one and AND with
  1228. * wl_msg_level2 in wl_dbg.h
  1229. */
  1230. #define WL_DPT_VAL 0x00000001
  1231. /* re-using WL_DPT_VAL */
  1232. /* re-using WL_MESH_VAL */
  1233. #define WL_NATOE_VAL 0x00000001
  1234. #define WL_MESH_VAL 0x00000001
  1235. #define WL_SCAN_VAL 0x00000002
  1236. #define WL_WOWL_VAL 0x00000004
  1237. #define WL_COEX_VAL 0x00000008
  1238. #define WL_RTDC_VAL 0x00000010
  1239. #define WL_PROTO_VAL 0x00000020
  1240. #define WL_SWDIV_VAL 0x00000040
  1241. #define WL_CHANINT_VAL 0x00000080
  1242. #define WL_WMF_VAL 0x00000100
  1243. #define WL_P2P_VAL 0x00000200
  1244. #define WL_ITFR_VAL 0x00000400
  1245. #define WL_MCHAN_VAL 0x00000800
  1246. #define WL_TDLS_VAL 0x00001000
  1247. #define WL_MCNX_VAL 0x00002000
  1248. #define WL_PROT_VAL 0x00004000
  1249. #define WL_TSO_VAL 0x00010000
  1250. #define WL_TRF_MGMT_VAL 0x00020000
  1251. #define WL_LPC_VAL 0x00040000
  1252. #define WL_L2FILTER_VAL 0x00080000
  1253. #define WL_TXBF_VAL 0x00100000
  1254. #define WL_P2PO_VAL 0x00200000
  1255. #define WL_TBTT_VAL 0x00400000
  1256. #define WL_FBT_VAL 0x00800000
  1257. #define WL_RRM_VAL 0x00800000 /* reuse */
  1258. #define WL_MQ_VAL 0x01000000
  1259. /* This level is currently used in Phoenix2 only */
  1260. #define WL_SRSCAN_VAL 0x02000000
  1261. #define WL_WNM_VAL 0x04000000
  1262. /* re-using WL_WNM_VAL for MBO */
  1263. #define WL_MBO_VAL 0x04000000
  1264. /* re-using WL_SRSCAN_VAL */
  1265. #define WL_RANDMAC_VAL 0x02000000
  1266. #define WL_UNUSED_VAL 0x10000000 /* Was a duplicate for WL_LPC_VAL. Removed */
  1267. #define WL_NET_DETECT_VAL 0x20000000
  1268. #define WL_OCE_VAL 0x20000000 /* reuse */
  1269. #define WL_PCIE_VAL 0x40000000
  1270. #define WL_PMDUR_VAL 0x80000000
  1271. /* use top-bit for WL_TIME_STAMP_VAL because this is a modifier
  1272. * rather than a message-type of its own
  1273. */
  1274. #define WL_TIMESTAMP_VAL 0x80000000
  1275. /* wl_msg_level2 is full. For new bits take the next one and AND with
  1276. * wl_msg_level3 in wl_dbg.h
  1277. */
  1278. #define WL_ASSOC_AP_VAL 0x00000001
  1279. #define WL_FILS_VAL 0x00000002
  1280. #define WL_LATENCY_VAL 0x00000004
  1281. /* max # of leds supported by GPIO (gpio pin# == led index#) */
  1282. #define WL_LED_NUMGPIO 32 /* gpio 0-31 */
  1283. /* led per-pin behaviors */
  1284. #define WL_LED_OFF 0 /* always off */
  1285. #define WL_LED_ON 1 /* always on */
  1286. #define WL_LED_ACTIVITY 2 /* activity */
  1287. #define WL_LED_RADIO 3 /* radio enabled */
  1288. #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
  1289. #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
  1290. #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
  1291. #define WL_LED_WI1 7 /* wlan indicator 1 mode (legacy cust) */
  1292. #define WL_LED_WI2 8 /* wlan indicator 2 mode (legacy cust) */
  1293. #define WL_LED_WI3 9 /* wlan indicator 3 mode (legacy cust) */
  1294. #define WL_LED_ASSOC 10 /* associated state indicator */
  1295. #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
  1296. #define WL_LED_ASSOCACT 12 /* on associated; blink fast for activity */
  1297. #define WL_LED_WI4 13 /* wlan indicator 4 mode (legacy cust 5G) */
  1298. #define WL_LED_WI5 14 /* wlan indicator 5 mode (legacy cust 2.4) */
  1299. #define WL_LED_BLINKSLOW 15 /* blink slow */
  1300. #define WL_LED_BLINKMED 16 /* blink med */
  1301. #define WL_LED_BLINKFAST 17 /* blink fast */
  1302. #define WL_LED_BLINKCUSTOM 18 /* blink custom */
  1303. #define WL_LED_BLINKPERIODIC 19 /* blink period (custom 1000ms / off 400ms) */
  1304. #define WL_LED_ASSOC_WITH_SEC 20 /* when connected with security */
  1305. /* keep on for 300 sec */
  1306. #define WL_LED_START_OFF 21 /* off upon boot, could be turned on later */
  1307. #define WL_LED_WI6 22 /* wlan indicator 6 mode legacy rtr 43526 5 */
  1308. #define WL_LED_WI7 23 /* wlan indicator 7 mode legacy rtr 43526 2.4 */
  1309. #define WL_LED_WI8 24 /* wlan indicator 8 mode legacy rtr 43526 */
  1310. #define WL_LED_NUMBEHAVIOR 25
  1311. /* led behavior numeric value format */
  1312. #define WL_LED_BEH_MASK 0x3f /* behavior mask */
  1313. #define WL_LED_PMU_OVERRIDE 0x40 /* need to set PMU Override bit for the GPIO */
  1314. #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
  1315. /* number of bytes needed to define a proper bit mask for MAC event reporting */
  1316. #define BCMIO_ROUNDUP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
  1317. #define BCMIO_NBBY 8
  1318. #define WL_EVENTING_MASK_LEN 16 /* Don't increase this without wl review */
  1319. #define WL_EVENTING_MASK_EXT_LEN \
  1320. MAX(WL_EVENTING_MASK_LEN, (ROUNDUP(WLC_E_LAST, NBBY)/NBBY))
  1321. /* join preference types */
  1322. #define WL_JOIN_PREF_RSSI 1 /* by RSSI */
  1323. #define WL_JOIN_PREF_WPA 2 /* by akm and ciphers */
  1324. #define WL_JOIN_PREF_BAND 3 /* by 802.11 band */
  1325. #define WL_JOIN_PREF_RSSI_DELTA 4 /* by 802.11 band only if RSSI delta condition matches */
  1326. #define WL_JOIN_PREF_TRANS_PREF 5 /* defined by requesting AP */
  1327. /* band preference */
  1328. #define WLJP_BAND_ASSOC_PREF 255 /* use what WLC_SET_ASSOC_PREFER ioctl specifies */
  1329. /* any multicast cipher suite */
  1330. #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
  1331. /* 802.11h measurement types */
  1332. #define WLC_MEASURE_TPC 1
  1333. #define WLC_MEASURE_CHANNEL_BASIC 2
  1334. #define WLC_MEASURE_CHANNEL_CCA 3
  1335. #define WLC_MEASURE_CHANNEL_RPI 4
  1336. /* regulatory enforcement levels */
  1337. #define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */
  1338. #define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */
  1339. #define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */
  1340. #define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */
  1341. /* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
  1342. * adoption is done regardless of capability spectrum_management
  1343. */
  1344. #define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */
  1345. /* bit position in per_chan_info; these depend on current country/regulatory domain */
  1346. #define WL_CHAN_VALID_HW (1u << 0) /* valid with current HW */
  1347. #define WL_CHAN_VALID_SW (1u << 1) /* valid with current country setting */
  1348. #define WL_CHAN_BAND_5G (1u << 2) /* 5GHz-band channel */
  1349. #define WL_CHAN_RADAR (1u << 3) /* radar sensitive channel */
  1350. #define WL_CHAN_INACTIVE (1u << 4) /* temporarily inactive due to radar */
  1351. #define WL_CHAN_PASSIVE (1u << 5) /* channel is in passive mode */
  1352. #define WL_CHAN_RESTRICTED (1u << 6) /* restricted use channel */
  1353. #define WL_CHAN_RADAR_EU_WEATHER (1u << 7) /* EU Radar weather channel.
  1354. * Implies an EU Radar channel.
  1355. */
  1356. #define WL_CHAN_CLM_RESTRICTED (1u << 8) /* channel restricted in CLM (i.e. by default) */
  1357. #define WL_CHAN_BAND_6G (1u << 9) /* 6GHz-band channel */
  1358. #define WL_CHAN_OOS_SHIFT 24u /* shift for OOS field */
  1359. #define WL_CHAN_OOS_MASK 0xFF000000u /* field specifying minutes remaining for this
  1360. * channel's out-of-service period due to radar
  1361. * detection
  1362. */
  1363. /* BTC mode used by "btc_mode" iovar */
  1364. #define WL_BTC_DISABLE 0 /* disable BT coexistence */
  1365. #define WL_BTC_FULLTDM 1 /* full TDM COEX */
  1366. #define WL_BTC_ENABLE 1 /* full TDM COEX to maintain backward compatiblity */
  1367. #define WL_BTC_PREMPT 2 /* full TDM COEX with preemption */
  1368. #define WL_BTC_LITE 3 /* light weight coex for large isolation platform */
  1369. #define WL_BTC_PARALLEL 4 /* BT and WLAN run in parallel with separate antenna */
  1370. #define WL_BTC_HYBRID 5 /* hybrid coex, only ack is allowed to transmit in BT slot */
  1371. #define WL_BTC_DEFAULT 8 /* set the default mode for the device */
  1372. #define WL_INF_BTC_DISABLE 0
  1373. #define WL_INF_BTC_ENABLE 1
  1374. #define WL_INF_BTC_AUTO 3
  1375. /* BTC wire used by "btc_wire" iovar */
  1376. #define WL_BTC_DEFWIRE 0 /* use default wire setting */
  1377. #define WL_BTC_2WIRE 2 /* use 2-wire BTC */
  1378. #define WL_BTC_3WIRE 3 /* use 3-wire BTC */
  1379. #define WL_BTC_4WIRE 4 /* use 4-wire BTC */
  1380. /* BTC flags: BTC configuration that can be set by host */
  1381. #define WL_BTC_FLAG_PREMPT (1 << 0)
  1382. #define WL_BTC_FLAG_BT_DEF (1 << 1)
  1383. #define WL_BTC_FLAG_ACTIVE_PROT (1 << 2)
  1384. #define WL_BTC_FLAG_SIM_RSP (1 << 3)
  1385. #define WL_BTC_FLAG_PS_PROTECT (1 << 4)
  1386. #define WL_BTC_FLAG_SIM_TX_LP (1 << 5)
  1387. #define WL_BTC_FLAG_ECI (1 << 6)
  1388. #define WL_BTC_FLAG_LIGHT (1 << 7)
  1389. #define WL_BTC_FLAG_PARALLEL (1 << 8)
  1390. /* maximum channels returned by the get valid channels iovar */
  1391. #define WL_NUMCHANNELS 64
  1392. /* Channels break down for 2G BAND
  1393. * 2G 20MHz = 14
  1394. *
  1395. * 2G 40MHz
  1396. * 9 * 2 = 18
  1397. *
  1398. * 2G tot = 14 + 18 = 32
  1399. *
  1400. * Channels Break down for 5G BAND
  1401. * 5G 20MHz
  1402. * 36-48 4
  1403. * 52-64 4
  1404. * 100-144 12
  1405. * 149-161 4
  1406. * 165 1
  1407. * 5G 20 subtot = 25
  1408. *
  1409. * 5G 40 12 * 2 = 24
  1410. * 5G 80 6 * 4 = 24
  1411. * 5G 160 2 * 8 = 16
  1412. *
  1413. * 5G total = 25 + 24+ 24+ 16 = 89
  1414. *
  1415. * TOTAL 2G and 5G
  1416. * 2G + 5G = (32 + 89) = 121
  1417. *
  1418. * Channels Break down for 6G BAND
  1419. * 20MHz = 59
  1420. * 40MHz 29 * 2 = 58
  1421. * 80MHz 14 * 4 = 56
  1422. * 160MHz 7 * 8 = 56
  1423. * 6G total = 59 + 58 + 56 + 56 = 229
  1424. *
  1425. * Toal WL_NUMCHANSPECS 2G/5G/6G
  1426. * total = 32 + 89 + 229 = 350
  1427. *
  1428. * IF 5g 80+80 is defined
  1429. * 80MHz cf pairs are:
  1430. * 42 106
  1431. * 42 122
  1432. * 42 138
  1433. * 42 155
  1434. * 58 106
  1435. * 58 122
  1436. * 58 138
  1437. * 58 155
  1438. * 106 138
  1439. * 106 155
  1440. * 122 155
  1441. * 138 155
  1442. *
  1443. *
  1444. * 12 pairs * 8 primary channels = 96
  1445. * TOTAL 2G + 5G + 5G (80 + 80)
  1446. * 32 + 89 + 96 = 217
  1447. *
  1448. *TOTAL 2G + 5G + 5G (80 + 80) +6G (excluding 80 + 80)
  1449. * 32 + 89 + 96 + 229 = 446
  1450. *
  1451. */
  1452. #ifdef WL_BAND6G
  1453. /* max number of chanspecs (used by the iovar to calc. buf space) */
  1454. #ifdef WL11AC_80P80
  1455. #define WL_NUMCHANSPECS 446
  1456. #else
  1457. #define WL_NUMCHANSPECS 350
  1458. #endif // endif
  1459. #else
  1460. /* max number of chanspecs (used by the iovar to calc. buf space) */
  1461. #ifdef WL11AC_80P80
  1462. #define WL_NUMCHANSPECS 206
  1463. #else
  1464. #define WL_NUMCHANSPECS 110
  1465. #endif // endif
  1466. #endif /* WL_BAND6G */
  1467. /* WDS link local endpoint WPA role */
  1468. #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
  1469. #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
  1470. #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
  1471. /* Base offset values */
  1472. #define WL_PKT_FILTER_BASE_PKT 0
  1473. #define WL_PKT_FILTER_BASE_END 1
  1474. #define WL_PKT_FILTER_BASE_D11_H 2 /* May be removed */
  1475. #define WL_PKT_FILTER_BASE_D11_D 3 /* May be removed */
  1476. #define WL_PKT_FILTER_BASE_ETH_H 4
  1477. #define WL_PKT_FILTER_BASE_ETH_D 5
  1478. #define WL_PKT_FILTER_BASE_ARP_H 6
  1479. #define WL_PKT_FILTER_BASE_ARP_D 7 /* May be removed */
  1480. #define WL_PKT_FILTER_BASE_IP4_H 8
  1481. #define WL_PKT_FILTER_BASE_IP4_D 9
  1482. #define WL_PKT_FILTER_BASE_IP6_H 10
  1483. #define WL_PKT_FILTER_BASE_IP6_D 11
  1484. #define WL_PKT_FILTER_BASE_TCP_H 12
  1485. #define WL_PKT_FILTER_BASE_TCP_D 13 /* May be removed */
  1486. #define WL_PKT_FILTER_BASE_UDP_H 14
  1487. #define WL_PKT_FILTER_BASE_UDP_D 15
  1488. #define WL_PKT_FILTER_BASE_IP6_P 16
  1489. #define WL_PKT_FILTER_BASE_COUNT 17 /* May be removed */
  1490. /* String mapping for bases that may be used by applications or debug */
  1491. #define WL_PKT_FILTER_BASE_NAMES \
  1492. { "START", WL_PKT_FILTER_BASE_PKT }, \
  1493. { "END", WL_PKT_FILTER_BASE_END }, \
  1494. { "ETH_H", WL_PKT_FILTER_BASE_ETH_H }, \
  1495. { "ETH_D", WL_PKT_FILTER_BASE_ETH_D }, \
  1496. { "D11_H", WL_PKT_FILTER_BASE_D11_H }, \
  1497. { "D11_D", WL_PKT_FILTER_BASE_D11_D }, \
  1498. { "ARP_H", WL_PKT_FILTER_BASE_ARP_H }, \
  1499. { "IP4_H", WL_PKT_FILTER_BASE_IP4_H }, \
  1500. { "IP4_D", WL_PKT_FILTER_BASE_IP4_D }, \
  1501. { "IP6_H", WL_PKT_FILTER_BASE_IP6_H }, \
  1502. { "IP6_D", WL_PKT_FILTER_BASE_IP6_D }, \
  1503. { "IP6_P", WL_PKT_FILTER_BASE_IP6_P }, \
  1504. { "TCP_H", WL_PKT_FILTER_BASE_TCP_H }, \
  1505. { "TCP_D", WL_PKT_FILTER_BASE_TCP_D }, \
  1506. { "UDP_H", WL_PKT_FILTER_BASE_UDP_H }, \
  1507. { "UDP_D", WL_PKT_FILTER_BASE_UDP_D }
  1508. /* Flags for a pattern list element */
  1509. #define WL_PKT_FILTER_MFLAG_NEG 0x0001
  1510. /*
  1511. * Packet engine interface
  1512. */
  1513. #define WL_PKTENG_PER_TX_START 0x01
  1514. #define WL_PKTENG_PER_TX_STOP 0x02
  1515. #define WL_PKTENG_PER_RX_START 0x04
  1516. #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
  1517. #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
  1518. #define WL_PKTENG_PER_RX_STOP 0x08
  1519. #define WL_PKTENG_PER_RU_TX_START 0x09
  1520. #define WL_PKTENG_PER_TRIG_TX_START 0x0a
  1521. #define WL_PKTENG_PER_MASK 0xff
  1522. #define WL_PKTENG_SYNCHRONOUS 0x100 /* synchronous flag */
  1523. #define WL_PKTENG_SYNCHRONOUS_UNBLK 0x200 /* synchronous unblock flag */
  1524. #define WL_PKTENG_COLLECT 0x400 /* Save last Rx'ed packet */
  1525. #ifdef PKTENG_LONGPKTSZ
  1526. /* max pktsz limit for pkteng */
  1527. #define WL_PKTENG_MAXPKTSZ PKTENG_LONGPKTSZ
  1528. #else
  1529. #define WL_PKTENG_MAXPKTSZ 16384
  1530. #endif // endif
  1531. #define NUM_80211b_RATES 4
  1532. #define NUM_80211ag_RATES 8
  1533. #define NUM_80211n_RATES 32
  1534. #define NUM_80211_RATES (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
  1535. /*
  1536. * WOWL capability/override settings
  1537. */
  1538. #define WL_WOWL_MAGIC (1 << 0) /* Wakeup on Magic packet */
  1539. #define WL_WOWL_NET (1 << 1) /* Wakeup on Netpattern */
  1540. #define WL_WOWL_DIS (1 << 2) /* Wakeup on loss-of-link due to Disassoc/Deauth */
  1541. #define WL_WOWL_RETR (1 << 3) /* Wakeup on retrograde TSF */
  1542. #define WL_WOWL_BCN (1 << 4) /* Wakeup on loss of beacon */
  1543. #define WL_WOWL_TST (1 << 5) /* Wakeup after test */
  1544. #define WL_WOWL_M1 (1 << 6) /* Wakeup after PTK refresh */
  1545. #define WL_WOWL_EAPID (1 << 7) /* Wakeup after receipt of EAP-Identity Req */
  1546. #define WL_WOWL_PME_GPIO (1 << 8) /* Wakeind via PME(0) or GPIO(1) */
  1547. #define WL_WOWL_ULP_BAILOUT (1 << 8) /* wakeind via unknown pkt by basic ULP-offloads -
  1548. * WL_WOWL_ULP_BAILOUT - same as WL_WOWL_PME_GPIO used only for DONGLE BUILDS
  1549. */
  1550. #define WL_WOWL_NEEDTKIP1 (1 << 9) /* need tkip phase 1 key to be updated by the driver */
  1551. #define WL_WOWL_GTK_FAILURE (1 << 10) /* enable wakeup if GTK fails */
  1552. #define WL_WOWL_EXTMAGPAT (1 << 11) /* support extended magic packets */
  1553. #define WL_WOWL_ARPOFFLOAD (1 << 12) /* support ARP/NS/keepalive offloading */
  1554. #define WL_WOWL_WPA2 (1 << 13) /* read protocol version for EAPOL frames */
  1555. #define WL_WOWL_KEYROT (1 << 14) /* If the bit is set, use key rotaton */
  1556. #define WL_WOWL_BCAST (1 << 15) /* If the bit is set, frm received was bcast frame */
  1557. #define WL_WOWL_SCANOL (1 << 16) /* If the bit is set, scan offload is enabled */
  1558. #define WL_WOWL_TCPKEEP_TIME (1 << 17) /* Wakeup on tcpkeep alive timeout */
  1559. #define WL_WOWL_MDNS_CONFLICT (1 << 18) /* Wakeup on mDNS Conflict Resolution */
  1560. #define WL_WOWL_MDNS_SERVICE (1 << 19) /* Wakeup on mDNS Service Connect */
  1561. #define WL_WOWL_TCPKEEP_DATA (1 << 20) /* tcp keepalive got data */
  1562. #define WL_WOWL_FW_HALT (1 << 21) /* Firmware died in wowl mode */
  1563. #define WL_WOWL_ENAB_HWRADIO (1 << 22) /* Enable detection of radio button changes */
  1564. #define WL_WOWL_MIC_FAIL (1 << 23) /* Offloads detected MIC failure(s) */
  1565. #define WL_WOWL_UNASSOC (1 << 24) /* Wakeup in Unassociated state (Net/Magic Pattern) */
  1566. #define WL_WOWL_SECURE (1 << 25) /* Wakeup if received matched secured pattern */
  1567. #define WL_WOWL_EXCESS_WAKE (1 << 26) /* Excess wake */
  1568. #define WL_WOWL_LINKDOWN (1 << 31) /* Link Down indication in WoWL mode */
  1569. #define WL_WOWL_TCPKEEP (1 << 20) /* temp copy to satisfy automerger */
  1570. #define MAGIC_PKT_MINLEN 102 /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
  1571. #define WOWL_PATTEN_TYPE_ARP (1 << 0) /* ARP offload Pattern */
  1572. #define WOWL_PATTEN_TYPE_NA (1 << 1) /* NA offload Pattern */
  1573. #define MAGIC_PKT_MINLEN 102 /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
  1574. #define MAGIC_PKT_NUM_MAC_ADDRS 16
  1575. /* Overlap BSS Scan parameters default, minimum, maximum */
  1576. #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 20 /* unit TU */
  1577. #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5 /* unit TU */
  1578. #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000 /* unit TU */
  1579. #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 10 /* unit TU */
  1580. #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10 /* unit TU */
  1581. #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000 /* unit TU */
  1582. #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300 /* unit Sec */
  1583. #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10 /* unit Sec */
  1584. #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900 /* unit Sec */
  1585. #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
  1586. #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
  1587. #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
  1588. #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200 /* unit TU */
  1589. #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200 /* unit TU */
  1590. #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
  1591. #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20 /* unit TU */
  1592. #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20 /* unit TU */
  1593. #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
  1594. #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25 /* unit percent */
  1595. #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0 /* unit percent */
  1596. #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100 /* unit percent */
  1597. #define WL_MIN_NUM_OBSS_SCAN_ARG 7 /* minimum number of arguments required for OBSS Scan */
  1598. #define WL_COEX_INFO_MASK 0x07
  1599. #define WL_COEX_INFO_REQ 0x01
  1600. #define WL_COEX_40MHZ_INTOLERANT 0x02
  1601. #define WL_COEX_WIDTH20 0x04
  1602. #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
  1603. #define MAX_RSSI_LEVELS 8
  1604. /* **** EXTLOG **** */
  1605. #define EXTLOG_CUR_VER 0x0100
  1606. #define MAX_ARGSTR_LEN 18 /* At least big enough for storing ETHER_ADDR_STR_LEN */
  1607. /* log modules (bitmap) */
  1608. #define LOG_MODULE_COMMON 0x0001
  1609. #define LOG_MODULE_ASSOC 0x0002
  1610. #define LOG_MODULE_EVENT 0x0004
  1611. #define LOG_MODULE_MAX 3 /* Update when adding module */
  1612. /* log levels */
  1613. #define WL_LOG_LEVEL_DISABLE 0
  1614. #define WL_LOG_LEVEL_ERR 1
  1615. #define WL_LOG_LEVEL_WARN 2
  1616. #define WL_LOG_LEVEL_INFO 3
  1617. #define WL_LOG_LEVEL_MAX WL_LOG_LEVEL_INFO /* Update when adding level */
  1618. /* flag */
  1619. #define LOG_FLAG_EVENT 1
  1620. /* log arg_type */
  1621. #define LOG_ARGTYPE_NULL 0
  1622. #define LOG_ARGTYPE_STR 1 /* %s */
  1623. #define LOG_ARGTYPE_INT 2 /* %d */
  1624. #define LOG_ARGTYPE_INT_STR 3 /* %d...%s */
  1625. #define LOG_ARGTYPE_STR_INT 4 /* %s...%d */
  1626. /* 802.11 Mgmt Packet flags */
  1627. #define VNDR_IE_BEACON_FLAG 0x1
  1628. #define VNDR_IE_PRBRSP_FLAG 0x2
  1629. #define VNDR_IE_ASSOCRSP_FLAG 0x4
  1630. #define VNDR_IE_AUTHRSP_FLAG 0x8
  1631. #define VNDR_IE_PRBREQ_FLAG 0x10
  1632. #define VNDR_IE_ASSOCREQ_FLAG 0x20
  1633. #define VNDR_IE_IWAPID_FLAG 0x40 /* vendor IE in IW advertisement protocol ID field */
  1634. #define VNDR_IE_AUTHREQ_FLAG 0x80
  1635. #define VNDR_IE_CUSTOM_FLAG 0x100 /* allow custom IE id */
  1636. #define VNDR_IE_DISASSOC_FLAG 0x200
  1637. #if defined(WLP2P)
  1638. /* P2P Action Frames flags (spec ordered) */
  1639. #define VNDR_IE_GONREQ_FLAG 0x001000
  1640. #define VNDR_IE_GONRSP_FLAG 0x002000
  1641. #define VNDR_IE_GONCFM_FLAG 0x004000
  1642. #define VNDR_IE_INVREQ_FLAG 0x008000
  1643. #define VNDR_IE_INVRSP_FLAG 0x010000
  1644. #define VNDR_IE_DISREQ_FLAG 0x020000
  1645. #define VNDR_IE_DISRSP_FLAG 0x040000
  1646. #define VNDR_IE_PRDREQ_FLAG 0x080000
  1647. #define VNDR_IE_PRDRSP_FLAG 0x100000
  1648. #define VNDR_IE_P2PAF_SHIFT 12
  1649. #endif /* WLP2P */
  1650. /* channel interference measurement (chanim) related defines */
  1651. /* chanim mode */
  1652. #define CHANIM_DISABLE 0 /* disabled */
  1653. #define CHANIM_DETECT 1 /* detection only */
  1654. #define CHANIM_EXT 2 /* external state machine */
  1655. #define CHANIM_ACT 3 /* full internal state machine, detect + act */
  1656. #define CHANIM_MODE_MAX 4
  1657. /* define for apcs reason code */
  1658. #define APCS_INIT 0
  1659. #define APCS_IOCTL 1
  1660. #define APCS_CHANIM 2
  1661. #define APCS_CSTIMER 3
  1662. #define APCS_TXDLY 5
  1663. #define APCS_NONACSD 6
  1664. #define APCS_DFS_REENTRY 7
  1665. #define APCS_TXFAIL 8
  1666. #define APCS_MAX 9
  1667. /* number of ACS record entries */
  1668. #define CHANIM_ACS_RECORD 10
  1669. /* CHANIM */
  1670. #define CCASTATS_TXDUR 0
  1671. #define CCASTATS_INBSS 1
  1672. #define CCASTATS_OBSS 2
  1673. #define CCASTATS_NOCTG 3
  1674. #define CCASTATS_NOPKT 4
  1675. #define CCASTATS_DOZE 5
  1676. #define CCASTATS_TXOP 6
  1677. #define CCASTATS_GDTXDUR 7
  1678. #define CCASTATS_BDTXDUR 8
  1679. #ifndef WLCHANIM_V2
  1680. #define CCASTATS_MAX 9
  1681. #else /* WLCHANIM_V2 */
  1682. #define CCASTATS_MYRX 9
  1683. #define CCASTATS_MAX 10
  1684. #endif /* WLCHANIM_V2 */
  1685. #define WL_CHANIM_COUNT_ALL 0xff
  1686. #define WL_CHANIM_COUNT_ONE 0x1
  1687. /* ap tpc modes */
  1688. #define AP_TPC_OFF 0
  1689. #define AP_TPC_BSS_PWR 1 /* BSS power control */
  1690. #define AP_TPC_AP_PWR 2 /* AP power control */
  1691. #define AP_TPC_AP_BSS_PWR 3 /* Both AP and BSS power control */
  1692. #define AP_TPC_MAX_LINK_MARGIN 127
  1693. /* ap tpc modes */
  1694. #define AP_TPC_OFF 0
  1695. #define AP_TPC_BSS_PWR 1 /* BSS power control */
  1696. #define AP_TPC_AP_PWR 2 /* AP power control */
  1697. #define AP_TPC_AP_BSS_PWR 3 /* Both AP and BSS power control */
  1698. #define AP_TPC_MAX_LINK_MARGIN 127
  1699. /* state */
  1700. #define WL_P2P_DISC_ST_SCAN 0
  1701. #define WL_P2P_DISC_ST_LISTEN 1
  1702. #define WL_P2P_DISC_ST_SEARCH 2
  1703. /* i/f type */
  1704. #define WL_P2P_IF_CLIENT 0
  1705. #define WL_P2P_IF_GO 1
  1706. #define WL_P2P_IF_DYNBCN_GO 2
  1707. #define WL_P2P_IF_DEV 3
  1708. /* p2p GO configuration */
  1709. #define WL_P2P_ENABLE_CONF 1 /* configure */
  1710. #define WL_P2P_DISABLE_CONF 0 /* un-configure */
  1711. /* count */
  1712. #define WL_P2P_SCHED_RSVD 0
  1713. #define WL_P2P_SCHED_REPEAT 255 /* anything > 255 will be treated as 255 */
  1714. #define WL_P2P_SCHED_FIXED_LEN 3
  1715. /* schedule type */
  1716. #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
  1717. #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
  1718. /* at some point we may need bitvec here (combination of actions) */
  1719. /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
  1720. #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
  1721. #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
  1722. /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
  1723. #define WL_P2P_SCHED_ACTION_GOOFF 2 /* turn off GO beacon/prbrsp functions */
  1724. /* schedule option - WL_P2P_SCHED_TYPE_XXX */
  1725. #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
  1726. /* at some point we may need bitvec here (combination of options) */
  1727. /* schedule option - WL_P2P_SCHED_TYPE_ABS */
  1728. #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count */
  1729. #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
  1730. /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
  1731. #define WL_P2P_SCHED_OPTION_TSFOFS 2 /* normal start/internal/duration/count with
  1732. * start being an offset of the 'current' TSF
  1733. */
  1734. /* feature flags */
  1735. #define WL_P2P_FEAT_GO_CSA (1 << 0) /* GO moves with the STA using CSA method */
  1736. #define WL_P2P_FEAT_GO_NOLEGACY (1 << 1) /* GO does not probe respond to non-p2p probe
  1737. * requests
  1738. */
  1739. #define WL_P2P_FEAT_RESTRICT_DEV_RESP (1 << 2) /* Restrict p2p dev interface from responding */
  1740. /* n-mode support capability */
  1741. /* 2x2 includes both 1x1 & 2x2 devices
  1742. * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
  1743. * control it independently
  1744. */
  1745. #define WL_11N_2x2 1
  1746. #define WL_11N_3x3 3
  1747. #define WL_11N_4x4 4
  1748. /* define 11n feature disable flags */
  1749. #define WLFEATURE_DISABLE_11N 0x00000001
  1750. #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
  1751. #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
  1752. #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
  1753. #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
  1754. #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
  1755. #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
  1756. #define WLFEATURE_DISABLE_11N_GF 0x00000080
  1757. /* op code in nat_cfg */
  1758. #define NAT_OP_ENABLE 1 /* enable NAT on given interface */
  1759. #define NAT_OP_DISABLE 2 /* disable NAT on given interface */
  1760. #define NAT_OP_DISABLE_ALL 3 /* disable NAT on all interfaces */
  1761. /* NAT state */
  1762. #define NAT_STATE_ENABLED 1 /* NAT is enabled */
  1763. #define NAT_STATE_DISABLED 2 /* NAT is disabled */
  1764. #define CHANNEL_5G_LOW_START 36 /* 5G low (36..48) CDD enable/disable bit mask */
  1765. #define CHANNEL_5G_MID_START 52 /* 5G mid (52..64) CDD enable/disable bit mask */
  1766. #define CHANNEL_5G_HIGH_START 100 /* 5G high (100..140) CDD enable/disable bit mask */
  1767. #define CHANNEL_5G_UPPER_START 149 /* 5G upper (149..161) CDD enable/disable bit mask */
  1768. /* D0 Coalescing */
  1769. #define IPV4_ARP_FILTER 0x0001
  1770. #define IPV4_NETBT_FILTER 0x0002
  1771. #define IPV4_LLMNR_FILTER 0x0004
  1772. #define IPV4_SSDP_FILTER 0x0008
  1773. #define IPV4_WSD_FILTER 0x0010
  1774. #define IPV6_NETBT_FILTER 0x0200
  1775. #define IPV6_LLMNR_FILTER 0x0400
  1776. #define IPV6_SSDP_FILTER 0x0800
  1777. #define IPV6_WSD_FILTER 0x1000
  1778. /* Network Offload Engine */
  1779. #define NWOE_OL_ENABLE 0x00000001
  1780. /*
  1781. * Traffic management structures/defines.
  1782. */
  1783. /* Traffic management bandwidth parameters */
  1784. #define TRF_MGMT_MAX_PRIORITIES 3
  1785. #define TRF_MGMT_FLAG_ADD_DSCP 0x0001 /* Add DSCP to IP TOS field */
  1786. #define TRF_MGMT_FLAG_DISABLE_SHAPING 0x0002 /* Don't shape traffic */
  1787. #define TRF_MGMT_FLAG_MANAGE_LOCAL_TRAFFIC 0x0008 /* Manage traffic over our local subnet */
  1788. #define TRF_MGMT_FLAG_FILTER_ON_MACADDR 0x0010 /* filter on MAC address */
  1789. #define TRF_MGMT_FLAG_NO_RX 0x0020 /* do not apply fiters to rx packets */
  1790. #define TRF_FILTER_MAC_ADDR 0x0001 /* L2 filter use dst mac address for filtering */
  1791. #define TRF_FILTER_IP_ADDR 0x0002 /* L3 filter use ip ddress for filtering */
  1792. #define TRF_FILTER_L4 0x0004 /* L4 filter use tcp/udp for filtering */
  1793. #define TRF_FILTER_DWM 0x0008 /* L3 filter use DSCP for filtering */
  1794. #define TRF_FILTER_FAVORED 0x0010 /* Tag the packet FAVORED */
  1795. /* WNM/NPS subfeatures mask */
  1796. #define WL_WNM_BSSTRANS 0x00000001
  1797. #define WL_WNM_PROXYARP 0x00000002
  1798. #define WL_WNM_MAXIDLE 0x00000004
  1799. #define WL_WNM_TIMBC 0x00000008
  1800. #define WL_WNM_TFS 0x00000010
  1801. #define WL_WNM_SLEEP 0x00000020
  1802. #define WL_WNM_DMS 0x00000040
  1803. #define WL_WNM_FMS 0x00000080
  1804. #define WL_WNM_NOTIF 0x00000100
  1805. #define WL_WNM_WBTEXT 0x00000200
  1806. #define WL_WNM_ESTM 0x00000400
  1807. #define WL_WNM_MAX 0x00000800
  1808. #ifdef WLWNM_BRCM
  1809. #define BRCM_WNM_FEATURE_SET\
  1810. (WL_WNM_PROXYARP | \
  1811. WL_WNM_SLEEP | \
  1812. WL_WNM_FMS | \
  1813. WL_WNM_TFS | \
  1814. WL_WNM_TIMBC | \
  1815. WL_WNM_BSSTRANS | \
  1816. WL_WNM_DMS | \
  1817. WL_WNM_NOTIF | \
  1818. 0)
  1819. #endif /* WLWNM_BRCM */
  1820. #ifndef ETHER_MAX_DATA
  1821. #define ETHER_MAX_DATA 1500
  1822. #endif /* ETHER_MAX_DATA */
  1823. /* Different discovery modes for dpt */
  1824. #define DPT_DISCOVERY_MANUAL 0x01 /* manual discovery mode */
  1825. #define DPT_DISCOVERY_AUTO 0x02 /* auto discovery mode */
  1826. #define DPT_DISCOVERY_SCAN 0x04 /* scan-based discovery mode */
  1827. /* different path selection values */
  1828. #define DPT_PATHSEL_AUTO 0 /* auto mode for path selection */
  1829. #define DPT_PATHSEL_DIRECT 1 /* always use direct DPT path */
  1830. #define DPT_PATHSEL_APPATH 2 /* always use AP path */
  1831. /* different ops for deny list */
  1832. #define DPT_DENY_LIST_ADD 1 /* add to dpt deny list */
  1833. #define DPT_DENY_LIST_REMOVE 2 /* remove from dpt deny list */
  1834. /* different ops for manual end point */
  1835. #define DPT_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
  1836. #define DPT_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
  1837. #define DPT_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
  1838. /* flags to indicate DPT status */
  1839. #define DPT_STATUS_ACTIVE 0x01 /* link active (though may be suspended) */
  1840. #define DPT_STATUS_AES 0x02 /* link secured through AES encryption */
  1841. #define DPT_STATUS_FAILED 0x04 /* DPT link failed */
  1842. #ifdef WLTDLS
  1843. /* different ops for manual end point */
  1844. #define TDLS_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
  1845. #define TDLS_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
  1846. #define TDLS_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
  1847. #define TDLS_MANUAL_EP_PM 4 /* put dpt endpoint in PM mode */
  1848. #define TDLS_MANUAL_EP_WAKE 5 /* wake up dpt endpoint from PM */
  1849. #define TDLS_MANUAL_EP_DISCOVERY 6 /* discover if endpoint is TDLS capable */
  1850. #define TDLS_MANUAL_EP_CHSW 7 /* channel switch */
  1851. #define TDLS_MANUAL_EP_WFD_TPQ 8 /* WiFi-Display Tunneled Probe reQuest */
  1852. /* modes */
  1853. #define TDLS_WFD_IE_TX 0
  1854. #define TDLS_WFD_IE_RX 1
  1855. #define TDLS_WFD_PROBE_IE_TX 2
  1856. #define TDLS_WFD_PROBE_IE_RX 3
  1857. #endif /* WLTDLS */
  1858. /* define for flag */
  1859. #define TSPEC_PENDING 0 /* TSPEC pending */
  1860. #define TSPEC_ACCEPTED 1 /* TSPEC accepted */
  1861. #define TSPEC_REJECTED 2 /* TSPEC rejected */
  1862. #define TSPEC_UNKNOWN 3 /* TSPEC unknown */
  1863. #define TSPEC_STATUS_MASK 7 /* TSPEC status mask */
  1864. #ifdef BCMCCX
  1865. /* "wlan_reason" iovar interface */
  1866. #define WL_WLAN_ASSOC_REASON_NORMAL_NETWORK 0 /* normal WLAN network setup */
  1867. #define WL_WLAN_ASSOC_REASON_ROAM_FROM_CELLULAR_NETWORK 1 /* roam from Cellular network */
  1868. #define WL_WLAN_ASSOC_REASON_ROAM_FROM_LAN 2 /* roam from LAN */
  1869. #define WL_WLAN_ASSOC_REASON_MAX 2 /* largest value allowed */
  1870. #endif /* BCMCCX */
  1871. /* Software feature flag defines used by wlfeatureflag */
  1872. #ifdef WLAFTERBURNER
  1873. #define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */
  1874. #define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */
  1875. #endif /* WLAFTERBURNER */
  1876. #define WL_SWFL_NOHWRADIO 0x0004 /* Disable HW Radio monitor (e.g., Cust Spec) */
  1877. #define WL_SWFL_FLOWCONTROL 0x0008 /* Enable backpressure to OS stack */
  1878. #define WL_SWFL_WLBSSSORT 0x0010 /* Per-port supports sorting of BSS */
  1879. #define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
  1880. #define CSA_BROADCAST_ACTION_FRAME 0 /* csa broadcast action frame */
  1881. #define CSA_UNICAST_ACTION_FRAME 1 /* csa unicast action frame */
  1882. /* Roaming trigger definitions for WLC_SET_ROAM_TRIGGER.
  1883. *
  1884. * (-100 < value < 0) value is used directly as a roaming trigger in dBm
  1885. * (0 <= value) value specifies a logical roaming trigger level from
  1886. * the list below
  1887. *
  1888. * WLC_GET_ROAM_TRIGGER always returns roaming trigger value in dBm, never
  1889. * the logical roam trigger value.
  1890. */
  1891. #define WLC_ROAM_TRIGGER_DEFAULT 0 /* default roaming trigger */
  1892. #define WLC_ROAM_TRIGGER_BANDWIDTH 1 /* optimize for bandwidth roaming trigger */
  1893. #define WLC_ROAM_TRIGGER_DISTANCE 2 /* optimize for distance roaming trigger */
  1894. #define WLC_ROAM_TRIGGER_AUTO 3 /* auto-detect environment */
  1895. #define WLC_ROAM_TRIGGER_MAX_VALUE 3 /* max. valid value */
  1896. #define WLC_ROAM_NEVER_ROAM_TRIGGER (-100) /* Avoid Roaming by setting a large value */
  1897. /* Preferred Network Offload (PNO, formerly PFN) defines */
  1898. #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
  1899. #define SORT_CRITERIA_BIT 0
  1900. #define AUTO_NET_SWITCH_BIT 1
  1901. #define ENABLE_BKGRD_SCAN_BIT 2
  1902. #define IMMEDIATE_SCAN_BIT 3
  1903. #define AUTO_CONNECT_BIT 4
  1904. #define ENABLE_BD_SCAN_BIT 5
  1905. #define ENABLE_ADAPTSCAN_BIT 6
  1906. #define IMMEDIATE_EVENT_BIT 8
  1907. #define SUPPRESS_SSID_BIT 9
  1908. #define ENABLE_NET_OFFLOAD_BIT 10
  1909. /* report found/lost events for SSID and BSSID networks seperately */
  1910. #define REPORT_SEPERATELY_BIT 11
  1911. #define BESTN_BSSID_ONLY_BIT 12
  1912. #define SORT_CRITERIA_MASK 0x0001
  1913. #define AUTO_NET_SWITCH_MASK 0x0002
  1914. #define ENABLE_BKGRD_SCAN_MASK 0x0004
  1915. #define IMMEDIATE_SCAN_MASK 0x0008
  1916. #define AUTO_CONNECT_MASK 0x0010
  1917. #define ENABLE_BD_SCAN_MASK 0x0020
  1918. #define ENABLE_ADAPTSCAN_MASK 0x00c0
  1919. #define IMMEDIATE_EVENT_MASK 0x0100
  1920. #define SUPPRESS_SSID_MASK 0x0200
  1921. #define ENABLE_NET_OFFLOAD_MASK 0x0400
  1922. /* report found/lost events for SSID and BSSID networks seperately */
  1923. #define REPORT_SEPERATELY_MASK 0x0800
  1924. #define BESTN_BSSID_ONLY_MASK 0x1000
  1925. #define PFN_VERSION 2
  1926. #ifdef PFN_SCANRESULT_2
  1927. #define PFN_SCANRESULT_VERSION 2
  1928. #else
  1929. #define PFN_SCANRESULT_VERSION 1
  1930. #endif /* PFN_SCANRESULT_2 */
  1931. #ifndef MAX_PFN_LIST_COUNT
  1932. #define MAX_PFN_LIST_COUNT 16
  1933. #endif /* MAX_PFN_LIST_COUNT */
  1934. #define PFN_COMPLETE 1
  1935. #define PFN_INCOMPLETE 0
  1936. #define DEFAULT_BESTN 2
  1937. #define DEFAULT_MSCAN 0
  1938. #define DEFAULT_REPEAT 10
  1939. #define DEFAULT_EXP 2
  1940. #define PFN_PARTIAL_SCAN_BIT 0
  1941. #define PFN_PARTIAL_SCAN_MASK 1
  1942. #define WL_PFN_SUPPRESSFOUND_MASK 0x08
  1943. #define WL_PFN_SUPPRESSLOST_MASK 0x10
  1944. #define WL_PFN_SSID_A_BAND_TRIG 0x20
  1945. #define WL_PFN_SSID_BG_BAND_TRIG 0x40
  1946. #define WL_PFN_SSID_IMPRECISE_MATCH 0x80
  1947. #define WL_PFN_SSID_SAME_NETWORK 0x10000
  1948. #define WL_PFN_SUPPRESS_AGING_MASK 0x20000
  1949. #define WL_PFN_FLUSH_ALL_SSIDS 0x40000
  1950. #define WL_PFN_RSSI_MASK 0xff00
  1951. #define WL_PFN_RSSI_SHIFT 8
  1952. #define WL_PFN_REPORT_ALLNET 0
  1953. #define WL_PFN_REPORT_SSIDNET 1
  1954. #define WL_PFN_REPORT_BSSIDNET 2
  1955. #define WL_PFN_CFG_FLAGS_PROHIBITED 0x00000001 /* Accept and use prohibited channels */
  1956. #define WL_PFN_CFG_FLAGS_HISTORY_OFF 0x00000002 /* Scan history suppressed */
  1957. #define WL_PFN_HIDDEN_BIT 2
  1958. #define PNO_SCAN_MAX_FW 508*1000 /* max time scan time in msec */
  1959. #define PNO_SCAN_MAX_FW_SEC PNO_SCAN_MAX_FW/1000 /* max time scan time in SEC */
  1960. #define PNO_SCAN_MIN_FW_SEC 10 /* min time scan time in SEC */
  1961. #define WL_PFN_HIDDEN_MASK 0x4
  1962. #define MAX_SSID_WHITELIST_NUM 4
  1963. #define MAX_BSSID_PREF_LIST_NUM 32
  1964. #define MAX_BSSID_BLACKLIST_NUM 32
  1965. #ifndef BESTN_MAX
  1966. #define BESTN_MAX 10
  1967. #endif // endif
  1968. #ifndef MSCAN_MAX
  1969. #define MSCAN_MAX 32
  1970. #endif // endif
  1971. /* TCP Checksum Offload error injection for testing */
  1972. #define TOE_ERRTEST_TX_CSUM 0x00000001
  1973. #define TOE_ERRTEST_RX_CSUM 0x00000002
  1974. #define TOE_ERRTEST_RX_CSUM2 0x00000004
  1975. /* ARP Offload feature flags for arp_ol iovar */
  1976. #define ARP_OL_AGENT 0x00000001
  1977. #define ARP_OL_SNOOP 0x00000002
  1978. #define ARP_OL_HOST_AUTO_REPLY 0x00000004
  1979. #define ARP_OL_PEER_AUTO_REPLY 0x00000008
  1980. #define ARP_OL_UPDATE_HOST_CACHE 0x00000010
  1981. /* ARP Offload error injection */
  1982. #define ARP_ERRTEST_REPLY_PEER 0x1
  1983. #define ARP_ERRTEST_REPLY_HOST 0x2
  1984. #define ARP_MULTIHOMING_MAX 8 /* Maximum local host IP addresses */
  1985. #if defined(WL_PKT_FLTR_EXT) && !defined(WL_PKT_FLTR_EXT_DISABLED)
  1986. #define ND_MULTIHOMING_MAX 32 /* Maximum local host IP addresses */
  1987. #else
  1988. #define ND_MULTIHOMING_MAX 10 /* Maximum local host IP addresses */
  1989. #endif /* WL_PKT_FLTR_EXT && !WL_PKT_FLTR_EXT_DISABLED */
  1990. #define ND_REQUEST_MAX 5 /* Max set of offload params */
  1991. /* AOAC wake event flag */
  1992. #define WAKE_EVENT_NLO_DISCOVERY_BIT 1
  1993. #define WAKE_EVENT_AP_ASSOCIATION_LOST_BIT 2
  1994. #define WAKE_EVENT_GTK_HANDSHAKE_ERROR_BIT 4
  1995. #define WAKE_EVENT_4WAY_HANDSHAKE_REQUEST_BIT 8
  1996. #define WAKE_EVENT_NET_PACKET_BIT 0x10
  1997. #define MAX_NUM_WOL_PATTERN 22 /* LOGO requirements min 22 */
  1998. /* Packet filter operation mode */
  1999. /* True: 1; False: 0 */
  2000. #define PKT_FILTER_MODE_FORWARD_ON_MATCH 1
  2001. /* Enable and disable pkt_filter as a whole */
  2002. #define PKT_FILTER_MODE_DISABLE 2
  2003. /* Cache first matched rx pkt(be queried by host later) */
  2004. #define PKT_FILTER_MODE_PKT_CACHE_ON_MATCH 4
  2005. /* If pkt_filter is enabled and no filter is set, don't forward anything */
  2006. #define PKT_FILTER_MODE_PKT_FORWARD_OFF_DEFAULT 8
  2007. #ifdef DONGLEOVERLAYS
  2008. #define OVERLAY_IDX_MASK 0x000000ff
  2009. #define OVERLAY_IDX_SHIFT 0
  2010. #define OVERLAY_FLAGS_MASK 0xffffff00
  2011. #define OVERLAY_FLAGS_SHIFT 8
  2012. /* overlay written to device memory immediately after loading the base image */
  2013. #define OVERLAY_FLAG_POSTLOAD 0x100
  2014. /* defer overlay download until the device responds w/WLC_E_OVL_DOWNLOAD event */
  2015. #define OVERLAY_FLAG_DEFER_DL 0x200
  2016. /* overlay downloaded prior to the host going to sleep */
  2017. #define OVERLAY_FLAG_PRESLEEP 0x400
  2018. #define OVERLAY_DOWNLOAD_CHUNKSIZE 1024
  2019. #endif /* DONGLEOVERLAYS */
  2020. /* reuse two number in the sc/rc space */
  2021. #define SMFS_CODE_MALFORMED 0xFFFE
  2022. #define SMFS_CODE_IGNORED 0xFFFD
  2023. /* RFAWARE def */
  2024. #define BCM_ACTION_RFAWARE 0x77
  2025. #define BCM_ACTION_RFAWARE_DCS 0x01
  2026. /* DCS reason code define */
  2027. #define BCM_DCS_IOVAR 0x1
  2028. #define BCM_DCS_UNKNOWN 0xFF
  2029. #ifdef PROP_TXSTATUS
  2030. /* Bit definitions for tlv iovar */
  2031. /*
  2032. * enable RSSI signals:
  2033. * WLFC_CTL_TYPE_RSSI
  2034. */
  2035. #define WLFC_FLAGS_RSSI_SIGNALS 0x0001
  2036. /* enable (if/mac_open, if/mac_close,, mac_add, mac_del) signals:
  2037. *
  2038. * WLFC_CTL_TYPE_MAC_OPEN
  2039. * WLFC_CTL_TYPE_MAC_CLOSE
  2040. *
  2041. * WLFC_CTL_TYPE_INTERFACE_OPEN
  2042. * WLFC_CTL_TYPE_INTERFACE_CLOSE
  2043. *
  2044. * WLFC_CTL_TYPE_MACDESC_ADD
  2045. * WLFC_CTL_TYPE_MACDESC_DEL
  2046. *
  2047. */
  2048. #define WLFC_FLAGS_XONXOFF_SIGNALS 0x0002
  2049. /* enable (status, fifo_credit, mac_credit) signals
  2050. * WLFC_CTL_TYPE_MAC_REQUEST_CREDIT
  2051. * WLFC_CTL_TYPE_TXSTATUS
  2052. * WLFC_CTL_TYPE_FIFO_CREDITBACK
  2053. */
  2054. #define WLFC_FLAGS_CREDIT_STATUS_SIGNALS 0x0004
  2055. #define WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE 0x0008
  2056. #define WLFC_FLAGS_PSQ_GENERATIONFSM_ENABLE 0x0010
  2057. #define WLFC_FLAGS_PSQ_ZERO_BUFFER_ENABLE 0x0020
  2058. #define WLFC_FLAGS_HOST_RXRERODER_ACTIVE 0x0040
  2059. #define WLFC_FLAGS_PKT_STAMP_SIGNALS 0x0080
  2060. #endif /* PROP_TXSTATUS */
  2061. #define WL_TIMBC_STATUS_AP_UNKNOWN 255 /* AP status for internal use only */
  2062. #define WL_DFRTS_LOGIC_OFF 0 /* Feature is disabled */
  2063. #define WL_DFRTS_LOGIC_OR 1 /* OR all non-zero threshold conditions */
  2064. #define WL_DFRTS_LOGIC_AND 2 /* AND all non-zero threshold conditions */
  2065. /* Definitions for Reliable Multicast */
  2066. #define WL_RELMCAST_MAX_CLIENT 32
  2067. #define WL_RELMCAST_FLAG_INBLACKLIST 1
  2068. #define WL_RELMCAST_FLAG_ACTIVEACKER 2
  2069. #define WL_RELMCAST_FLAG_RELMCAST 4
  2070. /* structures for proximity detection device role */
  2071. #define WL_PROXD_MODE_DISABLE 0
  2072. #define WL_PROXD_MODE_NEUTRAL 1
  2073. #define WL_PROXD_MODE_INITIATOR 2
  2074. #define WL_PROXD_MODE_TARGET 3
  2075. #define WL_PROXD_RANDOM_WAKEUP 0x8000
  2076. #ifdef NET_DETECT
  2077. #define NET_DETECT_MAX_WAKE_DATA_SIZE 2048
  2078. #define NET_DETECT_MAX_PROFILES 16
  2079. #define NET_DETECT_MAX_CHANNELS 50
  2080. #endif /* NET_DETECT */
  2081. /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
  2082. #define WL_RADIO_SW_DISABLE (1<<0)
  2083. #define WL_RADIO_HW_DISABLE (1<<1)
  2084. #define WL_RADIO_MPC_DISABLE (1<<2)
  2085. #define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
  2086. #define WL_RADIO_PERCORE_DISABLE (1<<4) /* Radio diable per core for DVT */
  2087. #define WL_RADIO_TSYNC_PWRSAVE_DISABLE (1<<5) /* Disable Radio in tsync mode for power saving */
  2088. #define WL_SPURAVOID_OFF 0
  2089. #define WL_SPURAVOID_ON1 1
  2090. #define WL_SPURAVOID_ON2 2
  2091. #define WL_4335_SPURAVOID_ON1 1
  2092. #define WL_4335_SPURAVOID_ON2 2
  2093. #define WL_4335_SPURAVOID_ON3 3
  2094. #define WL_4335_SPURAVOID_ON4 4
  2095. #define WL_4335_SPURAVOID_ON5 5
  2096. #define WL_4335_SPURAVOID_ON6 6
  2097. #define WL_4335_SPURAVOID_ON7 7
  2098. #define WL_4335_SPURAVOID_ON8 8
  2099. #define WL_4335_SPURAVOID_ON9 9
  2100. /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
  2101. #define WL_TXPWR_OVERRIDE (1U<<31)
  2102. #define WL_TXPWR_2G (1U<<30)
  2103. #define WL_TXPWR_5G (1U<<29)
  2104. #define WL_TXPWR_NEG (1U<<28)
  2105. #define WL_TXPWR_MASK (~(0x7<<29))
  2106. #define WL_TXPWR_CORE_MAX (3)
  2107. #define WL_TXPWR_CORE0_MASK (0x000000FF)
  2108. #define WL_TXPWR_CORE0_SHIFT (0)
  2109. #define WL_TXPWR_CORE1_MASK (0x0000FF00)
  2110. #define WL_TXPWR_CORE1_SHIFT (8)
  2111. #define WL_TXPWR_CORE2_MASK (0x00FF0000)
  2112. #define WL_TXPWR_CORE2_SHIFT (16)
  2113. /* phy types (returned by WLC_GET_PHYTPE) */
  2114. #define WLC_PHY_TYPE_A 0
  2115. #define WLC_PHY_TYPE_B 1
  2116. #define WLC_PHY_TYPE_G 2
  2117. #define WLC_PHY_TYPE_N 4
  2118. #define WLC_PHY_TYPE_LP 5
  2119. #define WLC_PHY_TYPE_SSN 6
  2120. #define WLC_PHY_TYPE_HT 7
  2121. #define WLC_PHY_TYPE_LCN 8
  2122. #define WLC_PHY_TYPE_LCN40 10
  2123. #define WLC_PHY_TYPE_AC 11
  2124. #define WLC_PHY_TYPE_LCN20 12
  2125. #define WLC_PHY_TYPE_NULL 0xf
  2126. /* Values for PM */
  2127. #define PM_OFF 0
  2128. #define PM_MAX 1
  2129. #define PM_FAST 2
  2130. #define PM_FORCE_OFF 3 /* use this bit to force PM off even bt is active */
  2131. #define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */
  2132. /* fbt_cap: FBT assoc / reassoc modes. */
  2133. #define WLC_FBT_CAP_DRV_4WAY_AND_REASSOC 1 /* Driver 4-way handshake & reassoc (WLFBT). */
  2134. /* monitor_promisc_level bits */
  2135. #define WL_MONPROMISC_PROMISC 0x0001
  2136. #define WL_MONPROMISC_CTRL 0x0002
  2137. #define WL_MONPROMISC_FCS 0x0004
  2138. /* TCP Checksum Offload defines */
  2139. #define TOE_TX_CSUM_OL 0x00000001
  2140. #define TOE_RX_CSUM_OL 0x00000002
  2141. /* Wi-Fi Display Services (WFDS) */
  2142. #define WL_P2P_SOCIAL_CHANNELS_MAX WL_NUMCHANNELS
  2143. #define MAX_WFDS_SEEK_SVC 4 /* Max # of wfds services to seek */
  2144. #define MAX_WFDS_ADVERT_SVC 4 /* Max # of wfds services to advertise */
  2145. #define MAX_WFDS_SVC_NAME_LEN 200 /* maximum service_name length */
  2146. #define MAX_WFDS_ADV_SVC_INFO_LEN 65000 /* maximum adv service_info length */
  2147. #define P2P_WFDS_HASH_LEN 6 /* Length of a WFDS service hash */
  2148. #define MAX_WFDS_SEEK_SVC_INFO_LEN 255 /* maximum seek service_info req length */
  2149. #define MAX_WFDS_SEEK_SVC_NAME_LEN 200 /* maximum service_name length */
  2150. /* ap_isolate bitmaps */
  2151. #define AP_ISOLATE_DISABLED 0x0
  2152. #define AP_ISOLATE_SENDUP_ALL 0x01
  2153. #define AP_ISOLATE_SENDUP_MCAST 0x02
  2154. /* Type values for the wl_pwrstats_t data field */
  2155. #define WL_PWRSTATS_TYPE_PHY 0 /**< struct wl_pwr_phy_stats */
  2156. #define WL_PWRSTATS_TYPE_SCAN 1 /**< struct wl_pwr_scan_stats */
  2157. #define WL_PWRSTATS_TYPE_USB_HSIC 2 /**< struct wl_pwr_usb_hsic_stats */
  2158. #define WL_PWRSTATS_TYPE_PM_AWAKE1 3 /**< struct wl_pwr_pm_awake_stats_v1 */
  2159. #define WL_PWRSTATS_TYPE_CONNECTION 4 /* struct wl_pwr_connect_stats; assoc and key-exch time */
  2160. #define WL_PWRSTATS_TYPE_PCIE 6 /**< struct wl_pwr_pcie_stats */
  2161. #define WL_PWRSTATS_TYPE_PM_AWAKE2 7 /**< struct wl_pwr_pm_awake_stats_v2 */
  2162. #define WL_PWRSTATS_TYPE_SDIO 8 /* struct wl_pwr_sdio_stats */
  2163. #define WL_PWRSTATS_TYPE_MIMO_PS_METRICS 9 /* struct wl_mimo_meas_metrics_t */
  2164. #define WL_PWRSTATS_TYPE_SLICE_INDEX 10 /* slice index for which this report is meant for */
  2165. #define WL_PWRSTATS_TYPE_TSYNC 11 /**< struct wl_pwr_tsync_stats */
  2166. #define WL_PWRSTATS_TYPE_OPS_STATS 12 /* struct wl_pwr_ops_stats_t */
  2167. #define WL_PWRSTATS_TYPE_BCNTRIM_STATS 13 /* struct wl_pwr_bcntrim_stats_t */
  2168. #define WL_PWRSTATS_TYPE_SLICE_INDEX_BAND_INFO 14 /* wl_pwr_slice_index_band_t */
  2169. #define WL_PWRSTATS_TYPE_PSBW_STATS 15 /* struct wl_pwr_psbw_stats_t */
  2170. /* IOV AWD DATA */
  2171. #define AWD_DATA_JOIN_INFO 0
  2172. #define AWD_DATA_VERSION_V1 1
  2173. /* IOV ETD DATA */
  2174. #define ETD_DATA_JOIN_INFO 0
  2175. #define ETD_DATA_VERSION_V1 1
  2176. /* CTMODE DBG */
  2177. /* input param: [31:16] => MPDU_THRESHOLD
  2178. * [15:03] => RESERVED
  2179. * [02] => enable UFP
  2180. * [01] => enable UFC
  2181. * [00] => enalbe CTMODE
  2182. */
  2183. #define CTMODE_DBG_CTMODE_EN (0x1u)
  2184. #define CTMODE_DBG_UFC_EN (0x2u)
  2185. #define CTMODE_DBG_UFP_EN (0x4u)
  2186. #define CTMODE_DBG_MPDU_THRESHOLD_SHIFT (7u)
  2187. #define CTMODE_DBG_MPDU_THRESHOLD_MASK ((0x1FFu) << CTMODE_DBG_MPDU_THRESHOLD_SHIFT)
  2188. #define CTMODE_DBG_BYTES_THRESHOLD_SHIFT (16u)
  2189. #define CTMODE_DBG_BYTES_THRESHOLD_MASK ((0xFFFu) << CTMODE_DBG_BYTES_THRESHOLD_SHIFT)
  2190. /* ====== SC use case configs ========= */
  2191. /* SC user/use case request */
  2192. #define WL_SC_REQ_SCAN 0u /* user scan */
  2193. #define WL_SC_REQ_CNX 1u /* associated idle */
  2194. #define WL_SC_REQ_NAN 2u /* NAN synchronization and discovery offload */
  2195. /* === Per use case configuration === */
  2196. /* scan cfgs */
  2197. #define SC_SCAN_CFG_PASSIVE_MASK 0x01u /* Enable passive scan on sc */
  2198. #define SC_SCAN_CFG_PASSIVE_SHIFT 0u
  2199. #define SC_SCAN_CFG_LP_SCAN_MASK 0x02u /* Enable low prio scan on sc */
  2200. #define SC_SCAN_CFG_LP_SCAN_SHIFT 1u
  2201. #define SC_SCAN_CFG_REG_SCAN_MASK 0x04u /* Enable split scan using sc */
  2202. #define SC_SCAN_CFG_REG_SCAN_SHIFT 2u
  2203. #define SC_SCAN_CFG_FULL_SCAN_MASK 0x08u /* Enable full scan on sc */
  2204. #define SC_SCAN_CFG_FULL_SCAN_SHIFT 3u
  2205. /* Add get and set macros for each of the configs? */
  2206. /* === Place holder for cnx and nan cfgs === */
  2207. #endif /* wlioctl_defs_h */