README 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. ================================================================================
  2. README for USB8388
  3. (c) Copyright © 2003-2006, Marvell International Ltd.
  4. All Rights Reserved
  5. This software file (the "File") is distributed by Marvell International
  6. Ltd. under the terms of the GNU General Public License Version 2, June 1991
  7. (the "License"). You may use, redistribute and/or modify this File in
  8. accordance with the terms and conditions of the License, a copy of which
  9. is available along with the File in the license.txt file or by writing to
  10. the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  11. 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
  12. THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
  13. IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
  14. ARE EXPRESSLY DISCLAIMED. The License provides additional details about
  15. this warranty disclaimer.
  16. ================================================================================
  17. =====================
  18. DRIVER LOADING
  19. =====================
  20. o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
  21. o. Load driver by using the following command:
  22. insmod usb8388.ko [fw_name=usb8388.bin]
  23. =====================
  24. IWPRIV COMMAND
  25. =====================
  26. NAME
  27. This manual describes the usage of private commands used in Marvell WLAN
  28. Linux Driver. All the commands available in Wlanconfig will not be available
  29. in the iwpriv.
  30. SYNOPSIS
  31. iwpriv <ethX> <command> [sub-command] ...
  32. iwpriv ethX version
  33. iwpriv ethX scantype [sub-command]
  34. iwpriv ethX getSNR <n>
  35. iwpriv ethX getNF <n>
  36. iwpriv ethX getRSSI <n>
  37. iwpriv ethX setrxant <n>
  38. iwpriv ethX getrxant
  39. iwpriv ethX settxant <n>
  40. iwpriv ethX gettxant
  41. iwpriv ethX authalgs <n>
  42. iwpriv ethX pre-TBTT <n>
  43. iwpriv ethX 8021xauthalgs <n>
  44. iwpriv ethX encryptionmode <n>
  45. iwpriv ethX setregioncode <n>
  46. iwpriv ethX getregioncode
  47. iwpriv ethX setbcnavg <n>
  48. iwpriv ethX getbcnavg
  49. iwpriv ethX setdataavg <n>
  50. iwpriv ethX setlisteninter <n>
  51. iwpriv ethX getlisteninter
  52. iwpriv ethX setmultipledtim <n>
  53. iwpriv ethX getmultipledtim
  54. iwpriv ethX atimwindow <n>
  55. iwpriv ethX deauth
  56. iwpriv ethX adhocstop
  57. iwpriv ethX radioon
  58. iwpriv ethX radiooff
  59. iwpriv ethX reasso-on
  60. iwpriv ethX reasso-off
  61. iwpriv ethX scanmode [sub-command]
  62. iwpriv ethX setwpaie <n>
  63. iwpriv ethX wlanidle-off
  64. iwpriv ethX wlanidle-on
  65. iwpriv ethX getcis
  66. iwpriv ethX getlog
  67. iwpriv ethX getadhocstatus
  68. iwpriv ethX adhocgrate <n>
  69. Version 4 Command:
  70. iwpriv ethX inactvityto <n>
  71. iwpriv ethX sleeppd <n>
  72. iwpriv ethX enable11d <n>
  73. iwpriv ethX tpccfg <n>
  74. iwpriv ethX powercfg <n>
  75. iwpriv ethX setafc <n>
  76. iwpriv ethX getafc
  77. Version 5 Command:
  78. iwpriv ethX ledgpio <n>
  79. iwpriv ethX scanprobes <n>
  80. iwpriv ethX lolisteninter <n>
  81. iwpriv ethX rateadapt <n> <m>
  82. iwpriv ethX txcontrol <n>
  83. iwpriv ethX psnullinterval <n>
  84. iwpriv ethX prescan <n>
  85. iwpriv ethX getrxinfo
  86. iwpriv ethX gettxrate
  87. iwpriv ethX beaconinterval
  88. BT Commands:
  89. The blinding table (BT) contains a list of mac addresses that should be
  90. ignored by the firmware. It is primarily used for debugging and
  91. testing networks. It can be edited and inspected with the following
  92. commands:
  93. iwpriv ethX bt_reset
  94. iwpriv ethX bt_add <mac_address>
  95. iwpriv ethX bt_del <mac_address>
  96. iwpriv ethX bt_list <id>
  97. FWT Commands:
  98. The forwarding table (FWT) is a feature used to manage mesh network
  99. routing in the firmware. The FWT is essentially a routing table that
  100. associates a destination mac address (da) with a next hop receiver
  101. address (ra). The FWT can be inspected and edited with the following
  102. iwpriv commands, which are described in greater detail below.
  103. Eventually, the table will be automatically maintained by a custom
  104. routing protocol.
  105. NOTE: FWT commands replace the previous DFT commands. What were the DFT
  106. commands?, you might ask. They were an earlier API to the firmware that
  107. implemented a simple MAC-layer forwarding mechanism. In the unlikely
  108. event that you were using these commands, you must migrate to the new
  109. FWT commands which can be used to achieve the same functionality.
  110. iwpriv ethX fwt_add [parameters]
  111. iwpriv ethX fwt_del [parameters]
  112. iwpriv ethX fwt_lookup [parameters]
  113. iwpriv ethX fwt_list [parameters]
  114. iwpriv ethX fwt_list_route [parameters]
  115. iwpriv ethX fwt_list_neigh [parameters]
  116. iwpriv ethX fwt_reset [parameters]
  117. iwpriv ethX fwt_cleanup
  118. iwpriv ethX fwt_time
  119. MESH Commands:
  120. The MESH commands are used to configure various features of the mesh
  121. routing protocol. The following commands are supported:
  122. iwpriv ethX mesh_get_ttl
  123. iwpriv ethX mesh_set_ttl ttl
  124. DESCRIPTION
  125. Those commands are used to send additional commands to the Marvell WLAN
  126. card via the Linux device driver.
  127. The ethX parameter specifies the network device that is to be used to
  128. perform this command on. it could be eth0, eth1 etc.
  129. version
  130. This is used to get the current version of the driver and the firmware.
  131. scantype
  132. This command is used to set the scan type to be used by the driver in
  133. the scan command. This setting will not be used while performing a scan
  134. for a specific SSID, as it is always done with scan type being active.
  135. where the sub-commands are: -
  136. active -- to set the scan type to active
  137. passive -- to set the scan type to passive
  138. get -- to get the scan type set in the driver
  139. getSNR
  140. This command gets the average and non average value of Signal to Noise
  141. Ratio of Beacon and Data.
  142. where value is:-
  143. 0 -- Beacon non-average.
  144. 1 -- Beacon average.
  145. 2 -- Data non-average.
  146. 3 -- Data average.
  147. If no value is given, all four values are returned in the order mentioned
  148. above.
  149. Note: This command is available only when STA is connected.
  150. getRSSI
  151. This command gets the average and non average value os Receive Signal
  152. Strength of Beacon and Data.
  153. where value is:-
  154. 0 -- Beacon non-average.
  155. 1 -- Beacon average.
  156. 2 -- Data non-average.
  157. 3 -- Data average.
  158. Note: This command is available only when STA is connected.
  159. getNF
  160. This command gets the average and non average value of Noise Floor of
  161. Beacon and Data.
  162. where value is:-
  163. 0 -- Beacon non-average.
  164. 1 -- Beacon average.
  165. 2 -- Data non-average.
  166. 3 -- Data average.
  167. Note: This command is available only when STA is connected.
  168. setrxant
  169. This command is used to set the mode for Rx antenna.
  170. The options that can be sent are:-
  171. 1 -- Antenna 1.
  172. 2 -- Antenna 2.
  173. 0xFFFF -- Diversity.
  174. Usage:
  175. iwpriv ethX setrxant 0x01: select Antenna 1.
  176. getrxant
  177. This command is used to get the mode for Rx antenna.
  178. settxant
  179. This command is used to set the mode for Tx antenna.
  180. The options that can be sent are:-
  181. 1 -- Antenna 1.
  182. 2 -- Antenna 2.
  183. 0xFFFF -- Diversity.
  184. Usage:
  185. iwpriv ethX settxant 0x01: select Antenna 1.
  186. gettxant
  187. This command is used to get the mode for Tx antenna.
  188. authalgs
  189. This command is used by the WPA supplicant to set the authentication
  190. algorithms in the station.
  191. 8021xauthalgs
  192. This command is used by the WPA supplicant to set the 8021.x authentication algorithm type
  193. station.
  194. where values can be:-
  195. 1 -- None
  196. 2 -- LEAP
  197. 4 -- TLS
  198. 8 -- TTLs
  199. 16 -- MD5
  200. encryptionmode
  201. This command is used by the WPA supplicant to set the encryption algorithm.
  202. where values can be:-
  203. 0 -- NONE
  204. 1 -- WEP40
  205. 2 -- TKIP
  206. 3 -- CCMP
  207. 4 -- WEP104
  208. pre-TBTT
  209. This command is used to set pre-TBTT time period where value is in microseconds.
  210. setregioncode
  211. This command is used to set the region code in the station.
  212. where value is 'region code' for various regions like
  213. USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ...
  214. Usage:
  215. iwpriv ethX setregioncode 0x10: set region code to USA (0x10).
  216. getregioncode
  217. This command is used to get the region code information set in the
  218. station.
  219. setbcnavg
  220. Set the weighting factor for calculating RSSI.
  221. getbcnavg
  222. Get weighting factor for calculating RSSI.
  223. setdataavg
  224. Set the weighting factor for calculating SNR.
  225. setlisteninter
  226. This command is used to set the listen interval in the
  227. station.
  228. where the value ranges between 1 - 255
  229. getlisteninter
  230. This command is used to get the listen interval value set in the
  231. station.
  232. setmultipledtim
  233. This command is used to set the multiple dtim value in the
  234. station.
  235. where the value is 1,2,3,4,5,0xfffe
  236. 0xfffe means the firmware will use listen interval in association
  237. command for waking up
  238. getmultipledtim
  239. This command is used to get the multiple dtim value set in the station.
  240. atimwindow
  241. This command is used to set the atim value in the
  242. station.
  243. where the value ranges between 0 - 50
  244. deauth
  245. This command is used to send the de-authentication to the AP with which
  246. the station is associated. This command is valid only when
  247. station is in Infrastructure mode.
  248. Note: This command is available only when STA is connected.
  249. adhocstop
  250. This command is used to stop beacon transmission from the station and
  251. go into idle state in ad-hoc mode.
  252. Note: This command is available only when STA is connected.
  253. radioon
  254. This command is used to turn on the RF antenna.
  255. radiooff
  256. This command is sued to turn off the RF antenna.
  257. scanmode
  258. This command is used to set the station to scan for either IBSS
  259. networks or BSS networks or both BSS and IBSS networks. This
  260. command can be used with sub commands,
  261. where the value for
  262. bss -- Scan All the BSS networks.
  263. ibss -- Scan All the IBSS networks.
  264. any -- Scan both BSS and IBSS networks.
  265. setwpaie
  266. This command is used by WPA supplicant to send the WPA-IE to the driver.
  267. wlanidle-off
  268. This command is used to get into idle state.
  269. Note: This command is available only when STA is connected.
  270. wlanidle-on
  271. This command is used to get off the idle state.
  272. Note: This command is available only when STA is connected.
  273. getlog
  274. This command is used to get the 802.11 statistics available in the
  275. station.
  276. Note: This command is available only when STA is connected.
  277. getadhocstatus
  278. This command is used to get the ad-hoc Network Status.
  279. The various status codes are:
  280. AdhocStarted
  281. AdhocJoined
  282. AdhocIdle
  283. InfraMode
  284. AutoUnknownMode
  285. Note: This command is available only when STA is connected.
  286. adhocgrate
  287. This command is used to enable(1) g_rate, Disable(0) g_rate
  288. and request(2) the status which g_rate is disabled/enabled,
  289. for Ad-hoc creator.
  290. where value is:-
  291. 0 -- Disabled
  292. 1 -- Enabled
  293. 2 -- Get
  294. ledgpio
  295. This command is used to set/get LEDs.
  296. iwpriv ethX ledgpio <LEDs>
  297. will set the corresponding LED for the GPIO Line.
  298. iwpriv ethX ledgpio
  299. will give u which LEDs are Enabled.
  300. Usage:
  301. iwpriv eth1 ledgpio 1 0 2 1 3 4
  302. will enable
  303. LED 1 -> GPIO 0
  304. LED 2 -> GPIO 1
  305. LED 3 -> GPIO 4
  306. iwpriv eth1 ledgpio
  307. shows LED information in the format as mentioned above.
  308. Note: LED0 is invalid
  309. Note: Maximum Number of LEDs are 16.
  310. inactivityto
  311. This command is used by the host to set/get the inactivity timeout value,
  312. which specifies when WLAN device is put to sleep.
  313. Usage:
  314. iwpriv ethX inactivityto [<timeout>]
  315. where the parameter are:
  316. timeout: timeout value in milliseconds.
  317. Example:
  318. iwpriv eth1 inactivityto
  319. "get the timeout value"
  320. iwpriv eth1 inactivityto X
  321. "set timeout value to X ms"
  322. sleeppd
  323. This command is used to configure the sleep period of the WLAN device.
  324. Usage:
  325. iwpriv ethX sleeppd [<sleep period>]
  326. where the parameter are:
  327. Period: sleep period in milliseconds. Range 10~60.
  328. Example:
  329. iwpriv eth1 sleeppd 10
  330. "set period as 10 ms"
  331. iwpriv eth1 sleeppd
  332. "get the sleep period configuration"
  333. enable11d
  334. This command is used to control 11d
  335. where value is:-
  336. 1 -- Enabled
  337. 0 -- Disabled
  338. 2 -- Get
  339. tpccfg
  340. Enables or disables automatic transmit power control.
  341. The first parameter turns this feature on (1) or off (0). When turning
  342. on, the user must also supply four more parameters in the following
  343. order:
  344. -UseSNR (Use SNR (in addition to PER) for TPC algorithm),
  345. -P0 (P0 power level for TPC),
  346. -P1 (P1 power level for TPC),
  347. -P2 (P2 power level for TPC).
  348. Usage:
  349. iwpriv ethX tpccfg: Get current configuration
  350. iwpriv ethX tpccfg 0: disable auto TPC
  351. iwpriv ethX tpccfg 0x01 0x00 0x05 0x0a 0x0d: enable auto TPC; do not use SNR;
  352. P0=0x05; P1=0x0a; P2=0x0d;
  353. iwpriv ethX tpccfg 0x01 0x01 0x05 0x0a 0x0d: enable auto TPC; use SNR;
  354. P0=0x05; P1=0x0a; P2=0x0d.
  355. powercfg
  356. Enables or disables power adaptation.
  357. The first parameter turns this feature on (1) or off (0). When turning
  358. on, the user must also supply three more parameters in the following
  359. order:
  360. -P0 (P0 power level for Power Adaptation),
  361. -P1 (P1 power level for Power Adaptation),
  362. -P2 (P2 power level for Power Adaptation).
  363. Usage:
  364. iwpriv ethX powercfg: Get current configuration
  365. iwpriv ethX powercfg 0: disable power adaptation
  366. iwpriv ethX powercfg 1 0x0d 0x0f 0x12: enable power adaptation;
  367. P0=0x0d; P1=0x0f; P2=0x12.
  368. getafc
  369. This command returns automatic frequency control parameters. It returns
  370. three integers:
  371. -P0: automatic is on (1), or off (0),
  372. -P1: current timing offset in PPM (part per million), and
  373. -P2: current frequency offset in PPM.
  374. setafc
  375. Set automatic frequency control options.
  376. The first parameter turns automatic on (1) or off (0).
  377. The user must supply two more parameters in either case, in the following
  378. order:
  379. When auto is on:
  380. -P0 (automatic adjustment frequency threshold in PPM),
  381. -P1 (automatic adjustment period in beacon period),
  382. When auto is off:
  383. -P0 (manual adjustment timing offset in PPM), and
  384. -P1 (manual adjustment frequency offset in PPM).
  385. Usage:
  386. iwpriv ethX setafc 0 10 10: manual adjustment, both timing and frequcncy
  387. offset are 10 PPM.
  388. iwpriv ethX setafc 1 10 10 enable afc, automatic adjustment,
  389. frequency threshold 10 PPM, for every 10 beacon periods.
  390. scanprobes
  391. This command sets number of probe requests per channel.
  392. Usage:
  393. iwpriv ethX scanprobes 3 (set scan probes to 3)
  394. iwpriv ethX scanprobes (get scan probes)
  395. lolisteninter
  396. This command sets the value of listen interval.
  397. Usage:
  398. iwpriv ethX lolisteninter 234 (set the lolisteninter to 234)
  399. iwpriv ethX lolisteninter (get the lolisteninter value)
  400. rateadapt
  401. This command sets the data rates bitmap.
  402. Where <n>
  403. 0: Disable auto rate adapt
  404. 1: Enable auto rate adapt
  405. <m>
  406. data rate bitmap
  407. Bit Data rate
  408. 0 1 Mbps
  409. 1 2 Mbps
  410. 2 5.5 Mbps
  411. 3 11 Mbps
  412. 4 Reserved
  413. 5 6 Mbps
  414. 6 9 Mbps
  415. 7 12 Mbps
  416. 8 18 Mbps
  417. 9 24 Mbps
  418. 10 36 Mbps
  419. 11 48 Mbps
  420. 12 54 Mbps
  421. 12-15 Reserved
  422. Usage:
  423. iwpriv ethX rateadapt
  424. read the currect data rate setting
  425. iwpriv ethX rateadapt 1 0x07
  426. enable auto data rate adapt and
  427. data rates are 1Mbps, 2Mbsp and 5.5Mbps
  428. txcontrol
  429. This command is used to set the Tx rate, ack policy, and retry limit on a per packet basis.
  430. Where value <n> is:
  431. if bit[4] == 1:
  432. bit[3:0] -- 0 1 2 3 4 5 6 7 8 9 10 11 12 13-16
  433. Data Rate(Mbps) -- 1 2 5.5 11 Rsv 6 9 12 18 24 36 48 54 Rsv
  434. bit[12:8]
  435. if bit[12] == 1, bit[11:8] specifies the Tx retry limit.
  436. bit[14:13] specifies per packet ack policy:
  437. bit[14:13]
  438. 1 0 use immediate ack policy for this packet
  439. 1 1 use no ack policy for this packet
  440. 0 x use the per-packet ack policy setting
  441. Usage:
  442. iwpriv ethX txcontrol 0x7513
  443. Use no-ack policy, 5 retires for Tx, 11Mbps rate
  444. psnullinterval
  445. This command is used to set/request NULL package interval for Power Save
  446. under infrastructure mode.
  447. where value is:-
  448. -1 -- Disabled
  449. n>0 -- Set interval as n (seconds)
  450. prescan
  451. This command is used to enable (1)/disable(0) auto prescan before assoicate to the ap
  452. where value is:-
  453. 0 -- Disabled
  454. 1 -- Enabled
  455. 2 -- Get
  456. getrxinfo
  457. This command gets non average value of Signal to Noise Ratio of Data and rate index.
  458. The following table shows RateIndex and Rate
  459. RateIndex Data rate
  460. 0 1 Mbps
  461. 1 2 Mbps
  462. 2 5.5 Mbps
  463. 3 11 Mbps
  464. 4 Reserved
  465. 5 6 Mbps
  466. 6 9 Mbps
  467. 7 12 Mbps
  468. 8 18 Mbps
  469. 9 24 Mbps
  470. 10 36 Mbps
  471. 11 48 Mbps
  472. 12 54 Mbps
  473. 13-15 Reserved
  474. gettxrate
  475. This command gets current Tx rate index of the first packet associated with Rate Adaptation.
  476. The following table shows RateIndex and Rate
  477. RateIndex Data rate
  478. 0 1 Mbps
  479. 1 2 Mbps
  480. 2 5.5 Mbps
  481. 3 11 Mbps
  482. 4 Reserved
  483. 5 6 Mbps
  484. 6 9 Mbps
  485. 7 12 Mbps
  486. 8 18 Mbps
  487. 9 24 Mbps
  488. 10 36 Mbps
  489. 11 48 Mbps
  490. 12 54 Mbps
  491. 13-15 Reserved
  492. bcninterval
  493. This command is used to sets beacon interval in adhoc mode when an argument is given, and gets current adhoc
  494. beacon interval when no argument is given. The valid beacon interval is between 20 - 1000,
  495. default beacon interval is 100.
  496. Usage:
  497. iwpriv ethX bcninterval 100 (set adhoc beacon interval to 100)
  498. iwpriv ethX bcninterval (get adhoc beacon interval)
  499. fwt_add
  500. This command is used to insert an entry into the FWT table. The list of
  501. parameters must follow the following structure:
  502. iwpriv ethX fwt_add da ra [metric dir ssn dsn hopcount ttl expiration sleepmode snr]
  503. The parameters between brackets are optional, but they must appear in
  504. the order specified. For example, if you want to specify the metric,
  505. you must also specify the dir, ssn, and dsn but you need not specify the
  506. hopcount, expiration, sleepmode, or snr. Any unspecified parameters
  507. will be assigned the defaults specified below.
  508. The different parameters are:-
  509. da -- DA MAC address in the form 00:11:22:33:44:55
  510. ra -- RA MAC address in the form 00:11:22:33:44:55
  511. metric -- route metric (cost: smaller-metric routes are
  512. preferred, default is 0)
  513. dir -- direction (1 for direct, 0 for reverse,
  514. default is 1)
  515. ssn -- Source Sequence Number (time at the RA for
  516. reverse routes. Default is 0)
  517. dsn -- Destination Sequence Number (time at the DA
  518. for direct routes. Default is 0)
  519. hopcount -- hop count (currently unused, default is 0)
  520. ttl -- TTL (Only used in reverse entries)
  521. expiration -- entry expiration (in ticks, where a tick is
  522. 1024us, or ~ 1ms. Use 0 for an indefinite
  523. entry, default is 0)
  524. sleepmode -- RA's sleep mode (currently unused, default is
  525. 0)
  526. snr -- SNR in the link to RA (currently unused,
  527. default is 0)
  528. The command does not return anything.
  529. fwt_del
  530. This command is used to remove an entry to the FWT table. The list of
  531. parameters must follow the following structure:
  532. iwpriv ethX fwt_del da ra [dir]
  533. where the different parameters are:-
  534. da -- DA MAC address (in the form "00:11:22:33:44:55")
  535. ra -- RA MAC address (in the form "00:11:22:33:44:55")
  536. dir -- direction (1 for direct, 0 for reverse,
  537. default is 1)
  538. The command does not return anything.
  539. fwt_lookup
  540. This command is used to get the best route in the FWT table to a given
  541. host. The only parameter is the MAC address of the host that is being
  542. looked for.
  543. iwpriv ethX fwt_lookup da
  544. where:-
  545. da -- DA MAC address (in the form "00:11:22:33:44:55")
  546. The command returns an output string identical to the one returned by
  547. fwt_list described below.
  548. fwt_list
  549. This command is used to list a route from the FWT table. The only
  550. parameter is the index into the table. If you want to list all the
  551. routes in a table, start with index=0, and keep listing until you get a
  552. "(null)" string. Note that the indicies may change as the fwt is
  553. updated. It is expected that most users will not use fwt_list directly,
  554. but that a utility similar to the traditional route command will be used
  555. to invoke fwt_list over and over.
  556. iwpriv ethX fwt_list index
  557. The output is a string of the following form:
  558. da ra metric dir ssn dsn hopcount ttl expiration sleepmode snr
  559. where the different fields are:-
  560. da -- DA MAC address (in the form "00:11:22:33:44:55")
  561. ra -- RA MAC address (in the form "00:11:22:33:44:55")
  562. metric -- route metric (cost: smaller-metric routes are preferred)
  563. dir -- direction (1 for direct, 0 for reverse)
  564. ssn -- Source Sequence Number (time at the RA for reverse routes)
  565. dsn -- Destination Sequence Number (time at the DA for direct routes)
  566. hopcount -- hop count (currently unused)
  567. ttl -- TTL (only used in reverse entries)
  568. expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
  569. sleepmode -- RA's sleep mode (currently unused)
  570. snr -- SNR in the link to RA (currently unused)
  571. fwt_list_route
  572. This command is used to list a route from the FWT table. The only
  573. parameter is the route ID. If you want to list all the routes in a
  574. table, start with rid=0, and keep incrementing rid until you get a
  575. "(null)" string. This function is similar to fwt_list. The only
  576. difference is the output format. Also note that this command is meant
  577. for debugging. It is expected that users will use fwt_lookup and
  578. fwt_list. One important reason for this is that the route id may change
  579. as the route table is altered.
  580. iwpriv ethX fwt_list_route rid
  581. The output is a string of the following form:
  582. da metric dir nid ssn dsn hopcount ttl expiration
  583. where the different fields are:-
  584. da -- DA MAC address (in the form "00:11:22:33:44:55")
  585. metric -- route metric (cost: smaller-metric routes are preferred)
  586. dir -- direction (1 for direct, 0 for reverse)
  587. nid -- Next-hop (neighbor) host ID (nid)
  588. ssn -- Source Sequence Number (time at the RA for reverse routes)
  589. dsn -- Destination Sequence Number (time at the DA for direct routes)
  590. hopcount -- hop count (currently unused)
  591. ttl -- TTL count (only used in reverse entries)
  592. expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
  593. fwt_list_neigh
  594. This command is used to list a neighbor from the FWT table. The only
  595. parameter is the neighbor ID. If you want to list all the neighbors in a
  596. table, start with nid=0, and keep incrementing nid until you get a
  597. "(null)" string. Note that the nid from a fwt_list_route command can be
  598. used as an input to this command. Also note that this command is meant
  599. mostly for debugging. It is expected that users will use fwt_lookup.
  600. One important reason for this is that the neighbor id may change as the
  601. neighbor table is altered.
  602. iwpriv ethX fwt_list_neigh nid
  603. The output is a string of the following form:
  604. ra sleepmode snr references
  605. where the different fields are:-
  606. ra -- RA MAC address (in the form "00:11:22:33:44:55")
  607. sleepmode -- RA's sleep mode (currently unused)
  608. snr -- SNR in the link to RA (currently unused)
  609. references -- RA's reference counter
  610. fwt_reset
  611. This command is used to reset the FWT table, getting rid of all the
  612. entries. There are no input parameters.
  613. iwpriv ethX fwt_reset
  614. The command does not return anything.
  615. fwt_cleanup
  616. This command is used to perform user-based garbage recollection. The
  617. FWT table is checked, and all the entries that are expired or invalid
  618. are cleaned. Note that this is exported to the driver for debugging
  619. purposes, as garbage collection is also fired by the firmware when in
  620. space problems. There are no input parameters.
  621. iwpriv ethX fwt_cleanup
  622. The command does returns the number of invalid/expired routes deleted.
  623. fwt_time
  624. This command returns a card's internal time representation. It is this
  625. time that is used to represent the expiration times of FWT entries. The
  626. number is not consistent from card to card; it is simply a timer count.
  627. The fwt_time command is used to inspect the timer so that expiration
  628. times reported by fwt_list can be properly interpreted.
  629. iwpriv ethX fwt_time
  630. mesh_get_ttl
  631. The mesh ttl is the number of hops a mesh packet can traverse before it
  632. is dropped. This parameter is used to prevent infinite loops in the
  633. mesh network. The value returned by this function is the ttl assigned
  634. to all mesh packets. Currently there is no way to control the ttl on a
  635. per packet or per socket basis.
  636. iwpriv ethX mesh_get_ttl
  637. mesh_set_ttl ttl
  638. Set the ttl. The argument must be between 0 and 255.
  639. iwpriv ethX mesh_set_ttl <ttl>
  640. =========================
  641. ETHTOOL
  642. =========================
  643. Use the -i option to retrieve version information from the driver.
  644. # ethtool -i eth0
  645. driver: libertas
  646. version: COMM-USB8388-318.p4
  647. firmware-version: 5.110.7
  648. bus-info:
  649. Use the -e option to read the EEPROM contents of the card.
  650. Usage:
  651. ethtool -e ethX [raw on|off] [offset N] [length N]
  652. -e retrieves and prints an EEPROM dump for the specified ethernet
  653. device. When raw is enabled, then it dumps the raw EEPROM data
  654. to stdout. The length and offset parameters allow dumping cer-
  655. tain portions of the EEPROM. Default is to dump the entire EEP-
  656. ROM.
  657. # ethtool -e eth0 offset 0 length 16
  658. Offset Values
  659. ------ ------
  660. 0x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
  661. ========================
  662. DEBUGFS COMMANDS
  663. ========================
  664. those commands are used via debugfs interface
  665. ===========
  666. rdmac
  667. rdbbp
  668. rdrf
  669. These commands are used to read the MAC, BBP and RF registers from the
  670. card. These commands take one parameter that specifies the offset
  671. location that is to be read. This parameter must be specified in
  672. hexadecimal (its possible to preceed preceding the number with a "0x").
  673. Path: /debugfs/libertas_wireless/ethX/registers/
  674. Usage:
  675. echo "0xa123" > rdmac ; cat rdmac
  676. echo "0xa123" > rdbbp ; cat rdbbp
  677. echo "0xa123" > rdrf ; cat rdrf
  678. wrmac
  679. wrbbp
  680. wrrf
  681. These commands are used to write the MAC, BBP and RF registers in the
  682. card. These commands take two parameters that specify the offset
  683. location and the value that is to be written. This parameters must
  684. be specified in hexadecimal (its possible to preceed the number
  685. with a "0x").
  686. Usage:
  687. echo "0xa123 0xaa" > wrmac
  688. echo "0xa123 0xaa" > wrbbp
  689. echo "0xa123 0xaa" > wrrf
  690. sleepparams
  691. This command is used to set the sleepclock configurations
  692. Path: /debugfs/libertas_wireless/ethX/
  693. Usage:
  694. cat sleepparams: reads the current sleepclock configuration
  695. echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
  696. where:
  697. p1 is Sleep clock error in ppm (0-65535)
  698. p2 is Wakeup offset in usec (0-65535)
  699. p3 is Clock stabilization time in usec (0-65535)
  700. p4 is Control periodic calibration (0-2)
  701. p5 is Control the use of external sleep clock (0-2)
  702. p6 is reserved for debug (0-65535)
  703. subscribed_events
  704. The subscribed_events directory contains the interface for the
  705. subscribed events API.
  706. Path: /debugfs/libertas_wireless/ethX/subscribed_events/
  707. Each event is represented by a filename. Each filename consists of the
  708. following three fields:
  709. Value Frequency Subscribed
  710. To read the current values for a given event, do:
  711. cat event
  712. To set the current values, do:
  713. echo "60 2 1" > event
  714. Frequency field specifies the reporting frequency for this event.
  715. If it is set to 0, then the event is reported only once, and then
  716. automatically unsubscribed. If it is set to 1, then the event is
  717. reported every time it occurs. If it is set to N, then the event is
  718. reported every Nth time it occurs.
  719. beacon_missed
  720. Value field specifies the number of consecutive missing beacons which
  721. triggers the LINK_LOSS event. This event is generated only once after
  722. which the firmware resets its state. At initialization, the LINK_LOSS
  723. event is subscribed by default. The default value of MissedBeacons is
  724. 60.
  725. failure_count
  726. Value field specifies the consecutive failure count threshold which
  727. triggers the generation of the MAX_FAIL event. Once this event is
  728. generated, the consecutive failure count is reset to 0.
  729. At initialization, the MAX_FAIL event is NOT subscribed by
  730. default.
  731. high_rssi
  732. This event is generated when the average received RSSI in beacons goes
  733. above a threshold, specified by Value.
  734. low_rssi
  735. This event is generated when the average received RSSI in beacons goes
  736. below a threshold, specified by Value.
  737. high_snr
  738. This event is generated when the average received SNR in beacons goes
  739. above a threshold, specified by Value.
  740. low_snr
  741. This event is generated when the average received SNR in beacons goes
  742. below a threshold, specified by Value.
  743. extscan
  744. This command is used to do a specific scan.
  745. Path: /debugfs/libertas_wireless/ethX/
  746. Usage: echo "SSID" > extscan
  747. Example:
  748. echo "LINKSYS-AP" > extscan
  749. To see the results of use getscantable command.
  750. getscantable
  751. Display the current contents of the driver scan table (ie. get the
  752. scan results).
  753. Path: /debugfs/libertas_wireless/ethX/
  754. Usage:
  755. cat getscantable
  756. setuserscan
  757. Initiate a customized scan and retrieve the results
  758. Path: /debugfs/libertas_wireless/ethX/
  759. Usage:
  760. echo "[ARGS]" > setuserscan
  761. where [ARGS]:
  762. chan=[chan#][band][mode] where band is [a,b,g] and mode is
  763. blank for active or 'p' for passive
  764. bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan
  765. ssid="[SSID]" specify a SSID filter for the scan
  766. keep=[0 or 1] keep the previous scan results (1), discard (0)
  767. dur=[scan time] time to scan for each channel in milliseconds
  768. probes=[#] number of probe requests to send on each chan
  769. type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
  770. Any combination of the above arguments can be supplied on the command line.
  771. If the chan token is absent, a full channel scan will be completed by
  772. the driver. If the dur or probes tokens are absent, the driver default
  773. setting will be used. The bssid and ssid fields, if blank,
  774. will produce an unfiltered scan. The type field will default to 3 (Any)
  775. and the keep field will default to 0 (Discard).
  776. Examples:
  777. 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
  778. echo "chan=1g,6g,11g" > setuserscan
  779. 2) Perform a passive scan on channel 11 for 20 ms:
  780. echo "chan=11gp dur=20" > setuserscan
  781. 3) Perform an active scan on channels 1, 6, and 11; and a passive scan on
  782. channel 36 in the 'a' band:
  783. echo "chan=1g,6g,11g,36ap" > setuserscan
  784. 4) Perform an active scan on channel 6 and 36 for a specific SSID:
  785. echo "chan=6g,36a ssid="TestAP"" > setuserscan
  786. 5) Scan all available channels (B/G, A bands) for a specific BSSID, keep
  787. the current scan table intact, update existing or append new scan data:
  788. echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
  789. 6) Scan channel 6, for all infrastructure networks, sending two probe
  790. requests. Keep the previous scan table intact. Update any duplicate
  791. BSSID/SSID matches with the new scan data:
  792. echo "chan=6g type=1 probes=2 keep=1" > setuserscan
  793. All entries in the scan table (not just the new scan data when keep=1)
  794. will be displayed upon completion by use of the getscantable ioctl.
  795. ==============================================================================