wireless: mwifiex: initial commit for Marvell mwifiex driver
[pandora-kernel.git] / drivers / net / wireless / mwifiex / README
1 # Copyright (C) 2011, Marvell International Ltd.
2 #
3 # This software file (the "File") is distributed by Marvell International
4 # Ltd. under the terms of the GNU General Public License Version 2, June 1991
5 # (the "License").  You may use, redistribute and/or modify this File in
6 # accordance with the terms and conditions of the License, a copy of which
7 # is available by writing to the Free Software Foundation, Inc.,
8 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
9 # worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
10 #
11 # THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
12 # IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
13 # ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
14 # this warranty disclaimer.
15
16
17 ===============================================================================
18                         U S E R  M A N U A L
19
20 1) FOR DRIVER INSTALL
21
22         a) Copy sd8787.bin to /lib/firmware/mrvl/ directory,
23            create the directory if it doesn't exist.
24         b) Install WLAN driver,
25                 insmod mwifiex.ko
26         c) Uninstall WLAN driver,
27                 ifconfig mlanX down
28                 rmmod mwifiex
29
30
31 2) FOR DRIVER CONFIGURATION AND INFO
32         The configurations can be done either using the 'iw' user space
33         utility or debugfs.
34
35         a) 'iw' utility commands
36
37         Following are some useful iw commands:-
38
39 iw dev mlan0 scan
40
41         This command will trigger a scan.
42         The command will then display the scan table entries
43
44 iw dev mlan0 connect -w <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1123456789a]
45         The above command can be used to connect to an AP with a particular SSID.
46         Ap's operating frequency can be specified or even the bssid. If the AP is using
47         WEP encryption, wep keys can be specified in the command.
48         Note: Every time before connecting to an AP scan command (iw dev mlan0 scan) should be used by user.
49
50 iw dev mlan0 disconnect
51         This command will be used to disconnect from an AP.
52
53
54 iw dev mlan0 ibss join <SSID> <freq in MHz> [fixed-freq] [fixed-bssid] [key 0:abcde]
55         The command will be used to join or create an ibss. Optionally, operating frequency,
56         bssid and the security related parameters can be specified while joining/creating
57         and ibss.
58
59 iw dev mlan0 ibss leave
60         The command will be used to leave an ibss network.
61
62 iw dev mlan0 link
63         The command will be used to get the connection status. The command will return parameters
64         such as SSID, operating frequency, rx/tx packets, signal strength, tx bitrate.
65
66         Apart from the iw utility all standard configurations using the 'iwconfig' utility are also supported.
67
68         b) Debugfs interface
69
70         The debugfs interface can be used for configurations and for getting
71         some useful information from the driver.
72         The section below explains the configurations that can be
73         done.
74
75         Mount debugfs to /debugfs mount point:
76
77                 mkdir /debugfs
78                 mount -t debugfs debugfs /debugfs
79
80         The information is provided in /debugfs/mwifiex/mlanX/:
81
82 iw reg set <country code>
83         The command will be used to change the regulatory domain.
84
85 iw reg get
86         The command will be used to get current regulatory domain.
87
88 info
89         This command is used to get driver info.
90
91         Usage:
92                 cat info
93
94         driver_name = "mwifiex"
95         driver_version = <driver_name, driver_version, (firmware_version)>
96         interface_name = "mlanX"
97         bss_mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
98         media_state = "Disconnected" | "Connected"
99         mac_address = <6-byte adapter MAC address>
100         multicase_count = <multicast address count>
101         essid = <current SSID>
102         bssid = <current BSSID>
103         channel = <current channel>
104         region_code = <current region code>
105         multicasr_address[n] = <multicast address>
106         num_tx_bytes = <number of bytes sent to device>
107         num_rx_bytes = <number of bytes received from device and sent to kernel>
108         num_tx_pkts = <number of packets sent to device>
109         num_rx_pkts = <number of packets received from device and sent to kernel>
110         num_tx_pkts_dropped = <number of Tx packets dropped by driver>
111         num_rx_pkts_dropped = <number of Rx packets dropped by driver>
112         num_tx_pkts_err = <number of Tx packets failed to send to device>
113         num_rx_pkts_err = <number of Rx packets failed to receive from device>
114         carrier "on" | "off"
115         tx queue "stopped" | "started"
116
117         The following debug info are provided in /debugfs/mwifiex/mlanX/debug:
118
119         int_counter = <interrupt count, cleared when interrupt handled>
120         wmm_ac_vo = <number of packets sent to device from WMM AcVo queue>
121         wmm_ac_vi = <number of packets sent to device from WMM AcVi queue>
122         wmm_ac_be = <number of packets sent to device from WMM AcBE queue>
123         wmm_ac_bk = <number of packets sent to device from WMM AcBK queue>
124         max_tx_buf_size = <maximum Tx buffer size>
125         tx_buf_size = <current Tx buffer size>
126         curr_tx_buf_size = <current Tx buffer size>
127         ps_mode = <0/1, CAM mode/PS mode>
128         ps_state = <0/1/2/3, full power state/awake state/pre-sleep state/sleep state>
129         is_deep_sleep = <0/1, not deep sleep state/deep sleep state>
130         wakeup_dev_req = <0/1, wakeup device not required/required>
131         wakeup_tries = <wakeup device count, cleared when device awake>
132         hs_configured = <0/1, host sleep not configured/configured>
133         hs_activated = <0/1, extended host sleep not activated/activated>
134         num_tx_timeout = <number of Tx timeout>
135         num_cmd_timeout = <number of timeout commands>
136         timeout_cmd_id = <command id of the last timeout command>
137         timeout_cmd_act = <command action of the last timeout command>
138         last_cmd_id = <command id of the last several commands sent to device>
139         last_cmd_act = <command action of the last several commands sent to device>
140         last_cmd_index = <0 based last command index>
141         last_cmd_resp_id = <command id of the last several command responses received from device>
142         last_cmd_resp_index = <0 based last command response index>
143         last_event = <event id of the last several events received from device>
144         last_event_index = <0 based last event index>
145         num_cmd_h2c_fail = <number of commands failed to send to device>
146         num_cmd_sleep_cfm_fail = <number of sleep confirm failed to send to device>
147         num_tx_h2c_fail = <number of data packets failed to send to device>
148         num_evt_deauth = <number of deauthenticated events received from device>
149         num_evt_disassoc = <number of disassociated events received from device>
150         num_evt_link_lost = <number of link lost events received from device>
151         num_cmd_deauth = <number of deauthenticate commands sent to device>
152         num_cmd_assoc_ok = <number of associate commands with success return>
153         num_cmd_assoc_fail = <number of associate commands with failure return>
154         cmd_sent = <0/1, send command resources available/sending command to device>
155         data_sent = <0/1, send data resources available/sending data to device>
156         mp_rd_bitmap = <SDIO multi-port read bitmap>
157         mp_wr_bitmap = <SDIO multi-port write bitmap>
158         cmd_resp_received = <0/1, no cmd response to process/response received and yet to process>
159         event_received = <0/1, no event to process/event received and yet to process>
160         ioctl_pending = <number of ioctl pending>
161         tx_pending = <number of Tx packet pending>
162         rx_pending = <number of Rx packet pending>
163
164
165 3) FOR DRIVER CONFIGURATION
166
167 regrdwr
168         This command is used to read/write the adapter register.
169
170         Usage:
171                 echo " <type> <offset> [value]" > regrdwr
172                 cat regrdwr
173
174         where the parameters are,
175                 <type>:     1:MAC/SOC, 2:BBP, 3:RF, 4:PMIC, 5:CAU
176                 <offset>:   offset of register
177                 [value]:    value to be written
178
179         Examples:
180                 echo "1 0xa060" > regrdwr           : Read the MAC register
181                 echo "1 0xa060 0x12" > regrdwr      : Write the MAC register
182                 echo "1 0xa794 0x80000000" > regrdwr
183                                                     : Write 0x80000000 to MAC register
184 rdeeprom
185         This command is used to read the EEPROM contents of the card.
186
187         Usage:
188                 echo "<offset> <length>" > rdeeprom
189                 cat rdeeprom
190
191         where the parameters are,
192                 <offset>:   multiples of 4
193                 <length>:   4-20, multiples of 4
194
195         Example:
196                 echo "0 20" > rdeeprom      : Read 20 bytes of EEPROM data from offset 0
197
198 getlog
199         This command is used to get the statistics available in the station.
200         Usage:
201
202         cat getlog
203
204 ===============================================================================