aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/README
blob: 378577200b56c5f3e81fe849c1c8d44aecb81723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
================================================================================
			README for USB8388

 (c) Copyright © 2003-2006, Marvell International Ltd.
 All Rights Reserved

 This software file (the "File") is distributed by Marvell International
 Ltd. under the terms of the GNU General Public License Version 2, June 1991
 (the "License").  You may use, redistribute and/or modify this File in
 accordance with the terms and conditions of the License, a copy of which
 is available along with the File in the license.txt file or by writing to
 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt.

 THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
 IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
 ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
 this warranty disclaimer.
================================================================================

=====================
DRIVER LOADING
=====================

	o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/

	o. Load driver by using the following command:

		insmod usb8388.ko [fw_name=usb8388.bin]

=====================
IWPRIV COMMAND
=====================

NAME
	This manual describes the usage of private commands used in Marvell WLAN
	Linux Driver. All the commands available in Wlanconfig will not be available
	in the iwpriv.

SYNOPSIS
	iwpriv <ethX> <command> [sub-command] ...

	iwpriv ethX setregioncode <n>
	iwpriv ethX getregioncode

Version 5 Command:
	iwpriv ethX ledgpio <n>

BT Commands:
	The blinding table (BT) contains a list of mac addresses that should be
	ignored by the firmware.  It is primarily used for debugging and
	testing networks.  It can be edited and inspected with the following
	commands:

	iwpriv ethX bt_reset
	iwpriv ethX bt_add <mac_address>
	iwpriv ethX bt_del <mac_address>
	iwpriv ethX bt_list <id>

FWT Commands:
	The forwarding table (FWT) is a feature used to manage mesh network
	routing in the firmware.  The FWT is essentially a routing table that
	associates a destination mac address (da) with a next hop receiver
	address (ra).  The FWT can be inspected and edited with the following
	iwpriv commands, which are described in greater detail below.
	Eventually, the table will be automatically maintained by a custom
	routing protocol.

	NOTE: FWT commands replace the previous DFT commands.  What were the DFT
	commands?, you might ask.  They were an earlier API to the firmware that
	implemented a simple MAC-layer forwarding mechanism.  In the unlikely
	event that you were using these commands, you must migrate to the new
	FWT commands which can be used to achieve the same functionality.

	iwpriv ethX fwt_add [parameters]
	iwpriv ethX fwt_del [parameters]
	iwpriv ethX fwt_lookup [parameters]
	iwpriv ethX fwt_list [parameters]
	iwpriv ethX fwt_list_route [parameters]
	iwpriv ethX fwt_list_neigh [parameters]
	iwpriv ethX fwt_reset [parameters]
	iwpriv ethX fwt_cleanup
	iwpriv ethX fwt_time

MESH Commands:

	The MESH commands are used to configure various features of the mesh
	routing protocol.  The following commands are supported:

	iwpriv ethX mesh_get_ttl
	iwpriv ethX mesh_set_ttl ttl

DESCRIPTION
	Those commands are used to send additional commands to the Marvell WLAN
	card via the Linux device driver.

	The ethX parameter specifies the network device that is to be used to
		perform this command on. it could be eth0, eth1 etc.

setregioncode
	This command is used to set the region code in the station.
	where value is 'region code' for various regions like
	USA FCC, Canada IC, Spain, France, Europe ETSI,	Japan ...

	Usage:
		iwpriv ethX setregioncode 0x10: set region code to USA (0x10).

getregioncode
	This command is used to get the region code information set in the
	station.

ledgpio
	This command is used to set/get LEDs.

	iwpriv ethX ledgpio <LEDs>
		will set the corresponding LED for the GPIO Line.

	iwpriv ethX ledgpio
		will give u which LEDs are Enabled.

	Usage:
		iwpriv eth1 ledgpio 1 0 2 1 3 4
			will enable
			LED 1 -> GPIO 0
			LED 2 -> GPIO 1
			LED 3 -> GPIO 4

		iwpriv eth1 ledgpio
			shows LED information in the format as mentioned above.

	Note: LED0 is invalid
	Note: Maximum Number of LEDs are 16.

