xref: /openbmc/linux/drivers/net/wireless/marvell/libertas/README (revision 9938b04472d5c59f8bd8152a548533a8599596a2)
1*f988d640SKalle Valo================================================================================
2*f988d640SKalle Valo			README for Libertas
3*f988d640SKalle Valo
4*f988d640SKalle Valo (c) Copyright © 2003-2006, Marvell International Ltd.
5*f988d640SKalle Valo All Rights Reserved
6*f988d640SKalle Valo
7*f988d640SKalle Valo This software file (the "File") is distributed by Marvell International
8*f988d640SKalle Valo Ltd. under the terms of the GNU General Public License Version 2, June 1991
9*f988d640SKalle Valo (the "License").  You may use, redistribute and/or modify this File in
10*f988d640SKalle Valo accordance with the terms and conditions of the License, a copy of which
11*f988d640SKalle Valo is available along with the File in the license.txt file or on the worldwide
12*f988d640SKalle Valo web at http://www.gnu.org/licenses/gpl.txt.
13*f988d640SKalle Valo
14*f988d640SKalle Valo THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15*f988d640SKalle Valo IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16*f988d640SKalle Valo ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
17*f988d640SKalle Valo this warranty disclaimer.
18*f988d640SKalle Valo================================================================================
19*f988d640SKalle Valo
20*f988d640SKalle Valo=====================
21*f988d640SKalle ValoDRIVER LOADING
22*f988d640SKalle Valo=====================
23*f988d640SKalle Valo
24*f988d640SKalle Valo	o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
25*f988d640SKalle Valo
26*f988d640SKalle Valo	o. Load driver by using the following command:
27*f988d640SKalle Valo
28*f988d640SKalle Valo		insmod usb8388.ko [fw_name=usb8388.bin]
29*f988d640SKalle Valo
30*f988d640SKalle Valo=========================
31*f988d640SKalle ValoETHTOOL
32*f988d640SKalle Valo=========================
33*f988d640SKalle Valo
34*f988d640SKalle Valo
35*f988d640SKalle ValoUse the -i option to retrieve version information from the driver.
36*f988d640SKalle Valo
37*f988d640SKalle Valo# ethtool -i eth0
38*f988d640SKalle Valodriver: libertas
39*f988d640SKalle Valoversion: COMM-USB8388-318.p4
40*f988d640SKalle Valofirmware-version: 5.110.7
41*f988d640SKalle Valobus-info:
42*f988d640SKalle Valo
43*f988d640SKalle ValoUse the -e option to read the EEPROM contents of the card.
44*f988d640SKalle Valo
45*f988d640SKalle Valo	Usage:
46*f988d640SKalle Valo	ethtool -e ethX [raw on|off] [offset N] [length N]
47*f988d640SKalle Valo
48*f988d640SKalle Valo       -e     retrieves and prints an EEPROM dump for the  specified  ethernet
49*f988d640SKalle Valo              device.   When raw is enabled, then it dumps the raw EEPROM data
50*f988d640SKalle Valo              to stdout. The length and offset parameters allow  dumping  cer-
51*f988d640SKalle Valo              tain portions of the EEPROM.  Default is to dump the entire EEP-
52*f988d640SKalle Valo              ROM.
53*f988d640SKalle Valo
54*f988d640SKalle Valo# ethtool -e eth0 offset 0 length 16
55*f988d640SKalle ValoOffset          Values
56*f988d640SKalle Valo------          ------
57*f988d640SKalle Valo0x0000          38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
58*f988d640SKalle Valo
59*f988d640SKalle Valo========================
60*f988d640SKalle ValoDEBUGFS COMMANDS
61*f988d640SKalle Valo========================
62*f988d640SKalle Valo
63*f988d640SKalle Valothose commands are used via debugfs interface
64*f988d640SKalle Valo
65*f988d640SKalle Valo===========
66*f988d640SKalle Valordmac
67*f988d640SKalle Valordbbp
68*f988d640SKalle Valordrf
69*f988d640SKalle Valo	These commands are used to read the MAC, BBP and RF registers from the
70*f988d640SKalle Valo	card.  These commands take one parameter that specifies the offset
71*f988d640SKalle Valo	location that is to be read.  This parameter must be specified in
72*f988d640SKalle Valo	hexadecimal (its possible to precede preceding the number with a "0x").
73*f988d640SKalle Valo
74*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
75*f988d640SKalle Valo
76*f988d640SKalle Valo	Usage:
77*f988d640SKalle Valo		echo "0xa123" > rdmac ; cat rdmac
78*f988d640SKalle Valo		echo "0xa123" > rdbbp ; cat rdbbp
79*f988d640SKalle Valo		echo "0xa123" > rdrf ; cat rdrf
80*f988d640SKalle Valowrmac
81*f988d640SKalle Valowrbbp
82*f988d640SKalle Valowrrf
83*f988d640SKalle Valo	These commands are used to write the MAC, BBP and RF registers in the
84*f988d640SKalle Valo	card.  These commands take two parameters that specify the offset
85*f988d640SKalle Valo	location and the value that is to be written. This parameters must
86*f988d640SKalle Valo	be specified in hexadecimal (its possible to precede the number
87*f988d640SKalle Valo	with a "0x").
88*f988d640SKalle Valo
89*f988d640SKalle Valo	Usage:
90*f988d640SKalle Valo		echo "0xa123 0xaa" > wrmac
91*f988d640SKalle Valo		echo "0xa123 0xaa" > wrbbp
92*f988d640SKalle Valo		echo "0xa123 0xaa" > wrrf
93*f988d640SKalle Valo
94*f988d640SKalle Valosleepparams
95*f988d640SKalle Valo	This command is used to set the sleepclock configurations
96*f988d640SKalle Valo
97*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/
98*f988d640SKalle Valo
99*f988d640SKalle Valo	Usage:
100*f988d640SKalle Valo		cat sleepparams: reads the current sleepclock configuration
101*f988d640SKalle Valo
102*f988d640SKalle Valo		echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
103*f988d640SKalle Valo
104*f988d640SKalle Valo		where:
105*f988d640SKalle Valo			p1 is Sleep clock error in ppm (0-65535)
106*f988d640SKalle Valo			p2 is Wakeup offset in usec (0-65535)
107*f988d640SKalle Valo			p3 is Clock stabilization time in usec (0-65535)
108*f988d640SKalle Valo			p4 is Control periodic calibration (0-2)
109*f988d640SKalle Valo			p5 is Control the use of external sleep clock (0-2)
110*f988d640SKalle Valo			p6 is reserved for debug (0-65535)
111*f988d640SKalle Valo
112*f988d640SKalle Valosubscribed_events
113*f988d640SKalle Valo
114*f988d640SKalle Valo	The subscribed_events directory contains the interface for the
115*f988d640SKalle Valo	subscribed events API.
116*f988d640SKalle Valo
117*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/subscribed_events/
118*f988d640SKalle Valo
119*f988d640SKalle Valo	Each event is represented by a filename. Each filename consists of the
120*f988d640SKalle Valo	following three fields:
121*f988d640SKalle Valo	Value Frequency Subscribed
122*f988d640SKalle Valo
123*f988d640SKalle Valo	To read the current values for a given event, do:
124*f988d640SKalle Valo		cat event
125*f988d640SKalle Valo	To set the current values, do:
126*f988d640SKalle Valo		echo "60 2 1" > event
127*f988d640SKalle Valo
128*f988d640SKalle Valo	Frequency field specifies the reporting frequency for this event.
129*f988d640SKalle Valo	If it is set to 0, then the event is reported only once, and then
130*f988d640SKalle Valo	automatically unsubscribed. If it is set to 1, then the event is
131*f988d640SKalle Valo	reported every time it occurs. If it is set to N, then the event is
132*f988d640SKalle Valo	reported every Nth time it occurs.
133*f988d640SKalle Valo
134*f988d640SKalle Valo	beacon_missed
135*f988d640SKalle Valo	Value field specifies the number of consecutive missing beacons which
136*f988d640SKalle Valo	triggers the LINK_LOSS event. This event is generated only once after
137*f988d640SKalle Valo	which the firmware resets its state. At initialization, the LINK_LOSS
138*f988d640SKalle Valo	event is subscribed by default. The default value of MissedBeacons is
139*f988d640SKalle Valo	60.
140*f988d640SKalle Valo
141*f988d640SKalle Valo	failure_count
142*f988d640SKalle Valo	Value field specifies the consecutive failure count threshold which
143*f988d640SKalle Valo	triggers the generation of the MAX_FAIL event. Once this event is
144*f988d640SKalle Valo	generated, the consecutive failure count is reset to 0.
145*f988d640SKalle Valo	At initialization, the MAX_FAIL event is NOT subscribed by
146*f988d640SKalle Valo	default.
147*f988d640SKalle Valo
148*f988d640SKalle Valo	high_rssi
149*f988d640SKalle Valo	This event is generated when the average received RSSI in beacons goes
150*f988d640SKalle Valo	above a threshold, specified by Value.
151*f988d640SKalle Valo
152*f988d640SKalle Valo	low_rssi
153*f988d640SKalle Valo	This event is generated when the average received RSSI in beacons goes
154*f988d640SKalle Valo	below a threshold, specified by Value.
155*f988d640SKalle Valo
156*f988d640SKalle Valo	high_snr
157*f988d640SKalle Valo	This event is generated when the average received SNR in beacons goes
158*f988d640SKalle Valo	above a threshold, specified by Value.
159*f988d640SKalle Valo
160*f988d640SKalle Valo	low_snr
161*f988d640SKalle Valo	This event is generated when the average received SNR in beacons goes
162*f988d640SKalle Valo	below a threshold, specified by Value.
163*f988d640SKalle Valo
164*f988d640SKalle Valoextscan
165*f988d640SKalle Valo	This command is used to do a specific scan.
166*f988d640SKalle Valo
167*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/
168*f988d640SKalle Valo
169*f988d640SKalle Valo	Usage: echo "SSID" > extscan
170*f988d640SKalle Valo
171*f988d640SKalle Valo	Example:
172*f988d640SKalle Valo		echo "LINKSYS-AP" > extscan
173*f988d640SKalle Valo
174*f988d640SKalle Valo	To see the results of use getscantable command.
175*f988d640SKalle Valo
176*f988d640SKalle Valogetscantable
177*f988d640SKalle Valo
178*f988d640SKalle Valo	Display the current contents of the driver scan table (ie. get the
179*f988d640SKalle Valo	scan results).
180*f988d640SKalle Valo
181*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/
182*f988d640SKalle Valo
183*f988d640SKalle Valo	Usage:
184*f988d640SKalle Valo		cat getscantable
185*f988d640SKalle Valo
186*f988d640SKalle Valosetuserscan
187*f988d640SKalle Valo	Initiate a customized scan and retrieve the results
188*f988d640SKalle Valo
189*f988d640SKalle Valo
190*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/
191*f988d640SKalle Valo
192*f988d640SKalle Valo    Usage:
193*f988d640SKalle Valo       echo "[ARGS]" > setuserscan
194*f988d640SKalle Valo
195*f988d640SKalle Valo         where [ARGS]:
196*f988d640SKalle Valo
197*f988d640SKalle Valo      bssid=xx:xx:xx:xx:xx:xx  specify a BSSID filter for the scan
198*f988d640SKalle Valo      ssid="[SSID]"            specify a SSID filter for the scan
199*f988d640SKalle Valo      keep=[0 or 1]            keep the previous scan results (1), discard (0)
200*f988d640SKalle Valo      dur=[scan time]          time to scan for each channel in milliseconds
201*f988d640SKalle Valo      type=[1,2,3]             BSS type: 1 (Infra), 2(Adhoc), 3(Any)
202*f988d640SKalle Valo
203*f988d640SKalle Valo    Any combination of the above arguments can be supplied on the command
204*f988d640SKalle Valo    line. If dur tokens are absent, the driver default setting will be used.
205*f988d640SKalle Valo    The bssid and ssid fields, if blank, will produce an unfiltered scan.
206*f988d640SKalle Valo    The type field will default to 3 (Any) and the keep field will default
207*f988d640SKalle Valo    to 0 (Discard).
208*f988d640SKalle Valo
209*f988d640SKalle Valo    Examples:
210*f988d640SKalle Valo    1) Perform a passive scan on all channels for 20 ms per channel:
211*f988d640SKalle Valo            echo "dur=20" > setuserscan
212*f988d640SKalle Valo
213*f988d640SKalle Valo    2) Perform an active scan for a specific SSID:
214*f988d640SKalle Valo            echo "ssid="TestAP"" > setuserscan
215*f988d640SKalle Valo
216*f988d640SKalle Valo    3) Scan all available channels (B/G, A bands) for a specific BSSID, keep
217*f988d640SKalle Valo       the current scan table intact, update existing or append new scan data:
218*f988d640SKalle Valo            echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
219*f988d640SKalle Valo
220*f988d640SKalle Valo    4) Scan for all infrastructure networks.
221*f988d640SKalle Valo       Keep the previous scan table intact. Update any duplicate BSSID/SSID
222*f988d640SKalle Valo       matches with the new scan data:
223*f988d640SKalle Valo            echo "type=1 keep=1" > setuserscan
224*f988d640SKalle Valo
225*f988d640SKalle Valo    All entries in the scan table (not just the new scan data when keep=1)
226*f988d640SKalle Valo    will be displayed upon completion by use of the getscantable ioctl.
227*f988d640SKalle Valo
228*f988d640SKalle Valohostsleep
229*f988d640SKalle Valo	This command is used to enable/disable host sleep.
230*f988d640SKalle Valo	Note: Host sleep parameters should be configured using
231*f988d640SKalle Valo	"ethtool -s ethX wol X" command before enabling host sleep.
232*f988d640SKalle Valo
233*f988d640SKalle Valo	Path: /sys/kernel/debug/libertas_wireless/ethX/
234*f988d640SKalle Valo
235*f988d640SKalle Valo	Usage:
236*f988d640SKalle Valo		cat hostsleep: reads the current hostsleep state
237*f988d640SKalle Valo		echo "1" > hostsleep : enable host sleep.
238*f988d640SKalle Valo		echo "0" > hostsleep : disable host sleep
239*f988d640SKalle Valo
240