README.i2400m 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. Driver for the Intel Wireless Wimax Connection 2400m
  2. (C) 2008 Intel Corporation < linux-wimax@intel.com >
  3. This provides a driver for the Intel Wireless WiMAX Connection 2400m
  4. and a basic Linux kernel WiMAX stack.
  5. 1. Requirements
  6. * Linux installation with Linux kernel 2.6.22 or newer (if building
  7. from a separate tree)
  8. * Intel i2400m Echo Peak or Baxter Peak; this includes the Intel
  9. Wireless WiMAX/WiFi Link 5x50 series.
  10. * build tools:
  11. + Linux kernel development package for the target kernel; to
  12. build against your currently running kernel, you need to have
  13. the kernel development package corresponding to the running
  14. image installed (usually if your kernel is named
  15. linux-VERSION, the development package is called
  16. linux-dev-VERSION or linux-headers-VERSION).
  17. + GNU C Compiler, make
  18. 2. Compilation and installation
  19. 2.1. Compilation of the drivers included in the kernel
  20. Configure the kernel; to enable the WiMAX drivers select Drivers >
  21. Networking Drivers > WiMAX device support. Enable all of them as
  22. modules (easier).
  23. If USB or SDIO are not enabled in the kernel configuration, the options
  24. to build the i2400m USB or SDIO drivers will not show. Enable said
  25. subsystems and go back to the WiMAX menu to enable the drivers.
  26. Compile and install your kernel as usual.
  27. 2.2. Compilation of the drivers distributed as an standalone module
  28. To compile
  29. $ cd source/directory
  30. $ make
  31. Once built you can load and unload using the provided load.sh script;
  32. load.sh will load the modules, load.sh u will unload them.
  33. To install in the default kernel directories (and enable auto loading
  34. when the device is plugged):
  35. $ make install
  36. $ depmod -a
  37. If your kernel development files are located in a non standard
  38. directory or if you want to build for a kernel that is not the
  39. currently running one, set KDIR to the right location:
  40. $ make KDIR=/path/to/kernel/dev/tree
  41. For more information, please contact linux-wimax@intel.com.
  42. 3. Installing the firmware
  43. The firmware can be obtained from http://linuxwimax.org or might have
  44. been supplied with your hardware.
  45. It has to be installed in the target system:
  46. *
  47. $ cp FIRMWAREFILE.sbcf /lib/firmware/i2400m-fw-BUSTYPE-1.3.sbcf
  48. * NOTE: if your firmware came in an .rpm or .deb file, just install
  49. it as normal, with the rpm (rpm -i FIRMWARE.rpm) or dpkg
  50. (dpkg -i FIRMWARE.deb) commands. No further action is needed.
  51. * BUSTYPE will be usb or sdio, depending on the hardware you have.
  52. Each hardware type comes with its own firmware and will not work
  53. with other types.
  54. 4. Design
  55. This package contains two major parts: a WiMAX kernel stack and a
  56. driver for the Intel i2400m.
  57. The WiMAX stack is designed to provide for common WiMAX control
  58. services to current and future WiMAX devices from any vendor; please
  59. see README.wimax for details.
  60. The i2400m kernel driver is broken up in two main parts: the bus
  61. generic driver and the bus-specific drivers. The bus generic driver
  62. forms the drivercore and contain no knowledge of the actual method we
  63. use to connect to the device. The bus specific drivers are just the
  64. glue to connect the bus-generic driver and the device. Currently only
  65. USB and SDIO are supported. See drivers/net/wimax/i2400m/i2400m.h for
  66. more information.
  67. The bus generic driver is logically broken up in two parts: OS-glue and
  68. hardware-glue. The OS-glue interfaces with Linux. The hardware-glue
  69. interfaces with the device on using an interface provided by the
  70. bus-specific driver. The reason for this breakup is to be able to
  71. easily reuse the hardware-glue to write drivers for other OSes; note
  72. the hardware glue part is written as a native Linux driver; no
  73. abstraction layers are used, so to port to another OS, the Linux kernel
  74. API calls should be replaced with the target OS's.
  75. 5. Usage
  76. To load the driver, follow the instructions in the install section;
  77. once the driver is loaded, plug in the device (unless it is permanently
  78. plugged in). The driver will enumerate the device, upload the firmware
  79. and output messages in the kernel log (dmesg, /var/log/messages or
  80. /var/log/kern.log) such as:
  81. ...
  82. i2400m_usb 5-4:1.0: firmware interface version 8.0.0
  83. i2400m_usb 5-4:1.0: WiMAX interface wmx0 (00:1d:e1:01:94:2c) ready
  84. At this point the device is ready to work.
  85. Current versions require the Intel WiMAX Network Service in userspace
  86. to make things work. See the network service's README for instructions
  87. on how to scan, connect and disconnect.
  88. 5.1. Module parameters
  89. Module parameters can be set at kernel or module load time or by
  90. echoing values:
  91. $ echo VALUE > /sys/module/MODULENAME/parameters/PARAMETERNAME
  92. To make changes permanent, for example, for the i2400m module, you can
  93. also create a file named /etc/modprobe.d/i2400m containing:
  94. options i2400m idle_mode_disabled=1
  95. To find which parameters are supported by a module, run:
  96. $ modinfo path/to/module.ko
  97. During kernel bootup (if the driver is linked in the kernel), specify
  98. the following to the kernel command line:
  99. i2400m.PARAMETER=VALUE
  100. 5.1.1. i2400m: idle_mode_disabled
  101. The i2400m module supports a parameter to disable idle mode. This
  102. parameter, once set, will take effect only when the device is
  103. reinitialized by the driver (eg: following a reset or a reconnect).
  104. 5.2. Debug operations: debugfs entries
  105. The driver will register debugfs entries that allow the user to tweak
  106. debug settings. There are three main container directories where
  107. entries are placed, which correspond to the three blocks a i2400m WiMAX
  108. driver has:
  109. * /sys/kernel/debug/wimax:DEVNAME/ for the generic WiMAX stack
  110. controls
  111. * /sys/kernel/debug/wimax:DEVNAME/i2400m for the i2400m generic
  112. driver controls
  113. * /sys/kernel/debug/wimax:DEVNAME/i2400m-usb (or -sdio) for the
  114. bus-specific i2400m-usb or i2400m-sdio controls).
  115. Of course, if debugfs is mounted in a directory other than
  116. /sys/kernel/debug, those paths will change.
  117. 5.2.1. Increasing debug output
  118. The files named *dl_* indicate knobs for controlling the debug output
  119. of different submodules:
  120. *
  121. # find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
  122. /sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_tx
  123. /sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_rx
  124. /sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_notif
  125. /sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_fw
  126. /sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_usb
  127. /sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
  128. /sys/kernel/debug/wimax:wmx0/i2400m/dl_rx
  129. /sys/kernel/debug/wimax:wmx0/i2400m/dl_rfkill
  130. /sys/kernel/debug/wimax:wmx0/i2400m/dl_netdev
  131. /sys/kernel/debug/wimax:wmx0/i2400m/dl_fw
  132. /sys/kernel/debug/wimax:wmx0/i2400m/dl_debugfs
  133. /sys/kernel/debug/wimax:wmx0/i2400m/dl_driver
  134. /sys/kernel/debug/wimax:wmx0/i2400m/dl_control
  135. /sys/kernel/debug/wimax:wmx0/wimax_dl_stack
  136. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
  137. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
  138. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
  139. /sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
  140. /sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
  141. By reading the file you can obtain the current value of said debug
  142. level; by writing to it, you can set it.
  143. To increase the debug level of, for example, the i2400m's generic TX
  144. engine, just write:
  145. $ echo 3 > /sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
  146. Increasing numbers yield increasing debug information; for details of
  147. what is printed and the available levels, check the source. The code
  148. uses 0 for disabled and increasing values until 8.
  149. 5.2.2. RX and TX statistics
  150. The i2400m/rx_stats and i2400m/tx_stats provide statistics about the
  151. data reception/delivery from the device:
  152. $ cat /sys/kernel/debug/wimax:wmx0/i2400m/rx_stats
  153. 45 1 3 34 3104 48 480
  154. The numbers reported are
  155. * packets/RX-buffer: total, min, max
  156. * RX-buffers: total RX buffers received, accumulated RX buffer size
  157. in bytes, min size received, max size received
  158. Thus, to find the average buffer size received, divide accumulated
  159. RX-buffer / total RX-buffers.
  160. To clear the statistics back to 0, write anything to the rx_stats file:
  161. $ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m_rx_stats
  162. Likewise for TX.
  163. Note the packets this debug file refers to are not network packet, but
  164. packets in the sense of the device-specific protocol for communication
  165. to the host. See drivers/net/wimax/i2400m/tx.c.
  166. 5.2.3. Tracing messages received from user space
  167. To echo messages received from user space into the trace pipe that the
  168. i2400m driver creates, set the debug file i2400m/trace_msg_from_user to
  169. 1:
  170. *
  171. $ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m/trace_msg_from_user
  172. 5.2.4. Performing a device reset
  173. By writing a 0, a 1 or a 2 to the file
  174. /sys/kernel/debug/wimax:wmx0/reset, the driver performs a warm (without
  175. disconnecting from the bus), cold (disconnecting from the bus) or bus
  176. (bus specific) reset on the device.
  177. 5.2.5. Asking the device to enter power saving mode
  178. By writing any value to the /sys/kernel/debug/wimax:wmx0 file, the
  179. device will attempt to enter power saving mode.
  180. 6. Troubleshooting
  181. 6.1. Driver complains about 'i2400m-fw-usb-1.2.sbcf: request failed'
  182. If upon connecting the device, the following is output in the kernel
  183. log:
  184. i2400m_usb 5-4:1.0: fw i2400m-fw-usb-1.3.sbcf: request failed: -2
  185. This means that the driver cannot locate the firmware file named
  186. /lib/firmware/i2400m-fw-usb-1.2.sbcf. Check that the file is present in
  187. the right location.