wlandef.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. /****************************************************************************
  2. * This file is part of the WLAN-Ethernut device driver.
  3. *
  4. * Copyright (c) 2004 by Michael Fischer. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the author nor the names of its contributors may
  16. * be used to endorse or promote products derived from this software
  17. * without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  23. * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. ****************************************************************************
  33. * Portions Copyright:
  34. *
  35. * Copyright (c) 2001 Atsushi Onoe
  36. * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
  37. * Copyright (c) 2002 M Warner Losh <imp@freebsd.org>. All rights reserved.
  38. * Copyright (c) 1997, 1998, 1999
  39. * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
  40. *
  41. * Redistribution and use in source and binary forms, with or without
  42. * modification, are permitted provided that the following conditions
  43. * are met:
  44. * 1. Redistributions of source code must retain the above copyright
  45. * notice, this list of conditions and the following disclaimer.
  46. * 2. Redistributions in binary form must reproduce the above copyright
  47. * notice, this list of conditions and the following disclaimer in the
  48. * documentation and/or other materials provided with the distribution.
  49. * 3. Neither the name of the author nor the names of any co-contributors
  50. * may be used to endorse or promote products derived from this software
  51. * without specific prior written permission.
  52. *
  53. * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
  54. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  55. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  56. * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
  57. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  58. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  59. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  60. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  61. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  62. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  63. * THE POSSIBILITY OF SUCH DAMAGE.
  64. *
  65. ****************************************************************************
  66. * History:
  67. *
  68. * 28.02.04 mifi First Version
  69. * This file is a mix of several FreeBSD header files.
  70. * I have put all the files together, because it was
  71. * difficult to use the original files. I have try this
  72. * but I must comment out to much to get it to work.
  73. * Here in this file you will fimd ONLY defines. All
  74. * the structs you will find in wlandrv.h.
  75. ****************************************************************************/
  76. #ifndef __WLANDEF_H__
  77. #define __WLANDEF_H__
  78. /*-------------------------------------------------------------------------*/
  79. /* global defines */
  80. /*-------------------------------------------------------------------------*/
  81. /***************************************************************************/
  82. /* ieee80211.h */
  83. /***************************************************************************/
  84. enum {
  85. IEEE80211_AUTH_NONE = 0,
  86. IEEE80211_AUTH_OPEN = 1,
  87. IEEE80211_AUTH_SHARED = 2,
  88. };
  89. #define IEEE80211_RATE_BASIC 0x80
  90. #define IEEE80211_RATE_VAL 0x7f
  91. /*
  92. * Maximum acceptable MTU is:
  93. * IEEE80211_MAX_LEN - WEP overhead - CRC -
  94. * QoS overhead - RSN/WPA overhead
  95. * Min is arbitrarily chosen > IEEE80211_MIN_LEN. The default
  96. * mtu is Ethernet-compatible; it's set by ether_ifattach.
  97. */
  98. #define IEEE80211_MTU_MAX 2290
  99. #define IEEE80211_MTU_MIN 32
  100. #define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \
  101. (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
  102. /***************************************************************************/
  103. /* ieee80211_var.h */
  104. /***************************************************************************/
  105. /*
  106. * 802.11 definitions
  107. */
  108. #define IEEE80211_CHAN_MAX 32
  109. #define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */
  110. #define IEEE80211_CHAN_ANYC \
  111. ((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
  112. /* XXX not really a mode; there are really multiple PHY's */
  113. enum ieee80211_phymode {
  114. IEEE80211_MODE_AUTO = 0, /* autoselect */
  115. IEEE80211_MODE_11A = 1, /* 5GHz, OFDM */
  116. IEEE80211_MODE_11B = 2, /* 2GHz, CCK */
  117. IEEE80211_MODE_11G = 3, /* 2GHz, OFDM */
  118. IEEE80211_MODE_FH = 4, /* 2GHz, GFSK */
  119. IEEE80211_MODE_TURBO = 5, /* 5GHz, OFDM, 2x clock */
  120. };
  121. #define IEEE80211_MODE_MAX (IEEE80211_MODE_TURBO+1)
  122. /* bits 0-3 are for private use by drivers */
  123. /* channel attributes */
  124. #define IEEE80211_CHAN_TURBO 0x0010 /* Turbo channel */
  125. #define IEEE80211_CHAN_CCK 0x0020 /* CCK channel */
  126. #define IEEE80211_CHAN_OFDM 0x0040 /* OFDM channel */
  127. #define IEEE80211_CHAN_2GHZ 0x0080 /* 2 GHz spectrum channel. */
  128. #define IEEE80211_CHAN_5GHZ 0x0100 /* 5 GHz spectrum channel */
  129. #define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */
  130. #define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */
  131. #define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */
  132. /*
  133. * Useful combinations of channel characteristics.
  134. */
  135. #define IEEE80211_CHAN_FHSS \
  136. (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
  137. #define IEEE80211_CHAN_A \
  138. (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
  139. #define IEEE80211_CHAN_B \
  140. (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
  141. #define IEEE80211_CHAN_PUREG \
  142. (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
  143. #define IEEE80211_CHAN_G \
  144. (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
  145. #define IEEE80211_CHAN_T \
  146. (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
  147. /***************************************************************************/
  148. /* ieee80211_node.h */
  149. /***************************************************************************/
  150. #define IEEE80211_RATE_SIZE 8 /* 802.11 standard */
  151. #define IEEE80211_RATE_MAXSIZE 15 /* max rates we'll handle */
  152. /***************************************************************************/
  153. /* if_wivar.h */
  154. /***************************************************************************/
  155. /*
  156. * FirmwareType
  157. */
  158. #define WI_NOTYPE 0
  159. #define WI_LUCENT 1
  160. #define WI_INTERSIL 2
  161. #define WI_SYMBOL 3
  162. /*
  163. * Encryption controls. We can enable or disable encryption as
  164. * well as specify up to 4 encryption keys. We can also specify
  165. * which of the four keys will be used for transmit encryption.
  166. */
  167. #define WI_RID_ENCRYPTION 0xFC20
  168. #define WI_RID_AUTHTYPE 0xFC21
  169. #define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
  170. #define WI_RID_TX_CRYPT_KEY 0xFCB1
  171. #define WI_RID_WEP_AVAIL 0xFD4F
  172. #define WI_RID_P2_TX_CRYPT_KEY 0xFC23
  173. #define WI_RID_P2_CRYPT_KEY0 0xFC24
  174. #define WI_RID_P2_CRYPT_KEY1 0xFC25
  175. #define WI_RID_MICROWAVE_OVEN 0xFC25
  176. #define WI_RID_P2_CRYPT_KEY2 0xFC26
  177. #define WI_RID_P2_CRYPT_KEY3 0xFC27
  178. #define WI_RID_P2_ENCRYPTION 0xFC28
  179. #define WI_RID_ROAMING_MODE 0xFC2D
  180. #define WI_PRISM_MIN_RSSI 0x1b
  181. #define WI_PRISM_MAX_RSSI 0x9a
  182. #define WI_PRISM_DBM_OFFSET 100
  183. #define WI_LUCENT_MIN_RSSI 47
  184. #define WI_LUCENT_MAX_RSSI 138
  185. #define WI_LUCENT_DBM_OFFSET 149
  186. /*
  187. * Various compat hacks/kludges
  188. */
  189. #define le16toh(x) (x)
  190. #define htole16(x) (x)
  191. /***************************************************************************/
  192. /* if_wireg.h */
  193. /***************************************************************************/
  194. #define WI_DELAY 5UL /* Harald: Added UL specifiers. However that worked before */
  195. #define WI_TIMEOUT (500000UL/WI_DELAY) /* 500 ms */ /* Harald: Same here */
  196. #define WI_PORT0 (0 << 8)
  197. #define WI_PORT1 (1 << 8)
  198. #define WI_PORT2 (2 << 8)
  199. #define WI_PORT3 (3 << 8)
  200. #define WI_PORT4 (4 << 8)
  201. #define WI_PORT5 (5 << 8)
  202. #define WI_HFA384X_SWSUPPORT0_OFF 0x28
  203. #define WI_PRISM2STA_MAGIC 0x4A2D
  204. /* Default port: 0 (only 0 exists on stations) */
  205. #define WI_DEFAULT_PORT WI_PORT0
  206. #define WI_DEFAULT_ROAMING 1
  207. #define WI_DEFAULT_AUTHTYPE 1
  208. /*
  209. * Hermes & Prism2 register definitions
  210. */
  211. /* Hermes command/status registers. */
  212. #define WI_COMMAND 0x00
  213. #define WI_PARAM0 0x02
  214. #define WI_PARAM1 0x04
  215. #define WI_PARAM2 0x06
  216. #define WI_STATUS 0x08
  217. #define WI_RESP0 0x0A
  218. #define WI_RESP1 0x0C
  219. #define WI_RESP2 0x0E
  220. /* Command register values. */
  221. #define WI_CMD_BUSY 0x8000 /* busy bit */
  222. #define WI_CMD_INI 0x0000 /* initialize */
  223. #define WI_CMD_ENABLE 0x0001 /* enable */
  224. #define WI_CMD_DISABLE 0x0002 /* disable */
  225. #define WI_CMD_DIAG 0x0003
  226. #define WI_CMD_ALLOC_MEM 0x000A /* allocate NIC memory */
  227. #define WI_CMD_TX 0x000B /* transmit */
  228. #define WI_CMD_NOTIFY 0x0010
  229. #define WI_CMD_INQUIRE 0x0011
  230. #define WI_CMD_ACCESS 0x0021
  231. #define WI_CMD_ACCESS_WRITE 0x0121
  232. #define WI_CMD_PROGRAM 0x0022
  233. #define WI_CMD_READEE 0x0030 /* symbol only */
  234. #define WI_CMD_READMIF 0x0030 /* prism2 */
  235. #define WI_CMD_WRITEMIF 0x0031 /* prism2 */
  236. #define WI_CMD_DEBUG 0x0038 /* Various test commands */
  237. #define WI_CMD_CODE_MASK 0x003F
  238. /*
  239. * Various cmd test stuff.
  240. */
  241. #define WI_TEST_MONITOR 0x0B
  242. #define WI_TEST_STOP 0x0F
  243. #define WI_TEST_CFG_BITS 0x15
  244. #define WI_TEST_CFG_BIT_ALC 0x08
  245. /*
  246. * Reclaim qualifier bit, applicable to the
  247. * TX and INQUIRE commands.
  248. */
  249. #define WI_RECLAIM 0x0100 /* reclaim NIC memory */
  250. /*
  251. * ACCESS command qualifier bits.
  252. */
  253. #define WI_ACCESS_READ 0x0000
  254. #define WI_ACCESS_WRITE 0x0100
  255. /* Status register values */
  256. #define WI_STAT_CMD_CODE 0x003F
  257. #define WI_STAT_DIAG_ERR 0x0100
  258. #define WI_STAT_INQ_ERR 0x0500
  259. #define WI_STAT_CMD_RESULT 0x7F00
  260. /* memory handle management registers */
  261. #define WI_INFO_FID 0x10
  262. #define WI_RX_FID 0x20
  263. #define WI_ALLOC_FID 0x22
  264. #define WI_TX_CMP_FID 0x24
  265. /*
  266. * Buffer Access Path (BAP) registers.
  267. * These are I/O channels. I believe you can use each one for
  268. * any desired purpose independently of the other. In general
  269. * though, we use BAP1 for reading and writing LTV records and
  270. * reading received data frames, and BAP0 for writing transmit
  271. * frames. This is a convention though, not a rule.
  272. */
  273. #define WI_SEL0 0x18
  274. #define WI_SEL1 0x1A
  275. #define WI_OFF0 0x1C
  276. #define WI_OFF1 0x1E
  277. #define WI_DATA0 0x36
  278. #define WI_DATA1 0x38
  279. #define WI_BAP0 WI_DATA0
  280. #define WI_BAP1 WI_DATA1
  281. #define WI_OFF_BUSY 0x8000
  282. #define WI_OFF_ERR 0x4000
  283. #define WI_OFF_DATAOFF 0x0FFF
  284. /* Event registers */
  285. #define WI_EVENT_STAT 0x30 /* Event status */
  286. #define WI_INT_EN 0x32 /* Interrupt enable/disable */
  287. #define WI_EVENT_ACK 0x34 /* Ack event */
  288. /* Events */
  289. #define WI_EV_TICK 0x8000 /* aux timer tick */
  290. #define WI_EV_RES 0x4000 /* controller h/w error (time out) */
  291. #define WI_EV_INFO_DROP 0x2000 /* no RAM to build unsolicited frame */
  292. #define WI_EV_NO_CARD 0x0800 /* card removed (hunh?) */
  293. #define WI_EV_DUIF_RX 0x0400 /* wavelan management packet received */
  294. #define WI_EV_INFO 0x0080 /* async info frame */
  295. #define WI_EV_CMD 0x0010 /* command completed */
  296. #define WI_EV_ALLOC 0x0008 /* async alloc/reclaim completed */
  297. #define WI_EV_TX_EXC 0x0004 /* async xmit completed with failure */
  298. #define WI_EV_TX 0x0002 /* async xmit completed succesfully */
  299. #define WI_EV_RX 0x0001 /* async rx completed */
  300. /*
  301. * PCMCIA Address definition
  302. */
  303. #define WI_COR_OFFSET 0x3e0
  304. #define WI_COR_VALUE 0x41
  305. /*
  306. * Define card ident
  307. */
  308. #define WI_NIC_LUCENT_ID 0x0001
  309. #define WI_NIC_LUCENT_STR "Lucent Technologies, WaveLAN/IEEE"
  310. #define WI_NIC_SONY_ID 0x0002
  311. #define WI_NIC_SONY_STR "Sony WaveLAN/IEEE"
  312. #define WI_NIC_LUCENT_EMB_ID 0x0005
  313. #define WI_NIC_LUCENT_EMB_STR "Lucent Embedded WaveLAN/IEEE"
  314. #define WI_NIC_EVB2_ID 0x8000
  315. #define WI_NIC_EVB2_STR "RF:PRISM2 MAC:HFA3841"
  316. #define WI_NIC_HWB3763_ID 0x8001
  317. #define WI_NIC_HWB3763_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3763 rev.B"
  318. #define WI_NIC_HWB3163_ID 0x8002
  319. #define WI_NIC_HWB3163_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A"
  320. #define WI_NIC_HWB3163B_ID 0x8003
  321. #define WI_NIC_HWB3163B_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.B"
  322. #define WI_NIC_EVB3_ID 0x8004
  323. #define WI_NIC_EVB3_STR "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
  324. #define WI_NIC_HWB1153_ID 0x8007
  325. #define WI_NIC_HWB1153_STR "RF:PRISM1 MAC:HFA3841 CARD:HWB1153"
  326. #define WI_NIC_P2_SST_ID 0x8008 /* Prism2 with SST flush */
  327. #define WI_NIC_P2_SST_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
  328. #define WI_NIC_EVB2_SST_ID 0x8009
  329. #define WI_NIC_EVB2_SST_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
  330. #define WI_NIC_3842_EVA_ID 0x800A /* 3842 Evaluation Board */
  331. #define WI_NIC_3842_EVA_STR "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
  332. #define WI_NIC_3842_PCMCIA_AMD_ID 0x800B /* Prism2.5 PCMCIA */
  333. #define WI_NIC_3842_PCMCIA_SST_ID 0x800C
  334. #define WI_NIC_3842_PCMCIA_ATL_ID 0x800D
  335. #define WI_NIC_3842_PCMCIA_ATS_ID 0x800E
  336. #define WI_NIC_3842_PCMCIA_STR "RF:PRISM2.5 MAC:ISL3873"
  337. #define WI_NIC_3842_MINI_AMD_ID 0x8012 /* Prism2.5 Mini-PCI */
  338. #define WI_NIC_3842_MINI_SST_ID 0x8013
  339. #define WI_NIC_3842_MINI_ATL_ID 0x8014
  340. #define WI_NIC_3842_MINI_ATS_ID 0x8015
  341. #define WI_NIC_3842_MINI_STR "RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)"
  342. #define WI_NIC_3842_PCI_AMD_ID 0x8016 /* Prism2.5 PCI-bridge */
  343. #define WI_NIC_3842_PCI_SST_ID 0x8017
  344. #define WI_NIC_3842_PCI_ATL_ID 0x8018
  345. #define WI_NIC_3842_PCI_ATS_ID 0x8019
  346. #define WI_NIC_3842_PCI_STR "RF:PRISM2.5 MAC:ISL3874A(PCI-bridge)"
  347. #define WI_NIC_P3_PCMCIA_AMD_ID 0x801A /* Prism3 PCMCIA */
  348. #define WI_NIC_P3_PCMCIA_SST_ID 0x801B
  349. #define WI_NIC_P3_PCMCIA_ATL_ID 0x801C
  350. #define WI_NIC_P3_PCMCIA_ATS_ID 0x801D
  351. #define WI_NIC_P3_PCMCIA_STR "RF:PRISM3(PCMCIA)"
  352. #define WI_NIC_P3_MINI_AMD_ID 0x8021 /* Prism3 Mini-PCI */
  353. #define WI_NIC_P3_MINI_SST_ID 0x8022
  354. #define WI_NIC_P3_MINI_ATL_ID 0x8023
  355. #define WI_NIC_P3_MINI_ATS_ID 0x8024
  356. #define WI_NIC_P3_MINI_STR "RF:PRISM3(Mini-PCI)"
  357. /*
  358. * Connection control characteristics. (0xFC00)
  359. * 0 == IBSS (802.11 compliant mode) (Only PRISM2)
  360. * 1 == Basic Service Set (BSS)
  361. * 2 == Wireless Distribudion System (WDS)
  362. * 3 == Pseudo IBSS
  363. * (Only PRISM2; not 802.11 compliant mode, testing use only)
  364. * 6 == HOST AP (Only PRISM2)
  365. */
  366. #define WI_PORTTYPE_IBSS 0x0
  367. #define WI_PORTTYPE_BSS 0x1
  368. #define WI_PORTTYPE_WDS 0x2
  369. #define WI_PORTTYPE_ADHOC 0x3
  370. #define WI_PORTTYPE_HOSTAP 0x6
  371. /*
  372. * Information frame types.
  373. */
  374. #define WI_INFO_NOTIFY 0xF000 /* Handover address */
  375. #define WI_INFO_COUNTERS 0xF100 /* Statistics counters */
  376. #define WI_INFO_SCAN_RESULTS 0xF101 /* Scan results */
  377. #define WI_INFO_HOST_SCAN_RESULTS 0xF104 /* Scan results */
  378. #define WI_INFO_LINK_STAT 0xF200 /* Link status */
  379. #define WI_INFO_LINK_STAT_CONNECTED 1
  380. #define WI_INFO_LINK_STAT_DISCONNECTED 2
  381. #define WI_INFO_LINK_STAT_AP_CHG 3 /* AP Change */
  382. #define WI_INFO_LINK_STAT_AP_OOR 4 /* AP Out Of Range */
  383. #define WI_INFO_LINK_STAT_AP_INR 5 /* AP In Range */
  384. #define WI_INFO_LINK_STAT_ASSOC_FAILED 6
  385. #define WI_INFO_ASSOC_STAT 0xF201 /* Association status */
  386. #define WI_INFO_AUTH_REQUEST 0xF202 /* Authentication Request (AP) */
  387. #define WI_INFO_POWERSAVE_COUNT 0xF203 /* PowerSave User Count (AP) */
  388. /* Rx Status Field */
  389. #define WI_STAT_ERRSTAT 0x0003
  390. /***************************************************************************/
  391. /* if_wavelan_ieee.h */
  392. /***************************************************************************/
  393. /*
  394. * Network parameters, static configuration entities.
  395. */
  396. #define WI_RID_PORTTYPE 0xFC00 /* Connection control characteristics */
  397. #define WI_RID_MAC_NODE 0xFC01 /* MAC address of this station */
  398. #define WI_RID_DESIRED_SSID 0xFC02 /* Service Set ID for connection */
  399. #define WI_RID_OWN_CHNL 0xFC03 /* Comm channel for BSS creation */
  400. #define WI_RID_OWN_SSID 0xFC04 /* IBSS creation ID */
  401. #define WI_RID_OWN_ATIM_WIN 0xFC05 /* ATIM window time for IBSS creation */
  402. #define WI_RID_SYSTEM_SCALE 0xFC06 /* scale that specifies AP density */
  403. #define WI_RID_MAX_DATALEN 0xFC07 /* Max len of MAC frame body data */
  404. #define WI_RID_MAC_WDS 0xFC08 /* MAC addr of corresponding WDS node */
  405. #define WI_RID_PM_ENABLED 0xFC09 /* ESS power management enable */
  406. #define WI_RID_PM_EPS 0xFC0A /* PM EPS/PS mode */
  407. #define WI_RID_MCAST_RX 0xFC0B /* ESS PM mcast reception */
  408. #define WI_RID_MAX_SLEEP 0xFC0C /* max sleep time for ESS PM */
  409. #define WI_RID_HOLDOVER 0xFC0D /* holdover time for ESS PM */
  410. #define WI_RID_NODENAME 0xFC0E /* ID name of this node for diag */
  411. #define WI_RID_DTIM_PERIOD 0xFC10 /* beacon interval between DTIMs */
  412. #define WI_RID_WDS_ADDR1 0xFC11 /* port 1 MAC of WDS link node */
  413. #define WI_RID_WDS_ADDR2 0xFC12 /* port 1 MAC of WDS link node */
  414. #define WI_RID_WDS_ADDR3 0xFC13 /* port 1 MAC of WDS link node */
  415. #define WI_RID_WDS_ADDR4 0xFC14 /* port 1 MAC of WDS link node */
  416. #define WI_RID_WDS_ADDR5 0xFC15 /* port 1 MAC of WDS link node */
  417. #define WI_RID_WDS_ADDR6 0xFC16 /* port 1 MAC of WDS link node */
  418. #define WI_RID_MCAST_PM_BUF 0xFC17 /* PM buffering of mcast */
  419. #define WI_RID_ENCRYPTION 0xFC20 /* enable/disable WEP */
  420. #define WI_RID_AUTHTYPE 0xFC21 /* specify authentication type */
  421. #define WI_RID_P2_TX_CRYPT_KEY 0xFC23
  422. #define WI_RID_P2_CRYPT_KEY0 0xFC24
  423. #define WI_RID_P2_CRYPT_KEY1 0xFC25
  424. #define WI_RID_MICROWAVE_OVEN 0xFC25
  425. #define WI_RID_P2_CRYPT_KEY2 0xFC26
  426. #define WI_RID_P2_CRYPT_KEY3 0xFC27
  427. #define WI_RID_P2_ENCRYPTION 0xFC28
  428. #define PRIVACY_INVOKED 0x01
  429. #define EXCLUDE_UNENCRYPTED 0x02
  430. #define HOST_ENCRYPT 0x10
  431. #define IV_EVERY_FRAME 0x00 /* IV = Initialization Vector */
  432. #define IV_EVERY10_FRAME 0x20 /* every 10 frame IV reuse */
  433. #define IV_EVERY50_FRAME 0x40 /* every 50 frame IV reuse */
  434. #define IV_EVERY100_FRAME 0x60 /* every 100 frame IV reuse */
  435. #define HOST_DECRYPT 0x80
  436. #define WI_RID_WEP_MAPTABLE 0xFC29
  437. #define WI_RID_CNFAUTHMODE 0xFC2A
  438. #define WI_RID_ROAMING_MODE 0xFC2D
  439. #define WI_RID_OWN_BEACON_INT 0xFC33 /* beacon xmit time for BSS creation */
  440. #define WI_RID_CNF_DBM_ADJUST 0xFC46
  441. #define WI_RID_DBM_ADJUST 0xFC46 /* RSSI - WI_RID_DBM_ADJUST ~ dBm */
  442. #define WI_RID_BASIC_RATE 0xFCB3
  443. #define WI_RID_SUPPORT_RATE 0xFCB4
  444. /*
  445. * Network parameters, dynamic configuration entities
  446. */
  447. #define WI_RID_MCAST_LIST 0xFC80 /* list of multicast addrs */
  448. #define WI_RID_CREATE_IBSS 0xFC81 /* create IBSS */
  449. #define WI_RID_FRAG_THRESH 0xFC82 /* frag len, unicast msg xmit */
  450. #define WI_RID_RTS_THRESH 0xFC83 /* frame len for RTS/CTS handshake */
  451. #define WI_RID_TX_RATE 0xFC84 /* data rate for message xmit */
  452. /* 0 == Fixed 1mbps */
  453. /* 1 == Fixed 2mbps */
  454. /* 2 == auto fallback */
  455. #define WI_RID_PROMISC 0xFC85 /* enable promisc mode */
  456. #define WI_RID_FRAG_THRESH0 0xFC90
  457. #define WI_RID_FRAG_THRESH1 0xFC91
  458. #define WI_RID_FRAG_THRESH2 0xFC92
  459. #define WI_RID_FRAG_THRESH3 0xFC93
  460. #define WI_RID_FRAG_THRESH4 0xFC94
  461. #define WI_RID_FRAG_THRESH5 0xFC95
  462. #define WI_RID_FRAG_THRESH6 0xFC96
  463. #define WI_RID_RTS_THRESH0 0xFC97
  464. #define WI_RID_RTS_THRESH1 0xFC98
  465. #define WI_RID_RTS_THRESH2 0xFC99
  466. #define WI_RID_RTS_THRESH3 0xFC9A
  467. #define WI_RID_RTS_THRESH4 0xFC9B
  468. #define WI_RID_RTS_THRESH5 0xFC9C
  469. #define WI_RID_RTS_THRESH6 0xFC9D
  470. #define WI_RID_TX_RATE0 0xFC9E
  471. #define WI_RID_TX_RATE1 0xFC9F
  472. #define WI_RID_TX_RATE2 0xFCA0
  473. #define WI_RID_TX_RATE3 0xFCA1
  474. #define WI_RID_TX_RATE4 0xFCA2
  475. #define WI_RID_TX_RATE5 0xFCA3
  476. #define WI_RID_TX_RATE6 0xFCA4
  477. #define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
  478. #define WI_RID_TX_CRYPT_KEY 0xFCB1
  479. #define WI_RID_TICK_TIME 0xFCE0
  480. struct wi_key {
  481. u_int16_t wi_keylen;
  482. u_int8_t wi_keydat[14];
  483. };
  484. /*
  485. * NIC information
  486. */
  487. #define WI_RID_DNLD_BUF 0xFD01
  488. #define WI_RID_MEMSZ 0xFD02 /* memory size info (XXX Lucent) */
  489. /* Looks like on lucnet pri firm too */
  490. #define WI_RID_PRI_IDENTITY 0xFD02 /* primary funcs firmware ident (PRISM2) */
  491. #define WI_RID_PRI_SUP_RANGE 0xFD03 /* primary supplier compatibility */
  492. #define WI_RID_CIF_ACT_RANGE 0xFD04 /* controller sup. compatibility */
  493. #define WI_RID_SERIALNO 0xFD0A /* card serial number */
  494. #define WI_RID_CARD_ID 0xFD0B /* card identification */
  495. #define WI_RID_MFI_SUP_RANGE 0xFD0C /* modem supplier compatibility */
  496. #define WI_RID_CFI_SUP_RANGE 0xFD0D /* controller sup. compatibility */
  497. #define WI_RID_CHANNEL_LIST 0xFD10 /* allowd comm. frequencies. */
  498. #define WI_RID_REG_DOMAINS 0xFD11 /* list of intendted regulatory doms */
  499. #define WI_RID_TEMP_TYPE 0xFD12 /* hw temp range code */
  500. #define WI_RID_CIS 0xFD13 /* PC card info struct */
  501. #define WI_RID_STA_IDENTITY 0xFD20 /* station funcs firmware ident */
  502. #define WI_RID_STA_SUP_RANGE 0xFD21 /* station supplier compat */
  503. #define WI_RID_MFI_ACT_RANGE 0xFD22
  504. #define WI_RID_SYMBOL_IDENTITY 0xFD24
  505. #define WI_RID_CFI_ACT_RANGE 0xFD33
  506. #define WI_RID_COMMQUAL 0xFD43
  507. #define WI_RID_SCALETHRESH 0xFD46
  508. #define WI_RID_PCF 0xFD87
  509. /*
  510. * MAC information
  511. */
  512. #define WI_RID_PORT_STAT 0xFD40 /* actual MAC port con control stat */
  513. #define WI_RID_CURRENT_SSID 0xFD41 /* ID of actually connected SS */
  514. #define WI_RID_CURRENT_BSSID 0xFD42 /* ID of actually connected BSS */
  515. #define WI_RID_COMMS_QUALITY 0xFD43 /* quality of BSS connection */
  516. #define WI_RID_CUR_TX_RATE 0xFD44 /* current TX rate */
  517. #define WI_RID_CUR_BEACON_INT 0xFD45 /* current beacon interval */
  518. #define WI_RID_CUR_SCALE_THRESH 0xFD46 /* actual system scane thresh setting */
  519. #define WI_RID_PROT_RESP_TIME 0xFD47 /* time to wait for resp to req msg */
  520. #define WI_RID_SHORT_RTR_LIM 0xFD48 /* max tx attempts for short frames */
  521. #define WI_RID_LONG_RTS_LIM 0xFD49 /* max tx attempts for long frames */
  522. #define WI_RID_MAX_TX_LIFE 0xFD4A /* max tx frame handling duration */
  523. #define WI_RID_MAX_RX_LIFE 0xFD4B /* max rx frame handling duration */
  524. #define WI_RID_CF_POLL 0xFD4C /* contention free pollable ind */
  525. #define WI_RID_AUTH_ALGS 0xFD4D /* auth algorithms available */
  526. #define WI_RID_AUTH_TYPE 0xFD4E /* availanle auth types */
  527. #define WI_RID_WEP_AVAIL 0xFD4F /* WEP privacy option available */
  528. #define WI_RID_DBM_COMMS_QUAL 0xFD51 /* CommQuality normalized to dBm */
  529. #define WI_RID_CUR_TX_RATE1 0xFD80
  530. #define WI_RID_CUR_TX_RATE2 0xFD81
  531. #define WI_RID_CUR_TX_RATE3 0xFD82
  532. #define WI_RID_CUR_TX_RATE4 0xFD83
  533. #define WI_RID_CUR_TX_RATE5 0xFD84
  534. #define WI_RID_CUR_TX_RATE6 0xFD85
  535. #define WI_RID_OWN_MAC 0xFD86 /* unique local MAC addr */
  536. #define WI_RID_PCI_INFO 0xFD87 /* point coordination func cap */
  537. /*
  538. * Modem information
  539. */
  540. #define WI_RID_PHY_TYPE 0xFDC0 /* phys layer type indication */
  541. #define WI_RID_CURRENT_CHAN 0xFDC1 /* current frequency */
  542. #define WI_RID_PWR_STATE 0xFDC2 /* pwr consumption status */
  543. #define WI_RID_CCA_MODE 0xFDC3 /* clear chan assess mode indication */
  544. #define WI_RID_CCA_TIME 0xFDC4 /* clear chan assess time */
  545. #define WI_RID_MAC_PROC_DELAY 0xFDC5 /* MAC processing delay time */
  546. #define WI_RID_DATA_RATES 0xFDC6 /* supported data rates */
  547. #endif /* !__WLANDEF_H__ */