fwt_add
	This command is used to insert an entry into the FWT table. The list of
	parameters must follow the following structure:

	iwpriv ethX fwt_add da ra [metric dir ssn dsn hopcount ttl expiration sleepmode snr]

	The parameters between brackets are optional, but they must appear in
	the order specified.  For example, if you want to specify the metric,
	you must also specify the dir, ssn, and dsn but you need not specify the
	hopcount, expiration, sleepmode, or snr.  Any unspecified parameters
	will be assigned the defaults specified below.

	The different parameters are:-
		da		-- DA MAC address in the form 00:11:22:33:44:55
		ra		-- RA MAC address in the form 00:11:22:33:44:55
		metric		-- route metric (cost: smaller-metric routes are
				   preferred, default is 0)
		dir		-- direction (1 for direct, 0 for reverse,
				   default is 1)
		ssn		-- Source Sequence Number (time at the RA for
				   reverse routes.  Default is 0)
		dsn		-- Destination Sequence Number (time at the DA
				   for direct routes.  Default is 0)
		hopcount	-- hop count (currently unused, default is 0)
		ttl		-- TTL (Only used in reverse entries)
		expiration	-- entry expiration (in ticks, where a tick is
				   1024us, or ~ 1ms. Use 0 for an indefinite
				   entry, default is 0)
		sleepmode	-- RA's sleep mode (currently unused, default is
				   0)
		snr		-- SNR in the link to RA (currently unused,
				   default is 0)

	The command does not return anything.

fwt_del
	This command is used to remove an entry to the FWT table. The list of
	parameters must follow the following structure:

		iwpriv ethX fwt_del da ra [dir]

	where the different parameters are:-
		da		-- DA MAC address (in the form "00:11:22:33:44:55")
		ra		-- RA MAC address (in the form "00:11:22:33:44:55")
		dir		-- direction (1 for direct, 0 for reverse,
				   default is 1)

	The command does not return anything.

fwt_lookup
	This command is used to get the best route in the FWT table to a given
	host. The only parameter is the MAC address of the host that is being
	looked for.

		iwpriv ethX fwt_lookup da

	where:-
		da		-- DA MAC address (in the form "00:11:22:33:44:55")

	The command returns an output string identical to the one returned by
	fwt_list described below.


fwt_list
	This command is used to list a route from the FWT table. The only
	parameter is the index into the table. If you want to list all the
	routes in a table, start with index=0, and keep listing until you get a
	"(null)" string.  Note that the indicies may change as the fwt is
	updated.  It is expected that most users will not use fwt_list directly,
	but that a utility similar to the traditional route command will be used
	to invoke fwt_list over and over.

		iwpriv ethX fwt_list index

	The output is a string of the following form:

		da ra metric dir ssn dsn hopcount ttl expiration sleepmode snr

	where the different fields are:-
		da		-- DA MAC address (in the form "00:11:22:33:44:55")
		ra		-- RA MAC address (in the form "00:11:22:33:44:55")
		metric		-- route metric (cost: smaller-metric routes are preferred)
		dir		-- direction (1 for direct, 0 for reverse)
		ssn		-- Source Sequence Number (time at the RA for reverse routes)
		dsn		-- Destination Sequence Number (time at the DA for direct routes)
		hopcount	-- hop count (currently unused)
		ttl		-- TTL (only used in reverse entries)
		expiration	-- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
		sleepmode	-- RA's sleep mode (currently unused)
		snr		-- SNR in the link to RA (currently unused)

fwt_list_route
	This command is used to list a route from the FWT table. The only
	parameter is the route ID. If you want to list all the routes in a
	table, start with rid=0, and keep incrementing rid until you get a
	"(null)" string. This function is similar to fwt_list. The only
	difference is the output format.  Also note that this command is meant
	for debugging.  It is expected that users will use fwt_lookup and
	fwt_list.  One important reason for this is that the route id may change
	as the route table is altered.

		iwpriv ethX fwt_list_route rid

	The output is a string of the following form:

		da metric dir nid ssn dsn hopcount ttl expiration

	where the different fields are:-
		da		-- DA MAC address (in the form "00:11:22:33:44:55")
		metric		-- route metric (cost: smaller-metric routes are preferred)
		dir		-- direction (1 for direct, 0 for reverse)
		nid		-- Next-hop (neighbor) host ID (nid)
		ssn		-- Source Sequence Number (time at the RA for reverse routes)
		dsn		-- Destination Sequence Number (time at the DA for direct routes)
		hopcount	-- hop count (currently unused)
		ttl		-- TTL count (only used in reverse entries)
		expiration	-- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)

