33
34 /*
35 * UWBA private header file.
36 */
37
38 #include <sys/note.h>
39 #include <sys/sunddi.h>
40 #include <sys/types.h>
41 #include <sys/list.h>
42 #include <sys/bitset.h>
43 #include <sys/bitmap.h>
44
45 #include <sys/uwb/uwb.h>
46 #include <sys/uwb/uwbai.h>
47
48 /* For logging. */
49 #define UWBA_LOG_DEBUG 2
50 #define UWBA_LOG_LOG 1
51 #define UWBA_LOG_CONSOLE 0
52
53 #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
54 #define isdigit(ch) ((ch >= '0') && (ch <= '9'))
55
56 #define UWB_RAW_RESULT_CODE_SIZE 5 /* size of RCEB + bResultCode */
57 #define UWB_RAW_RCCB_HEAD_SIZE 4 /* size of RCCB */
58
59 #define UWB_RAW_BEVENTTYPE_OFFSET 0 /* offset of bEventType */
60 #define UWB_RAW_WEVENT_OFFSET 1 /* offset of wEvent */
61 #define UWB_RAW_BEVENTCONTEXT_OFFSET 3 /* offset of bEventContext */
62 #define UWB_RAW_BRESULTCODE_OFFSET 4 /* offset of bResultCode */
63
64
65
66 #define UWB_CTXT_ID_TOP 0xfe /* top context id */
67 #define UWB_CTXT_ID_BOTTOM 0x1 /* bottom context id */
68 #define UWB_CTXT_ID_NOTIF 0x0 /* notification context id */
69 #define UWB_CTXT_ID_UNVALID 0xff /* invalid context id */
70
71
72 #define UWB_INVALID_EVT_CODE 0x7ffe /* invalid evt/notif code */
73 #define UWB_INVALID_EVT_SIZE 0x7fff /* invalid evt length */
|
33
34 /*
35 * UWBA private header file.
36 */
37
38 #include <sys/note.h>
39 #include <sys/sunddi.h>
40 #include <sys/types.h>
41 #include <sys/list.h>
42 #include <sys/bitset.h>
43 #include <sys/bitmap.h>
44
45 #include <sys/uwb/uwb.h>
46 #include <sys/uwb/uwbai.h>
47
48 /* For logging. */
49 #define UWBA_LOG_DEBUG 2
50 #define UWBA_LOG_LOG 1
51 #define UWBA_LOG_CONSOLE 0
52
53 #if defined(__GNUC__)
54 #define offsetof(s, m) __builtin_offsetof(s, m)
55 #else
56 #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
57 #endif
58 #define isdigit(ch) ((ch >= '0') && (ch <= '9'))
59
60 #define UWB_RAW_RESULT_CODE_SIZE 5 /* size of RCEB + bResultCode */
61 #define UWB_RAW_RCCB_HEAD_SIZE 4 /* size of RCCB */
62
63 #define UWB_RAW_BEVENTTYPE_OFFSET 0 /* offset of bEventType */
64 #define UWB_RAW_WEVENT_OFFSET 1 /* offset of wEvent */
65 #define UWB_RAW_BEVENTCONTEXT_OFFSET 3 /* offset of bEventContext */
66 #define UWB_RAW_BRESULTCODE_OFFSET 4 /* offset of bResultCode */
67
68
69
70 #define UWB_CTXT_ID_TOP 0xfe /* top context id */
71 #define UWB_CTXT_ID_BOTTOM 0x1 /* bottom context id */
72 #define UWB_CTXT_ID_NOTIF 0x0 /* notification context id */
73 #define UWB_CTXT_ID_UNVALID 0xff /* invalid context id */
74
75
76 #define UWB_INVALID_EVT_CODE 0x7ffe /* invalid evt/notif code */
77 #define UWB_INVALID_EVT_SIZE 0x7fff /* invalid evt length */
|