Linux-libre 3.6.3-gnu1
[librecmc/linux-libre.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) /*(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         max_tx_buf_size = <maximum Tx buffer size>
124         tx_buf_size = <current Tx buffer size>
125         curr_tx_buf_size = <current Tx buffer size>
126         ps_mode = <0/1, CAM mode/PS mode>
127         ps_state = <0/1/2/3, full power state/awake state/pre-sleep state/sleep state>
128         is_deep_sleep = <0/1, not deep sleep state/deep sleep state>
129         wakeup_dev_req = <0/1, wakeup device not required/required>
130         wakeup_tries = <wakeup device count, cleared when device awake>
131         hs_configured = <0/1, host sleep not configured/configured>
132         hs_activated = <0/1, extended host sleep not activated/activated>
133         num_tx_timeout = <number of Tx timeout>
134         num_cmd_timeout = <number of timeout commands>
135         timeout_cmd_id = <command id of the last timeout command>
136         timeout_cmd_act = <command action of the last timeout command>
137         last_cmd_id = <command id of the last several commands sent to device>
138         last_cmd_act = <command action of the last several commands sent to device>
139         last_cmd_index = <0 based last command index>
140         last_cmd_resp_id = <command id of the last several command responses received from device>
141         last_cmd_resp_index = <0 based last command response index>
142         last_event = <event id of the last several events received from device>
143         last_event_index = <0 based last event index>
144         num_cmd_h2c_fail = <number of commands failed to send to device>
145         num_cmd_sleep_cfm_fail = <number of sleep confirm failed to send to device>
146         num_tx_h2c_fail = <number of data packets failed to send to device>
147         num_evt_deauth = <number of deauthenticated events received from device>
148         num_evt_disassoc = <number of disassociated events received from device>
149         num_evt_link_lost = <number of link lost events received from device>
150         num_cmd_deauth = <number of deauthenticate commands sent to device>
151         num_cmd_assoc_ok = <number of associate commands with success return>
152         num_cmd_assoc_fail = <number of associate commands with failure return>
153         cmd_sent = <0/1, send command resources available/sending command to device>
154         data_sent = <0/1, send data resources available/sending data to device>
155         mp_rd_bitmap = <SDIO multi-port read bitmap>
156         mp_wr_bitmap = <SDIO multi-port write bitmap>
157         cmd_resp_received = <0/1, no cmd response to process/response received and yet to process>
158         event_received = <0/1, no event to process/event received and yet to process>
159         cmd_pending = <number of cmd pending>
160         tx_pending = <number of Tx packet pending>
161         rx_pending = <number of Rx packet pending>
162
163
164 3) FOR DRIVER CONFIGURATION
165
166 regrdwr
167         This command is used to read/write the adapter register.
168
169         Usage:
170                 echo " <type> <offset> [value]" > regrdwr
171                 cat regrdwr
172
173         where the parameters are,
174                 <type>:     1:MAC/SOC, 2:BBP, 3:RF, 4:PMIC, 5:CAU
175                 <offset>:   offset of register
176                 [value]:    value to be written
177
178         Examples:
179                 echo "1 0xa060" > regrdwr           : Read the MAC register
180                 echo "1 0xa060 0x12" > regrdwr      : Write the MAC register
181                 echo "1 0xa794 0x80000000" > regrdwr
182                                                     : Write 0x80000000 to MAC register
183 rdeeprom
184         This command is used to read the EEPROM contents of the card.
185
186         Usage:
187                 echo "<offset> <length>" > rdeeprom
188                 cat rdeeprom
189
190         where the parameters are,
191                 <offset>:   multiples of 4
192                 <length>:   4-20, multiples of 4
193
194         Example:
195                 echo "0 20" > rdeeprom      : Read 20 bytes of EEPROM data from offset 0
196
197 getlog
198         This command is used to get the statistics available in the station.
199         Usage:
200
201         cat getlog
202
203 ===============================================================================