fwt_list_neigh
	This command is used to list a neighbor from the FWT table. The only
	parameter is the neighbor ID. If you want to list all the neighbors in a
	table, start with nid=0, and keep incrementing nid until you get a
	"(null)" string.  Note that the nid from a fwt_list_route command can be
	used as an input to this command.  Also note that this command is meant
	mostly for debugging.  It is expected that users will use fwt_lookup.
	One important reason for this is that the neighbor id may change as the
	neighbor table is altered.

		iwpriv ethX fwt_list_neigh nid

	The output is a string of the following form:

		ra sleepmode snr references

	where the different fields are:-
		ra		-- RA MAC address (in the form "00:11:22:33:44:55")
		sleepmode	-- RA's sleep mode (currently unused)
		snr		-- SNR in the link to RA (currently unused)
		references	-- RA's reference counter

fwt_reset
	This command is used to reset the FWT table, getting rid of all the
	entries. There are no input parameters.

		iwpriv ethX fwt_reset

	The command does not return anything.

fwt_cleanup
	This command is used to perform user-based garbage recollection. The
	FWT table is checked, and all the entries that are expired or invalid
	are cleaned. Note that this is exported to the driver for debugging
	purposes, as garbage collection is also fired by the firmware when in
	space problems. There are no input parameters.

		iwpriv ethX fwt_cleanup

	The command does returns the number of invalid/expired routes deleted.

fwt_time
	This command returns a card's internal time representation.  It is this
	time that is used to represent the expiration times of FWT entries.  The
	number is not consistent from card to card; it is simply a timer count.
	The fwt_time command is used to inspect the timer so that expiration
	times reported by fwt_list can be properly interpreted.

		iwpriv ethX fwt_time

mesh_get_ttl

	The mesh ttl is the number of hops a mesh packet can traverse before it
	is dropped.  This parameter is used to prevent infinite loops in the
	mesh network.  The value returned by this function is the ttl assigned
	to all mesh packets.  Currently there is no way to control the ttl on a
	per packet or per socket basis.

	iwpriv ethX mesh_get_ttl

mesh_set_ttl ttl

	Set the ttl.  The argument must be between 0 and 255.

	iwpriv ethX mesh_set_ttl <ttl>

=========================
ETHTOOL
=========================


Use the -i option to retrieve version information from the driver.

# ethtool -i eth0
driver: libertas
version: COMM-USB8388-318.p4
firmware-version: 5.110.7
bus-info:

Use the -e option to read the EEPROM contents of the card.

	Usage:
	ethtool -e ethX [raw on|off] [offset N] [length N]

       -e     retrieves and prints an EEPROM dump for the  specified  ethernet
              device.   When raw is enabled, then it dumps the raw EEPROM data
              to stdout. The length and offset parameters allow  dumping  cer-
              tain portions of the EEPROM.  Default is to dump the entire EEP-
              ROM.

# ethtool -e eth0 offset 0 length 16
Offset          Values
------          ------
0x0000          38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00

========================
DEBUGFS COMMANDS
========================

those commands are used via debugfs interface

===========
rdmac
rdbbp
rdrf
	These commands are used to read the MAC, BBP and RF registers from the
	card.  These commands take one parameter that specifies the offset
	location that is to be read.  This parameter must be specified in
	hexadecimal (its possible to preceed preceding the number with a "0x").

	Path: /debugfs/libertas_wireless/ethX/registers/

	Usage:
		echo "0xa123" > rdmac ; cat rdmac
		echo "0xa123" > rdbbp ; cat rdbbp
		echo "0xa123" > rdrf ; cat rdrf
wrmac
wrbbp
wrrf
	These commands are used to write the MAC, BBP and RF registers in the
	card.  These commands take two parameters that specify the offset
	location and the value that is to be written. This parameters must
	be specified in hexadecimal (its possible to preceed the number
	with a "0x").

	Usage:
		echo "0xa123 0xaa" > wrmac
		echo "0xa123 0xaa" > wrbbp
		echo "0xa123 0xaa" > wrrf

sleepparams
	This command is used to set the sleepclock configurations

	Path: /debugfs/libertas_wireless/ethX/

	Usage:
		cat sleepparams: reads the current sleepclock configuration

		echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.

		where:
			p1 is Sleep clock error in ppm (0-65535)
			p2 is Wakeup offset in usec (0-65535)
			p3 is Clock stabilization time in usec (0-65535)
			p4 is Control periodic calibration (0-2)
			p5 is Control the use of external sleep clock (0-2)
			p6 is reserved for debug (0-65535)

