aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcmdhd/include/dhdioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/dhdioctl.h')
-rw-r--r--drivers/net/wireless/bcmdhd/include/dhdioctl.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/dhdioctl.h b/drivers/net/wireless/bcmdhd/include/dhdioctl.h
new file mode 100644
index 00000000000..9661dac2603
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/include/dhdioctl.h
@@ -0,0 +1,129 @@
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-2011, 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.11.10.1 2010-12-22 23:47:26 Exp $
29 */
30
31#ifndef _dhdioctl_h_
32#define _dhdioctl_h_
33
34#include <typedefs.h>
35
36
37/* require default structure packing */
38#define BWL_DEFAULT_PACKING
39#include <packed_section_start.h>
40
41
42/* Linux network driver ioctl encoding */
43typedef struct dhd_ioctl {
44 uint cmd; /* common ioctl definition */
45 void *buf; /* pointer to user buffer */
46 uint len; /* length of user buffer */
47 bool set; /* get or set request (optional) */
48 uint used; /* bytes read or written (optional) */
49 uint needed; /* bytes needed (optional) */
50 uint driver; /* to identify target driver */
51} dhd_ioctl_t;
52
53/* Underlying BUS definition */
54enum {
55 BUS_TYPE_USB = 0, /* for USB dongles */
56 BUS_TYPE_SDIO /* for SDIO dongles */
57};
58
59/* per-driver magic numbers */
60#define DHD_IOCTL_MAGIC 0x00444944
61
62/* bump this number if you change the ioctl interface */
63#define DHD_IOCTL_VERSION 1
64
65#define DHD_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
66#define DHD_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
67
68/* common ioctl definitions */
69#define DHD_GET_MAGIC 0
70#define DHD_GET_VERSION 1
71#define DHD_GET_VAR 2
72#define DHD_SET_VAR 3
73
74/* message levels */
75#define DHD_ERROR_VAL 0x0001
76#define DHD_TRACE_VAL 0x0002
77#define DHD_INFO_VAL 0x0004
78#define DHD_DATA_VAL 0x0008
79#define DHD_CTL_VAL 0x0010
80#define DHD_TIMER_VAL 0x0020
81#define DHD_HDRS_VAL 0x0040
82#define DHD_BYTES_VAL 0x0080
83#define DHD_INTR_VAL 0x0100
84#define DHD_LOG_VAL 0x0200
85#define DHD_GLOM_VAL 0x0400
86#define DHD_EVENT_VAL 0x0800
87#define DHD_BTA_VAL 0x1000
88#define DHD_ISCAN_VAL 0x2000
89#define DHD_ARPOE_VAL 0x4000
90
91#ifdef SDTEST
92/* For pktgen iovar */
93typedef struct dhd_pktgen {
94 uint version; /* To allow structure change tracking */
95 uint freq; /* Max ticks between tx/rx attempts */
96 uint count; /* Test packets to send/rcv each attempt */
97 uint print; /* Print counts every <print> attempts */
98 uint total; /* Total packets (or bursts) */
99 uint minlen; /* Minimum length of packets to send */
100 uint maxlen; /* Maximum length of packets to send */
101 uint numsent; /* Count of test packets sent */
102 uint numrcvd; /* Count of test packets received */
103 uint numfail; /* Count of test send failures */
104 uint mode; /* Test mode (type of test packets) */
105 uint stop; /* Stop after this many tx failures */
106} dhd_pktgen_t;
107
108/* Version in case structure changes */
109#define DHD_PKTGEN_VERSION 2
110
111/* Type of test packets to use */
112#define DHD_PKTGEN_ECHO 1 /* Send echo requests */
113#define DHD_PKTGEN_SEND 2 /* Send discard packets */
114#define DHD_PKTGEN_RXBURST 3 /* Request dongle send N packets */
115#define DHD_PKTGEN_RECV 4 /* Continuous rx from continuous tx dongle */
116#endif /* SDTEST */
117
118/* Enter idle immediately (no timeout) */
119#define DHD_IDLE_IMMEDIATE (-1)
120
121/* Values for idleclock iovar: other values are the sd_divisor to use when idle */
122#define DHD_IDLE_ACTIVE 0 /* Do not request any SD clock change when idle */
123#define DHD_IDLE_STOP (-1) /* Request SD clock be stopped (and use SD1 mode) */
124
125
126/* require default structure packing */
127#include <packed_section_end.h>
128
129#endif /* _dhdioctl_h_ */