This source file includes following definitions.
- uwbd_evt_handle_rc_ie_rcv
1
2
3
4
5
6
7
8
9 #include <linux/errno.h>
10 #include <linux/module.h>
11 #include <linux/device.h>
12 #include <linux/bitmap.h>
13 #include "uwb-internal.h"
14
15
16
17
18 int uwbd_evt_handle_rc_ie_rcv(struct uwb_event *evt)
19 {
20 int result = -EINVAL;
21 struct device *dev = &evt->rc->uwb_dev.dev;
22 struct uwb_rc_evt_ie_rcv *iercv;
23
24
25 if (evt->notif.size < sizeof(*iercv)) {
26 dev_err(dev, "IE Received notification: Not enough data to "
27 "decode (%zu vs %zu bytes needed)\n",
28 evt->notif.size, sizeof(*iercv));
29 goto error;
30 }
31 iercv = container_of(evt->notif.rceb, struct uwb_rc_evt_ie_rcv, rceb);
32
33 dev_dbg(dev, "IE received, element ID=%d\n", iercv->IEData[0]);
34
35 if (iercv->IEData[0] == UWB_RELINQUISH_REQUEST_IE) {
36 dev_warn(dev, "unhandled Relinquish Request IE\n");
37 }
38
39 return 0;
40 error:
41 return result;
42 }