README 9.0 KB

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