subscribed_events

	The subscribed_events directory contains the interface for the
	subscribed events API.

	Path: /debugfs/libertas_wireless/ethX/subscribed_events/

	Each event is represented by a filename. Each filename consists of the
	following three fields:
	Value Frequency Subscribed

	To read the current values for a given event, do:
		cat event
	To set the current values, do:
		echo "60 2 1" > event

	Frequency field specifies the reporting frequency for this event.
	If it is set to 0, then the event is reported only once, and then
	automatically unsubscribed. If it is set to 1, then the event is
	reported every time it occurs. If it is set to N, then the event is
	reported every Nth time it occurs.

	beacon_missed
	Value field specifies the number of consecutive missing beacons which
	triggers the LINK_LOSS event. This event is generated only once after
	which the firmware resets its state. At initialization, the LINK_LOSS
	event is subscribed by default. The default value of MissedBeacons is
	60.

	failure_count
	Value field specifies the consecutive failure count threshold which
	triggers the generation of the MAX_FAIL event. Once this event is
	generated, the consecutive failure count is reset to 0.
	At initialization, the MAX_FAIL event is NOT subscribed by
	default.

	high_rssi
	This event is generated when the average received RSSI in beacons goes
	above a threshold, specified by Value.

	low_rssi
	This event is generated when the average received RSSI in beacons goes
	below a threshold, specified by Value.

	high_snr
	This event is generated when the average received SNR in beacons goes
	above a threshold, specified by Value.

	low_snr
	This event is generated when the average received SNR in beacons goes
	below a threshold, specified by Value.

extscan
	This command is used to do a specific scan.

	Path: /debugfs/libertas_wireless/ethX/

	Usage: echo "SSID" > extscan

	Example:
		echo "LINKSYS-AP" > extscan

	To see the results of use getscantable command.

getscantable

	Display the current contents of the driver scan table (ie. get the
	scan results).

	Path: /debugfs/libertas_wireless/ethX/

	Usage:
		cat getscantable

setuserscan
	Initiate a customized scan and retrieve the results


	Path: /debugfs/libertas_wireless/ethX/

    Usage:
       echo "[ARGS]" > setuserscan

         where [ARGS]:

      chan=[chan#][band][mode] where band is [a,b,g] and mode is
                               blank for active or 'p' for passive
      bssid=xx:xx:xx:xx:xx:xx  specify a BSSID filter for the scan
      ssid="[SSID]"            specify a SSID filter for the scan
      keep=[0 or 1]            keep the previous scan results (1), discard (0)
      dur=[scan time]          time to scan for each channel in milliseconds
      probes=[#]               number of probe requests to send on each chan
      type=[1,2,3]             BSS type: 1 (Infra), 2(Adhoc), 3(Any)

    Any combination of the above arguments can be supplied on the command line.
      If the chan token is absent, a full channel scan will be completed by
      the driver.  If the dur or probes tokens are absent, the driver default
      setting will be used.  The bssid and ssid fields, if blank,
      will produce an unfiltered scan. The type field will default to 3 (Any)
      and the keep field will default to 0 (Discard).

    Examples:
    1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
            echo "chan=1g,6g,11g" > setuserscan

    2) Perform a passive scan on channel 11 for 20 ms:
            echo "chan=11gp dur=20" > setuserscan

    3) Perform an active scan on channels 1, 6, and 11; and a passive scan on
       channel 36 in the 'a' band:

            echo "chan=1g,6g,11g,36ap" > setuserscan

    4) Perform an active scan on channel 6 and 36 for a specific SSID:
            echo "chan=6g,36a ssid="TestAP"" > setuserscan

    5) Scan all available channels (B/G, A bands) for a specific BSSID, keep
       the current scan table intact, update existing or append new scan data:
            echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan

    6) Scan channel 6, for all infrastructure networks, sending two probe
       requests.  Keep the previous scan table intact. Update any duplicate
       BSSID/SSID matches with the new scan data:
            echo "chan=6g type=1 probes=2 keep=1" > setuserscan

    All entries in the scan table (not just the new scan data when keep=1)
    will be displayed upon completion by use of the getscantable ioctl.

==============================================================================