PageRenderTime 47ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/bcm4329/include/dhdioctl.h

https://bitbucket.org/slukk/jb-tsm-kernel-4.2
C Header | 123 lines | 62 code | 20 blank | 41 comment | 0 complexity | 924d12c1750e9eb9f36e67f90cb988cd MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
  1. /*
  2. * Definitions for ioctls to access DHD iovars.
  3. * Based on wlioctl.h (for Broadcom 802.11abg driver).
  4. * (Moves towards generic ioctls for BCM drivers/iovars.)
  5. *
  6. * Definitions subject to change without notice.
  7. *
  8. * Copyright (C) 1999-2010, Broadcom Corporation
  9. *
  10. * Unless you and Broadcom execute a separate written software license
  11. * agreement governing use of this software, this software is licensed to you
  12. * under the terms of the GNU General Public License version 2 (the "GPL"),
  13. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  14. * following added to such license:
  15. *
  16. * As a special exception, the copyright holders of this software give you
  17. * permission to link this software with independent modules, and to copy and
  18. * distribute the resulting executable under terms of your choice, provided that
  19. * you also meet, for each linked independent module, the terms and conditions of
  20. * the license of that module. An independent module is a module which is not
  21. * derived from this software. The special exception does not apply to any
  22. * modifications of the software.
  23. *
  24. * Notwithstanding the above, under no circumstances may you combine this
  25. * software in any way with any other Broadcom software provided under a license
  26. * other than the GPL, without Broadcom's express prior written consent.
  27. *
  28. * $Id: dhdioctl.h,v 13.7.8.1.4.1.16.5 2010/05/21 21:49:38 Exp $
  29. */
  30. #ifndef _dhdioctl_h_
  31. #define _dhdioctl_h_
  32. #include <typedefs.h>
  33. /* require default structure packing */
  34. #define BWL_DEFAULT_PACKING
  35. #include <packed_section_start.h>
  36. /* Linux network driver ioctl encoding */
  37. typedef struct dhd_ioctl {
  38. uint cmd; /* common ioctl definition */
  39. void *buf; /* pointer to user buffer */
  40. uint len; /* length of user buffer */
  41. bool set; /* get or set request (optional) */
  42. uint used; /* bytes read or written (optional) */
  43. uint needed; /* bytes needed (optional) */
  44. uint driver; /* to identify target driver */
  45. } dhd_ioctl_t;
  46. /* per-driver magic numbers */
  47. #define DHD_IOCTL_MAGIC 0x00444944
  48. /* bump this number if you change the ioctl interface */
  49. #define DHD_IOCTL_VERSION 1
  50. #define DHD_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
  51. #define DHD_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
  52. /* common ioctl definitions */
  53. #define DHD_GET_MAGIC 0
  54. #define DHD_GET_VERSION 1
  55. #define DHD_GET_VAR 2
  56. #define DHD_SET_VAR 3
  57. /* message levels */
  58. #define DHD_ERROR_VAL 0x0001
  59. #define DHD_TRACE_VAL 0x0002
  60. #define DHD_INFO_VAL 0x0004
  61. #define DHD_DATA_VAL 0x0008
  62. #define DHD_CTL_VAL 0x0010
  63. #define DHD_TIMER_VAL 0x0020
  64. #define DHD_HDRS_VAL 0x0040
  65. #define DHD_BYTES_VAL 0x0080
  66. #define DHD_INTR_VAL 0x0100
  67. #define DHD_LOG_VAL 0x0200
  68. #define DHD_GLOM_VAL 0x0400
  69. #define DHD_EVENT_VAL 0x0800
  70. #define DHD_BTA_VAL 0x1000
  71. #define DHD_ISCAN_VAL 0x2000
  72. #ifdef SDTEST
  73. /* For pktgen iovar */
  74. typedef struct dhd_pktgen {
  75. uint version; /* To allow structure change tracking */
  76. uint freq; /* Max ticks between tx/rx attempts */
  77. uint count; /* Test packets to send/rcv each attempt */
  78. uint print; /* Print counts every <print> attempts */
  79. uint total; /* Total packets (or bursts) */
  80. uint minlen; /* Minimum length of packets to send */
  81. uint maxlen; /* Maximum length of packets to send */
  82. uint numsent; /* Count of test packets sent */
  83. uint numrcvd; /* Count of test packets received */
  84. uint numfail; /* Count of test send failures */
  85. uint mode; /* Test mode (type of test packets) */
  86. uint stop; /* Stop after this many tx failures */
  87. } dhd_pktgen_t;
  88. /* Version in case structure changes */
  89. #define DHD_PKTGEN_VERSION 2
  90. /* Type of test packets to use */
  91. #define DHD_PKTGEN_ECHO 1 /* Send echo requests */
  92. #define DHD_PKTGEN_SEND 2 /* Send discard packets */
  93. #define DHD_PKTGEN_RXBURST 3 /* Request dongle send N packets */
  94. #define DHD_PKTGEN_RECV 4 /* Continuous rx from continuous tx dongle */
  95. #endif /* SDTEST */
  96. /* Enter idle immediately (no timeout) */
  97. #define DHD_IDLE_IMMEDIATE (-1)
  98. /* Values for idleclock iovar: other values are the sd_divisor to use when idle */
  99. #define DHD_IDLE_ACTIVE 0 /* Do not request any SD clock change when idle */
  100. #define DHD_IDLE_STOP (-1) /* Request SD clock be stopped (and use SD1 mode) */
  101. /* require default structure packing */
  102. #include <packed_section_end.h>
  103. #endif /* _dhdioctl_h_ */