README.wimax 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Linux kernel WiMAX stack
  2. (C) 2008 Intel Corporation < linux-wimax@intel.com >
  3. This provides a basic Linux kernel WiMAX stack to provide a common
  4. control API for WiMAX devices, usable from kernel and user space.
  5. 1. Design
  6. The WiMAX stack is designed to provide for common WiMAX control
  7. services to current and future WiMAX devices from any vendor.
  8. Because currently there is only one and we don't know what would be the
  9. common services, the APIs it currently provides are very minimal.
  10. However, it is done in such a way that it is easily extensible to
  11. accommodate future requirements.
  12. The stack works by embedding a struct wimax_dev in your device's
  13. control structures. This provides a set of callbacks that the WiMAX
  14. stack will call in order to implement control operations requested by
  15. the user. As well, the stack provides API functions that the driver
  16. calls to notify about changes of state in the device.
  17. The stack exports the API calls needed to control the device to user
  18. space using generic netlink as a marshalling mechanism. You can access
  19. them using your own code or use the wrappers provided for your
  20. convenience in libwimax (in the wimax-tools package).
  21. For detailed information on the stack, please see
  22. include/linux/wimax.h.
  23. 2. Usage
  24. For usage in a driver (registration, API, etc) please refer to the
  25. instructions in the header file include/linux/wimax.h.
  26. When a device is registered with the WiMAX stack, a set of debugfs
  27. files will appear in /sys/kernel/debug/wimax:wmxX can tweak for
  28. control.
  29. 2.1. Obtaining debug information: debugfs entries
  30. The WiMAX stack is compiled, by default, with debug messages that can
  31. be used to diagnose issues. By default, said messages are disabled.
  32. The drivers will register debugfs entries that allow the user to tweak
  33. debug settings.
  34. Each driver, when registering with the stack, will cause a debugfs
  35. directory named wimax:DEVICENAME to be created; optionally, it might
  36. create more subentries below it.
  37. 2.1.1. Increasing debug output
  38. The files named *dl_* indicate knobs for controlling the debug output
  39. of different submodules of the WiMAX stack:
  40. *
  41. # find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
  42. /sys/kernel/debug/wimax:wmx0/wimax_dl_stack
  43. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
  44. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
  45. /sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
  46. /sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
  47. /sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
  48. /sys/kernel/debug/wimax:wmx0/.... # other driver specific files
  49. NOTE: Of course, if debugfs is mounted in a directory other than
  50. /sys/kernel/debug, those paths will change.
  51. By reading the file you can obtain the current value of said debug
  52. level; by writing to it, you can set it.
  53. To increase the debug level of, for example, the id-table submodule,
  54. just write:
  55. $ echo 3 > /sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
  56. Increasing numbers yield increasing debug information; for details of
  57. what is printed and the available levels, check the source. The code
  58. uses 0 for disabled and increasing values until 8.