Back to home page

OSCL-LXR

 
 

    


0001 #
0002 # Copyright 2011-2020 NXP
0003 #
0004 # This software file (the "File") is distributed by NXP
0005 # under the terms of the GNU General Public License Version 2, June 1991
0006 # (the "License").  You may use, redistribute and/or modify this File in
0007 # accordance with the terms and conditions of the License, a copy of which
0008 # is available by writing to the Free Software Foundation, Inc.,
0009 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
0010 # worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
0011 #
0012 # THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
0013 # IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
0014 # ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
0015 # this warranty disclaimer.
0016 
0017 
0018 ===============================================================================
0019                         U S E R  M A N U A L
0020 
0021 1) FOR DRIVER INSTALL
0022 
0023         a) Copy sd8787.bin to /lib/firmware/mrvl/ directory,
0024            create the directory if it doesn't exist.
0025         b) Install WLAN driver,
0026                 insmod mwifiex.ko
0027         c) Uninstall WLAN driver,
0028                 ifconfig mlanX down
0029                 rmmod mwifiex
0030 
0031 
0032 2) FOR DRIVER CONFIGURATION AND INFO
0033         The configurations can be done either using the 'iw' user space
0034         utility or debugfs.
0035 
0036         a) 'iw' utility commands
0037 
0038         Following are some useful iw commands:-
0039 
0040 iw dev mlan0 scan
0041 
0042         This command will trigger a scan.
0043         The command will then display the scan table entries
0044 
0045 iw dev mlan0 connect -w <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1123456789a]
0046         The above command can be used to connect to an AP with a particular SSID.
0047         Ap's operating frequency can be specified or even the bssid. If the AP is using
0048         WEP encryption, wep keys can be specified in the command.
0049         Note: Every time before connecting to an AP scan command (iw dev mlan0 scan) should be used by user.
0050 
0051 iw dev mlan0 disconnect
0052         This command will be used to disconnect from an AP.
0053 
0054 
0055 iw dev mlan0 ibss join <SSID> <freq in MHz> [fixed-freq] [fixed-bssid] [key 0:abcde]
0056         The command will be used to join or create an ibss. Optionally, operating frequency,
0057         bssid and the security related parameters can be specified while joining/creating
0058         and ibss.
0059 
0060 iw dev mlan0 ibss leave
0061         The command will be used to leave an ibss network.
0062 
0063 iw dev mlan0 link
0064         The command will be used to get the connection status. The command will return parameters
0065         such as SSID, operating frequency, rx/tx packets, signal strength, tx bitrate.
0066 
0067         Apart from the iw utility all standard configurations using the 'iwconfig' utility are also supported.
0068 
0069         b) Debugfs interface
0070 
0071         The debugfs interface can be used for configurations and for getting
0072         some useful information from the driver.
0073         The section below explains the configurations that can be
0074         done.
0075 
0076         Mount debugfs to /debugfs mount point:
0077 
0078                 mkdir /debugfs
0079                 mount -t debugfs debugfs /debugfs
0080 
0081         The information is provided in /debugfs/mwifiex/mlanX/:
0082 
0083 iw reg set <country code>
0084         The command will be used to change the regulatory domain.
0085 
0086 iw reg get
0087         The command will be used to get current regulatory domain.
0088 
0089 info
0090         This command is used to get driver info.
0091 
0092         Usage:
0093                 cat info
0094 
0095         driver_name = "mwifiex"
0096         driver_version = <driver_name, driver_version, (firmware_version)>
0097         interface_name = "mlanX"
0098         bss_mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
0099         media_state = "Disconnected" | "Connected"
0100         mac_address = <6-byte adapter MAC address>
0101         multicase_count = <multicast address count>
0102         essid = <current SSID>
0103         bssid = <current BSSID>
0104         channel = <current channel>
0105         region_code = <current region code>
0106         multicasr_address[n] = <multicast address>
0107         num_tx_bytes = <number of bytes sent to device>
0108         num_rx_bytes = <number of bytes received from device and sent to kernel>
0109         num_tx_pkts = <number of packets sent to device>
0110         num_rx_pkts = <number of packets received from device and sent to kernel>
0111         num_tx_pkts_dropped = <number of Tx packets dropped by driver>
0112         num_rx_pkts_dropped = <number of Rx packets dropped by driver>
0113         num_tx_pkts_err = <number of Tx packets failed to send to device>
0114         num_rx_pkts_err = <number of Rx packets failed to receive from device>
0115         carrier "on" | "off"
0116         tx queue "stopped" | "started"
0117 
0118         The following debug info are provided in /debugfs/mwifiex/mlanX/debug:
0119 
0120         int_counter = <interrupt count, cleared when interrupt handled>
0121         wmm_ac_vo = <number of packets sent to device from WMM AcVo queue>
0122         wmm_ac_vi = <number of packets sent to device from WMM AcVi queue>
0123         wmm_ac_be = <number of packets sent to device from WMM AcBE queue>
0124         wmm_ac_bk = <number of packets sent to device from WMM AcBK queue>
0125         tx_buf_size = <current Tx buffer size>
0126         curr_tx_buf_size = <current Tx buffer size>
0127         ps_mode = <0/1, CAM mode/PS mode>
0128         ps_state = <0/1/2/3, full power state/awake state/pre-sleep state/sleep state>
0129         is_deep_sleep = <0/1, not deep sleep state/deep sleep state>
0130         wakeup_dev_req = <0/1, wakeup device not required/required>
0131         wakeup_tries = <wakeup device count, cleared when device awake>
0132         hs_configured = <0/1, host sleep not configured/configured>
0133         hs_activated = <0/1, extended host sleep not activated/activated>
0134         num_tx_timeout = <number of Tx timeout>
0135         is_cmd_timedout = <0/1 command timeout not occurred/occurred>
0136         timeout_cmd_id = <command id of the last timeout command>
0137         timeout_cmd_act = <command action of the last timeout command>
0138         last_cmd_id = <command id of the last several commands sent to device>
0139         last_cmd_act = <command action of the last several commands sent to device>
0140         last_cmd_index = <0 based last command index>
0141         last_cmd_resp_id = <command id of the last several command responses received from device>
0142         last_cmd_resp_index = <0 based last command response index>
0143         last_event = <event id of the last several events received from device>
0144         last_event_index = <0 based last event index>
0145         num_cmd_h2c_fail = <number of commands failed to send to device>
0146         num_cmd_sleep_cfm_fail = <number of sleep confirm failed to send to device>
0147         num_tx_h2c_fail = <number of data packets failed to send to device>
0148         num_evt_deauth = <number of deauthenticated events received from device>
0149         num_evt_disassoc = <number of disassociated events received from device>
0150         num_evt_link_lost = <number of link lost events received from device>
0151         num_cmd_deauth = <number of deauthenticate commands sent to device>
0152         num_cmd_assoc_ok = <number of associate commands with success return>
0153         num_cmd_assoc_fail = <number of associate commands with failure return>
0154         cmd_sent = <0/1, send command resources available/sending command to device>
0155         data_sent = <0/1, send data resources available/sending data to device>
0156         mp_rd_bitmap = <SDIO multi-port read bitmap>
0157         mp_wr_bitmap = <SDIO multi-port write bitmap>
0158         cmd_resp_received = <0/1, no cmd response to process/response received and yet to process>
0159         event_received = <0/1, no event to process/event received and yet to process>
0160         cmd_pending = <number of cmd pending>
0161         tx_pending = <number of Tx packet pending>
0162         rx_pending = <number of Rx packet pending>
0163 
0164 
0165 3) FOR DRIVER CONFIGURATION
0166 
0167 regrdwr
0168         This command is used to read/write the adapter register.
0169 
0170         Usage:
0171                 echo " <type> <offset> [value]" > regrdwr
0172                 cat regrdwr
0173 
0174         where the parameters are,
0175                 <type>:     1:MAC/SOC, 2:BBP, 3:RF, 4:PMIC, 5:CAU
0176                 <offset>:   offset of register
0177                 [value]:    value to be written
0178 
0179         Examples:
0180                 echo "1 0xa060" > regrdwr           : Read the MAC register
0181                 echo "1 0xa060 0x12" > regrdwr      : Write the MAC register
0182                 echo "1 0xa794 0x80000000" > regrdwr
0183                                                     : Write 0x80000000 to MAC register
0184 
0185 memrw
0186         This command is used to read/write the firmware memory.
0187 
0188         Usage:
0189                 1) For reading firmware memory location.
0190                         echo r <address> 0 > /sys/kernel/debug/mwifiex/mlan0/memrw
0191                         cat /sys/kernel/debug/mwifiex/mlan0/memrw
0192                 2) For writing value to firmware memory location.
0193                         echo w <address> [value] > /sys/kernel/debug/mwifiex/mlan0/memrw
0194 
0195         where the parameters are,
0196                 <address>:  memory address
0197                 [value]:    value to be written
0198 
0199         Examples:
0200                 echo r 0x4cf70 0 > /sys/kernel/debug/mwifiex/mlan0/memrw
0201                 cat /sys/kernel/debug/mwifiex/mlan0/memrw
0202                                                 : Read memory address 0x4cf70
0203                 iwpriv mlan0 memrdwr -0x7fff6000 -0x40000000
0204                 echo w 0x8000a000 0xc0000000 > /sys/kernel/debug/mwifiex/mlan0/memrw
0205                                                 : Write 0xc0000000 to memory address 0x8000a000
0206 
0207 rdeeprom
0208         This command is used to read the EEPROM contents of the card.
0209 
0210         Usage:
0211                 echo "<offset> <length>" > rdeeprom
0212                 cat rdeeprom
0213 
0214         where the parameters are,
0215                 <offset>:   multiples of 4
0216                 <length>:   4-20, multiples of 4
0217 
0218         Example:
0219                 echo "0 20" > rdeeprom      : Read 20 bytes of EEPROM data from offset 0
0220 
0221 hscfg
0222         This command is used to debug/simulate host sleep feature using
0223         different configuration parameters.
0224 
0225         Usage:
0226                 echo "<condition> [GPIO# [gap]]]" > hscfg
0227                 cat hscfg
0228 
0229         where the parameters are,
0230                 <condition>: bit 0 = 1   -- broadcast data
0231                              bit 1 = 1   -- unicast data
0232                              bit 2 = 1   -- mac event
0233                              bit 3 = 1   -- multicast data
0234                 [GPIO#]: pin number of GPIO used to wakeup the host.
0235                          GPIO pin# (e.g. 0-7) or 0xff (interface, e.g. SDIO
0236                          will be used instead).
0237                 [gap]:   the gap in milliseconds between wakeup signal and
0238                          wakeup event or 0xff for special setting (host
0239                          acknowledge required) when GPIO is used to wakeup host.
0240 
0241         Examples:
0242                 echo "-1" > hscfg        : Cancel host sleep mode
0243                 echo "3" > hscfg         : Broadcast and unicast data;
0244                                            Use GPIO and gap set previously
0245                 echo "2 3" > hscfg       : Unicast data and GPIO 3;
0246                                            Use gap set previously
0247                 echo "2 1 160" > hscfg   : Unicast data, GPIO 1 and gap 160 ms
0248                 echo "2 1 0xff" > hscfg  : Unicast data, GPIO 1; Wait for host
0249                                            to ack before sending wakeup event
0250 
0251 getlog
0252         This command is used to get the statistics available in the station.
0253         Usage:
0254 
0255         cat getlog
0256 
0257 device_dump
0258         This command is used to dump driver information and firmware memory
0259         segments.
0260         Usage:
0261 
0262         cat fw_dump
0263 
0264 verext
0265         This command is used to get extended firmware version string using
0266         different configuration parameters.
0267 
0268         Usage:
0269                 echo "[version_str_sel]" > verext
0270                 cat verext
0271 
0272                 [version_str_sel]: firmware support several extend version
0273                                    string cases, include 0/1/10/20/21/99
0274 ===============================================================================