blob: 1453eec82a99288256e55bf7b9a408c3c1648408 [file] [log] [blame]
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02001================================================================================
Amitkumar Karwar49125452009-09-30 20:04:38 -07002 README for Libertas
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02003
David Woodhouse0e8a5bd2007-05-25 23:15:27 -04004 (c) Copyright © 2003-2006, Marvell International Ltd.
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02005 All Rights Reserved
6
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.
14
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================================================================================
20
21=====================
22DRIVER LOADING
23=====================
24
25 o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
26
27 o. Load driver by using the following command:
28
29 insmod usb8388.ko [fw_name=usb8388.bin]
30
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020031=========================
32ETHTOOL
33=========================
34
35
36Use the -i option to retrieve version information from the driver.
37
38# ethtool -i eth0
39driver: libertas
40version: COMM-USB8388-318.p4
41firmware-version: 5.110.7
42bus-info:
43
44Use the -e option to read the EEPROM contents of the card.
45
46 Usage:
47 ethtool -e ethX [raw on|off] [offset N] [length N]
48
49 -e retrieves and prints an EEPROM dump for the specified ethernet
50 device. When raw is enabled, then it dumps the raw EEPROM data
51 to stdout. The length and offset parameters allow dumping cer-
52 tain portions of the EEPROM. Default is to dump the entire EEP-
53 ROM.
54
55# ethtool -e eth0 offset 0 length 16
56Offset Values
57------ ------
580x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
59
60========================
61DEBUGFS COMMANDS
62========================
63
64those commands are used via debugfs interface
65
66===========
67rdmac
68rdbbp
69rdrf
70 These commands are used to read the MAC, BBP and RF registers from the
71 card. These commands take one parameter that specifies the offset
72 location that is to be read. This parameter must be specified in
Lucas De Marchi25985ed2011-03-30 22:57:33 -030073 hexadecimal (its possible to precede preceding the number with a "0x").
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020074
GeunSik Lim156f5a72009-06-02 15:01:37 +090075 Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020076
77 Usage:
78 echo "0xa123" > rdmac ; cat rdmac
79 echo "0xa123" > rdbbp ; cat rdbbp
80 echo "0xa123" > rdrf ; cat rdrf
81wrmac
82wrbbp
83wrrf
84 These commands are used to write the MAC, BBP and RF registers in the
85 card. These commands take two parameters that specify the offset
86 location and the value that is to be written. This parameters must
Lucas De Marchi25985ed2011-03-30 22:57:33 -030087 be specified in hexadecimal (its possible to precede the number
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020088 with a "0x").
89
90 Usage:
91 echo "0xa123 0xaa" > wrmac
92 echo "0xa123 0xaa" > wrbbp
93 echo "0xa123 0xaa" > wrrf
94
95sleepparams
96 This command is used to set the sleepclock configurations
97
GeunSik Lim156f5a72009-06-02 15:01:37 +090098 Path: /sys/kernel/debug/libertas_wireless/ethX/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020099
100 Usage:
101 cat sleepparams: reads the current sleepclock configuration
102
103 echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
104
105 where:
106 p1 is Sleep clock error in ppm (0-65535)
107 p2 is Wakeup offset in usec (0-65535)
108 p3 is Clock stabilization time in usec (0-65535)
109 p4 is Control periodic calibration (0-2)
110 p5 is Control the use of external sleep clock (0-2)
111 p6 is reserved for debug (0-65535)
112
113subscribed_events
114
115 The subscribed_events directory contains the interface for the
116 subscribed events API.
117
GeunSik Lim156f5a72009-06-02 15:01:37 +0900118 Path: /sys/kernel/debug/libertas_wireless/ethX/subscribed_events/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200119
120 Each event is represented by a filename. Each filename consists of the
121 following three fields:
122 Value Frequency Subscribed
123
124 To read the current values for a given event, do:
125 cat event
126 To set the current values, do:
127 echo "60 2 1" > event
128
129 Frequency field specifies the reporting frequency for this event.
130 If it is set to 0, then the event is reported only once, and then
131 automatically unsubscribed. If it is set to 1, then the event is
132 reported every time it occurs. If it is set to N, then the event is
133 reported every Nth time it occurs.
134
135 beacon_missed
136 Value field specifies the number of consecutive missing beacons which
137 triggers the LINK_LOSS event. This event is generated only once after
138 which the firmware resets its state. At initialization, the LINK_LOSS
139 event is subscribed by default. The default value of MissedBeacons is
140 60.
141
142 failure_count
143 Value field specifies the consecutive failure count threshold which
144 triggers the generation of the MAX_FAIL event. Once this event is
145 generated, the consecutive failure count is reset to 0.
146 At initialization, the MAX_FAIL event is NOT subscribed by
147 default.
148
149 high_rssi
150 This event is generated when the average received RSSI in beacons goes
151 above a threshold, specified by Value.
152
153 low_rssi
154 This event is generated when the average received RSSI in beacons goes
155 below a threshold, specified by Value.
156
157 high_snr
158 This event is generated when the average received SNR in beacons goes
159 above a threshold, specified by Value.
160
161 low_snr
162 This event is generated when the average received SNR in beacons goes
163 below a threshold, specified by Value.
164
165extscan
166 This command is used to do a specific scan.
167
GeunSik Lim156f5a72009-06-02 15:01:37 +0900168 Path: /sys/kernel/debug/libertas_wireless/ethX/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200169
170 Usage: echo "SSID" > extscan
171
172 Example:
173 echo "LINKSYS-AP" > extscan
174
175 To see the results of use getscantable command.
176
177getscantable
178
179 Display the current contents of the driver scan table (ie. get the
180 scan results).
181
GeunSik Lim156f5a72009-06-02 15:01:37 +0900182 Path: /sys/kernel/debug/libertas_wireless/ethX/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200183
184 Usage:
185 cat getscantable
186
187setuserscan
188 Initiate a customized scan and retrieve the results
189
190
GeunSik Lim156f5a72009-06-02 15:01:37 +0900191 Path: /sys/kernel/debug/libertas_wireless/ethX/
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200192
193 Usage:
194 echo "[ARGS]" > setuserscan
195
196 where [ARGS]:
197
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200198 bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan
199 ssid="[SSID]" specify a SSID filter for the scan
200 keep=[0 or 1] keep the previous scan results (1), discard (0)
201 dur=[scan time] time to scan for each channel in milliseconds
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200202 type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
203
Holger Schurigdd1d12d2007-11-28 17:29:36 +0100204 Any combination of the above arguments can be supplied on the command
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100205 line. If dur tokens are absent, the driver default setting will be used.
206 The bssid and ssid fields, if blank, will produce an unfiltered scan.
207 The type field will default to 3 (Any) and the keep field will default
208 to 0 (Discard).
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200209
210 Examples:
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100211 1) Perform a passive scan on all channels for 20 ms per channel:
212 echo "dur=20" > setuserscan
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200213
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100214 2) Perform an active scan for a specific SSID:
215 echo "ssid="TestAP"" > setuserscan
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200216
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100217 3) Scan all available channels (B/G, A bands) for a specific BSSID, keep
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200218 the current scan table intact, update existing or append new scan data:
219 echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
220
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100221 4) Scan for all infrastructure networks.
Holger Schurigdd1d12d2007-11-28 17:29:36 +0100222 Keep the previous scan table intact. Update any duplicate BSSID/SSID
223 matches with the new scan data:
Holger Schuriga7d0ada2007-11-28 17:30:21 +0100224 echo "type=1 keep=1" > setuserscan
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200225
226 All entries in the scan table (not just the new scan data when keep=1)
227 will be displayed upon completion by use of the getscantable ioctl.
228
Amitkumar Karwar13118432010-07-08 06:43:48 +0530229hostsleep
230 This command is used to enable/disable host sleep.
231 Note: Host sleep parameters should be configured using
232 "ethtool -s ethX wol X" command before enabling host sleep.
233
234 Path: /sys/kernel/debug/libertas_wireless/ethX/
235
236 Usage:
237 cat hostsleep: reads the current hostsleep state
238 echo "1" > hostsleep : enable host sleep.
239 echo "0" > hostsleep : disable host sleep
240
Amitkumar Karwar49125452009-09-30 20:04:38 -0700241========================
242IWCONFIG COMMANDS
243========================
244power period
245
246 This command is used to configure the station in deep sleep mode /
247 auto deep sleep mode.
248
249 The timer is implemented to monitor the activities (command, event,
250 etc.). When an activity is detected station will exit from deep
251 sleep mode automatically and restart the timer. At timer expiry
252 (no activity for defined time period) the deep sleep mode is entered
253 automatically.
254
255 Note: this command is for SDIO interface only.
256
257 Usage:
258 To enable deep sleep mode do:
259 iwconfig wlan0 power period 0
260 To enable auto deep sleep mode with idle time period 5 seconds do:
261 iwconfig wlan0 power period 5
262 To disable deep sleep/auto deep sleep mode do:
263 iwconfig wlan0 power period -1
264
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200265==============================================================================