xref: /linux/drivers/net/wireless/marvell/libertas/README (revision f988d64010ec058a206dce083b5c791ce09caa48)
1876c9d3aSMarcelo Tosatti================================================================================
249125454SAmitkumar Karwar			README for Libertas
3876c9d3aSMarcelo Tosatti
40e8a5bd9SDavid Woodhouse (c) Copyright © 2003-2006, Marvell International Ltd.
5876c9d3aSMarcelo Tosatti All Rights Reserved
6876c9d3aSMarcelo Tosatti
7876c9d3aSMarcelo Tosatti This software file (the "File") is distributed by Marvell International
8876c9d3aSMarcelo Tosatti Ltd. under the terms of the GNU General Public License Version 2, June 1991
9876c9d3aSMarcelo Tosatti (the "License").  You may use, redistribute and/or modify this File in
10876c9d3aSMarcelo Tosatti accordance with the terms and conditions of the License, a copy of which
11*36769159SJeff Kirsher is available along with the File in the license.txt file or on the worldwide
12*36769159SJeff Kirsher web at http://www.gnu.org/licenses/gpl.txt.
13876c9d3aSMarcelo Tosatti
14876c9d3aSMarcelo Tosatti THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15876c9d3aSMarcelo Tosatti IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16876c9d3aSMarcelo Tosatti ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
17876c9d3aSMarcelo Tosatti this warranty disclaimer.
18876c9d3aSMarcelo Tosatti================================================================================
19876c9d3aSMarcelo Tosatti
20876c9d3aSMarcelo Tosatti=====================
21876c9d3aSMarcelo TosattiDRIVER LOADING
22876c9d3aSMarcelo Tosatti=====================
23876c9d3aSMarcelo Tosatti
24876c9d3aSMarcelo Tosatti	o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
25876c9d3aSMarcelo Tosatti
26876c9d3aSMarcelo Tosatti	o. Load driver by using the following command:
27876c9d3aSMarcelo Tosatti
28876c9d3aSMarcelo Tosatti		insmod usb8388.ko [fw_name=usb8388.bin]
29876c9d3aSMarcelo Tosatti
30876c9d3aSMarcelo Tosatti=========================
31876c9d3aSMarcelo TosattiETHTOOL
32876c9d3aSMarcelo Tosatti=========================
33876c9d3aSMarcelo Tosatti
34876c9d3aSMarcelo Tosatti
35876c9d3aSMarcelo TosattiUse the -i option to retrieve version information from the driver.
36876c9d3aSMarcelo Tosatti
37876c9d3aSMarcelo Tosatti# ethtool -i eth0
38876c9d3aSMarcelo Tosattidriver: libertas
39876c9d3aSMarcelo Tosattiversion: COMM-USB8388-318.p4
40876c9d3aSMarcelo Tosattifirmware-version: 5.110.7
41876c9d3aSMarcelo Tosattibus-info:
42876c9d3aSMarcelo Tosatti
43876c9d3aSMarcelo TosattiUse the -e option to read the EEPROM contents of the card.
44876c9d3aSMarcelo Tosatti
45876c9d3aSMarcelo Tosatti	Usage:
46876c9d3aSMarcelo Tosatti	ethtool -e ethX [raw on|off] [offset N] [length N]
47876c9d3aSMarcelo Tosatti
48876c9d3aSMarcelo Tosatti       -e     retrieves and prints an EEPROM dump for the  specified  ethernet
49876c9d3aSMarcelo Tosatti              device.   When raw is enabled, then it dumps the raw EEPROM data
50876c9d3aSMarcelo Tosatti              to stdout. The length and offset parameters allow  dumping  cer-
51876c9d3aSMarcelo Tosatti              tain portions of the EEPROM.  Default is to dump the entire EEP-
52876c9d3aSMarcelo Tosatti              ROM.
53876c9d3aSMarcelo Tosatti
54876c9d3aSMarcelo Tosatti# ethtool -e eth0 offset 0 length 16
55876c9d3aSMarcelo TosattiOffset          Values
56876c9d3aSMarcelo Tosatti------          ------
57876c9d3aSMarcelo Tosatti0x0000          38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
58876c9d3aSMarcelo Tosatti
59876c9d3aSMarcelo Tosatti========================
60876c9d3aSMarcelo TosattiDEBUGFS COMMANDS
61876c9d3aSMarcelo Tosatti========================
62876c9d3aSMarcelo Tosatti
63876c9d3aSMarcelo Tosattithose commands are used via debugfs interface
64876c9d3aSMarcelo Tosatti
65876c9d3aSMarcelo Tosatti===========
66876c9d3aSMarcelo Tosattirdmac
67876c9d3aSMarcelo Tosattirdbbp
68876c9d3aSMarcelo Tosattirdrf
69876c9d3aSMarcelo Tosatti	These commands are used to read the MAC, BBP and RF registers from the
70876c9d3aSMarcelo Tosatti	card.  These commands take one parameter that specifies the offset
71876c9d3aSMarcelo Tosatti	location that is to be read.  This parameter must be specified in
7225985edcSLucas De Marchi	hexadecimal (its possible to precede preceding the number with a "0x").
73876c9d3aSMarcelo Tosatti
74156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
75876c9d3aSMarcelo Tosatti
76876c9d3aSMarcelo Tosatti	Usage:
77876c9d3aSMarcelo Tosatti		echo "0xa123" > rdmac ; cat rdmac
78876c9d3aSMarcelo Tosatti		echo "0xa123" > rdbbp ; cat rdbbp
79876c9d3aSMarcelo Tosatti		echo "0xa123" > rdrf ; cat rdrf
80876c9d3aSMarcelo Tosattiwrmac
81876c9d3aSMarcelo Tosattiwrbbp
82876c9d3aSMarcelo Tosattiwrrf
83876c9d3aSMarcelo Tosatti	These commands are used to write the MAC, BBP and RF registers in the
84876c9d3aSMarcelo Tosatti	card.  These commands take two parameters that specify the offset
85876c9d3aSMarcelo Tosatti	location and the value that is to be written. This parameters must
8625985edcSLucas De Marchi	be specified in hexadecimal (its possible to precede the number
87876c9d3aSMarcelo Tosatti	with a "0x").
88876c9d3aSMarcelo Tosatti
89876c9d3aSMarcelo Tosatti	Usage:
90876c9d3aSMarcelo Tosatti		echo "0xa123 0xaa" > wrmac
91876c9d3aSMarcelo Tosatti		echo "0xa123 0xaa" > wrbbp
92876c9d3aSMarcelo Tosatti		echo "0xa123 0xaa" > wrrf
93876c9d3aSMarcelo Tosatti
94876c9d3aSMarcelo Tosattisleepparams
95876c9d3aSMarcelo Tosatti	This command is used to set the sleepclock configurations
96876c9d3aSMarcelo Tosatti
97156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/
98876c9d3aSMarcelo Tosatti
99876c9d3aSMarcelo Tosatti	Usage:
100876c9d3aSMarcelo Tosatti		cat sleepparams: reads the current sleepclock configuration
101876c9d3aSMarcelo Tosatti
102876c9d3aSMarcelo Tosatti		echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
103876c9d3aSMarcelo Tosatti
104876c9d3aSMarcelo Tosatti		where:
105876c9d3aSMarcelo Tosatti			p1 is Sleep clock error in ppm (0-65535)
106876c9d3aSMarcelo Tosatti			p2 is Wakeup offset in usec (0-65535)
107876c9d3aSMarcelo Tosatti			p3 is Clock stabilization time in usec (0-65535)
108876c9d3aSMarcelo Tosatti			p4 is Control periodic calibration (0-2)
109876c9d3aSMarcelo Tosatti			p5 is Control the use of external sleep clock (0-2)
110876c9d3aSMarcelo Tosatti			p6 is reserved for debug (0-65535)
111876c9d3aSMarcelo Tosatti
112876c9d3aSMarcelo Tosattisubscribed_events
113876c9d3aSMarcelo Tosatti
114876c9d3aSMarcelo Tosatti	The subscribed_events directory contains the interface for the
115876c9d3aSMarcelo Tosatti	subscribed events API.
116876c9d3aSMarcelo Tosatti
117156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/subscribed_events/
118876c9d3aSMarcelo Tosatti
119876c9d3aSMarcelo Tosatti	Each event is represented by a filename. Each filename consists of the
120876c9d3aSMarcelo Tosatti	following three fields:
121876c9d3aSMarcelo Tosatti	Value Frequency Subscribed
122876c9d3aSMarcelo Tosatti
123876c9d3aSMarcelo Tosatti	To read the current values for a given event, do:
124876c9d3aSMarcelo Tosatti		cat event
125876c9d3aSMarcelo Tosatti	To set the current values, do:
126876c9d3aSMarcelo Tosatti		echo "60 2 1" > event
127876c9d3aSMarcelo Tosatti
128876c9d3aSMarcelo Tosatti	Frequency field specifies the reporting frequency for this event.
129876c9d3aSMarcelo Tosatti	If it is set to 0, then the event is reported only once, and then
130876c9d3aSMarcelo Tosatti	automatically unsubscribed. If it is set to 1, then the event is
131876c9d3aSMarcelo Tosatti	reported every time it occurs. If it is set to N, then the event is
132876c9d3aSMarcelo Tosatti	reported every Nth time it occurs.
133876c9d3aSMarcelo Tosatti
134876c9d3aSMarcelo Tosatti	beacon_missed
135876c9d3aSMarcelo Tosatti	Value field specifies the number of consecutive missing beacons which
136876c9d3aSMarcelo Tosatti	triggers the LINK_LOSS event. This event is generated only once after
137876c9d3aSMarcelo Tosatti	which the firmware resets its state. At initialization, the LINK_LOSS
138876c9d3aSMarcelo Tosatti	event is subscribed by default. The default value of MissedBeacons is
139876c9d3aSMarcelo Tosatti	60.
140876c9d3aSMarcelo Tosatti
141876c9d3aSMarcelo Tosatti	failure_count
142876c9d3aSMarcelo Tosatti	Value field specifies the consecutive failure count threshold which
143876c9d3aSMarcelo Tosatti	triggers the generation of the MAX_FAIL event. Once this event is
144876c9d3aSMarcelo Tosatti	generated, the consecutive failure count is reset to 0.
145876c9d3aSMarcelo Tosatti	At initialization, the MAX_FAIL event is NOT subscribed by
146876c9d3aSMarcelo Tosatti	default.
147876c9d3aSMarcelo Tosatti
148876c9d3aSMarcelo Tosatti	high_rssi
149876c9d3aSMarcelo Tosatti	This event is generated when the average received RSSI in beacons goes
150876c9d3aSMarcelo Tosatti	above a threshold, specified by Value.
151876c9d3aSMarcelo Tosatti
152876c9d3aSMarcelo Tosatti	low_rssi
153876c9d3aSMarcelo Tosatti	This event is generated when the average received RSSI in beacons goes
154876c9d3aSMarcelo Tosatti	below a threshold, specified by Value.
155876c9d3aSMarcelo Tosatti
156876c9d3aSMarcelo Tosatti	high_snr
157876c9d3aSMarcelo Tosatti	This event is generated when the average received SNR in beacons goes
158876c9d3aSMarcelo Tosatti	above a threshold, specified by Value.
159876c9d3aSMarcelo Tosatti
160876c9d3aSMarcelo Tosatti	low_snr
161876c9d3aSMarcelo Tosatti	This event is generated when the average received SNR in beacons goes
162876c9d3aSMarcelo Tosatti	below a threshold, specified by Value.
163876c9d3aSMarcelo Tosatti
164876c9d3aSMarcelo Tosattiextscan
165876c9d3aSMarcelo Tosatti	This command is used to do a specific scan.
166876c9d3aSMarcelo Tosatti
167156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/
168876c9d3aSMarcelo Tosatti
169876c9d3aSMarcelo Tosatti	Usage: echo "SSID" > extscan
170876c9d3aSMarcelo Tosatti
171876c9d3aSMarcelo Tosatti	Example:
172876c9d3aSMarcelo Tosatti		echo "LINKSYS-AP" > extscan
173876c9d3aSMarcelo Tosatti
174876c9d3aSMarcelo Tosatti	To see the results of use getscantable command.
175876c9d3aSMarcelo Tosatti
176876c9d3aSMarcelo Tosattigetscantable
177876c9d3aSMarcelo Tosatti
178876c9d3aSMarcelo Tosatti	Display the current contents of the driver scan table (ie. get the
179876c9d3aSMarcelo Tosatti	scan results).
180876c9d3aSMarcelo Tosatti
181156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/
182876c9d3aSMarcelo Tosatti
183876c9d3aSMarcelo Tosatti	Usage:
184876c9d3aSMarcelo Tosatti		cat getscantable
185876c9d3aSMarcelo Tosatti
186876c9d3aSMarcelo Tosattisetuserscan
187876c9d3aSMarcelo Tosatti	Initiate a customized scan and retrieve the results
188876c9d3aSMarcelo Tosatti
189876c9d3aSMarcelo Tosatti
190156f5a78SGeunSik Lim	Path: /sys/kernel/debug/libertas_wireless/ethX/
191876c9d3aSMarcelo Tosatti
192876c9d3aSMarcelo Tosatti    Usage:
193876c9d3aSMarcelo Tosatti       echo "[ARGS]" > setuserscan
194876c9d3aSMarcelo Tosatti
195876c9d3aSMarcelo Tosatti         where [ARGS]:
196876c9d3aSMarcelo Tosatti
197876c9d3aSMarcelo Tosatti      bssid=xx:xx:xx:xx:xx:xx  specify a BSSID filter for the scan
198876c9d3aSMarcelo Tosatti      ssid="[SSID]"            specify a SSID filter for the scan
199876c9d3aSMarcelo Tosatti      keep=[0 or 1]            keep the previous scan results (1), discard (0)
200876c9d3aSMarcelo Tosatti      dur=[scan time]          time to scan for each channel in milliseconds
201876c9d3aSMarcelo Tosatti      type=[1,2,3]             BSS type: 1 (Infra), 2(Adhoc), 3(Any)
202876c9d3aSMarcelo Tosatti
203dd1d12daSHolger Schurig    Any combination of the above arguments can be supplied on the command
204a7d0adaeSHolger Schurig    line. If dur tokens are absent, the driver default setting will be used.
205a7d0adaeSHolger Schurig    The bssid and ssid fields, if blank, will produce an unfiltered scan.
206a7d0adaeSHolger Schurig    The type field will default to 3 (Any) and the keep field will default
207a7d0adaeSHolger Schurig    to 0 (Discard).
208876c9d3aSMarcelo Tosatti
209876c9d3aSMarcelo Tosatti    Examples:
210a7d0adaeSHolger Schurig    1) Perform a passive scan on all channels for 20 ms per channel:
211a7d0adaeSHolger Schurig            echo "dur=20" > setuserscan
212876c9d3aSMarcelo Tosatti
213a7d0adaeSHolger Schurig    2) Perform an active scan for a specific SSID:
214a7d0adaeSHolger Schurig            echo "ssid="TestAP"" > setuserscan
215876c9d3aSMarcelo Tosatti
216a7d0adaeSHolger Schurig    3) Scan all available channels (B/G, A bands) for a specific BSSID, keep
217876c9d3aSMarcelo Tosatti       the current scan table intact, update existing or append new scan data:
218876c9d3aSMarcelo Tosatti            echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
219876c9d3aSMarcelo Tosatti
220a7d0adaeSHolger Schurig    4) Scan for all infrastructure networks.
221dd1d12daSHolger Schurig       Keep the previous scan table intact. Update any duplicate BSSID/SSID
222dd1d12daSHolger Schurig       matches with the new scan data:
223a7d0adaeSHolger Schurig            echo "type=1 keep=1" > setuserscan
224876c9d3aSMarcelo Tosatti
225876c9d3aSMarcelo Tosatti    All entries in the scan table (not just the new scan data when keep=1)
226876c9d3aSMarcelo Tosatti    will be displayed upon completion by use of the getscantable ioctl.
227876c9d3aSMarcelo Tosatti
2281311843cSAmitkumar Karwarhostsleep
2291311843cSAmitkumar Karwar	This command is used to enable/disable host sleep.
2301311843cSAmitkumar Karwar	Note: Host sleep parameters should be configured using
2311311843cSAmitkumar Karwar	"ethtool -s ethX wol X" command before enabling host sleep.
2321311843cSAmitkumar Karwar
2331311843cSAmitkumar Karwar	Path: /sys/kernel/debug/libertas_wireless/ethX/
2341311843cSAmitkumar Karwar
2351311843cSAmitkumar Karwar	Usage:
2361311843cSAmitkumar Karwar		cat hostsleep: reads the current hostsleep state
2371311843cSAmitkumar Karwar		echo "1" > hostsleep : enable host sleep.
2381311843cSAmitkumar Karwar		echo "0" > hostsleep : disable host sleep
2391311843cSAmitkumar Karwar
240