CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/cache/sources/wl/include/dhdioctl.h
Views: 3959
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 Open Broadcom Corporation$
9
*
10
* $Id: dhdioctl.h 327775 2012-04-16 18:54:32Z $
11
*/
12
13
#ifndef _dhdioctl_h_
14
#define _dhdioctl_h_
15
16
#include <typedefs.h>
17
18
19
/* require default structure packing */
20
#define BWL_DEFAULT_PACKING
21
#include <packed_section_start.h>
22
23
24
/* Linux network driver ioctl encoding */
25
typedef struct dhd_ioctl {
26
uint cmd; /* common ioctl definition */
27
void *buf; /* pointer to user buffer */
28
uint len; /* length of user buffer */
29
bool set; /* get or set request (optional) */
30
uint used; /* bytes read or written (optional) */
31
uint needed; /* bytes needed (optional) */
32
uint driver; /* to identify target driver */
33
} dhd_ioctl_t;
34
35
/* Underlying BUS definition */
36
enum {
37
BUS_TYPE_USB = 0, /* for USB dongles */
38
BUS_TYPE_SDIO /* for SDIO dongles */
39
};
40
41
/* per-driver magic numbers */
42
#define DHD_IOCTL_MAGIC 0x00444944
43
44
/* bump this number if you change the ioctl interface */
45
#define DHD_IOCTL_VERSION 1
46
47
#define DHD_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
48
#define DHD_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
49
50
/* common ioctl definitions */
51
#define DHD_GET_MAGIC 0
52
#define DHD_GET_VERSION 1
53
#define DHD_GET_VAR 2
54
#define DHD_SET_VAR 3
55
56
/* message levels */
57
#define DHD_ERROR_VAL 0x0001
58
#define DHD_TRACE_VAL 0x0002
59
#define DHD_INFO_VAL 0x0004
60
#define DHD_DATA_VAL 0x0008
61
#define DHD_CTL_VAL 0x0010
62
#define DHD_TIMER_VAL 0x0020
63
#define DHD_HDRS_VAL 0x0040
64
#define DHD_BYTES_VAL 0x0080
65
#define DHD_INTR_VAL 0x0100
66
#define DHD_LOG_VAL 0x0200
67
#define DHD_GLOM_VAL 0x0400
68
#define DHD_EVENT_VAL 0x0800
69
#define DHD_BTA_VAL 0x1000
70
#if 0 && (NDISVER >= 0x0630) && 1
71
#define DHD_SCAN_VAL 0x2000
72
#else
73
#define DHD_ISCAN_VAL 0x2000
74
#endif
75
#define DHD_ARPOE_VAL 0x4000
76
77
#ifdef SDTEST
78
/* For pktgen iovar */
79
typedef struct dhd_pktgen {
80
uint version; /* To allow structure change tracking */
81
uint freq; /* Max ticks between tx/rx attempts */
82
uint count; /* Test packets to send/rcv each attempt */
83
uint print; /* Print counts every <print> attempts */
84
uint total; /* Total packets (or bursts) */
85
uint minlen; /* Minimum length of packets to send */
86
uint maxlen; /* Maximum length of packets to send */
87
uint numsent; /* Count of test packets sent */
88
uint numrcvd; /* Count of test packets received */
89
uint numfail; /* Count of test send failures */
90
uint mode; /* Test mode (type of test packets) */
91
uint stop; /* Stop after this many tx failures */
92
} dhd_pktgen_t;
93
94
/* Version in case structure changes */
95
#define DHD_PKTGEN_VERSION 2
96
97
/* Type of test packets to use */
98
#define DHD_PKTGEN_ECHO 1 /* Send echo requests */
99
#define DHD_PKTGEN_SEND 2 /* Send discard packets */
100
#define DHD_PKTGEN_RXBURST 3 /* Request dongle send N packets */
101
#define DHD_PKTGEN_RECV 4 /* Continuous rx from continuous tx dongle */
102
#endif /* SDTEST */
103
104
/* Enter idle immediately (no timeout) */
105
#define DHD_IDLE_IMMEDIATE (-1)
106
107
/* Values for idleclock iovar: other values are the sd_divisor to use when idle */
108
#define DHD_IDLE_ACTIVE 0 /* Do not request any SD clock change when idle */
109
#define DHD_IDLE_STOP (-1) /* Request SD clock be stopped (and use SD1 mode) */
110
111
112
/* require default structure packing */
113
#include <packed_section_end.h>
114
115
#endif /* _dhdioctl_h_ */
116
117