GNU Linux-libre 4.9.282-gnu1
[releases.git] / drivers / net / wireless / marvell / mwifiex / README
1 # Copyright (C) 2011-2014, 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) /*(DEBLOBBED)*/
23         b) Install WLAN driver,
24                 insmod mwifiex.ko
25         c) Uninstall WLAN driver,
26                 ifconfig mlanX down
27                 rmmod mwifiex
28
29
30 2) FOR DRIVER CONFIGURATION AND INFO
31         The configurations can be done either using the 'iw' user space
32         utility or debugfs.
33
34         a) 'iw' utility commands
35
36         Following are some useful iw commands:-
37
38 iw dev mlan0 scan
39
40         This command will trigger a scan.
41         The command will then display the scan table entries
42
43 iw dev mlan0 connect -w <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1123456789a]
44         The above command can be used to connect to an AP with a particular SSID.
45         Ap's operating frequency can be specified or even the bssid. If the AP is using
46         WEP encryption, wep keys can be specified in the command.
47         Note: Every time before connecting to an AP scan command (iw dev mlan0 scan) should be used by user.
48
49 iw dev mlan0 disconnect
50         This command will be used to disconnect from an AP.
51
52
53 iw dev mlan0 ibss join <SSID> <freq in MHz> [fixed-freq] [fixed-bssid] [key 0:abcde]
54         The command will be used to join or create an ibss. Optionally, operating frequency,
55         bssid and the security related parameters can be specified while joining/creating
56         and ibss.
57
58 iw dev mlan0 ibss leave
59         The command will be used to leave an ibss network.
60
61 iw dev mlan0 link
62         The command will be used to get the connection status. The command will return parameters
63         such as SSID, operating frequency, rx/tx packets, signal strength, tx bitrate.
64
65         Apart from the iw utility all standard configurations using the 'iwconfig' utility are also supported.
66
67         b) Debugfs interface
68
69         The debugfs interface can be used for configurations and for getting
70         some useful information from the driver.
71         The section below explains the configurations that can be
72         done.
73
74         Mount debugfs to /debugfs mount point:
75
76                 mkdir /debugfs
77                 mount -t debugfs debugfs /debugfs
78
79         The information is provided in /debugfs/mwifiex/mlanX/:
80
81 iw reg set <country code>
82         The command will be used to change the regulatory domain.
83
84 iw reg get
85         The command will be used to get current regulatory domain.
86
87 info
88         This command is used to get driver info.
89
90         Usage:
91                 cat info
92
93         driver_name = "mwifiex"
94         driver_version = <driver_name, driver_version, (firmware_version)>
95         interface_name = "mlanX"
96         bss_mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
97         media_state = "Disconnected" | "Connected"
98         mac_address = <6-byte adapter MAC address>
99         multicase_count = <multicast address count>
100         essid = <current SSID>
101         bssid = <current BSSID>
102         channel = <current channel>
103         region_code = <current region code>
104         multicasr_address[n] = <multicast address>
105         num_tx_bytes = <number of bytes sent to device>
106         num_rx_bytes = <number of bytes received from device and sent to kernel>
107         num_tx_pkts = <number of packets sent to device>
108         num_rx_pkts = <number of packets received from device and sent to kernel>
109         num_tx_pkts_dropped = <number of Tx packets dropped by driver>
110         num_rx_pkts_dropped = <number of Rx packets dropped by driver>
111         num_tx_pkts_err = <number of Tx packets failed to send to device>
112         num_rx_pkts_err = <number of Rx packets failed to receive from device>
113         carrier "on" | "off"
114         tx queue "stopped" | "started"
115
116         The following debug info are provided in /debugfs/mwifiex/mlanX/debug:
117
118         int_counter = <interrupt count, cleared when interrupt handled>
119         wmm_ac_vo = <number of packets sent to device from WMM AcVo queue>
120         wmm_ac_vi = <number of packets sent to device from WMM AcVi queue>
121         wmm_ac_be = <number of packets sent to device from WMM AcBE queue>
122         wmm_ac_bk = <number of packets sent to device from WMM AcBK queue>
123         tx_buf_size = <current Tx buffer size>
124         curr_tx_buf_size = <current Tx buffer size>
125         ps_mode = <0/1, CAM mode/PS mode>
126         ps_state = <0/1/2/3, full power state/awake state/pre-sleep state/sleep state>
127         is_deep_sleep = <0/1, not deep sleep state/deep sleep state>
128         wakeup_dev_req = <0/1, wakeup device not required/required>
129         wakeup_tries = <wakeup device count, cleared when device awake>
130         hs_configured = <0/1, host sleep not configured/configured>
131         hs_activated = <0/1, extended host sleep not activated/activated>
132         num_tx_timeout = <number of Tx timeout>
133         is_cmd_timedout = <0/1 command timeout not occurred/occurred>
134         timeout_cmd_id = <command id of the last timeout command>
135         timeout_cmd_act = <command action of the last timeout command>
136         last_cmd_id = <command id of the last several commands sent to device>
137         last_cmd_act = <command action of the last several commands sent to device>
138         last_cmd_index = <0 based last command index>
139         last_cmd_resp_id = <command id of the last several command responses received from device>
140         last_cmd_resp_index = <0 based last command response index>
141         last_event = <event id of the last several events received from device>
142         last_event_index = <0 based last event index>
143         num_cmd_h2c_fail = <number of commands failed to send to device>
144         num_cmd_sleep_cfm_fail = <number of sleep confirm failed to send to device>
145         num_tx_h2c_fail = <number of data packets failed to send to device>
146         num_evt_deauth = <number of deauthenticated events received from device>
147         num_evt_disassoc = <number of disassociated events received from device>
148         num_evt_link_lost = <number of link lost events received from device>
149         num_cmd_deauth = <number of deauthenticate commands sent to device>
150         num_cmd_assoc_ok = <number of associate commands with success return>
151         num_cmd_assoc_fail = <number of associate commands with failure return>
152         cmd_sent = <0/1, send command resources available/sending command to device>
153         data_sent = <0/1, send data resources available/sending data to device>
154         mp_rd_bitmap = <SDIO multi-port read bitmap>
155         mp_wr_bitmap = <SDIO multi-port write bitmap>
156         cmd_resp_received = <0/1, no cmd response to process/response received and yet to process>
157         event_received = <0/1, no event to process/event received and yet to process>
158         cmd_pending = <number of cmd pending>
159         tx_pending = <number of Tx packet pending>
160         rx_pending = <number of Rx packet pending>
161
162
163 3) FOR DRIVER CONFIGURATION
164
165 regrdwr
166         This command is used to read/write the adapter register.
167
168         Usage:
169                 echo " <type> <offset> [value]" > regrdwr
170                 cat regrdwr
171
172         where the parameters are,
173                 <type>:     1:MAC/SOC, 2:BBP, 3:RF, 4:PMIC, 5:CAU
174                 <offset>:   offset of register
175                 [value]:    value to be written
176
177         Examples:
178                 echo "1 0xa060" > regrdwr           : Read the MAC register
179                 echo "1 0xa060 0x12" > regrdwr      : Write the MAC register
180                 echo "1 0xa794 0x80000000" > regrdwr
181                                                     : Write 0x80000000 to MAC register
182 rdeeprom
183         This command is used to read the EEPROM contents of the card.
184
185         Usage:
186                 echo "<offset> <length>" > rdeeprom
187                 cat rdeeprom
188
189         where the parameters are,
190                 <offset>:   multiples of 4
191                 <length>:   4-20, multiples of 4
192
193         Example:
194                 echo "0 20" > rdeeprom      : Read 20 bytes of EEPROM data from offset 0
195
196 hscfg
197         This command is used to debug/simulate host sleep feature using
198         different configuration parameters.
199
200         Usage:
201                 echo "<condition> [GPIO# [gap]]]" > hscfg
202                 cat hscfg
203
204         where the parameters are,
205                 <condition>: bit 0 = 1   -- broadcast data
206                              bit 1 = 1   -- unicast data
207                              bit 2 = 1   -- mac event
208                              bit 3 = 1   -- multicast data
209                 [GPIO#]: pin number of GPIO used to wakeup the host.
210                          GPIO pin# (e.g. 0-7) or 0xff (interface, e.g. SDIO
211                          will be used instead).
212                 [gap]:   the gap in milliseconds between wakeup signal and
213                          wakeup event or 0xff for special setting (host
214                          acknowledge required) when GPIO is used to wakeup host.
215
216         Examples:
217                 echo "-1" > hscfg        : Cancel host sleep mode
218                 echo "3" > hscfg         : Broadcast and unicast data;
219                                            Use GPIO and gap set previously
220                 echo "2 3" > hscfg       : Unicast data and GPIO 3;
221                                            Use gap set previously
222                 echo "2 1 160" > hscfg   : Unicast data, GPIO 1 and gap 160 ms
223                 echo "2 1 0xff" > hscfg  : Unicast data, GPIO 1; Wait for host
224                                            to ack before sending wakeup event
225
226 getlog
227         This command is used to get the statistics available in the station.
228         Usage:
229
230         cat getlog
231
232 device_dump
233         This command is used to dump driver information and firmware memory
234         segments.
235         Usage:
236
237         cat fw_dump
238
239 verext
240         This command is used to get extended firmware version string using
241         different configuration parameters.
242
243         Usage:
244                 echo "[version_str_sel]" > verext
245                 cat verext
246
247                 [version_str_sel]: firmware support several extend version
248                                    string cases, include 0/1/10/20/21/99
249 ===============================================================================