s3c_wifi_v4(GSPI)
所属分类:嵌入式Linux
开发工具:Unix_Linux
文件大小:2611KB
下载次数:139
上传日期:2010-02-27 09:31:59
上 传 者:
beibeiyhj
说明: s3c_wifi_v4是我们做出来的marvell 8686 SPI 驱动,移植了SPI接口部分。采用SPI Poll方式,支持最高SPI速率25M
目前已经测试了以下Linux版本
Linux 2.6.18.1
Linux 2.6.24.7
(s3c_wifi_v4 is the driverof marvell 8686 SPI , part of the SPI interface. Using SPI Poll ways to support the maximum SPI speed 25M which had tested on the following Linux versions of Linux 2.6.18.1 Linux 2.6.24.7)
文件列表:
s3c_wifi_v4(GSPI)\.gspi.ko.cmd (189, 2009-09-22)
s3c_wifi_v4(GSPI)\.gspi.mod.o.cmd (9916, 2009-09-22)
s3c_wifi_v4(GSPI)\.gspi.o.cmd (210, 2009-09-22)
s3c_wifi_v4(GSPI)\.gspi8xxx.ko.cmd (205, 2009-09-22)
s3c_wifi_v4(GSPI)\.gspi8xxx.mod.o.cmd (9960, 2009-09-22)
s3c_wifi_v4(GSPI)\.gspi8xxx.o.cmd (781, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi.ko (95829, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi.mod.c (456, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi.mod.o (11252, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi.o (85757, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi8xxx.ko (2138522, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi8xxx.mod.c (460, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi8xxx.mod.o (11260, 2009-09-22)
s3c_wifi_v4(GSPI)\gspi8xxx.o (2128430, 2009-09-22)
s3c_wifi_v4(GSPI)\Module.symvers (899, 2009-09-22)
s3c_wifi_v4(GSPI)\release_version.h (130, 2009-09-21)
s3c_wifi_v4(GSPI)\tags (298759, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_11d.o.cmd (21290, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_cmd.o.cmd (21290, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_cmdresp.o.cmd (21330, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_debug.o.cmd (21310, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_fops.o.cmd (21328, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_fw.o.cmd (21308, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_join.o.cmd (21300, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_main.o.cmd (21300, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_proc.o.cmd (21300, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_rx.o.cmd (21280, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_scan.o.cmd (21300, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_tx.o.cmd (21280, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_wext.o.cmd (21410, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\.wlan_wmm.o.cmd (21290, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\host.h (13541, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\hostcmd.h (27812, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\include.h (928, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\sbi.h (3025, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\wlan_11d.c (25958, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\wlan_11d.h (3119, 2009-09-21)
s3c_wifi_v4(GSPI)\wlan\wlan_11d.o (130296, 2009-09-22)
s3c_wifi_v4(GSPI)\wlan\wlan_cmd.c (86371, 2009-09-21)
... ...
===============================================================================
U S E R M A N U A L
1) FOR DRIVER BUILD
Goto source code directory src_xxxx.
make [clean] build
The driver and utility binaries can be found in ../bin_xxxx directory.
2) FOR DRIVER INSTALL
a) Copy helper_gspi.bin and gspi8xxx.bin to /lib/firmware/mrvl/ directory,
create the directory if it doesn't exist.
b) insmod gspi.o (or gspi.ko)
c) insmod gspi8xxx.o (or gspi8xxx.ko) helper_name=/lib/firmware/mrvl/helper_gspi.bin \
fw_name=/lib/firmware/mrvl/gspi8xxx.bin
To install GSPI8xxx Driver with user-specified helper file /lib/firmware/mrvl/helper_gspi.bin and
MFG firmware file /lib/firmware/mrvl/gspi8xxxmfg.bin, using the following command:
insmod gspi.o (or gspi.ko)
insmod gspi8xxx.o (or gspi8xxx.ko) mfgmode=1 helper_name=/lib/firmware/mrvl/helper_gspi.bin \
fw_name=/lib/firmware/mrvl/gspi8xxxmfg.bin
3) FOR DRIVER PROC & DEBUG
The following info are provided in /proc/net/wlan/info,
driver_name = "wlan"
driver_version =
InterfaceName = "ethX"
Mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
State = "Disconnected" | "Connected"
MACAddress = <6-byte adapter MAC address>
MCCount =
ESSID =
Channel =
region_code =
MCAddr[n] =
num_tx_bytes =
num_rx_bytes =
num_tx_pkts =
num_rx_pkts =
num_tx_pkts_dropped =
num_rx_pkts_dropped =
num_tx_pkts_err =
num_rx_pkts_err =
carrier "on" | "off"
tx queue "stopped" | "started"
CurCmd "NULL" |
The following debug info are provided in /proc/net/wlan/debug,
IntCounter =
ConnectStatus = <0/1, disconnected/connected>
wmmQStp = <0/1, WMM queue started/stopped>
wmmPkts =
wmmAcVo =
wmmAcVi =
wmmAcBE =
wmmAcBK =
PSMode = <0/1, CAM mode/PS mode>
PSState = <0/1/2/3, full power state/awake state/pre-sleep state/sleep state>
IsDeepSleep = <0/1, not deep sleep state/deep sleep state>
IsAutoDeepSleepEnabled = <0/1, not auto deep sleep mode/auto deep sleep mode>
WakeupDevReq = <0/1, wakeup device not required/required>
WakeupTries =
HS_Configured = <0/1, host sleep not configured/configured>
HS_Activated = <0/1, extended host sleep not activated/activated>
num_tx_timeout =
num_cmd_timeout =
TimeoutCmdId =
TimeoutCmdAct =
LastCmdId =
LastCmdAct =
LastCmdIndex = <0 based last command index>
LastCmdRespId =
LastCmdRespIndex = <0 based last command response index>
LastEvent =
LastEventIndex = <0 based last event index>
num_cmd_h2c_fail =
num_cmd_sleep_cfm_fail =
num_tx_h2c_fail =
num_evt_deauth =
num_evt_disassoc =
num_evt_link_lost =
num_cmd_deauth =
num_cmd_assoc_ok =
num_cmd_assoc_fail =
dnld_sent = <0/1/2, send resources available/sending data to device/sending command to device>
Use dmesg or cat /var/log/debug to check driver debug messages.
Update /proc/sys/kernel/printk to change message log levels.
For example,
echo 6 > /proc/sys/kernel/printk (messages with a higher priority than 6
will be printed to the console)
echo 15 > /proc/sys/kernel/printk (all messages will be printed to console)
4) FOR IWPRIV COMMAND
NAME
This manual describes the usage of private commands used in Marvell WLAN
Linux Driver. All the commands available in Wlanconfig will not be available
in the iwpriv.
To use parameters as hex format, a'0x' must precede it for the parameters to
be parsed properly.
SYNOPSIS
iwpriv [sub-command] ...
iwpriv ethX version
iwpriv ethX verext
iwpriv ethX scantype [sub-command]
iwpriv ethX getSNR
iwpriv ethX getNF
iwpriv ethX getRSSI
iwpriv ethX setrxant
iwpriv ethX getrxant
iwpriv ethX settxant
iwpriv ethX gettxant
iwpriv ethX authalgs
iwpriv ethX encryptionmode
iwpriv ethX setregioncode
iwpriv ethX getregioncode
iwpriv ethX setbcnavg
iwpriv ethX getbcnavg
iwpriv ethX setdataavg
iwpriv ethX getdataavg
iwpriv ethX setlisteninter
iwpriv ethX getlisteninter
iwpriv ethX setmultipledtim
iwpriv ethX getmultipledtim
iwpriv ethX atimwindow
iwpriv ethX deepsleep
iwpriv ethX autodeepsleep
iwpriv ethX hscfg
iwpriv ethX hssetpara
iwpriv ethX deauth
iwpriv ethX adhocstop
iwpriv ethX radioon
iwpriv ethX radiooff
iwpriv ethX reasso-on
iwpriv ethX reasso-off
iwpriv ethX scanmode [sub-command]
iwpriv ethX setwpaie
iwpriv ethX setaeskey
iwpriv ethX getaeskey
iwpriv ethX rmaeskey
iwpriv ethX getlog
iwpriv ethX getadhocstatus
iwpriv ethX adhocgrate
Version 4 Command:
iwpriv ethX inactivityto
iwpriv ethX sleeppd
iwpriv ethX enable11d
iwpriv ethX bgscan
iwpriv ethX wmm
iwpriv ethX tpccfg
Version 5 Command:
iwpriv ethX ledgpio
iwpriv ethX wmm_qosinfo
iwpriv ethX scanprobes
iwpriv ethX lolisteninter
iwpriv ethX rateadapt
iwpriv ethX fwwakeupmethod
iwpriv ethX txcontrol
iwpriv ethX uapsdnullgen
iwpriv ethX psnullinterval
iwpriv ethX getrxinfo
iwpriv ethX gettxrate
iwpriv ethX bcninterval [n]
iwpriv ethX setcoalescing
iwpriv ethX bcnmisto
iwpriv ethX adhocawakepd
iwpriv ethX sdiopullctrl
iwpriv ethX scantime [s] [a] [p]
iwpriv ethX ldocfg [n]
iwpriv ethX dataevtcfg [a] [b] [c] [d] [e] [f] [g] [h] [i]
iwpriv ethX rtsctsctrl [n]
iwpriv ethX drvdbg [n] [m]
iwpriv ethX adhocgprot [n]
iwpriv ethX getrate
iwpriv ethX associate
iwpriv ethX gspiregrw [n] [m]
iwpriv ethX getdtim
DESCRIPTION
Those commands are used to send additional commands to the Marvell WLAN
card via the Linux device driver.
The ethX parameter specifies the network device that is to be used to
perform this command on. it could be eth0, eth1 etc.
version
This is used to get the current version of the driver and the firmware.
verext
Retrieve and display an extended version string from the firmware
Usage:
iwpriv ethX verext [#]
where [#] is an optional argument to retrieve a specific version string,
omission of the argument retrieves the 0 indexed string
scantype
This command is used to set the scan type to be used by the driver in
the scan command. This setting will not be used while performing a scan
for a specific SSID, as it is always done with scan type being active.
where the sub-commands are: -
active -- to set the scan type to active
passive -- to set the scan type to passive
get -- to get the scan type set in the driver
getSNR
This command gets the average and non average value of Signal to Noise
Ratio of Beacon and Data.
where value is:
0 -- Beacon non-average.
1 -- Beacon average.
2 -- Data non-average.
3 -- Data average.
If no value is given, all four values are returned in the order mentioned
above.
Note: This command is available only when STA is connected.
getRSSI
This command gets the average and non average value os Receive Signal
Strength of Beacon and Data.
where value is:
0 -- Beacon non-average.
1 -- Beacon average.
2 -- Data non-average.
3 -- Data average.
Note: This command is available only when STA is connected.
getNF
This command gets the average and non average value of Noise Floor of
Beacon and Data.
where value is:
0 -- Beacon non-average.
1 -- Beacon average.
2 -- Data non-average.
3 -- Data average.
Note: This command is available only when STA is connected.
setrxant
This command is used to set the mode for Rx antenna.
The options that can be sent are:-
1 -- Antenna 1.
2 -- Antenna 2.
0xFFFF -- Diversity.
Usage:
iwpriv ethX setrxant 0x01: select Antenna 1.
getrxant
This command is used to get the mode for Rx antenna.
settxant
This command is used to set the mode for Tx antenna.
The options that can be sent are:-
1 -- Antenna 1.
2 -- Antenna 2.
0xFFFF -- Diversity.
Usage:
iwpriv ethX settxant 0x01: select Antenna 1.
gettxant
This command is used to get the mode for Tx antenna.
authalgs
This command is used by the WPA supplicant to set the authentication
algorithms in the station.
encryptionmode
This command is used by the WPA supplicant to set the encryption algorithm.
where values can be:-
0 -- NONE
1 -- WEP40
2 -- TKIP
3 -- CCMP
4 -- WEP104
setregioncode
This command is used to set the region code in the station.
where value is 'region code' for various regions like
USA FCC, Canada IC, France, Europe ETSI, Japan ...
Usage:
iwpriv ethX setregioncode 0x10: set region code to USA (0x10).
getregioncode
This command is used to get the region code information set in the
station.
setbcnavg
Set the weighting factor for calculating beacon average RSSI and SNR.
where value can be:
0 -- default beacon averaging factor (8)
1-8 -- beacon averaging factor
Usage:
iwpriv ethX setbcnavg 0
iwpriv ethX setbcnavg 8
getbcnavg
Get the weighting factor for calculating beacon average RSSI and SNR.
Usage:
iwpriv ethX getbcnavg
setdataavg
Set the weighting factor for calculating data average RSSI and SNR.
where value can be:
0 -- default data averaging factor (8)
1-8 -- data averaging factor
Usage:
iwpriv ethX setdataavg 0
iwpriv ethX setdataavg 8
getdataavg
Get the weighting factor for calculating data average RSSI and SNR.
Usage:
iwpriv ethX getdataavg
setlisteninter
This command is used to set the listen interval in the
station.
where the value ranges between 1 - 255
getlisteninter
This command is used to get the listen interval value set in the
station.
setmultipledtim
This command is used to set the multiple dtim value in the
station.
where the value is 1,2,3,4,5,0xfffe
65534 (0xfffe) means that the dtim will be ignored in firmware,
listen interval or local listen interval will be used.
getmultipledtim
This command is used to get the multiple dtim value set in the station.
atimwindow
This command is used to set atim value in the station when an argument is given,
return the atim value set by the user and the current atim value if adapter is in connected state.
The valid atimwindow is between 0 - 50.
Usage:
iwpriv ethX atimwindow 0 (set atimwindow to 0)
not connected:
iwpriv ethX atimwindow (get atimwindow value set by user)
connected:
iwpriv ethX atimwindow (get atimwindow set by user previously
and current atimwindow)
deauth
This command is used to send the de-authentication to the AP with which
the station is associated. This command is valid only when
station is in Infrastructure mode.
Note: This command is available only when STA is connected.
reasso-on
This command is used to enable re-association function in dirver.
reasso-off
This command is used to disable re-association function in driver
adhocstop
This command is used to stop beacon transmission from the station and
go into idle state in ad-hoc mode.
Note: This command is available only when STA is connected.
radioon
This command is used to turn on the RF antenna.
radiooff
This command is sued to turn off the RF antenna.
scanmode
This command is used to set the station to scan for either IBSS
networks or BSS networks or both BSS and IBSS networks. This
command can be used with sub commands,
where the value for
bss -- Scan All the BSS networks.
ibss -- Scan All the IBSS networks.
any -- Scan both BSS and IBSS networks.
deepsleep
This command is used to configure the station in deepsleep mode.
where the option is:
1 -- Enable deepsleep mode
0 -- Disable deepsleep mode
2 -- Display deepsleep setting
Usage:
iwpriv ethX deepsleep 1
Enable deepsleep mode
iwpriv ethX deepsleep 0
Disable deepsleep mode
iwpriv ethX deepsleep 2
Display deepsleep setting
autodeepsleep
This command is used to configure the station in auto deepsleep mode.
where the option is:
1 -- Enable auto deepsleep mode
0 -- Disable auto deepsleep mode
Usage:
iwpriv ethX autodeepsleep
Read the current auto deepsleep setting
iwpriv ethX autodeepsleep 1
Enable auto deepsleep mode
iwpriv ethX autodeepsleep 0
Disable auto deepsleep mode
hscfg
This command is used to configure the host sleep parameters.
iwpriv ethX hscfg Condition [GPIO# [Gap]]
Note:
1) This command takes one (Condition) or two (Condition and GPIO#) or three (Condition, GPIO# and gap)
parameters.
where Condition is:
bit 0 = 1 -- broadcast data
bit 1 = 1 -- unicast data
bit 2 = 1 -- mac event
bit 3 = 1 -- multicast packet
where GPIO is the pin number of GPIO used to wakeup the host. It could be any valid
GPIO pin# (e.g. 0-7) or 0xff (Interface, e.g. SDIO will be used instead).
where Gap is the gap in milli seconds between wakeup signal and wakeup event
or 0xff for special setting.
2) the Host Sleep mode will be cancelled if condition is set to -1.
3) Usage:
iwpriv eth1 hscfg -1 # cancel host sleep mode
iwpriv eth1 hscfg 3 # broadcast and unicast data
# use GPIO and GAP set previously
iwpriv eth1 hscfg 2 0x3 # unicast data
# use GPIO 3
# use GAP set previously
iwpriv eth1 hscfg 2 1 0xa0 # unicast data
# use GPIO 1
# gap: 160 ms
iwpriv eth1 hscfg 2 0xff # unicast data
# use Interface (e.g. SDIO)
# use GAP set previously
iwpriv eth1 hscfg 0x2 0x3 0xff # unicast data
# use GPIO 3
# special host sleep mode
iwpriv eth1 hscfg 0x2 0xff 0xff # unicast data
# use Interface (e.g. SDIO)
# special host sleep mode
hssetpara
This command is used to set host sleep parameters.
iwpriv ethX hssetpara Condition [GPIO# [Gap]]
Note:
1) The usages of parameters are the same as "hscfg" command.
2) The parameters will be saved in the driver and be usded when host suspends.
setwpaie
This command is used by WPA supplicant to send the WPA-IE to the driver.
setaeskey
This command is used to set the AES key, when the station is in Ad-hoc
mode.
where value can be any 16 byte value.
Usage:
iwpriv ethX setaeskey 12345678901234567890123456789012
getaeskey
This command is used to get the AES key, when the station is in Ad-hoc
mode.
rmaeskey
This command is used to remove the Ad-Hoc AES key that is previously set.
It will disable ad-hoc AES as well.
getlog
This command is used to get the 802.11 statistics available in the
station.
Note: This command is available only when STA is connected.
getadhocstatus
This command is used to get the ad-hoc Network Status.
The various status codes are:
AdhocStarted
AdhocJoined
AdhocIdle
InfraMode
AutoUnknownMode
Note: This command is available only when STA is connected.
adhocgrate
This command is used to enable(1) g_rate, Disable(0) g_rate
and request(2) the status which g_rate is disabled/enabled,
for Ad-hoc creator.
where value is:
0 -- Disable
1 -- Enable
2 -- Get
ledgpio
This command is used to set/get LED settings.
iwpriv ethX ledgpio
will set the corresponding LED for the GPIO Line.
iwpriv ethX ledgpio
will get the current LEDs settings.
Usage:
iwpriv eth1 ledgpio 1 0 2 1 3 16
LED 1 -> GPIO 0
LED 2 -> GPIO 1
LED 3 -> disable
iwpriv eth1 ledgpio
shows LED information in the format as mentioned above.
Note: LED 0 is invalid
Maximum Number of LEDs are 3.
inactivityto
This command is used by the host to set/get the inactivity timeout value,
which specifies when WLAN device is put to sleep.
Usage:
iwpriv ethX inactivityto []
where the parameter are:
timeout: timeout value in milliseconds.
Example:
iwpriv eth1 inactivityto
"get the timeout value"
iwpriv eth1 inactivityto X
"set timeout value to X ms"
sleeppd
This command is used to configure the sleep period of the WLAN device.
Usage:
iwpriv ethX sleeppd []
where the parameter are:
Period: sleep period in milliseconds. Range 10~60.
Example:
iwpriv eth1 sleeppd 10
"set period as 10 ms"
iwpriv eth1 sleeppd
"get the sleep period configuration"
enable11d
This command is used to control 11d
where value is:
1 -- Enable
0 -- Disable
2 -- Get
wmm
This command is used to control WMM
where value is:
0 -- Disable
1 -- Enable
2 -- Get
bgscan
Enables or disables the Background scan.
The configuration for bg scan must be set using wlanconfig
Usage:
wlanconfig ethX bgscanconfig bg_scan_config.conf
iwpriv ethX bgscan 0 (disable)
iwpriv ethX bgscan 1 (enable)
iwpriv ethX bgscan 2 (display enable or disable)
tpccfg
Enables or disables automatic transmit power control.
The first parameter turns this feature on (1) or off (0). When turning
on, the user must also supply four more parameters in the following
order:
-UseSNR (Use SNR (in addition to PER) for TPC algorithm),
-P0 (P0 power level for TPC),
-P1 (P1 power level for TPC),
-P2 (P2 power level for TPC).
Usage:
iwpriv ethX tpccfg: Get current configuration
iwpriv ethX tpccfg 0: disable auto TPC
iwpriv ethX tpccfg 0x01 0x00 0x05 0x0a 0x0d: enable auto TPC; do not use SN ... ...
近期下载者:
相关文件:
收藏者: