1 ================================================================================
4 (c) Copyright © 2003-2006, Marvell International Ltd.
7 This software file (the "File") is distributed by Marvell International
8 Ltd. under the terms of the GNU General Public License Version 2, June 1991
9 (the "License"). You may use, redistribute and/or modify this File in
10 accordance with the terms and conditions of the License, a copy of which
11 is available along with the File in the license.txt file or by writing to
12 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
13 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
15 THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
17 ARE EXPRESSLY DISCLAIMED. The License provides additional details about
18 this warranty disclaimer.
19 ================================================================================
25 o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
27 o. Load driver by using the following command:
29 insmod usb8388.ko [fw_name=usb8388.bin]
36 This manual describes the usage of private commands used in Marvell WLAN
37 Linux Driver. All the commands available in Wlanconfig will not be available
41 iwpriv <ethX> <command> [sub-command] ...
43 iwpriv ethX setregioncode <n>
44 iwpriv ethX getregioncode
47 iwpriv ethX ledgpio <n>
50 The blinding table (BT) contains a list of mac addresses that should be
51 ignored by the firmware. It is primarily used for debugging and
52 testing networks. It can be edited and inspected with the following
56 iwpriv ethX bt_add <mac_address>
57 iwpriv ethX bt_del <mac_address>
58 iwpriv ethX bt_list <id>
61 The forwarding table (FWT) is a feature used to manage mesh network
62 routing in the firmware. The FWT is essentially a routing table that
63 associates a destination mac address (da) with a next hop receiver
64 address (ra). The FWT can be inspected and edited with the following
65 iwpriv commands, which are described in greater detail below.
66 Eventually, the table will be automatically maintained by a custom
69 NOTE: FWT commands replace the previous DFT commands. What were the DFT
70 commands?, you might ask. They were an earlier API to the firmware that
71 implemented a simple MAC-layer forwarding mechanism. In the unlikely
72 event that you were using these commands, you must migrate to the new
73 FWT commands which can be used to achieve the same functionality.
75 iwpriv ethX fwt_add [parameters]
76 iwpriv ethX fwt_del [parameters]
77 iwpriv ethX fwt_lookup [parameters]
78 iwpriv ethX fwt_list [parameters]
79 iwpriv ethX fwt_list_route [parameters]
80 iwpriv ethX fwt_list_neigh [parameters]
81 iwpriv ethX fwt_reset [parameters]
82 iwpriv ethX fwt_cleanup
87 The MESH commands are used to configure various features of the mesh
88 routing protocol. The following commands are supported:
90 iwpriv ethX mesh_get_ttl
91 iwpriv ethX mesh_set_ttl ttl
94 Those commands are used to send additional commands to the Marvell WLAN
95 card via the Linux device driver.
97 The ethX parameter specifies the network device that is to be used to
98 perform this command on. it could be eth0, eth1 etc.
101 This command is used to set the region code in the station.
102 where value is 'region code' for various regions like
103 USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ...
106 iwpriv ethX setregioncode 0x10: set region code to USA (0x10).
109 This command is used to get the region code information set in the
113 This command is used to set/get LEDs.
115 iwpriv ethX ledgpio <LEDs>
116 will set the corresponding LED for the GPIO Line.
119 will give u which LEDs are Enabled.
122 iwpriv eth1 ledgpio 1 0 2 1 3 4
129 shows LED information in the format as mentioned above.
131 Note: LED0 is invalid
132 Note: Maximum Number of LEDs are 16.
135 This command is used to insert an entry into the FWT table. The list of
136 parameters must follow the following structure:
138 iwpriv ethX fwt_add da ra [metric dir ssn dsn hopcount ttl expiration sleepmode snr]
140 The parameters between brackets are optional, but they must appear in
141 the order specified. For example, if you want to specify the metric,
142 you must also specify the dir, ssn, and dsn but you need not specify the
143 hopcount, expiration, sleepmode, or snr. Any unspecified parameters
144 will be assigned the defaults specified below.
146 The different parameters are:-
147 da -- DA MAC address in the form 00:11:22:33:44:55
148 ra -- RA MAC address in the form 00:11:22:33:44:55
149 metric -- route metric (cost: smaller-metric routes are
150 preferred, default is 0)
151 dir -- direction (1 for direct, 0 for reverse,
153 ssn -- Source Sequence Number (time at the RA for
154 reverse routes. Default is 0)
155 dsn -- Destination Sequence Number (time at the DA
156 for direct routes. Default is 0)
157 hopcount -- hop count (currently unused, default is 0)
158 ttl -- TTL (Only used in reverse entries)
159 expiration -- entry expiration (in ticks, where a tick is
160 1024us, or ~ 1ms. Use 0 for an indefinite
162 sleepmode -- RA's sleep mode (currently unused, default is
164 snr -- SNR in the link to RA (currently unused,
167 The command does not return anything.
170 This command is used to remove an entry to the FWT table. The list of
171 parameters must follow the following structure:
173 iwpriv ethX fwt_del da ra [dir]
175 where the different parameters are:-
176 da -- DA MAC address (in the form "00:11:22:33:44:55")
177 ra -- RA MAC address (in the form "00:11:22:33:44:55")
178 dir -- direction (1 for direct, 0 for reverse,
181 The command does not return anything.
184 This command is used to get the best route in the FWT table to a given
185 host. The only parameter is the MAC address of the host that is being
188 iwpriv ethX fwt_lookup da
191 da -- DA MAC address (in the form "00:11:22:33:44:55")
193 The command returns an output string identical to the one returned by
194 fwt_list described below.
198 This command is used to list a route from the FWT table. The only
199 parameter is the index into the table. If you want to list all the
200 routes in a table, start with index=0, and keep listing until you get a
201 "(null)" string. Note that the indicies may change as the fwt is
202 updated. It is expected that most users will not use fwt_list directly,
203 but that a utility similar to the traditional route command will be used
204 to invoke fwt_list over and over.
206 iwpriv ethX fwt_list index
208 The output is a string of the following form:
210 da ra metric dir ssn dsn hopcount ttl expiration sleepmode snr
212 where the different fields are:-
213 da -- DA MAC address (in the form "00:11:22:33:44:55")
214 ra -- RA MAC address (in the form "00:11:22:33:44:55")
215 metric -- route metric (cost: smaller-metric routes are preferred)
216 dir -- direction (1 for direct, 0 for reverse)
217 ssn -- Source Sequence Number (time at the RA for reverse routes)
218 dsn -- Destination Sequence Number (time at the DA for direct routes)
219 hopcount -- hop count (currently unused)
220 ttl -- TTL (only used in reverse entries)
221 expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
222 sleepmode -- RA's sleep mode (currently unused)
223 snr -- SNR in the link to RA (currently unused)
226 This command is used to list a route from the FWT table. The only
227 parameter is the route ID. If you want to list all the routes in a
228 table, start with rid=0, and keep incrementing rid until you get a
229 "(null)" string. This function is similar to fwt_list. The only
230 difference is the output format. Also note that this command is meant
231 for debugging. It is expected that users will use fwt_lookup and
232 fwt_list. One important reason for this is that the route id may change
233 as the route table is altered.
235 iwpriv ethX fwt_list_route rid
237 The output is a string of the following form:
239 da metric dir nid ssn dsn hopcount ttl expiration
241 where the different fields are:-
242 da -- DA MAC address (in the form "00:11:22:33:44:55")
243 metric -- route metric (cost: smaller-metric routes are preferred)
244 dir -- direction (1 for direct, 0 for reverse)
245 nid -- Next-hop (neighbor) host ID (nid)
246 ssn -- Source Sequence Number (time at the RA for reverse routes)
247 dsn -- Destination Sequence Number (time at the DA for direct routes)
248 hopcount -- hop count (currently unused)
249 ttl -- TTL count (only used in reverse entries)
250 expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
253 This command is used to list a neighbor from the FWT table. The only
254 parameter is the neighbor ID. If you want to list all the neighbors in a
255 table, start with nid=0, and keep incrementing nid until you get a
256 "(null)" string. Note that the nid from a fwt_list_route command can be
257 used as an input to this command. Also note that this command is meant
258 mostly for debugging. It is expected that users will use fwt_lookup.
259 One important reason for this is that the neighbor id may change as the
260 neighbor table is altered.
262 iwpriv ethX fwt_list_neigh nid
264 The output is a string of the following form:
266 ra sleepmode snr references
268 where the different fields are:-
269 ra -- RA MAC address (in the form "00:11:22:33:44:55")
270 sleepmode -- RA's sleep mode (currently unused)
271 snr -- SNR in the link to RA (currently unused)
272 references -- RA's reference counter
275 This command is used to reset the FWT table, getting rid of all the
276 entries. There are no input parameters.
278 iwpriv ethX fwt_reset
280 The command does not return anything.
283 This command is used to perform user-based garbage recollection. The
284 FWT table is checked, and all the entries that are expired or invalid
285 are cleaned. Note that this is exported to the driver for debugging
286 purposes, as garbage collection is also fired by the firmware when in
287 space problems. There are no input parameters.
289 iwpriv ethX fwt_cleanup
291 The command does returns the number of invalid/expired routes deleted.
294 This command returns a card's internal time representation. It is this
295 time that is used to represent the expiration times of FWT entries. The
296 number is not consistent from card to card; it is simply a timer count.
297 The fwt_time command is used to inspect the timer so that expiration
298 times reported by fwt_list can be properly interpreted.
304 The mesh ttl is the number of hops a mesh packet can traverse before it
305 is dropped. This parameter is used to prevent infinite loops in the
306 mesh network. The value returned by this function is the ttl assigned
307 to all mesh packets. Currently there is no way to control the ttl on a
308 per packet or per socket basis.
310 iwpriv ethX mesh_get_ttl
314 Set the ttl. The argument must be between 0 and 255.
316 iwpriv ethX mesh_set_ttl <ttl>
318 =========================
320 =========================
323 Use the -i option to retrieve version information from the driver.
327 version: COMM-USB8388-318.p4
328 firmware-version: 5.110.7
331 Use the -e option to read the EEPROM contents of the card.
334 ethtool -e ethX [raw on|off] [offset N] [length N]
336 -e retrieves and prints an EEPROM dump for the specified ethernet
337 device. When raw is enabled, then it dumps the raw EEPROM data
338 to stdout. The length and offset parameters allow dumping cer-
339 tain portions of the EEPROM. Default is to dump the entire EEP-
342 # ethtool -e eth0 offset 0 length 16
345 0x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
347 ========================
349 ========================
351 those commands are used via debugfs interface
357 These commands are used to read the MAC, BBP and RF registers from the
358 card. These commands take one parameter that specifies the offset
359 location that is to be read. This parameter must be specified in
360 hexadecimal (its possible to preceed preceding the number with a "0x").
362 Path: /debugfs/libertas_wireless/ethX/registers/
365 echo "0xa123" > rdmac ; cat rdmac
366 echo "0xa123" > rdbbp ; cat rdbbp
367 echo "0xa123" > rdrf ; cat rdrf
371 These commands are used to write the MAC, BBP and RF registers in the
372 card. These commands take two parameters that specify the offset
373 location and the value that is to be written. This parameters must
374 be specified in hexadecimal (its possible to preceed the number
378 echo "0xa123 0xaa" > wrmac
379 echo "0xa123 0xaa" > wrbbp
380 echo "0xa123 0xaa" > wrrf
383 This command is used to set the sleepclock configurations
385 Path: /debugfs/libertas_wireless/ethX/
388 cat sleepparams: reads the current sleepclock configuration
390 echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
393 p1 is Sleep clock error in ppm (0-65535)
394 p2 is Wakeup offset in usec (0-65535)
395 p3 is Clock stabilization time in usec (0-65535)
396 p4 is Control periodic calibration (0-2)
397 p5 is Control the use of external sleep clock (0-2)
398 p6 is reserved for debug (0-65535)
402 The subscribed_events directory contains the interface for the
403 subscribed events API.
405 Path: /debugfs/libertas_wireless/ethX/subscribed_events/
407 Each event is represented by a filename. Each filename consists of the
408 following three fields:
409 Value Frequency Subscribed
411 To read the current values for a given event, do:
413 To set the current values, do:
414 echo "60 2 1" > event
416 Frequency field specifies the reporting frequency for this event.
417 If it is set to 0, then the event is reported only once, and then
418 automatically unsubscribed. If it is set to 1, then the event is
419 reported every time it occurs. If it is set to N, then the event is
420 reported every Nth time it occurs.
423 Value field specifies the number of consecutive missing beacons which
424 triggers the LINK_LOSS event. This event is generated only once after
425 which the firmware resets its state. At initialization, the LINK_LOSS
426 event is subscribed by default. The default value of MissedBeacons is
430 Value field specifies the consecutive failure count threshold which
431 triggers the generation of the MAX_FAIL event. Once this event is
432 generated, the consecutive failure count is reset to 0.
433 At initialization, the MAX_FAIL event is NOT subscribed by
437 This event is generated when the average received RSSI in beacons goes
438 above a threshold, specified by Value.
441 This event is generated when the average received RSSI in beacons goes
442 below a threshold, specified by Value.
445 This event is generated when the average received SNR in beacons goes
446 above a threshold, specified by Value.
449 This event is generated when the average received SNR in beacons goes
450 below a threshold, specified by Value.
453 This command is used to do a specific scan.
455 Path: /debugfs/libertas_wireless/ethX/
457 Usage: echo "SSID" > extscan
460 echo "LINKSYS-AP" > extscan
462 To see the results of use getscantable command.
466 Display the current contents of the driver scan table (ie. get the
469 Path: /debugfs/libertas_wireless/ethX/
475 Initiate a customized scan and retrieve the results
478 Path: /debugfs/libertas_wireless/ethX/
481 echo "[ARGS]" > setuserscan
485 chan=[chan#][band][mode] where band is [a,b,g] and mode is
486 blank for active or 'p' for passive
487 bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan
488 ssid="[SSID]" specify a SSID filter for the scan
489 keep=[0 or 1] keep the previous scan results (1), discard (0)
490 dur=[scan time] time to scan for each channel in milliseconds
491 probes=[#] number of probe requests to send on each chan
492 type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
494 Any combination of the above arguments can be supplied on the command line.
495 If the chan token is absent, a full channel scan will be completed by
496 the driver. If the dur or probes tokens are absent, the driver default
497 setting will be used. The bssid and ssid fields, if blank,
498 will produce an unfiltered scan. The type field will default to 3 (Any)
499 and the keep field will default to 0 (Discard).
502 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
503 echo "chan=1g,6g,11g" > setuserscan
505 2) Perform a passive scan on channel 11 for 20 ms:
506 echo "chan=11gp dur=20" > setuserscan
508 3) Perform an active scan on channels 1, 6, and 11; and a passive scan on
509 channel 36 in the 'a' band:
511 echo "chan=1g,6g,11g,36ap" > setuserscan
513 4) Perform an active scan on channel 6 and 36 for a specific SSID:
514 echo "chan=6g,36a ssid="TestAP"" > setuserscan
516 5) Scan all available channels (B/G, A bands) for a specific BSSID, keep
517 the current scan table intact, update existing or append new scan data:
518 echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
520 6) Scan channel 6, for all infrastructure networks, sending two probe
521 requests. Keep the previous scan table intact. Update any duplicate
522 BSSID/SSID matches with the new scan data:
523 echo "chan=6g type=1 probes=2 keep=1" > setuserscan
525 All entries in the scan table (not just the new scan data when keep=1)
526 will be displayed upon completion by use of the getscantable ioctl.
528 ==============================================================================