162306a36Sopenharmony_ci================================================================================ 262306a36Sopenharmony_ci README for Libertas 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci (c) Copyright © 2003-2006, Marvell International Ltd. 562306a36Sopenharmony_ci All Rights Reserved 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci This software file (the "File") is distributed by Marvell International 862306a36Sopenharmony_ci Ltd. under the terms of the GNU General Public License Version 2, June 1991 962306a36Sopenharmony_ci (the "License"). You may use, redistribute and/or modify this File in 1062306a36Sopenharmony_ci accordance with the terms and conditions of the License, a copy of which 1162306a36Sopenharmony_ci is available along with the File in the license.txt file or on the worldwide 1262306a36Sopenharmony_ci web at http://www.gnu.org/licenses/gpl.txt. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 1562306a36Sopenharmony_ci IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 1662306a36Sopenharmony_ci ARE EXPRESSLY DISCLAIMED. The License provides additional details about 1762306a36Sopenharmony_ci this warranty disclaimer. 1862306a36Sopenharmony_ci================================================================================ 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci===================== 2162306a36Sopenharmony_ciDRIVER LOADING 2262306a36Sopenharmony_ci===================== 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci o. Load driver by using the following command: 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci insmod usb8388.ko [fw_name=usb8388.bin] 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci========================= 3162306a36Sopenharmony_ciETHTOOL 3262306a36Sopenharmony_ci========================= 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciUse the -i option to retrieve version information from the driver. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci# ethtool -i eth0 3862306a36Sopenharmony_cidriver: libertas 3962306a36Sopenharmony_civersion: COMM-USB8388-318.p4 4062306a36Sopenharmony_cifirmware-version: 5.110.7 4162306a36Sopenharmony_cibus-info: 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciUse the -e option to read the EEPROM contents of the card. 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci Usage: 4662306a36Sopenharmony_ci ethtool -e ethX [raw on|off] [offset N] [length N] 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci -e retrieves and prints an EEPROM dump for the specified ethernet 4962306a36Sopenharmony_ci device. When raw is enabled, then it dumps the raw EEPROM data 5062306a36Sopenharmony_ci to stdout. The length and offset parameters allow dumping cer- 5162306a36Sopenharmony_ci tain portions of the EEPROM. Default is to dump the entire EEP- 5262306a36Sopenharmony_ci ROM. 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci# ethtool -e eth0 offset 0 length 16 5562306a36Sopenharmony_ciOffset Values 5662306a36Sopenharmony_ci------ ------ 5762306a36Sopenharmony_ci0x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci======================== 6062306a36Sopenharmony_ciDEBUGFS COMMANDS 6162306a36Sopenharmony_ci======================== 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_cithose commands are used via debugfs interface 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci=========== 6662306a36Sopenharmony_cirdmac 6762306a36Sopenharmony_cirdbbp 6862306a36Sopenharmony_cirdrf 6962306a36Sopenharmony_ci These commands are used to read the MAC, BBP and RF registers from the 7062306a36Sopenharmony_ci card. These commands take one parameter that specifies the offset 7162306a36Sopenharmony_ci location that is to be read. This parameter must be specified in 7262306a36Sopenharmony_ci hexadecimal (its possible to precede preceding the number with a "0x"). 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/registers/ 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci Usage: 7762306a36Sopenharmony_ci echo "0xa123" > rdmac ; cat rdmac 7862306a36Sopenharmony_ci echo "0xa123" > rdbbp ; cat rdbbp 7962306a36Sopenharmony_ci echo "0xa123" > rdrf ; cat rdrf 8062306a36Sopenharmony_ciwrmac 8162306a36Sopenharmony_ciwrbbp 8262306a36Sopenharmony_ciwrrf 8362306a36Sopenharmony_ci These commands are used to write the MAC, BBP and RF registers in the 8462306a36Sopenharmony_ci card. These commands take two parameters that specify the offset 8562306a36Sopenharmony_ci location and the value that is to be written. This parameters must 8662306a36Sopenharmony_ci be specified in hexadecimal (its possible to precede the number 8762306a36Sopenharmony_ci with a "0x"). 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci Usage: 9062306a36Sopenharmony_ci echo "0xa123 0xaa" > wrmac 9162306a36Sopenharmony_ci echo "0xa123 0xaa" > wrbbp 9262306a36Sopenharmony_ci echo "0xa123 0xaa" > wrrf 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_cisleepparams 9562306a36Sopenharmony_ci This command is used to set the sleepclock configurations 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/ 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci Usage: 10062306a36Sopenharmony_ci cat sleepparams: reads the current sleepclock configuration 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration. 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci where: 10562306a36Sopenharmony_ci p1 is Sleep clock error in ppm (0-65535) 10662306a36Sopenharmony_ci p2 is Wakeup offset in usec (0-65535) 10762306a36Sopenharmony_ci p3 is Clock stabilization time in usec (0-65535) 10862306a36Sopenharmony_ci p4 is Control periodic calibration (0-2) 10962306a36Sopenharmony_ci p5 is Control the use of external sleep clock (0-2) 11062306a36Sopenharmony_ci p6 is reserved for debug (0-65535) 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_cisubscribed_events 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci The subscribed_events directory contains the interface for the 11562306a36Sopenharmony_ci subscribed events API. 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/subscribed_events/ 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci Each event is represented by a filename. Each filename consists of the 12062306a36Sopenharmony_ci following three fields: 12162306a36Sopenharmony_ci Value Frequency Subscribed 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci To read the current values for a given event, do: 12462306a36Sopenharmony_ci cat event 12562306a36Sopenharmony_ci To set the current values, do: 12662306a36Sopenharmony_ci echo "60 2 1" > event 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci Frequency field specifies the reporting frequency for this event. 12962306a36Sopenharmony_ci If it is set to 0, then the event is reported only once, and then 13062306a36Sopenharmony_ci automatically unsubscribed. If it is set to 1, then the event is 13162306a36Sopenharmony_ci reported every time it occurs. If it is set to N, then the event is 13262306a36Sopenharmony_ci reported every Nth time it occurs. 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_ci beacon_missed 13562306a36Sopenharmony_ci Value field specifies the number of consecutive missing beacons which 13662306a36Sopenharmony_ci triggers the LINK_LOSS event. This event is generated only once after 13762306a36Sopenharmony_ci which the firmware resets its state. At initialization, the LINK_LOSS 13862306a36Sopenharmony_ci event is subscribed by default. The default value of MissedBeacons is 13962306a36Sopenharmony_ci 60. 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci failure_count 14262306a36Sopenharmony_ci Value field specifies the consecutive failure count threshold which 14362306a36Sopenharmony_ci triggers the generation of the MAX_FAIL event. Once this event is 14462306a36Sopenharmony_ci generated, the consecutive failure count is reset to 0. 14562306a36Sopenharmony_ci At initialization, the MAX_FAIL event is NOT subscribed by 14662306a36Sopenharmony_ci default. 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci high_rssi 14962306a36Sopenharmony_ci This event is generated when the average received RSSI in beacons goes 15062306a36Sopenharmony_ci above a threshold, specified by Value. 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci low_rssi 15362306a36Sopenharmony_ci This event is generated when the average received RSSI in beacons goes 15462306a36Sopenharmony_ci below a threshold, specified by Value. 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci high_snr 15762306a36Sopenharmony_ci This event is generated when the average received SNR in beacons goes 15862306a36Sopenharmony_ci above a threshold, specified by Value. 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci low_snr 16162306a36Sopenharmony_ci This event is generated when the average received SNR in beacons goes 16262306a36Sopenharmony_ci below a threshold, specified by Value. 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ciextscan 16562306a36Sopenharmony_ci This command is used to do a specific scan. 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/ 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ci Usage: echo "SSID" > extscan 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci Example: 17262306a36Sopenharmony_ci echo "LINKSYS-AP" > extscan 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ci To see the results of use getscantable command. 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_cigetscantable 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci Display the current contents of the driver scan table (ie. get the 17962306a36Sopenharmony_ci scan results). 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/ 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci Usage: 18462306a36Sopenharmony_ci cat getscantable 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_cisetuserscan 18762306a36Sopenharmony_ci Initiate a customized scan and retrieve the results 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/ 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci Usage: 19362306a36Sopenharmony_ci echo "[ARGS]" > setuserscan 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci where [ARGS]: 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan 19862306a36Sopenharmony_ci ssid="[SSID]" specify a SSID filter for the scan 19962306a36Sopenharmony_ci keep=[0 or 1] keep the previous scan results (1), discard (0) 20062306a36Sopenharmony_ci dur=[scan time] time to scan for each channel in milliseconds 20162306a36Sopenharmony_ci type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any) 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci Any combination of the above arguments can be supplied on the command 20462306a36Sopenharmony_ci line. If dur tokens are absent, the driver default setting will be used. 20562306a36Sopenharmony_ci The bssid and ssid fields, if blank, will produce an unfiltered scan. 20662306a36Sopenharmony_ci The type field will default to 3 (Any) and the keep field will default 20762306a36Sopenharmony_ci to 0 (Discard). 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci Examples: 21062306a36Sopenharmony_ci 1) Perform a passive scan on all channels for 20 ms per channel: 21162306a36Sopenharmony_ci echo "dur=20" > setuserscan 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_ci 2) Perform an active scan for a specific SSID: 21462306a36Sopenharmony_ci echo "ssid="TestAP"" > setuserscan 21562306a36Sopenharmony_ci 21662306a36Sopenharmony_ci 3) Scan all available channels (B/G, A bands) for a specific BSSID, keep 21762306a36Sopenharmony_ci the current scan table intact, update existing or append new scan data: 21862306a36Sopenharmony_ci echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci 4) Scan for all infrastructure networks. 22162306a36Sopenharmony_ci Keep the previous scan table intact. Update any duplicate BSSID/SSID 22262306a36Sopenharmony_ci matches with the new scan data: 22362306a36Sopenharmony_ci echo "type=1 keep=1" > setuserscan 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci All entries in the scan table (not just the new scan data when keep=1) 22662306a36Sopenharmony_ci will be displayed upon completion by use of the getscantable ioctl. 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_cihostsleep 22962306a36Sopenharmony_ci This command is used to enable/disable host sleep. 23062306a36Sopenharmony_ci Note: Host sleep parameters should be configured using 23162306a36Sopenharmony_ci "ethtool -s ethX wol X" command before enabling host sleep. 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci Path: /sys/kernel/debug/libertas_wireless/ethX/ 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci Usage: 23662306a36Sopenharmony_ci cat hostsleep: reads the current hostsleep state 23762306a36Sopenharmony_ci echo "1" > hostsleep : enable host sleep. 23862306a36Sopenharmony_ci echo "0" > hostsleep : disable host sleep 23962306a36Sopenharmony_ci 240