adf_net_wcmd.h 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523
  1. /*
  2. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted (subject to the limitations in the
  7. * disclaimer below) provided that the following conditions are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * 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
  15. * distribution.
  16. *
  17. * * Neither the name of Qualcomm Atheros nor the names of its
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  22. * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  23. * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
  24. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  25. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  27. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  28. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  29. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  30. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  31. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  32. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  33. * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. */
  35. /**
  36. * Copyright (c) Atheros Communications Inc. 2002-2008
  37. *
  38. */
  39. #ifndef __ADF_NET_WCMD_H
  40. #define __ADF_NET_WCMD_H
  41. #include <adf_os_stdtypes.h>
  42. #include <adf_os_types.h>
  43. #include <adf_net_types.h>
  44. /**
  45. * Defines
  46. */
  47. #define ADF_NET_WCMD_NAME_SIZE __ADF_OS_NAME_SIZE
  48. #define ADF_NET_WCMD_NICK_NAME 32 /**< Max Device nick name size*/
  49. #define ADF_NET_WCMD_MODE_NAME_LEN 6
  50. #define ADF_NET_WCMD_IE_MAXLEN 256 /** Max Len for IE */
  51. #define ADF_NET_WCMD_MAX_BITRATES 32
  52. #define ADF_NET_WCMD_MAX_ENC_SZ 8
  53. #define ADF_NET_WCMD_MAX_FREQ 32
  54. #define ADF_NET_WCMD_MAX_TXPOWER 8
  55. #define ADF_NET_WCMD_EVENT_CAP 6
  56. /**
  57. * @brief key set/get info
  58. */
  59. #define ADF_NET_WCMD_KEYBUF_SIZE 16
  60. #define ADF_NET_WCMD_MICBUF_SIZE 16/**< space for tx+rx keys */
  61. #define ADF_NET_WCMD_KEY_DEFAULT 0x80/**< default xmit key */
  62. #define ADF_NET_WCMD_ADDR_LEN 6
  63. #define ADF_NET_WCMD_KEYDATA_SZ \
  64. (ADF_NET_WCMD_KEYBUF_SIZE + ADF_NET_WCMD_MICBUF_SIZE)
  65. /**
  66. * @brief key flags
  67. * XXX: enum's
  68. */
  69. #define ADF_NET_WCMD_VAPKEY_XMIT 0x01/**< xmit */
  70. #define ADF_NET_WCMD_VAPKEY_RECV 0x02/**< recv */
  71. #define ADF_NET_WCMD_VAPKEY_GROUP 0x04/**< WPA group*/
  72. #define ADF_NET_WCMD_VAPKEY_SWCRYPT 0x10/**< Encrypt/decrypt*/
  73. #define ADF_NET_WCMD_VAPKEY_SWMIC 0x20/**< Enmic/Demic */
  74. #define ADF_NET_WCMD_VAPKEY_DEFAULT 0x80/**< Default key */
  75. #define ADF_NET_WCMD_MAX_SSID 32
  76. #define ADF_NET_WCMD_CHAN_BYTES 32
  77. #define ADF_NET_WCMD_RTS_DEFAULT 512
  78. #define ADF_NET_WCMD_RTS_MIN 1
  79. #define ADF_NET_WCMD_RTS_MAX 2346
  80. #define ADF_NET_WCMD_FRAG_MIN 256
  81. #define ADF_NET_WCMD_FRAG_MAX 2346
  82. /**
  83. * @brief Maximum number of address that you may get in the
  84. * list of access ponts
  85. */
  86. #define ADF_NET_WCMD_MAX_AP 64
  87. #define ADF_NET_WCMD_RATE_MAXSIZE 30
  88. #define ADF_NET_WCMD_NUM_TR_ENTS 128
  89. /**
  90. * @brief Ethtool specific
  91. */
  92. #define ADF_NET_WCMD_BUSINFO_LEN 32
  93. #define ADF_NET_WCMD_DRIVSIZ 32
  94. #define ADF_NET_WCMD_VERSIZ 32
  95. #define ADF_NET_WCMD_FIRMSIZ 32
  96. /**
  97. * *******************************Enums******************
  98. */
  99. typedef enum adf_net_wcmd_vapmode{
  100. ADF_NET_WCMD_VAPMODE_AUTO, /**< Driver default*/
  101. ADF_NET_WCMD_VAPMODE_ADHOC, /**< Single cell*/
  102. ADF_NET_WCMD_VAPMODE_INFRA, /**< Multi Cell or Roaming*/
  103. ADF_NET_WCMD_VAPMODE_MASTER, /**< Access Point*/
  104. ADF_NET_WCMD_VAPMODE_REPEAT, /**< Wireless Repeater*/
  105. ADF_NET_WCMD_VAPMODE_SECOND, /**< Secondary master or repeater*/
  106. ADF_NET_WCMD_VAPMODE_MONITOR /**< Passive Monitor*/
  107. }adf_net_wcmd_vapmode_t;
  108. /**
  109. * @brief key type
  110. */
  111. typedef enum adf_net_wcmd_ciphermode{
  112. ADF_NET_WCMD_CIPHERMODE_WEP,
  113. ADF_NET_WCMD_CIPHERMODE_TKIP,
  114. ADF_NET_WCMD_CIPHERMODE_AES_OCB,
  115. ADF_NET_WCMD_CIPHERMODE_AES_CCM ,
  116. ADF_NET_WCMD_CIPHERMODE_RESERVE,
  117. ADF_NET_WCMD_CIPHERMODE_CKIP,
  118. ADF_NET_WCMD_CIPHERMODE_NONE
  119. }adf_net_wcmd_ciphermode_t;
  120. /**
  121. * @brief Get/Set wireless commands
  122. */
  123. typedef enum adf_net_wcmd_type{
  124. /* net80211 */
  125. ADF_NET_WCMD_GET_RTS_THRES,
  126. ADF_NET_WCMD_SET_RTS_THRES,
  127. ADF_NET_WCMD_GET_FRAGMENT,
  128. ADF_NET_WCMD_SET_FRAGMENT,
  129. ADF_NET_WCMD_GET_VAPMODE,
  130. ADF_NET_WCMD_SET_VAPMODE,
  131. ADF_NET_WCMD_GET_BSSID,
  132. ADF_NET_WCMD_SET_BSSID,
  133. ADF_NET_WCMD_GET_NICKNAME,
  134. ADF_NET_WCMD_SET_NICKNAME,
  135. ADF_NET_WCMD_GET_FREQUENCY,
  136. ADF_NET_WCMD_SET_FREQUENCY,
  137. ADF_NET_WCMD_GET_ESSID,
  138. ADF_NET_WCMD_SET_ESSID,
  139. ADF_NET_WCMD_GET_TX_POWER,
  140. ADF_NET_WCMD_SET_TX_POWER,
  141. ADF_NET_WCMD_GET_PARAM,
  142. ADF_NET_WCMD_SET_PARAM,
  143. ADF_NET_WCMD_GET_OPT_IE,
  144. ADF_NET_WCMD_SET_OPT_IE,
  145. ADF_NET_WCMD_GET_APP_IE_BUF,
  146. ADF_NET_WCMD_SET_APP_IE_BUF,
  147. ADF_NET_WCMD_SET_ENC,
  148. ADF_NET_WCMD_GET_KEY,
  149. ADF_NET_WCMD_SET_KEY,
  150. ADF_NET_WCMD_GET_SCAN,
  151. ADF_NET_WCMD_SET_SCAN,
  152. ADF_NET_WCMD_GET_MODE,
  153. ADF_NET_WCMD_SET_MODE,
  154. ADF_NET_WCMD_GET_CHAN_LIST,
  155. ADF_NET_WCMD_SET_CHAN_LIST,
  156. ADF_NET_WCMD_GET_WMM_PARAM,
  157. ADF_NET_WCMD_SET_WMM_PARAM,
  158. ADF_NET_WCMD_GET_VAPNAME,
  159. ADF_NET_WCMD_GET_IC_CAPS,
  160. ADF_NET_WCMD_GET_RETRIES,
  161. ADF_NET_WCMD_GET_WAP_LIST,
  162. ADF_NET_WCMD_GET_ADDBA_STATUS,
  163. ADF_NET_WCMD_GET_CHAN_INFO,
  164. ADF_NET_WCMD_GET_WPA_IE,
  165. ADF_NET_WCMD_GET_WSC_IE,
  166. ADF_NET_WCMD_SET_TXPOWER_LIMIT,
  167. ADF_NET_WCMD_SET_TURBO,
  168. ADF_NET_WCMD_SET_FILTER,
  169. ADF_NET_WCMD_SET_ADDBA_RESPONSE,
  170. ADF_NET_WCMD_SET_MLME,
  171. ADF_NET_WCMD_SET_SEND_ADDBA,
  172. ADF_NET_WCMD_SET_SEND_DELBA,
  173. ADF_NET_WCMD_SET_DELKEY,
  174. ADF_NET_WCMD_SET_DELMAC,
  175. ADF_NET_WCMD_SET_ADD_MAC,
  176. ADF_NET_WCMD_GET_RANGE,
  177. ADF_NET_WCMD_GET_POWER,
  178. ADF_NET_WCMD_SET_POWER,
  179. ADF_NET_WCMD_GET_DEVSTATS,
  180. ADF_NET_WCMD_SET_MTU,
  181. ADF_NET_WCMD_SET_SYSCTL,
  182. ADF_NET_WCMD_GET_STA_STATS,/* stats_sta */
  183. ADF_NET_WCMD_GET_VAP_STATS, /* stats_vap */
  184. ADF_NET_WCMD_GET_STATION_LIST, /* station */
  185. /* Device specific */
  186. ADF_NET_WCMD_SET_DEV_VAP_CREATE,
  187. ADF_NET_WCMD_SET_DEV_TX_TIMEOUT, /* XXX:No data definition */
  188. ADF_NET_WCMD_SET_DEV_MODE_INIT, /* XXX:No data definition */
  189. ADF_NET_WCMD_GET_DEV_STATUS,
  190. ADF_NET_WCMD_GET_DEV_STATUS_CLR, /* XXX:No data definition */
  191. ADF_NET_WCMD_GET_DEV_DIALOG,
  192. ADF_NET_WCMD_GET_DEV_PHYERR,
  193. ADF_NET_WCMD_GET_DEV_CWM,
  194. ADF_NET_WCMD_GET_DEV_ETHTOOL,
  195. ADF_NET_WCMD_SET_DEV_MAC,
  196. ADF_NET_WCMD_SET_DEV_CAP,/*ATH_CAP*/
  197. /* Device write specific */
  198. ADF_NET_WCMD_SET_DEV_EIFS_MASK,
  199. ADF_NET_WCMD_SET_DEV_EIFS_DUR,
  200. ADF_NET_WCMD_SET_DEV_SLOTTIME,
  201. ADF_NET_WCMD_SET_DEV_ACKTIMEOUT,
  202. ADF_NET_WCMD_SET_DEV_CTSTIMEOUT,
  203. ADF_NET_WCMD_SET_DEV_SOFTLED,
  204. ADF_NET_WCMD_SET_DEV_LEDPIN,
  205. ADF_NET_WCMD_SET_DEV_DEBUG,
  206. ADF_NET_WCMD_SET_DEV_TXANTENNA,
  207. ADF_NET_WCMD_SET_DEV_RXANTENNA,
  208. ADF_NET_WCMD_SET_DEV_DIVERSITY,
  209. ADF_NET_WCMD_SET_DEV_TXINTRPERIOD,
  210. ADF_NET_WCMD_SET_DEV_FFTXQMIN,
  211. ADF_NET_WCMD_SET_DEV_TKIPMIC,
  212. ADF_NET_WCMD_SET_DEV_GLOBALTXTIMEOUT,
  213. ADF_NET_WCMD_SET_DEV_SW_WSC_BUTTON,
  214. /* Device read specific */
  215. ADF_NET_WCMD_GET_DEV_EIFS_MASK,
  216. ADF_NET_WCMD_GET_DEV_EIFS_DUR,
  217. ADF_NET_WCMD_GET_DEV_SLOTTIME,
  218. ADF_NET_WCMD_GET_DEV_ACKTIMEOUT,
  219. ADF_NET_WCMD_GET_DEV_CTSTIMEOUT,
  220. ADF_NET_WCMD_GET_DEV_SOFTLED,
  221. ADF_NET_WCMD_GET_DEV_LEDPIN,
  222. ADF_NET_WCMD_GET_DEV_COUNTRYCODE,
  223. ADF_NET_WCMD_GET_DEV_REGDOMAIN,
  224. ADF_NET_WCMD_GET_DEV_DEBUG,
  225. ADF_NET_WCMD_GET_DEV_TXANTENNA,
  226. ADF_NET_WCMD_GET_DEV_RXANTENNA,
  227. ADF_NET_WCMD_GET_DEV_DIVERSITY,
  228. ADF_NET_WCMD_GET_DEV_TXINTRPERIOD,
  229. ADF_NET_WCMD_GET_DEV_FFTXQMIN,
  230. ADF_NET_WCMD_GET_DEV_TKIPMIC,
  231. ADF_NET_WCMD_GET_DEV_GLOBALTXTIMEOUT,
  232. ADF_NET_WCMD_GET_DEV_SW_WSC_BUTTON
  233. }adf_net_wcmd_type_t;
  234. /**
  235. * @brief Opmodes for the VAP
  236. */
  237. typedef enum adf_net_wcmd_opmode{
  238. ADF_NET_WCMD_OPMODE_IBSS,/**< IBSS (adhoc) station */
  239. ADF_NET_WCMD_OPMODE_STA,/**< Infrastructure station */
  240. ADF_NET_WCMD_OPMODE_WDS,/**< WDS link */
  241. ADF_NET_WCMD_OPMODE_AHDEMO,/**< Old lucent compatible adhoc demo */
  242. ADF_NET_WCMD_OPMODE_RESERVE0,/**<XXX: future use*/
  243. ADF_NET_WCMD_OPMODE_RESERVE1,/**<XXX: future use*/
  244. ADF_NET_WCMD_OPMODE_HOSTAP,/**< Software Access Point*/
  245. ADF_NET_WCMD_OPMODE_RESERVE2,/**<XXX: future use*/
  246. ADF_NET_WCMD_OPMODE_MONITOR/**< Monitor mode*/
  247. }adf_net_wcmd_opmode_t;
  248. /**
  249. * brief PHY modes for VAP
  250. */
  251. typedef enum adf_net_wcmd_phymode{
  252. ADF_NET_WCMD_PHYMODE_AUTO=0,/**< autoselect */
  253. ADF_NET_WCMD_PHYMODE_11A=1,/**< 5GHz, OFDM */
  254. ADF_NET_WCMD_PHYMODE_11B=2,/**< 2GHz, CCK */
  255. ADF_NET_WCMD_PHYMODE_11G=3,/**< 2GHz, OFDM */
  256. ADF_NET_WCMD_PHYMODE_FH=4,/**< 2GHz, GFSK */
  257. ADF_NET_WCMD_PHYMODE_TURBO_A=5,/**< 5GHz, OFDM, 2 x clk dynamic turbo */
  258. ADF_NET_WCMD_PHYMODE_TURBO_G=6,/**< 2GHz, OFDM, 2 x clk dynamic turbo*/
  259. ADF_NET_WCMD_PHYMODE_11NA=7,/**< 5GHz, OFDM + MIMO*/
  260. ADF_NET_WCMD_PHYMODE_11NG=8,/**< 2GHz, OFDM + MIMO*/
  261. ADF_NET_WCMD_PHYMODE_TURBO_STATIC_A=9,/**< Turbo Static A*/
  262. }adf_net_wcmd_phymode_t;
  263. /**
  264. * @brief param id
  265. */
  266. typedef enum adf_net_wcmd_param_id{
  267. ADF_NET_WCMD_PARAM_TURBO = 1,/**<turbo mode */
  268. ADF_NET_WCMD_PARAM_MODE,/**< phy mode (11a, 11b, etc.) */
  269. ADF_NET_WCMD_PARAM_AUTHMODE,/**< authentication mode */
  270. ADF_NET_WCMD_PARAM_PROTMODE,/**< 802.11g protection */
  271. ADF_NET_WCMD_PARAM_MCASTCIPHER,/**< multicast/default cipher */
  272. ADF_NET_WCMD_PARAM_MCASTKEYLEN,/**< multicast key length */
  273. ADF_NET_WCMD_PARAM_UCASTCIPHERS,/**< unicast cipher suites */
  274. ADF_NET_WCMD_PARAM_UCASTCIPHER,/**< unicast cipher */
  275. ADF_NET_WCMD_PARAM_UCASTKEYLEN,/**< unicast key length */
  276. ADF_NET_WCMD_PARAM_WPA,/**< WPA mode (0,1,2) */
  277. ADF_NET_WCMD_PARAM_ROAMING,/**< roaming mode */
  278. ADF_NET_WCMD_PARAM_PRIVACY,/**< privacy invoked */
  279. ADF_NET_WCMD_PARAM_COUNTERMEASURES,/**< WPA/TKIP countermeasures */
  280. ADF_NET_WCMD_PARAM_DROPUNENCRYPTED,/**< discard unencrypted frames */
  281. ADF_NET_WCMD_PARAM_DRIVER_CAPS,/**< driver capabilities */
  282. ADF_NET_WCMD_PARAM_MACCMD,/**< MAC ACL operation */
  283. ADF_NET_WCMD_PARAM_WMM,/**< WMM mode (on, off) */
  284. ADF_NET_WCMD_PARAM_HIDESSID,/**< hide SSID mode (on, off) */
  285. ADF_NET_WCMD_PARAM_APBRIDGE,/**< AP inter-sta bridging */
  286. ADF_NET_WCMD_PARAM_KEYMGTALGS,/**< key management algorithms */
  287. ADF_NET_WCMD_PARAM_RSNCAPS,/**< RSN capabilities */
  288. ADF_NET_WCMD_PARAM_INACT,/**< station inactivity timeout */
  289. ADF_NET_WCMD_PARAM_INACT_AUTH,/**< station auth inact timeout */
  290. ADF_NET_WCMD_PARAM_INACT_INIT,/**< station init inact timeout */
  291. ADF_NET_WCMD_PARAM_ABOLT,/**< Atheros Adv. Capabilities */
  292. ADF_NET_WCMD_PARAM_DTIM_PERIOD,/**< DTIM period (beacons) */
  293. ADF_NET_WCMD_PARAM_BEACON_INTERVAL,/**< beacon interval (ms) */
  294. ADF_NET_WCMD_PARAM_DOTH,/**< 11.h is on/off */
  295. ADF_NET_WCMD_PARAM_PWRTARGET,/**< Current Channel Pwr Constraint */
  296. ADF_NET_WCMD_PARAM_GENREASSOC,/**< Generate a reassociation request */
  297. ADF_NET_WCMD_PARAM_COMPRESSION,/**< compression */
  298. ADF_NET_WCMD_PARAM_FF,/**< fast frames support */
  299. ADF_NET_WCMD_PARAM_XR,/**< XR support */
  300. ADF_NET_WCMD_PARAM_BURST,/**< burst mode */
  301. ADF_NET_WCMD_PARAM_PUREG,/**< pure 11g (no 11b stations) */
  302. ADF_NET_WCMD_PARAM_AR,/**< AR support */
  303. ADF_NET_WCMD_PARAM_WDS,/**< Enable 4 address processing */
  304. ADF_NET_WCMD_PARAM_BGSCAN,/**< bg scanning (on, off) */
  305. ADF_NET_WCMD_PARAM_BGSCAN_IDLE,/**< bg scan idle threshold */
  306. ADF_NET_WCMD_PARAM_BGSCAN_INTERVAL,/**< bg scan interval */
  307. ADF_NET_WCMD_PARAM_MCAST_RATE,/**< Multicast Tx Rate */
  308. ADF_NET_WCMD_PARAM_COVERAGE_CLASS,/**< coverage class */
  309. ADF_NET_WCMD_PARAM_COUNTRY_IE,/**< enable country IE */
  310. ADF_NET_WCMD_PARAM_SCANVALID,/**< scan cache valid threshold */
  311. ADF_NET_WCMD_PARAM_ROAM_RSSI_11A,/**< rssi threshold in 11a */
  312. ADF_NET_WCMD_PARAM_ROAM_RSSI_11B,/**< rssi threshold in 11b */
  313. ADF_NET_WCMD_PARAM_ROAM_RSSI_11G,/**< rssi threshold in 11g */
  314. ADF_NET_WCMD_PARAM_ROAM_RATE_11A,/**< tx rate threshold in 11a */
  315. ADF_NET_WCMD_PARAM_ROAM_RATE_11B,/**< tx rate threshold in 11b */
  316. ADF_NET_WCMD_PARAM_ROAM_RATE_11G,/**< tx rate threshold in 11g */
  317. ADF_NET_WCMD_PARAM_UAPSDINFO,/**< value for qos info field */
  318. ADF_NET_WCMD_PARAM_SLEEP,/**< force sleep/wake */
  319. ADF_NET_WCMD_PARAM_QOSNULL,/**< force sleep/wake */
  320. ADF_NET_WCMD_PARAM_PSPOLL,/**< force ps-poll generation (sta only) */
  321. ADF_NET_WCMD_PARAM_EOSPDROP,/**< force uapsd EOSP drop (ap only) */
  322. ADF_NET_WCMD_PARAM_MARKDFS,/**< mark a dfs interference channel*/
  323. ADF_NET_WCMD_PARAM_REGCLASS,/**< enable regclass ids in country IE */
  324. ADF_NET_WCMD_PARAM_CHANBW,/**< set chan bandwidth preference */
  325. ADF_NET_WCMD_PARAM_WMM_AGGRMODE,/**< set WMM Aggressive Mode */
  326. ADF_NET_WCMD_PARAM_SHORTPREAMBLE,/**< enable/disable short Preamble */
  327. ADF_NET_WCMD_PARAM_BLOCKDFSCHAN,/**< enable/disable use of DFS channels */
  328. ADF_NET_WCMD_PARAM_CWM_MODE,/**< CWM mode */
  329. ADF_NET_WCMD_PARAM_CWM_EXTOFFSET,/**< Ext. channel offset */
  330. ADF_NET_WCMD_PARAM_CWM_EXTPROTMODE,/**< Ext. Chan Protection mode */
  331. ADF_NET_WCMD_PARAM_CWM_EXTPROTSPACING,/**< Ext. chan Protection spacing */
  332. ADF_NET_WCMD_PARAM_CWM_ENABLE,/**< State machine enabled */
  333. ADF_NET_WCMD_PARAM_CWM_EXTBUSYTHRESHOLD,/**< Ext. chan busy threshold*/
  334. ADF_NET_WCMD_PARAM_CWM_CHWIDTH,/**< Current channel width */
  335. ADF_NET_WCMD_PARAM_SHORT_GI,/**< half GI */
  336. ADF_NET_WCMD_PARAM_FAST_CC,/**< fast channel change */
  337. /**
  338. * 11n A-MPDU, A-MSDU support
  339. */
  340. ADF_NET_WCMD_PARAM_AMPDU,/**< 11n a-mpdu support */
  341. ADF_NET_WCMD_PARAM_AMPDU_LIMIT,/**< a-mpdu length limit */
  342. ADF_NET_WCMD_PARAM_AMPDU_DENSITY,/**< a-mpdu density */
  343. ADF_NET_WCMD_PARAM_AMPDU_SUBFRAMES,/**< a-mpdu subframe limit */
  344. ADF_NET_WCMD_PARAM_AMSDU,/**< a-msdu support */
  345. ADF_NET_WCMD_PARAM_AMSDU_LIMIT,/**< a-msdu length limit */
  346. ADF_NET_WCMD_PARAM_COUNTRYCODE,/**< Get country code */
  347. ADF_NET_WCMD_PARAM_TX_CHAINMASK,/**< Tx chain mask */
  348. ADF_NET_WCMD_PARAM_RX_CHAINMASK,/**< Rx chain mask */
  349. ADF_NET_WCMD_PARAM_RTSCTS_RATECODE,/**< RTS Rate code */
  350. ADF_NET_WCMD_PARAM_HT_PROTECTION,/**< Protect traffic in HT mode */
  351. ADF_NET_WCMD_PARAM_RESET_ONCE,/**< Force a reset */
  352. ADF_NET_WCMD_PARAM_SETADDBAOPER,/**< Set ADDBA mode */
  353. ADF_NET_WCMD_PARAM_TX_CHAINMASK_LEGACY,/**< Tx chain mask */
  354. ADF_NET_WCMD_PARAM_11N_RATE,/**< Set ADDBA mode */
  355. ADF_NET_WCMD_PARAM_11N_RETRIES,/**< Tx chain mask for legacy clients */
  356. ADF_NET_WCMD_PARAM_WDS_AUTODETECT,/**< Autodetect/DelBa for WDS mode */
  357. ADF_NET_WCMD_PARAM_RB,/**< Switch in/out of RB */
  358. /**
  359. * RB Detection knobs.
  360. */
  361. ADF_NET_WCMD_PARAM_RB_DETECT,/**< Do RB detection */
  362. ADF_NET_WCMD_PARAM_RB_SKIP_THRESHOLD,/**< seqno-skip-by-1s to detect */
  363. ADF_NET_WCMD_PARAM_RB_TIMEOUT,/**< (in ms) to restore non-RB */
  364. ADF_NET_WCMD_PARAM_NO_HTIE,/**< Control HT IEs are sent out or parsed */
  365. ADF_NET_WCMD_PARAM_MAXSTA/**< Config max allowable staions for each VAP */
  366. }adf_net_wcmd_param_id_t;
  367. /**
  368. * @brief APPIEBUF related definations
  369. */
  370. typedef enum adf_net_wcmd_appie_frame{
  371. ADF_NET_WCMD_APPIE_FRAME_BEACON,
  372. ADF_NET_WCMD_APPIE_FRAME_PROBE_REQ,
  373. ADF_NET_WCMD_APPIE_FRAME_PROBE_RESP,
  374. ADF_NET_WCMD_APPIE_FRAME_ASSOC_REQ,
  375. ADF_NET_WCMD_APPIE_FRAME_ASSOC_RESP,
  376. ADF_NET_WCMD_APPIE_NUM_OF_FRAME
  377. }adf_net_wcmd_appie_frame_t;
  378. /**
  379. * @brief filter pointer info
  380. */
  381. typedef enum adf_net_wcmd_filter_type{
  382. ADF_NET_WCMD_FILTER_TYPE_BEACON=0x1,
  383. ADF_NET_WCMD_FILTER_TYPE_PROBE_REQ=0x2,
  384. ADF_NET_WCMD_FILTER_TYPE_PROBE_RESP=0x4,
  385. ADF_NET_WCMD_FILTER_TYPE_ASSOC_REQ=0x8,
  386. ADF_NET_WCMD_FILTER_TYPE_ASSOC_RESP=0x10,
  387. ADF_NET_WCMD_FILTER_TYPE_AUTH=0x20,
  388. ADF_NET_WCMD_FILTER_TYPE_DEAUTH=0x40,
  389. ADF_NET_WCMD_FILTER_TYPE_DISASSOC=0x80,
  390. ADF_NET_WCMD_FILTER_TYPE_ALL=0xFF,
  391. }adf_net_wcmd_filter_type_t;
  392. /**
  393. * @brief mlme info pointer
  394. */
  395. typedef enum adf_net_wcmd_mlme_op_type{
  396. ADF_NET_WCMD_MLME_ASSOC,
  397. ADF_NET_WCMD_MLME_DISASSOC,
  398. ADF_NET_WCMD_MLME_DEAUTH,
  399. ADF_NET_WCMD_MLME_AUTHORIZE,
  400. ADF_NET_WCMD_MLME_UNAUTHORIZE,
  401. }adf_net_wcmd_mlme_op_type_t;
  402. typedef enum adf_net_wcmd_wmmparams{
  403. ADF_NET_WCMD_WMMPARAMS_CWMIN = 1,
  404. ADF_NET_WCMD_WMMPARAMS_CWMAX,
  405. ADF_NET_WCMD_WMMPARAMS_AIFS,
  406. ADF_NET_WCMD_WMMPARAMS_TXOPLIMIT,
  407. ADF_NET_WCMD_WMMPARAMS_ACM,
  408. ADF_NET_WCMD_WMMPARAMS_NOACKPOLICY,
  409. }adf_net_wcmd_wmmparams_t;
  410. /**
  411. * @brief Power Management Flags
  412. */
  413. typedef enum adf_net_wcmd_pmflags{
  414. ADF_NET_WCMD_POWER_ON = 0x0,
  415. ADF_NET_WCMD_POWER_MIN = 0x1,/**< Min */
  416. ADF_NET_WCMD_POWER_MAX = 0x2,/**< Max */
  417. ADF_NET_WCMD_POWER_REL = 0x4,/**< Not in seconds/ms/us */
  418. ADF_NET_WCMD_POWER_MOD = 0xF,/**< Modify a parameter */
  419. ADF_NET_WCMD_POWER_UCAST_R = 0x100,/**< Ucast messages */
  420. ADF_NET_WCMD_POWER_MCAST_R = 0x200,/**< Mcast messages */
  421. ADF_NET_WCMD_POWER_ALL_R = 0x300,/**< All messages though PM */
  422. ADF_NET_WCMD_POWER_FORCE_S = 0x400,/**< Force PM to unicast */
  423. ADF_NET_WCMD_POWER_REPEATER = 0x800,/**< Bcast messages in PM*/
  424. ADF_NET_WCMD_POWER_MODE = 0xF00,/**< Power Management mode */
  425. ADF_NET_WCMD_POWER_PERIOD = 0x1000,/**< Period/Duration of */
  426. ADF_NET_WCMD_POWER_TIMEOUT = 0x2000,/**< Timeout (to go asleep) */
  427. ADF_NET_WCMD_POWER_TYPE = 0xF000/**< Type of parameter */
  428. }adf_net_wcmd_pmflags_t;
  429. /**
  430. * @brief Tx Power flags
  431. */
  432. typedef enum adf_net_wcmd_txpow_flags{
  433. ADF_NET_WCMD_TXPOW_DBM = 0,/**< dBm */
  434. ADF_NET_WCMD_TXPOW_MWATT = 0x1,/**< mW */
  435. ADF_NET_WCMD_TXPOW_RELATIVE = 0x2,/**< Arbitrary units */
  436. ADF_NET_WCMD_TXPOW_TYPE = 0xFF,/**< Type of value */
  437. ADF_NET_WCMD_TXPOW_RANGE = 0x1000/**< Range (min - max) */
  438. }adf_net_wcmd_txpow_flags_t;
  439. /**
  440. * @brief Retry flags
  441. */
  442. typedef enum adf_net_wcmd_retry_flags{
  443. ADF_NET_WCMD_RETRY_ON = 0x0,
  444. ADF_NET_WCMD_RETRY_MIN = 0x1,/**< Value is a minimum */
  445. ADF_NET_WCMD_RETRY_MAX = 0x2,/**< Maximum */
  446. ADF_NET_WCMD_RETRY_RELATIVE = 0x4,/**< Not in seconds/ms/us */
  447. ADF_NET_WCMD_RETRY_SHORT = 0x10,/**< Short packets */
  448. ADF_NET_WCMD_RETRY_LONG = 0x20,/**< Long packets */
  449. ADF_NET_WCMD_RETRY_MODIFIER = 0xFF,/**< Modify a parameter */
  450. ADF_NET_WCMD_RETRY_LIMIT = 0x1000,/**< Max retries*/
  451. ADF_NET_WCMD_RETRY_LIFETIME = 0x2000,/**< Max retries us*/
  452. ADF_NET_WCMD_RETRY_TYPE = 0xF000,/**< Parameter type */
  453. }adf_net_wcmd_retry_flags_t;
  454. /**
  455. * @brief choose the CWM struct type
  456. */
  457. typedef enum adf_net_wcmd_cwmtype{
  458. ADF_NET_WCMD_CWMTYPE_INFO=139,/**< driver requirement */
  459. ADF_NET_WCMD_CWMTYPE_DBG/**< driver requirement */
  460. }adf_net_wcmd_cwmtype_t;
  461. /**
  462. * @brief CWM Debug mode commands
  463. */
  464. typedef enum adf_net_wcmd_cwm_cmd{
  465. ADF_NET_WCMD_CWM_CMD_EVENT,/**< Send Event */
  466. ADF_NET_WCMD_CWM_CMD_CTL,/**< Ctrl channel busy */
  467. ADF_NET_WCMD_CWM_CMD_EXT,/**< Ext chan busy */
  468. ADF_NET_WCMD_CWM_CMD_VCTL,/**< virt ctrl chan busy*/
  469. ADF_NET_DBGCWM_CMD_VEXT/**< virt extension channel busy*/
  470. }adf_net_wcmd_cwm_cmd_t;
  471. /**
  472. * @brief CWM EVENTS
  473. */
  474. typedef enum adf_net_wcmd_cwm_event{
  475. ADF_NET_WCMD_CWMEVENT_TXTIMEOUT, /**< tx timeout interrupt */
  476. ADF_NET_WCMD_CWMEVENT_EXTCHCLEAR, /**< ext channel sensing clear */
  477. ADF_NET_WCMD_CWMEVENT_EXTCHBUSY, /**< ext channel sensing busy */
  478. ADF_NET_WCMD_CWMEVENT_EXTCHSTOP, /**< ext channel sensing stop */
  479. ADF_NET_WCMD_CWMEVENT_EXTCHRESUME,/**< ext channel sensing resume */
  480. ADF_NET_WCMD_CWMEVENT_DESTCW20, /**< dest channel width changed to 20 */
  481. ADF_NET_WCMD_CWMEVENT_DESTCW40, /**< dest channel width changed to 40 */
  482. ADF_NET_WCMD_CWMEVENT_MAX
  483. } adf_net_wcmd_cwm_event_t;
  484. /**
  485. * @brief eth tool info
  486. */
  487. typedef enum adf_net_wcmd_ethtool_cmd{
  488. ADF_NET_WCMD_ETHTOOL_GSET=0x1,/**< Get settings. */
  489. ADF_NET_WCMD_ETHTOOL_SSET,/**< Set settings. */
  490. ADF_NET_WCMD_ETHTOOL_GDRVINFO,/**< Get driver info. */
  491. ADF_NET_WCMD_ETHTOOL_GREGS,/**< Get NIC registers. */
  492. ADF_NET_WCMD_ETHTOOL_GWOL,/**< Wake-on-lan options. */
  493. ADF_NET_WCMD_ETHTOOL_SWOL,/**< Set wake-on-lan options. */
  494. ADF_NET_WCMD_ETHTOOL_GMSGLVL,/**< Get driver message level */
  495. ADF_NET_WCMD_ETHTOOL_SMSGLVL,/**< Set driver msg level */
  496. ADF_NET_WCMD_ETHTOOL_NWAY_RST,/**< Restart autonegotiation. */
  497. ADF_NET_WCMD_ETHTOOL_GEEPROM,/**< Get EEPROM data */
  498. ADF_NET_WCMD_ETHTOOL_SEEPROM,/** < Set EEPROM data. */
  499. ADF_NET_WCMD_ETHTOOL_GCOALESCE,/** < Get coalesce config */
  500. ADF_NET_WCMD_ETHTOOL_SCOALESCE,/** < Set coalesce config. */
  501. ADF_NET_WCMD_ETHTOOL_GRINGPARAM,/** < Get ring parameters */
  502. ADF_NET_WCMD_ETHTOOL_SRINGPARAM,/** < Set ring parameters. */
  503. ADF_NET_WCMD_ETHTOOL_GPAUSEPARAM,/** < Get pause parameters */
  504. ADF_NET_WCMD_ETHTOOL_SPAUSEPARAM,/** < Set pause parameters. */
  505. ADF_NET_WCMD_ETHTOOL_GRXCSUM,/** < Get RX hw csum enable */
  506. ADF_NET_WCMD_ETHTOOL_SRXCSUM,/** < Set RX hw csum enable */
  507. ADF_NET_WCMD_ETHTOOL_GTXCSUM,/** < Get TX hw csum enable */
  508. ADF_NET_WCMD_ETHTOOL_STXCSUM,/** < Set TX hw csum enable */
  509. ADF_NET_WCMD_ETHTOOL_GSG,/** < Get scatter-gather enable */
  510. ADF_NET_WCMD_ETHTOOL_SSG,/** < Set scatter-gather enable */
  511. ADF_NET_WCMD_ETHTOOL_TEST,/** < execute NIC self-test. */
  512. ADF_NET_WCMD_ETHTOOL_GSTRINGS,/** < get specified string set */
  513. ADF_NET_WCMD_ETHTOOL_PHYS_ID,/** < identify the NIC */
  514. ADF_NET_WCMD_ETHTOOL_GSTATS,/** < get NIC-specific statistics */
  515. ADF_NET_WCMD_ETHTOOL_GTSO,/** < Get TSO enable (ethtool_value) */
  516. ADF_NET_WCMD_ETHTOOL_STSO,/** < Set TSO enable (ethtool_value) */
  517. ADF_NET_WCMD_ETHTOOL_GPERMADDR,/** < Get permanent hardware address */
  518. ADF_NET_WCMD_ETHTOOL_GUFO,/** < Get UFO enable */
  519. ADF_NET_WCMD_ETHTOOL_SUFO,/** < Set UFO enable */
  520. ADF_NET_WCMD_ETHTOOL_GGSO,/** < Get GSO enable */
  521. ADF_NET_WCMD_ETHTOOL_SGSO,/** < Set GSO enable */
  522. }adf_net_wcmd_ethtool_cmd_t;
  523. /**
  524. * ***************************Structures***********************
  525. */
  526. /**
  527. * @brief Information Element
  528. */
  529. typedef struct adf_net_ie_info{
  530. a_uint16_t len;
  531. a_uint8_t data[ADF_NET_WCMD_IE_MAXLEN];
  532. }adf_net_ie_info_t;
  533. /**
  534. * @brief WCMD info
  535. */
  536. typedef struct adf_net_wcmd_vapname{
  537. a_uint32_t len;
  538. a_uint8_t name[ADF_NET_WCMD_NAME_SIZE];
  539. }adf_net_wcmd_vapname_t;
  540. /**
  541. * @brief nickname pointer info
  542. */
  543. typedef struct adf_net_wcmd_nickname{
  544. a_uint16_t len;
  545. a_uint8_t name[ADF_NET_WCMD_NICK_NAME];
  546. }adf_net_wcmd_nickname_t;
  547. /**
  548. * @brief missed frame info
  549. */
  550. typedef struct adf_net_wcmd_miss{
  551. a_uint32_t beacon;/**< Others cases */
  552. }adf_net_wcmd_miss_t;
  553. /**
  554. * @brief discarded frame info
  555. */
  556. typedef struct adf_net_wcmd_discard{
  557. a_uint32_t nwid;/**< Rx : Wrong nwid/essid */
  558. a_uint32_t code; /**< Rx : Unable to code/decode (WEP) */
  559. a_uint32_t fragment;/**< Rx : Can't perform MAC reassembly */
  560. a_uint32_t retries;/**< Tx : Max MAC retries num reached */
  561. a_uint32_t misc;/**< Others cases */
  562. }adf_net_wcmd_discard_t;
  563. /**
  564. * @brief Link quality info
  565. */
  566. typedef struct adf_net_wcmd_linkqty{
  567. a_uint8_t qual;/*link quality(retries, SNR, missed beacons)*/
  568. a_uint8_t level;/*Signal level (dBm) */
  569. a_uint8_t noise;/*Noise level (dBm) */
  570. a_uint8_t updated;/*Update flag*/
  571. }adf_net_wcmd_linkqty_t;
  572. /**
  573. * @brief frequency info
  574. */
  575. typedef struct adf_net_wcmd_freq{
  576. a_int32_t m;/*Mantissa */
  577. a_int16_t e;/*Exponent */
  578. a_uint8_t i;/*List index (when in range struct) */
  579. a_uint8_t flags;/*Flags (fixed/auto) */
  580. }adf_net_wcmd_freq_t;
  581. /**
  582. * @brief VAP parameter range info
  583. */
  584. typedef struct adf_net_wcmd_vapparam_range{
  585. /**
  586. * @brief Informative stuff (to choose between different
  587. * interface) In theory this value should be the maximum
  588. * benchmarked TCP/IP throughput, because with most of these
  589. * devices the bit rate is meaningless (overhead an co) to
  590. * estimate how fast the connection will go and pick the fastest
  591. * one. I suggest people to play with Netperf or any
  592. * benchmark...
  593. */
  594. a_uint32_t throughput;/**< To give an idea... */
  595. /** @brief NWID (or domain id) */
  596. a_uint32_t min_nwid;/**< Min NWID to set */
  597. a_uint32_t max_nwid;/**< Max NWID to set */
  598. /**
  599. * @brief Old Frequency (backward compatibility - moved lower )
  600. */
  601. a_uint16_t old_num_channels;
  602. a_uint8_t old_num_frequency;
  603. /**@brief Wireless event capability bitmasks */
  604. a_uint32_t event_capa[ADF_NET_WCMD_EVENT_CAP];
  605. /**@brief Signal level threshold range */
  606. a_int32_t sensitivity;
  607. /**
  608. * @brief Quality of link & SNR stuff Quality range (link,
  609. * level, noise) If the quality is absolute, it will be in the
  610. * range [0
  611. * - max_qual], if the quality is dBm, it will be in the range
  612. * [max_qual - 0]. Don't forget that we use 8 bit arithmetics...
  613. */
  614. adf_net_wcmd_linkqty_t max_qual;/**< Link Quality*/
  615. /**
  616. * @brief This should contain the average/typical values of the
  617. * quality indicator. This should be the threshold between a
  618. * "good" and a "bad" link (example : monitor going from green
  619. * to orange). Currently, user space apps like quality monitors
  620. * don't have any way to calibrate the measurement. With this,
  621. * they can split the range between 0 and max_qual in different
  622. * quality level (using a geometric subdivision centered on the
  623. * average). I expect that people doing the user space apps will
  624. * feedback us on which value we need to put in each
  625. * driver...
  626. */
  627. adf_net_wcmd_linkqty_t avg_qual;
  628. /**@brief Rates */
  629. a_uint8_t num_bitrates; /**< Number of entries in the list */
  630. a_int32_t bitrate[ADF_NET_WCMD_MAX_BITRATES]; /**< in bps */
  631. /**@brief RTS threshold */
  632. a_int32_t min_rts; /**< Minimal RTS threshold */
  633. a_int32_t max_rts; /**< Maximal RTS threshold */
  634. /**@brief Frag threshold */
  635. a_int32_t min_frag;/**< Minimal frag threshold */
  636. a_int32_t max_frag;/**< Maximal frag threshold */
  637. /**@brief Power Management duration & timeout */
  638. a_int32_t min_pmp;/**< Minimal PM period */
  639. a_int32_t max_pmp;/**< Maximal PM period */
  640. a_int32_t min_pmt;/**< Minimal PM timeout */
  641. a_int32_t max_pmt;/**< Maximal PM timeout */
  642. a_uint16_t pmp_flags;/**< decode max/min PM period */
  643. a_uint16_t pmt_flags;/**< decode max/min PM timeout */
  644. a_uint16_t pm_capa;/**< PM options supported */
  645. /**@brief Encoder stuff, Different token sizes */
  646. a_uint16_t enc_sz[ADF_NET_WCMD_MAX_ENC_SZ];
  647. a_uint8_t num_enc_sz; /**< Number of entry in the list */
  648. a_uint8_t max_enc_tk;/**< Max number of tokens */
  649. /**@brief For drivers that need a "login/passwd" form */
  650. a_uint8_t enc_login_idx;/**< token index for login token */
  651. /**@brief Transmit power */
  652. a_uint16_t txpower_capa;/**< options supported */
  653. a_uint8_t num_txpower;/**< Number of entries in the list */
  654. a_int32_t txpower[ADF_NET_WCMD_MAX_TXPOWER];/**< in bps */
  655. /**@brief Wireless Extension version info */
  656. a_uint8_t we_version_compiled;/**< Must be WIRELESS_EXT */
  657. a_uint8_t we_version_source;/**< Last update of source */
  658. /**@brief Retry limits and lifetime */
  659. a_uint16_t retry_capa;/**< retry options supported */
  660. a_uint16_t retry_flags;/**< decode max/min retry limit*/
  661. a_uint16_t r_time_flags;/**< Decode max/min retry life */
  662. a_int32_t min_retry;/**< Min retries */
  663. a_int32_t max_retry;/**< Max retries */
  664. a_int32_t min_r_time;/**< Min retry lifetime */
  665. a_int32_t max_r_time;/**< Max retry lifetime */
  666. /**@brief Frequency */
  667. a_uint16_t num_channels;/**< Num channels [0 - (num - 1)] */
  668. a_uint8_t num_frequency;/**< Num entries*/
  669. /**
  670. * Note : this frequency list doesn't need to fit channel
  671. * numbers, because each entry contain its channel index
  672. */
  673. adf_net_wcmd_freq_t freq[ADF_NET_WCMD_MAX_FREQ];
  674. a_uint32_t enc_capa; /**< IW_ENC_CAPA_* bit field */
  675. }adf_net_wcmd_vapparam_range_t;
  676. /**
  677. * @brief key info
  678. */
  679. typedef struct adf_net_wcmd_keyinfo{
  680. a_uint8_t ik_type; /**< key/cipher type */
  681. a_uint8_t ik_pad;
  682. a_uint16_t ik_keyix;/**< key index */
  683. a_uint8_t ik_keylen;/**< key length in bytes */
  684. a_uint8_t ik_flags;
  685. a_uint8_t ik_macaddr[ADF_NET_WCMD_ADDR_LEN];
  686. a_uint64_t ik_keyrsc;/**< key receive sequence counter */
  687. a_uint64_t ik_keytsc;/**< key transmit sequence counter */
  688. a_uint8_t ik_keydata[ADF_NET_WCMD_KEYDATA_SZ];
  689. }adf_net_wcmd_keyinfo_t;
  690. /**
  691. * @brief bssid pointer info
  692. */
  693. typedef struct adf_net_wcmd_bssid{
  694. a_uint8_t bssid[ADF_NET_WCMD_ADDR_LEN];
  695. }adf_net_wcmd_bssid_t;
  696. /**
  697. * @brief essid structure info
  698. */
  699. typedef struct adf_net_wcmd_ssid{
  700. a_uint8_t byte[ADF_NET_WCMD_MAX_SSID];
  701. a_uint16_t len;/**< number of fields or size in bytes */
  702. a_uint16_t flags;/**< Optional */
  703. } adf_net_wcmd_ssid_t;
  704. typedef struct adf_net_wcmd_param{
  705. adf_net_wcmd_param_id_t param_id;
  706. a_uint32_t value;
  707. }adf_net_wcmd_param_t;
  708. /**
  709. * @brief optional IE pointer info
  710. */
  711. typedef adf_net_ie_info_t adf_net_wcmd_optie_t;
  712. /**
  713. * @brief status of VAP interface
  714. */
  715. typedef struct adf_net_wcmd_vapstats{
  716. a_uint8_t status;/**< Status*/
  717. adf_net_wcmd_linkqty_t qual;/**< Quality of the link*/
  718. adf_net_wcmd_discard_t discard;/**< Packet discarded counts */
  719. adf_net_wcmd_miss_t miss;/**< Packet missed counts */
  720. } adf_net_wcmd_vapstats_t;
  721. /**
  722. * @brief appie pointer info
  723. */
  724. typedef struct adf_net_wcmd_appie{
  725. adf_net_wcmd_appie_frame_t frmtype;
  726. a_uint32_t len;
  727. a_uint8_t data[ADF_NET_WCMD_IE_MAXLEN];
  728. }adf_net_wcmd_appie_t;
  729. /**
  730. * @brief send ADDBA info pointer
  731. */
  732. typedef struct adf_net_wcmd_addba{
  733. a_uint16_t aid;
  734. a_uint32_t tid;
  735. a_uint32_t arg1;
  736. }adf_net_wcmd_addba_t;
  737. /**
  738. * @brief ADDBA status pointer info
  739. */
  740. typedef struct adf_net_wcmd_addba_status{
  741. a_uint16_t aid;
  742. a_uint32_t tid;
  743. a_uint16_t status;
  744. }adf_net_wcmd_addba_status_t;
  745. /**
  746. * @brief ADDBA response pointer info
  747. */
  748. typedef struct adf_net_wcmd_addba_resp{
  749. a_uint16_t aid;
  750. a_uint32_t tid;
  751. a_uint32_t arg1;
  752. }adf_net_wcmd_addba_resp_t;
  753. /**
  754. * @brief send DELBA info pointer
  755. */
  756. typedef struct adf_net_wcmd_delba{
  757. a_uint16_t aid;
  758. a_uint32_t tid;
  759. a_uint32_t arg1;
  760. a_uint32_t arg2;
  761. }adf_net_wcmd_delba_t;
  762. /**
  763. * @brief MLME
  764. */
  765. typedef struct adf_net_wcmd_mlme{
  766. adf_net_wcmd_mlme_op_type_t op;/**< operation to perform */
  767. a_uint8_t reason;/**< 802.11 reason code */
  768. //a_uint8_t macaddr[ADF_NET_WCMD_ADDR_LEN];
  769. adf_net_ethaddr_t mac;
  770. }adf_net_wcmd_mlme_t;
  771. /**
  772. * @brief Set the active channel list. Note this list is
  773. * intersected with the available channel list in
  774. * calculating the set of channels actually used in
  775. * scanning.
  776. */
  777. typedef struct adf_net_wcmd_chanlist{
  778. a_uint8_t chanlist[ADF_NET_WCMD_CHAN_BYTES];
  779. // u_int16_t len;
  780. }adf_net_wcmd_chanlist_t;
  781. /**
  782. * @brief Channels are specified by frequency and attributes.
  783. */
  784. typedef struct adf_net_wcmd_chan{
  785. a_uint16_t freq;/**< setting in Mhz */
  786. a_uint32_t flags;/**< see below */
  787. a_uint8_t ieee;/**< IEEE channel number */
  788. a_int8_t maxregpower;/**< maximum regulatory tx power in dBm */
  789. a_int8_t maxpower;/**< maximum tx power in dBm */
  790. a_int8_t minpower;/**< minimum tx power in dBm */
  791. a_uint8_t regclassid;/**< regulatory class id */
  792. } adf_net_wcmd_chan_t;
  793. /**
  794. * @brief channel info pointer
  795. */
  796. typedef struct adf_net_wcmd_chaninfo{
  797. a_uint32_t nchans;
  798. adf_net_wcmd_chan_t chans;
  799. }adf_net_wcmd_chaninfo_t;
  800. /**
  801. * @brief wmm-param info
  802. */
  803. typedef struct adf_net_wcmd_wmmparaminfo{
  804. adf_net_wcmd_wmmparams_t cmd;
  805. a_uint32_t ac;
  806. a_uint32_t bss;
  807. a_uint32_t value;
  808. }adf_net_wcmd_wmmparaminfo_t;
  809. /**
  810. * @brief wpa ie pointer info
  811. */
  812. typedef struct adf_net_wcmd_wpaie{
  813. adf_net_ethaddr_t mac;
  814. adf_net_ie_info_t ie;
  815. }adf_net_wcmd_wpaie_t;
  816. /**
  817. * @brief wsc ie pointer info
  818. */
  819. typedef struct adf_net_wcmd_wscie{
  820. adf_net_ethaddr_t mac;
  821. adf_net_ie_info_t ie;
  822. }adf_net_wcmd_wscie_t;
  823. /**
  824. * @brief rts threshold set/get info
  825. */
  826. typedef struct adf_net_wcmd_rts_th{
  827. a_uint16_t threshold;
  828. a_uint16_t disabled;
  829. a_uint16_t fixed;
  830. }adf_net_wcmd_rts_th_t;
  831. /**
  832. * @brief fragment threshold set/get info
  833. */
  834. typedef struct adf_net_wcmd_frag_th{
  835. a_uint16_t threshold;
  836. a_uint16_t disabled;
  837. a_uint16_t fixed;
  838. }adf_net_wcmd_frag_th_t;
  839. /**
  840. * @brief ic_caps set/get/enable/disable info
  841. */
  842. typedef a_uint32_t adf_net_wcmd_ic_caps_t;
  843. /**
  844. * @brief iv_opmode set/get/enable/disable info
  845. */
  846. typedef a_uint32_t adf_net_wcmd_iv_opmode_t;
  847. /**
  848. * @brief retries set/get/enable/disable info
  849. */
  850. typedef struct adf_net_wcmd_retries{
  851. a_int32_t value;/**< The value of the parameter itself */
  852. a_uint8_t disabled;/**< Disable the feature */
  853. a_uint16_t flags;/**< Various specifc flags (if any) */
  854. }adf_net_wcmd_retries_t;
  855. /**
  856. * @brief power set/get info
  857. */
  858. typedef struct adf_net_wcmd_power{
  859. a_int32_t value;/**< The value of the parameter itself */
  860. a_uint8_t disabled;/**< Disable the feature */
  861. adf_net_wcmd_pmflags_t flags;/**< Various specifc flags (if any) */
  862. a_int32_t fixed;/**< fixed */
  863. }adf_net_wcmd_power_t;
  864. /**
  865. * @brief txpower set/get/enable/disable info
  866. */
  867. typedef struct adf_net_wcmd_txpower{
  868. a_uint32_t txpower;
  869. a_uint8_t fixed;
  870. a_uint8_t disabled;
  871. adf_net_wcmd_txpow_flags_t flags;
  872. }adf_net_wcmd_txpower_t;
  873. /**
  874. * @brief tx-power-limit info
  875. */
  876. typedef a_uint32_t adf_net_wcmd_txpowlimit_t;
  877. /**
  878. * @brief Scan result data returned
  879. */
  880. typedef struct adf_net_wcmd_scan_result{
  881. a_uint16_t isr_len; /**< length (mult of 4) */
  882. a_uint16_t isr_freq; /**< MHz */
  883. a_uint32_t isr_flags; /**< channel flags */
  884. a_uint8_t isr_noise;
  885. a_uint8_t isr_rssi;
  886. a_uint8_t isr_intval; /**< beacon interval */
  887. a_uint16_t isr_capinfo; /**< capabilities */
  888. a_uint8_t isr_erp; /**< ERP element */
  889. a_uint8_t isr_bssid[ADF_NET_WCMD_ADDR_LEN];
  890. a_uint8_t isr_nrates;
  891. a_uint8_t isr_rates[ADF_NET_WCMD_RATE_MAXSIZE];
  892. a_uint8_t isr_ssid_len; /**< SSID length */
  893. a_uint8_t isr_ie_len; /**< IE length */
  894. a_uint8_t isr_pad[5];
  895. /* variable length SSID followed by IE data */
  896. } adf_net_wcmd_scan_result_t;
  897. /**
  898. * @brief scan request info
  899. */
  900. typedef struct adf_net_wcmd_scan{
  901. adf_net_wcmd_scan_result_t result[ADF_NET_WCMD_MAX_AP];
  902. a_uint32_t len;/*Valid entries*/
  903. }adf_net_wcmd_scan_t;
  904. /**
  905. * @brief waplist request info
  906. */
  907. typedef struct adf_net_wcmd_vaplist{
  908. a_uint8_t list[ADF_NET_WCMD_MAX_AP];
  909. a_uint32_t len;
  910. }adf_net_wcmd_vaplist_t;
  911. /**
  912. * @brief list of stations
  913. */
  914. typedef struct adf_net_wcmd_stainfo{
  915. a_uint8_t list[ADF_NET_WCMD_MAX_AP];
  916. a_uint32_t len;
  917. } adf_net_wcmd_stainfo_t;
  918. /**
  919. * @brief ath caps info
  920. */
  921. typedef struct adf_net_wcmd_devcap{
  922. a_int32_t cap;
  923. a_int32_t setting;
  924. }adf_net_wcmd_devcap_t;
  925. /**
  926. * @brief station stats
  927. */
  928. typedef struct adf_net_wcmd_stastats{
  929. adf_net_ethaddr_t mac;/**< MAC of the station*/
  930. struct ns_data{
  931. a_uint32_t ns_rx_data;/**< rx data frames */
  932. a_uint32_t ns_rx_mgmt;/**< rx management frames */
  933. a_uint32_t ns_rx_ctrl;/**< rx control frames */
  934. a_uint32_t ns_rx_ucast;/**< rx unicast frames */
  935. a_uint32_t ns_rx_mcast;/**< rx multi/broadcast frames */
  936. a_uint64_t ns_rx_bytes;/**< rx data count (bytes) */
  937. a_uint64_t ns_rx_beacons;/**< rx beacon frames */
  938. a_uint32_t ns_rx_proberesp;/**< rx probe response frames */
  939. a_uint32_t ns_rx_dup;/**< rx discard 'cuz dup */
  940. a_uint32_t ns_rx_noprivacy;/**< rx w/ wep but privacy off */
  941. a_uint32_t ns_rx_wepfail;/**< rx wep processing failed */
  942. a_uint32_t ns_rx_demicfail;/**< rx demic failed */
  943. a_uint32_t ns_rx_decap;/**< rx decapsulation failed */
  944. a_uint32_t ns_rx_defrag;/**< rx defragmentation failed */
  945. a_uint32_t ns_rx_disassoc;/**< rx disassociation */
  946. a_uint32_t ns_rx_deauth;/**< rx deauthentication */
  947. a_uint32_t ns_rx_action;/**< rx action */
  948. a_uint32_t ns_rx_decryptcrc;/**< rx decrypt failed on crc */
  949. a_uint32_t ns_rx_unauth;/**< rx on unauthorized port */
  950. a_uint32_t ns_rx_unencrypted;/**< rx unecrypted w/ privacy */
  951. a_uint32_t ns_tx_data;/**< tx data frames */
  952. a_uint32_t ns_tx_mgmt;/**< tx management frames */
  953. a_uint32_t ns_tx_ucast;/**< tx unicast frames */
  954. a_uint32_t ns_tx_mcast;/**< tx multi/broadcast frames */
  955. a_uint64_t ns_tx_bytes;/**< tx data count (bytes) */
  956. a_uint32_t ns_tx_probereq;/**< tx probe request frames */
  957. a_uint32_t ns_tx_uapsd;/**< tx on uapsd queue */
  958. a_uint32_t ns_tx_novlantag;/**< tx discard 'cuz no tag */
  959. a_uint32_t ns_tx_vlanmismatch;/**< tx discard 'cuz bad tag */
  960. a_uint32_t ns_tx_eosplost;/**< uapsd EOSP retried out */
  961. a_uint32_t ns_ps_discard;/**< ps discard 'cuz of age */
  962. a_uint32_t ns_uapsd_triggers;/**< uapsd triggers */
  963. /* MIB-related state */
  964. a_uint32_t ns_tx_assoc;/**< [re]associations */
  965. a_uint32_t ns_tx_assoc_fail;/**< [re]association failures */
  966. a_uint32_t ns_tx_auth;/**< [re]authentications */
  967. a_uint32_t ns_tx_auth_fail;/**< [re]authentication failures*/
  968. a_uint32_t ns_tx_deauth;/**< deauthentications */
  969. a_uint32_t ns_tx_deauth_code;/**< last deauth reason */
  970. a_uint32_t ns_tx_disassoc;/**< disassociations */
  971. a_uint32_t ns_tx_disassoc_code;/**< last disassociation reason */
  972. a_uint32_t ns_psq_drops;/**< power save queue drops */
  973. }data;
  974. } adf_net_wcmd_stastats_t;
  975. /**
  976. * @brief 11n tx/rx stats
  977. */
  978. typedef struct adf_net_wcmd_11n_stats {
  979. a_uint32_t tx_pkts;/**< total tx data packets */
  980. a_uint32_t tx_checks;/**< tx drops in wrong state */
  981. a_uint32_t tx_drops;/**< tx drops due to qdepth limit */
  982. a_uint32_t tx_minqdepth;/**< tx when h/w queue depth is low */
  983. a_uint32_t tx_queue;/**< tx pkts when h/w queue is busy */
  984. a_uint32_t tx_comps;/**< tx completions */
  985. a_uint32_t tx_stopfiltered;/**< tx pkts filtered for requeueing */
  986. a_uint32_t tx_qnull;/**< txq empty occurences */
  987. a_uint32_t tx_noskbs;/**< tx no skbs for encapsulations */
  988. a_uint32_t tx_nobufs;/**< tx no descriptors */
  989. a_uint32_t tx_badsetups;/**< tx key setup failures */
  990. a_uint32_t tx_normnobufs;/**< tx no desc for legacy packets */
  991. a_uint32_t tx_schednone;/**< tx schedule pkt queue empty */
  992. a_uint32_t tx_bars;/**< tx bars sent */
  993. a_uint32_t txbar_xretry;/**< tx bars excessively retried */
  994. a_uint32_t txbar_compretries;/**< tx bars retried */
  995. a_uint32_t txbar_errlast;/**< tx bars last frame failed */
  996. a_uint32_t tx_compunaggr;/**< tx unaggregated frame completions */
  997. a_uint32_t txunaggr_xretry;/**< tx unaggregated excessive retries */
  998. a_uint32_t tx_compaggr;/**< tx aggregated completions */
  999. a_uint32_t tx_bawadv;/**< tx block ack window advanced */
  1000. a_uint32_t tx_bawretries;/**< tx block ack window retries */
  1001. a_uint32_t tx_bawnorm;/**< tx block ack window additions */
  1002. a_uint32_t tx_bawupdates;/**< tx block ack window updates */
  1003. a_uint32_t tx_bawupdtadv;/**< tx block ack window advances */
  1004. a_uint32_t tx_retries;/**< tx retries of sub frames */
  1005. a_uint32_t tx_xretries;/**< tx excessive retries of aggregates */
  1006. a_uint32_t txaggr_noskbs;/**< tx no skbs for aggr encapsualtion */
  1007. a_uint32_t txaggr_nobufs;/**< tx no desc for aggr */
  1008. a_uint32_t txaggr_badkeys;/**< tx enc key setup failures */
  1009. a_uint32_t txaggr_schedwindow;/**< tx no frame scheduled: baw limited */
  1010. a_uint32_t txaggr_single;/**< tx frames not aggregated */
  1011. a_uint32_t txaggr_compgood;/**< tx aggr good completions */
  1012. a_uint32_t txaggr_compxretry;/**< tx aggr excessive retries */
  1013. a_uint32_t txaggr_compretries;/**< tx aggr unacked subframes */
  1014. a_uint32_t txunaggr_compretries;/**< tx non-aggr unacked subframes */
  1015. a_uint32_t txaggr_prepends;/**< tx aggr old frames requeued */
  1016. a_uint32_t txaggr_filtered;/**< filtered aggr packet */
  1017. a_uint32_t txaggr_fifo;/**< fifo underrun of aggregate */
  1018. a_uint32_t txaggr_xtxop;/**< txop exceeded for an aggregate */
  1019. a_uint32_t txaggr_desc_cfgerr;/**< aggregate descriptor config error */
  1020. a_uint32_t txaggr_data_urun;/**< data underrun for an aggregate */
  1021. a_uint32_t txaggr_delim_urun;/**< delimiter underrun for an aggregate */
  1022. a_uint32_t txaggr_errlast;/**< tx aggr: last sub-frame failed */
  1023. a_uint32_t txunaggr_errlast;/**< tx non-aggr: last frame failed */
  1024. a_uint32_t txaggr_longretries;/**< tx aggr h/w long retries */
  1025. a_uint32_t txaggr_shortretries;/**< tx aggr h/w short retries */
  1026. a_uint32_t txaggr_timer_exp;/**< tx aggr : tx timer expired */
  1027. a_uint32_t txaggr_babug;/**< tx aggr : BA bug */
  1028. a_uint32_t rx_pkts;/**< rx pkts */
  1029. a_uint32_t rx_aggr;/**< rx aggregated packets */
  1030. a_uint32_t rx_aggrbadver;/**< rx pkts with bad version */
  1031. a_uint32_t rx_bars;/**< rx bars */
  1032. a_uint32_t rx_nonqos;/**< rx non qos-data frames */
  1033. a_uint32_t rx_seqreset;/**< rx sequence resets */
  1034. a_uint32_t rx_oldseq;/**< rx old packets */
  1035. a_uint32_t rx_bareset;/**< rx block ack window reset */
  1036. a_uint32_t rx_baresetpkts;/**< rx pts indicated due to baw resets */
  1037. a_uint32_t rx_dup;/**< rx duplicate pkts */
  1038. a_uint32_t rx_baadvance;/**< rx block ack window advanced */
  1039. a_uint32_t rx_recvcomp;/**< rx pkt completions */
  1040. a_uint32_t rx_bardiscard;/**< rx bar discarded */
  1041. a_uint32_t rx_barcomps;/**< rx pkts unblocked on bar reception */
  1042. a_uint32_t rx_barrecvs;/**< rx pkt completions on bar reception */
  1043. a_uint32_t rx_skipped;/**< rx pkt sequences skipped on timeout */
  1044. a_uint32_t rx_comp_to;/**< rx indications due to timeout */
  1045. a_uint32_t wd_tx_active;/**< watchdog: tx is active */
  1046. a_uint32_t wd_tx_inactive;/**< watchdog: tx is not active */
  1047. a_uint32_t wd_tx_hung;/**< watchdog: tx is hung */
  1048. a_uint32_t wd_spurious;/**< watchdog: spurious tx hang */
  1049. a_uint32_t tx_requeue;/**< filter & requeue on 20/40 transitions */
  1050. a_uint32_t tx_drain_txq;/**< draining tx queue on error */
  1051. a_uint32_t tx_drain_tid;/**< draining tid buf queue on error */
  1052. a_uint32_t tx_drain_bufs;/**< buffers drained from pending tid queue */
  1053. a_uint32_t tx_tidpaused;/**< pausing tx on tid */
  1054. a_uint32_t tx_tidresumed;/**< resuming tx on tid */
  1055. a_uint32_t tx_unaggr_filtered;/**< unaggregated tx pkts filtered */
  1056. a_uint32_t tx_aggr_filtered;/**< aggregated tx pkts filtered */
  1057. a_uint32_t tx_filtered;/**< total sub-frames filtered */
  1058. a_uint32_t rx_rb_on;/**< total rb on-s */
  1059. a_uint32_t rx_rb_off;/**< total rb off-s */
  1060. } adf_net_wcmd_11n_stats_t;
  1061. /**
  1062. * @brief ampdu info
  1063. */
  1064. typedef struct adf_net_wcmd_ampdu_trc {
  1065. a_uint32_t tr_head;
  1066. a_uint32_t tr_tail;
  1067. struct trc_entry{
  1068. a_uint16_t tre_seqst;/**< starting sequence of aggr */
  1069. a_uint16_t tre_baseqst;/**< starting sequence of ba */
  1070. a_uint32_t tre_npkts;/**< packets in aggregate */
  1071. a_uint32_t tre_aggrlen;/**< aggregation length */
  1072. a_uint32_t tre_bamap0;/**< block ack bitmap word 0 */
  1073. a_uint32_t tre_bamap1;/**< block ack bitmap word 1 */
  1074. }tr_ents[ADF_NET_WCMD_NUM_TR_ENTS];
  1075. } adf_net_wcmd_ampdu_trc_t;
  1076. /**
  1077. * @brief phy stats info
  1078. */
  1079. typedef struct adf_net_wcmd_phystats{
  1080. a_uint32_t ast_watchdog;/**< device reset by watchdog */
  1081. a_uint32_t ast_hardware;/**< fatal hardware error interrupts */
  1082. a_uint32_t ast_bmiss;/**< beacon miss interrupts */
  1083. a_uint32_t ast_rxorn;/**< rx overrun interrupts */
  1084. a_uint32_t ast_rxeol;/**< rx eol interrupts */
  1085. a_uint32_t ast_txurn;/**< tx underrun interrupts */
  1086. a_uint32_t ast_txto;/**< tx timeout interrupts */
  1087. a_uint32_t ast_cst;/**< carrier sense timeout interrupts */
  1088. a_uint32_t ast_mib;/**< mib interrupts */
  1089. a_uint32_t ast_tx_packets;/**< packet sent on the interface */
  1090. a_uint32_t ast_tx_mgmt;/**< management frames transmitted */
  1091. a_uint32_t ast_tx_discard;/**< frames discarded prior to assoc */
  1092. a_uint32_t ast_tx_invalid;/**< frames discarded 'cuz device gone */
  1093. a_uint32_t ast_tx_qstop;/**< tx queue stopped 'cuz full */
  1094. a_uint32_t ast_tx_encap;/**< tx encapsulation failed */
  1095. a_uint32_t ast_tx_nonode;/**< no node*/
  1096. a_uint32_t ast_tx_nobuf;/**< no buf */
  1097. a_uint32_t ast_tx_nobufmgt;/**< no buffer (mgmt)*/
  1098. a_uint32_t ast_tx_xretries;/**< too many retries */
  1099. a_uint32_t ast_tx_fifoerr;/**< FIFO underrun */
  1100. a_uint32_t ast_tx_filtered;/**< xmit filtered */
  1101. a_uint32_t ast_tx_timer_exp;/**< tx timer expired */
  1102. a_uint32_t ast_tx_shortretry;/**< on-chip retries (short) */
  1103. a_uint32_t ast_tx_longretry;/**< tx on-chip retries (long) */
  1104. a_uint32_t ast_tx_badrate;/**< tx failed 'cuz bogus xmit rate */
  1105. a_uint32_t ast_tx_noack;/**< tx frames with no ack marked */
  1106. a_uint32_t ast_tx_rts;/**< tx frames with rts enabled */
  1107. a_uint32_t ast_tx_cts;/**< tx frames with cts enabled */
  1108. a_uint32_t ast_tx_shortpre;/**< tx frames with short preamble */
  1109. a_uint32_t ast_tx_altrate;/**< tx frames with alternate rate */
  1110. a_uint32_t ast_tx_protect;/**< tx frames with protection */
  1111. a_uint32_t ast_rx_orn;/**< rx failed 'cuz of desc overrun */
  1112. a_uint32_t ast_rx_crcerr;/**< rx failed 'cuz of bad CRC */
  1113. a_uint32_t ast_rx_fifoerr;/**< rx failed 'cuz of FIFO overrun */
  1114. a_uint32_t ast_rx_badcrypt;/**< rx failed 'cuz decryption */
  1115. a_uint32_t ast_rx_badmic;/**< rx failed 'cuz MIC failure */
  1116. a_uint32_t ast_rx_phyerr;/**< rx PHY error summary count */
  1117. a_uint32_t ast_rx_phy[64];/**< rx PHY error per-code counts */
  1118. a_uint32_t ast_rx_tooshort;/**< rx discarded 'cuz frame too short */
  1119. a_uint32_t ast_rx_toobig;/**< rx discarded 'cuz frame too large */
  1120. a_uint32_t ast_rx_nobuf;/**< rx setup failed 'cuz no skbuff */
  1121. a_uint32_t ast_rx_packets;/**< packet recv on the interface */
  1122. a_uint32_t ast_rx_mgt;/**< management frames received */
  1123. a_uint32_t ast_rx_ctl;/**< control frames received */
  1124. a_int8_t ast_tx_rssi_combined;/**< tx rssi of last ack [combined] */
  1125. a_int8_t ast_tx_rssi_ctl0;/**< tx rssi of last ack [ctl, chain 0] */
  1126. a_int8_t ast_tx_rssi_ctl1;/**< tx rssi of last ack [ctl, chain 1] */
  1127. a_int8_t ast_tx_rssi_ctl2;/**< tx rssi of last ack [ctl, chain 2] */
  1128. a_int8_t ast_tx_rssi_ext0;/**< tx rssi of last ack [ext, chain 0] */
  1129. a_int8_t ast_tx_rssi_ext1;/**< tx rssi of last ack [ext, chain 1] */
  1130. a_int8_t ast_tx_rssi_ext2;/**< tx rssi of last ack [ext, chain 2] */
  1131. a_int8_t ast_rx_rssi_combined;/**< rx rssi from histogram [combined]*/
  1132. a_int8_t ast_rx_rssi_ctl0;/**< rx rssi from histogram [ctl, chain 0] */
  1133. a_int8_t ast_rx_rssi_ctl1;/**< rx rssi from histogram [ctl, chain 1] */
  1134. a_int8_t ast_rx_rssi_ctl2;/**< rx rssi from histogram [ctl, chain 2] */
  1135. a_int8_t ast_rx_rssi_ext0;/**< rx rssi from histogram [ext, chain 0] */
  1136. a_int8_t ast_rx_rssi_ext1;/**< rx rssi from histogram [ext, chain 1] */
  1137. a_int8_t ast_rx_rssi_ext2;/**< rx rssi from histogram [ext, chain 2] */
  1138. a_uint32_t ast_be_xmit;/**< beacons transmitted */
  1139. a_uint32_t ast_be_nobuf;/**< no skbuff available for beacon */
  1140. a_uint32_t ast_per_cal;/**< periodic calibration calls */
  1141. a_uint32_t ast_per_calfail;/**< periodic calibration failed */
  1142. a_uint32_t ast_per_rfgain;/**< periodic calibration rfgain reset */
  1143. a_uint32_t ast_rate_calls;/**< rate control checks */
  1144. a_uint32_t ast_rate_raise;/**< rate control raised xmit rate */
  1145. a_uint32_t ast_rate_drop;/**< rate control dropped xmit rate */
  1146. a_uint32_t ast_ant_defswitch;/**< rx/default antenna switches */
  1147. a_uint32_t ast_ant_txswitch;/**< tx antenna switches */
  1148. a_uint32_t ast_ant_rx[8];/**< rx frames with antenna */
  1149. a_uint32_t ast_ant_tx[8];/**< tx frames with antenna */
  1150. a_uint32_t ast_suspend;/**< driver suspend calls */
  1151. a_uint32_t ast_resume;/**< driver resume calls */
  1152. a_uint32_t ast_shutdown;/**< driver shutdown calls */
  1153. a_uint32_t ast_init;/**< driver init calls */
  1154. a_uint32_t ast_stop;/**< driver stop calls */
  1155. a_uint32_t ast_reset;/**< driver resets */
  1156. a_uint32_t ast_nodealloc;/**< nodes allocated */
  1157. a_uint32_t ast_nodefree;/**< nodes deleted */
  1158. a_uint32_t ast_keyalloc;/**< keys allocated */
  1159. a_uint32_t ast_keydelete;/**< keys deleted */
  1160. a_uint32_t ast_bstuck;/**< beacon stuck */
  1161. a_uint32_t ast_draintxq;/**< drain tx queue */
  1162. a_uint32_t ast_stopdma;/**< stop tx queue dma */
  1163. a_uint32_t ast_stoprecv;/**< stop recv */
  1164. a_uint32_t ast_startrecv;/**< start recv */
  1165. a_uint32_t ast_flushrecv;/**< flush recv */
  1166. a_uint32_t ast_chanchange;/**< channel changes */
  1167. a_uint32_t ast_fastcc;/**< Number of fast channel changes */
  1168. a_uint32_t ast_fastcc_errs;/**< Number of failed fast channel changes */
  1169. a_uint32_t ast_chanset;/**< channel sets */
  1170. a_uint32_t ast_cwm_mac;/**< CWM - mac mode switch */
  1171. a_uint32_t ast_cwm_phy;/**< CWM - phy mode switch */
  1172. a_uint32_t ast_cwm_requeue;/**< CWM - requeue dest node packets */
  1173. a_uint32_t ast_rx_delim_pre_crcerr;/**< pre-delimit crc errors */
  1174. a_uint32_t ast_rx_delim_post_crcerr;/**< post-delimit crc errors */
  1175. a_uint32_t ast_rx_decrypt_busyerr;/**< decrypt busy errors */
  1176. adf_net_wcmd_11n_stats_t ast_11n;/**< 11n statistics */
  1177. adf_net_wcmd_ampdu_trc_t ast_trc;/**< ampdu trc */
  1178. } adf_net_wcmd_phystats_t;
  1179. /**
  1180. * @brief diag info
  1181. */
  1182. typedef struct adf_net_wcmd_diag{
  1183. a_int8_t ad_name[ADF_NET_WCMD_NAME_SIZE];/**< if name*/
  1184. a_uint16_t ad_id;
  1185. a_uint16_t ad_in_size;/**< pack to fit, yech */
  1186. a_uint8_t *ad_in_data;
  1187. a_uint8_t *ad_out_data;
  1188. a_uint32_t ad_out_size;
  1189. }adf_net_wcmd_diag_t;
  1190. /*
  1191. * Device phyerr ioctl info
  1192. */
  1193. typedef struct adf_net_wcmd_phyerr{
  1194. a_int8_t ad_name[ADF_NET_WCMD_NAME_SIZE];/**< if name, e.g. "ath0" */
  1195. a_uint16_t ad_id;
  1196. a_uint16_t ad_in_size; /**< pack to fit, yech */
  1197. a_uint8_t *ad_in_data;
  1198. a_uint8_t *ad_out_data;
  1199. a_uint32_t ad_out_size;
  1200. }adf_net_wcmd_phyerr_t;
  1201. /**
  1202. * @brief cwm-info
  1203. */
  1204. typedef struct adf_net_wcmd_cwminfo{
  1205. a_uint32_t ci_chwidth; /**< channel width */
  1206. a_uint32_t ci_macmode; /**< MAC mode */
  1207. a_uint32_t ci_phymode; /**< Phy mode */
  1208. a_uint32_t ci_extbusyper; /**< extension busy (percent) */
  1209. } adf_net_wcmd_cwminfo_t;
  1210. /**
  1211. * @brief cwm-dbg
  1212. */
  1213. typedef struct adf_net_wcmd_cwmdbg{
  1214. adf_net_wcmd_cwm_cmd_t dc_cmd;/**< dbg commands*/
  1215. adf_net_wcmd_cwm_event_t dc_arg;/**< events*/
  1216. } adf_net_wcmd_cwmdbg_t;
  1217. /**
  1218. * @brief device cwm info
  1219. */
  1220. typedef struct adf_net_wcmd_cwm{
  1221. adf_net_wcmd_cwmtype_t type;
  1222. union{
  1223. adf_net_wcmd_cwmdbg_t dbg;
  1224. adf_net_wcmd_cwminfo_t info;
  1225. }cwm;
  1226. }adf_net_wcmd_cwm_t;
  1227. /**
  1228. * @brief Helpers to access the CWM structures
  1229. */
  1230. #define cwm_dbg cwm.dbg
  1231. #define cwm_info cwm.info
  1232. /**
  1233. * @brief eth tool info
  1234. */
  1235. typedef struct adf_net_wcmd_ethtool{
  1236. a_uint32_t cmd;/*XXX:???*/
  1237. a_int8_t driver[ADF_NET_WCMD_DRIVSIZ];/**< driver short name */
  1238. a_int8_t version[ADF_NET_WCMD_VERSIZ];/**< driver ver string */
  1239. a_int8_t fw_version[ADF_NET_WCMD_FIRMSIZ];/**< firmware ver string*/
  1240. a_int8_t bus_info[ADF_NET_WCMD_BUSINFO_LEN];/**< Bus info */
  1241. a_int8_t reserved1[32];
  1242. a_int8_t reserved2[16];
  1243. a_uint32_t n_stats;/**< number of u64's from ETHTOOL_GSTATS */
  1244. a_uint32_t testinfo_len;
  1245. a_uint32_t eedump_len;/**< Size of data from EEPROM(bytes) */
  1246. a_uint32_t regdump_len;/**< Size of data from REG(bytes) */
  1247. }adf_net_wcmd_ethtool_t ;
  1248. typedef struct adf_net_wcmd_ethtool_info{
  1249. adf_net_wcmd_ethtool_cmd_t cmd;/*XXX:???*/
  1250. adf_net_wcmd_ethtool_t drv;
  1251. }adf_net_wcmd_ethtool_info_t;
  1252. /**
  1253. * @brief vap create flag info
  1254. */
  1255. typedef enum adf_net_wcmd_vapcreate_flags{
  1256. ADF_NET_WCMD_CLONE_BSSID=0x1,/**< allocate unique mac/bssid */
  1257. ADF_NET_WCMD_NO_STABEACONS/**< Do not setup the sta beacon timers*/
  1258. }adf_net_wcmd_vapcreate_flags_t;
  1259. /**
  1260. * @brief VAP info structure used during VAPCREATE
  1261. */
  1262. typedef struct adf_net_wcmd_vapinfo{
  1263. a_uint8_t icp_name[ADF_NET_WCMD_NAME_SIZE];
  1264. adf_net_wcmd_opmode_t icp_opmode;/**< operating mode */
  1265. adf_net_wcmd_vapcreate_flags_t icp_flags;
  1266. }adf_net_wcmd_vapinfo_t;
  1267. /**
  1268. * @brief ath stats info
  1269. */
  1270. typedef struct adf_net_wcmd_devstats{
  1271. a_uint64_t rx_packets;/**< total packets received */
  1272. a_uint64_t tx_packets;/**< total packets transmitted */
  1273. a_uint64_t rx_bytes;/**< total bytes received */
  1274. a_uint64_t tx_bytes;/**< total bytes transmitted */
  1275. a_uint64_t rx_errors;/**< bad packets received */
  1276. a_uint64_t tx_errors;/**< packet transmit problems */
  1277. a_uint64_t rx_dropped;/**< no space in linux buffers */
  1278. a_uint64_t tx_dropped;/**< no space available in linux */
  1279. a_uint64_t multicast;/**< multicast packets received */
  1280. a_uint64_t collisions;
  1281. /* detailed rx_errors: */
  1282. a_uint64_t rx_length_errors;
  1283. a_uint64_t rx_over_errors;/**< receiver ring buff overflow */
  1284. a_uint64_t rx_crc_errors;/**< recved pkt with crc error */
  1285. a_uint64_t rx_frame_errors;/**< recv'd frame alignment error */
  1286. a_uint64_t rx_fifo_errors;/**< recv'r fifo overrun */
  1287. a_uint64_t rx_missed_errors;/**< receiver missed packet */
  1288. /* detailed tx_errors */
  1289. a_uint64_t tx_aborted_errors;
  1290. a_uint64_t tx_carrier_errors;
  1291. a_uint64_t tx_fifo_errors;
  1292. a_uint64_t tx_heartbeat_errors;
  1293. a_uint64_t tx_window_errors;
  1294. /* for cslip etc */
  1295. a_uint64_t rx_compressed;
  1296. a_uint64_t tx_compressed;
  1297. }adf_net_wcmd_devstats_t;
  1298. /**
  1299. * @brief mtu set/get/enable/disable info
  1300. */
  1301. typedef a_uint32_t adf_net_wcmd_mtu_t;
  1302. /**
  1303. * @brief turbo
  1304. */
  1305. typedef a_uint32_t adf_net_wcmd_turbo_t;
  1306. typedef union adf_net_wcmd_data{
  1307. adf_net_wcmd_vapname_t vapname;/*XXX: ???*/
  1308. adf_net_wcmd_bssid_t bssid;
  1309. adf_net_wcmd_nickname_t nickname;
  1310. adf_net_wcmd_ssid_t essid;
  1311. adf_net_wcmd_rts_th_t rts;/*GET_RTS_THRES & SET_RTS_THRES*/
  1312. adf_net_wcmd_frag_th_t frag;/*GET_FRAG & SET_FRAG*/
  1313. adf_net_wcmd_ic_caps_t ic_caps;
  1314. adf_net_wcmd_iv_opmode_t iv_opmode;
  1315. adf_net_wcmd_freq_t freq;
  1316. adf_net_wcmd_retries_t retries;
  1317. adf_net_wcmd_txpower_t txpower;
  1318. adf_net_wcmd_txpowlimit_t txpowlimit;
  1319. adf_net_wcmd_vaplist_t vaplist;
  1320. adf_net_wcmd_phymode_t phymode;
  1321. adf_net_wcmd_vapmode_t vapmode;/*GET_OPMODE & SET_OPMODE*/
  1322. adf_net_wcmd_devcap_t devcap;
  1323. adf_net_wcmd_turbo_t turbo;
  1324. adf_net_wcmd_param_t param;
  1325. adf_net_wcmd_optie_t optie;
  1326. adf_net_wcmd_appie_t appie;
  1327. adf_net_wcmd_filter_type_t filter;
  1328. adf_net_wcmd_addba_t addba;
  1329. adf_net_wcmd_delba_t delba;
  1330. adf_net_wcmd_addba_status_t addba_status;
  1331. adf_net_wcmd_addba_resp_t addba_resp;
  1332. adf_net_wcmd_keyinfo_t key;
  1333. adf_net_wcmd_mlme_t mlme;
  1334. adf_net_wcmd_chanlist_t chanlist;
  1335. adf_net_wcmd_chaninfo_t chaninfo;
  1336. adf_net_wcmd_wmmparaminfo_t wmmparam;
  1337. adf_net_wcmd_wpaie_t wpaie;
  1338. adf_net_wcmd_wscie_t wscie;
  1339. adf_net_wcmd_power_t power;
  1340. adf_net_wcmd_stainfo_t station;
  1341. adf_net_wcmd_diag_t dev_diag;
  1342. adf_net_wcmd_phyerr_t phyerr;
  1343. adf_net_wcmd_cwm_t cwm;
  1344. adf_net_wcmd_ethtool_info_t ethtool;
  1345. adf_net_wcmd_vapinfo_t vap_info;/**< during vapcreate*/
  1346. adf_net_wcmd_mtu_t mtu;
  1347. adf_net_ethaddr_t mac;/*MAC addr of VAP or Dev */
  1348. adf_net_wcmd_scan_t *scan;
  1349. adf_net_wcmd_vapparam_range_t *range;
  1350. adf_net_wcmd_stastats_t *stats_sta;
  1351. adf_net_wcmd_vapstats_t *stats_vap;/*XXX: name*/
  1352. adf_net_wcmd_phystats_t *stats_phy;
  1353. adf_net_wcmd_devstats_t *stats_dev;
  1354. a_uint32_t datum;/*for sysctl*/
  1355. } adf_net_wcmd_data_t;
  1356. /**
  1357. * @brief ioctl structure to configure the wireless interface.
  1358. */
  1359. typedef struct adf_net_wcmd{
  1360. char if_name[ADF_NET_WCMD_NAME_SIZE];/**< Iface name*/
  1361. adf_net_wcmd_type_t type; /**< Type of wcmd */
  1362. adf_net_wcmd_data_t data; /**< Data */
  1363. } adf_net_wcmd_t;
  1364. /**
  1365. * @brief helper macros
  1366. */
  1367. #define d_vapname data.vapname
  1368. #define d_bssid data.bssid
  1369. #define d_nickname data.nickname
  1370. #define d_essid data.essid
  1371. #define d_rts data.rts
  1372. #define d_frag data.frag
  1373. #define d_iccaps data.ic_caps
  1374. #define d_ivopmode data.iv_opmode
  1375. #define d_freq data.freq
  1376. #define d_retries data.retries
  1377. #define d_txpower data.txpower
  1378. #define d_txpowlimit data.txpowlimit
  1379. #define d_vaplist data.vaplist
  1380. #define d_scan data.scan
  1381. #define d_phymode data.phymode
  1382. #define d_opmode data.opmode
  1383. #define d_devcap data.devcap
  1384. #define d_turbo data.turbo
  1385. #define d_param data.param
  1386. #define d_optie data.optie
  1387. #define d_appie data.appie
  1388. #define d_filter data.filter
  1389. #define d_addba data.addba
  1390. #define d_delba data.delba
  1391. #define d_addba_status data.addba_status
  1392. #define d_addba_resp data.addba_resp
  1393. #define d_key data.key
  1394. #define d_mlme data.mlme
  1395. #define d_chanlist data.chanlist
  1396. #define d_chaninfo data.chaninfo
  1397. #define d_wmmparam data.wmmparam
  1398. #define d_wpaie data.wpaie
  1399. #define d_wscie data.wscie
  1400. #define d_power data.power
  1401. #define d_station data.station
  1402. #define d_range data.range
  1403. #define d_stastats data.stats_sta
  1404. #define d_vapstats data.stats_vap
  1405. #define d_devstats data.stats_dev
  1406. #define d_phystats data.stats_phy
  1407. #define d_daig data.dev_diag
  1408. #define d_phyerr data.phyerr
  1409. #define d_cwm data.cwm
  1410. #define d_ethtool data.ethtool
  1411. #define d_vapinfo data.vap_info
  1412. #define d_mtu data.mtu
  1413. #define d_mac data.mac
  1414. #define d_datum data.datum
  1415. typedef struct adf_net_wcmd_chansw{
  1416. a_uint8_t chan;
  1417. a_uint8_t ttbt;
  1418. }adf_net_wcmd_chansw_t;
  1419. /**
  1420. * ***************************Unresoloved*******************
  1421. */
  1422. // typedef struct adf_net_wcmd_chansw_info{
  1423. // a_uint8_t chan;
  1424. // a_uint8_t ttbt;
  1425. // }adf_net_wcmd_chansw_info_t;
  1426. //
  1427. /**
  1428. * @brief ath mac info
  1429. */
  1430. // typedef struct {
  1431. // a_uint16_t sa_family;/**< address family, AF_xxx*/
  1432. // a_int8_t sa_data[ADF_NET_WCMD_ADDR_LEN];/**< 14 bytes address */
  1433. // }adf_net_wcmd_ath_mac_info_t;
  1434. #endif