1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26#include <linux/init.h>
27#include <linux/module.h>
28#include <linux/usb.h>
29#include <linux/uwb.h>
30#include "dfu/i1480-dfu.h"
31
32
33
34static struct uwb_est_entry i1480_est_fd00[] = {
35
36
37
38 [i1480_EVT_CONFIRM] = { .size = sizeof(struct i1480_evt_confirm) },
39 [i1480_CMD_SET_IP_MAS] = { .size = sizeof(struct i1480_evt_confirm) },
40#ifdef i1480_RCEB_EXTENDED
41 [0x09] = {
42 .size = sizeof(struct i1480_rceb),
43 .offset = 1 + offsetof(struct i1480_rceb, wParamLength),
44 },
45#endif
46};
47
48
49static struct uwb_est_entry i1480_est_fd01[] = {
50 [0xff & i1480_EVT_RM_INIT_DONE] = { .size = sizeof(struct i1480_rceb) },
51 [0xff & i1480_EVT_DEV_ADD] = { .size = sizeof(struct i1480_rceb) + 9 },
52 [0xff & i1480_EVT_DEV_RM] = { .size = sizeof(struct i1480_rceb) + 9 },
53 [0xff & i1480_EVT_DEV_ID_CHANGE] = {
54 .size = sizeof(struct i1480_rceb) + 2 },
55};
56
57static int __init i1480_est_init(void)
58{
59 int result = uwb_est_register(i1480_CET_VS1, 0x00, 0x8086, 0x0c3b,
60 i1480_est_fd00,
61 ARRAY_SIZE(i1480_est_fd00));
62 if (result < 0) {
63 printk(KERN_ERR "Can't register EST table fd00: %d\n", result);
64 return result;
65 }
66 result = uwb_est_register(i1480_CET_VS1, 0x01, 0x8086, 0x0c3b,
67 i1480_est_fd01, ARRAY_SIZE(i1480_est_fd01));
68 if (result < 0) {
69 printk(KERN_ERR "Can't register EST table fd01: %d\n", result);
70 return result;
71 }
72 return 0;
73}
74module_init(i1480_est_init);
75
76static void __exit i1480_est_exit(void)
77{
78 uwb_est_unregister(i1480_CET_VS1, 0x00, 0x8086, 0x0c3b,
79 i1480_est_fd00, ARRAY_SIZE(i1480_est_fd00));
80 uwb_est_unregister(i1480_CET_VS1, 0x01, 0x8086, 0x0c3b,
81 i1480_est_fd01, ARRAY_SIZE(i1480_est_fd01));
82}
83module_exit(i1480_est_exit);
84
85MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>");
86MODULE_DESCRIPTION("i1480's Vendor Specific Event Size Tables");
87MODULE_LICENSE("GPL");
88
89
90
91
92
93
94static struct usb_device_id __used i1480_est_id_table[] = {
95 { USB_DEVICE(0x8086, 0xdf3b), },
96 { USB_DEVICE(0x8086, 0x0c3b), },
97 { },
98};
99MODULE_DEVICE_TABLE(usb, i1480_est_id_table);
100