18c2ecf20Sopenharmony_ci================================================================================
28c2ecf20Sopenharmony_ci			README for Libertas
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci (c) Copyright © 2003-2006, Marvell International Ltd.
58c2ecf20Sopenharmony_ci All Rights Reserved
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci This software file (the "File") is distributed by Marvell International
88c2ecf20Sopenharmony_ci Ltd. under the terms of the GNU General Public License Version 2, June 1991
98c2ecf20Sopenharmony_ci (the "License").  You may use, redistribute and/or modify this File in
108c2ecf20Sopenharmony_ci accordance with the terms and conditions of the License, a copy of which
118c2ecf20Sopenharmony_ci is available along with the File in the license.txt file or on the worldwide
128c2ecf20Sopenharmony_ci web at http://www.gnu.org/licenses/gpl.txt.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
158c2ecf20Sopenharmony_ci IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
168c2ecf20Sopenharmony_ci ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
178c2ecf20Sopenharmony_ci this warranty disclaimer.
188c2ecf20Sopenharmony_ci================================================================================
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci=====================
218c2ecf20Sopenharmony_ciDRIVER LOADING
228c2ecf20Sopenharmony_ci=====================
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	o. Load driver by using the following command:
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci		insmod usb8388.ko [fw_name=usb8388.bin]
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci=========================
318c2ecf20Sopenharmony_ciETHTOOL
328c2ecf20Sopenharmony_ci=========================
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciUse the -i option to retrieve version information from the driver.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci# ethtool -i eth0
388c2ecf20Sopenharmony_cidriver: libertas
398c2ecf20Sopenharmony_civersion: COMM-USB8388-318.p4
408c2ecf20Sopenharmony_cifirmware-version: 5.110.7
418c2ecf20Sopenharmony_cibus-info:
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciUse the -e option to read the EEPROM contents of the card.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	Usage:
468c2ecf20Sopenharmony_ci	ethtool -e ethX [raw on|off] [offset N] [length N]
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci       -e     retrieves and prints an EEPROM dump for the  specified  ethernet
498c2ecf20Sopenharmony_ci              device.   When raw is enabled, then it dumps the raw EEPROM data
508c2ecf20Sopenharmony_ci              to stdout. The length and offset parameters allow  dumping  cer-
518c2ecf20Sopenharmony_ci              tain portions of the EEPROM.  Default is to dump the entire EEP-
528c2ecf20Sopenharmony_ci              ROM.
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci# ethtool -e eth0 offset 0 length 16
558c2ecf20Sopenharmony_ciOffset          Values
568c2ecf20Sopenharmony_ci------          ------
578c2ecf20Sopenharmony_ci0x0000          38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci========================
608c2ecf20Sopenharmony_ciDEBUGFS COMMANDS
618c2ecf20Sopenharmony_ci========================
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_cithose commands are used via debugfs interface
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci===========
668c2ecf20Sopenharmony_cirdmac
678c2ecf20Sopenharmony_cirdbbp
688c2ecf20Sopenharmony_cirdrf
698c2ecf20Sopenharmony_ci	These commands are used to read the MAC, BBP and RF registers from the
708c2ecf20Sopenharmony_ci	card.  These commands take one parameter that specifies the offset
718c2ecf20Sopenharmony_ci	location that is to be read.  This parameter must be specified in
728c2ecf20Sopenharmony_ci	hexadecimal (its possible to precede preceding the number with a "0x").
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci	Usage:
778c2ecf20Sopenharmony_ci		echo "0xa123" > rdmac ; cat rdmac
788c2ecf20Sopenharmony_ci		echo "0xa123" > rdbbp ; cat rdbbp
798c2ecf20Sopenharmony_ci		echo "0xa123" > rdrf ; cat rdrf
808c2ecf20Sopenharmony_ciwrmac
818c2ecf20Sopenharmony_ciwrbbp
828c2ecf20Sopenharmony_ciwrrf
838c2ecf20Sopenharmony_ci	These commands are used to write the MAC, BBP and RF registers in the
848c2ecf20Sopenharmony_ci	card.  These commands take two parameters that specify the offset
858c2ecf20Sopenharmony_ci	location and the value that is to be written. This parameters must
868c2ecf20Sopenharmony_ci	be specified in hexadecimal (its possible to precede the number
878c2ecf20Sopenharmony_ci	with a "0x").
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci	Usage:
908c2ecf20Sopenharmony_ci		echo "0xa123 0xaa" > wrmac
918c2ecf20Sopenharmony_ci		echo "0xa123 0xaa" > wrbbp
928c2ecf20Sopenharmony_ci		echo "0xa123 0xaa" > wrrf
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_cisleepparams
958c2ecf20Sopenharmony_ci	This command is used to set the sleepclock configurations
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci	Usage:
1008c2ecf20Sopenharmony_ci		cat sleepparams: reads the current sleepclock configuration
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci		echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci		where:
1058c2ecf20Sopenharmony_ci			p1 is Sleep clock error in ppm (0-65535)
1068c2ecf20Sopenharmony_ci			p2 is Wakeup offset in usec (0-65535)
1078c2ecf20Sopenharmony_ci			p3 is Clock stabilization time in usec (0-65535)
1088c2ecf20Sopenharmony_ci			p4 is Control periodic calibration (0-2)
1098c2ecf20Sopenharmony_ci			p5 is Control the use of external sleep clock (0-2)
1108c2ecf20Sopenharmony_ci			p6 is reserved for debug (0-65535)
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_cisubscribed_events
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ci	The subscribed_events directory contains the interface for the
1158c2ecf20Sopenharmony_ci	subscribed events API.
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/subscribed_events/
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci	Each event is represented by a filename. Each filename consists of the
1208c2ecf20Sopenharmony_ci	following three fields:
1218c2ecf20Sopenharmony_ci	Value Frequency Subscribed
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci	To read the current values for a given event, do:
1248c2ecf20Sopenharmony_ci		cat event
1258c2ecf20Sopenharmony_ci	To set the current values, do:
1268c2ecf20Sopenharmony_ci		echo "60 2 1" > event
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci	Frequency field specifies the reporting frequency for this event.
1298c2ecf20Sopenharmony_ci	If it is set to 0, then the event is reported only once, and then
1308c2ecf20Sopenharmony_ci	automatically unsubscribed. If it is set to 1, then the event is
1318c2ecf20Sopenharmony_ci	reported every time it occurs. If it is set to N, then the event is
1328c2ecf20Sopenharmony_ci	reported every Nth time it occurs.
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci	beacon_missed
1358c2ecf20Sopenharmony_ci	Value field specifies the number of consecutive missing beacons which
1368c2ecf20Sopenharmony_ci	triggers the LINK_LOSS event. This event is generated only once after
1378c2ecf20Sopenharmony_ci	which the firmware resets its state. At initialization, the LINK_LOSS
1388c2ecf20Sopenharmony_ci	event is subscribed by default. The default value of MissedBeacons is
1398c2ecf20Sopenharmony_ci	60.
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ci	failure_count
1428c2ecf20Sopenharmony_ci	Value field specifies the consecutive failure count threshold which
1438c2ecf20Sopenharmony_ci	triggers the generation of the MAX_FAIL event. Once this event is
1448c2ecf20Sopenharmony_ci	generated, the consecutive failure count is reset to 0.
1458c2ecf20Sopenharmony_ci	At initialization, the MAX_FAIL event is NOT subscribed by
1468c2ecf20Sopenharmony_ci	default.
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ci	high_rssi
1498c2ecf20Sopenharmony_ci	This event is generated when the average received RSSI in beacons goes
1508c2ecf20Sopenharmony_ci	above a threshold, specified by Value.
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci	low_rssi
1538c2ecf20Sopenharmony_ci	This event is generated when the average received RSSI in beacons goes
1548c2ecf20Sopenharmony_ci	below a threshold, specified by Value.
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ci	high_snr
1578c2ecf20Sopenharmony_ci	This event is generated when the average received SNR in beacons goes
1588c2ecf20Sopenharmony_ci	above a threshold, specified by Value.
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci	low_snr
1618c2ecf20Sopenharmony_ci	This event is generated when the average received SNR in beacons goes
1628c2ecf20Sopenharmony_ci	below a threshold, specified by Value.
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ciextscan
1658c2ecf20Sopenharmony_ci	This command is used to do a specific scan.
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci	Usage: echo "SSID" > extscan
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci	Example:
1728c2ecf20Sopenharmony_ci		echo "LINKSYS-AP" > extscan
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ci	To see the results of use getscantable command.
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_cigetscantable
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci	Display the current contents of the driver scan table (ie. get the
1798c2ecf20Sopenharmony_ci	scan results).
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci	Usage:
1848c2ecf20Sopenharmony_ci		cat getscantable
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_cisetuserscan
1878c2ecf20Sopenharmony_ci	Initiate a customized scan and retrieve the results
1888c2ecf20Sopenharmony_ci
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci    Usage:
1938c2ecf20Sopenharmony_ci       echo "[ARGS]" > setuserscan
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci         where [ARGS]:
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci      bssid=xx:xx:xx:xx:xx:xx  specify a BSSID filter for the scan
1988c2ecf20Sopenharmony_ci      ssid="[SSID]"            specify a SSID filter for the scan
1998c2ecf20Sopenharmony_ci      keep=[0 or 1]            keep the previous scan results (1), discard (0)
2008c2ecf20Sopenharmony_ci      dur=[scan time]          time to scan for each channel in milliseconds
2018c2ecf20Sopenharmony_ci      type=[1,2,3]             BSS type: 1 (Infra), 2(Adhoc), 3(Any)
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ci    Any combination of the above arguments can be supplied on the command
2048c2ecf20Sopenharmony_ci    line. If dur tokens are absent, the driver default setting will be used.
2058c2ecf20Sopenharmony_ci    The bssid and ssid fields, if blank, will produce an unfiltered scan.
2068c2ecf20Sopenharmony_ci    The type field will default to 3 (Any) and the keep field will default
2078c2ecf20Sopenharmony_ci    to 0 (Discard).
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_ci    Examples:
2108c2ecf20Sopenharmony_ci    1) Perform a passive scan on all channels for 20 ms per channel:
2118c2ecf20Sopenharmony_ci            echo "dur=20" > setuserscan
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_ci    2) Perform an active scan for a specific SSID:
2148c2ecf20Sopenharmony_ci            echo "ssid="TestAP"" > setuserscan
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci    3) Scan all available channels (B/G, A bands) for a specific BSSID, keep
2178c2ecf20Sopenharmony_ci       the current scan table intact, update existing or append new scan data:
2188c2ecf20Sopenharmony_ci            echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci    4) Scan for all infrastructure networks.
2218c2ecf20Sopenharmony_ci       Keep the previous scan table intact. Update any duplicate BSSID/SSID
2228c2ecf20Sopenharmony_ci       matches with the new scan data:
2238c2ecf20Sopenharmony_ci            echo "type=1 keep=1" > setuserscan
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci    All entries in the scan table (not just the new scan data when keep=1)
2268c2ecf20Sopenharmony_ci    will be displayed upon completion by use of the getscantable ioctl.
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_cihostsleep
2298c2ecf20Sopenharmony_ci	This command is used to enable/disable host sleep.
2308c2ecf20Sopenharmony_ci	Note: Host sleep parameters should be configured using
2318c2ecf20Sopenharmony_ci	"ethtool -s ethX wol X" command before enabling host sleep.
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_ci	Path: /sys/kernel/debug/libertas_wireless/ethX/
2348c2ecf20Sopenharmony_ci
2358c2ecf20Sopenharmony_ci	Usage:
2368c2ecf20Sopenharmony_ci		cat hostsleep: reads the current hostsleep state
2378c2ecf20Sopenharmony_ci		echo "1" > hostsleep : enable host sleep.
2388c2ecf20Sopenharmony_ci		echo "0" > hostsleep : disable host sleep
2398c2ecf20Sopenharmony_ci
240