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