23 #include <linux/export.h>
32 static int hidp_sock_release(
struct socket *
sock)
34 struct sock *
sk = sock->
sk;
36 BT_DBG(
"sock %p sk %p", sock, sk);
49 static int hidp_sock_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
60 BT_DBG(
"cmd %x arg %lx", cmd, arg);
135 struct compat_hidp_connadd_req {
151 static int hidp_sock_compat_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
162 cl.ci = compat_ptr(uci);
174 struct compat_hidp_connadd_req
ca;
197 arg = (
unsigned long) uca;
204 return hidp_sock_ioctl(sock, cmd, arg);
208 static const struct proto_ops hidp_sock_ops = {
211 .release = hidp_sock_release,
212 .ioctl = hidp_sock_ioctl,
214 .compat_ioctl = hidp_sock_compat_ioctl,
231 static struct proto hidp_proto = {
234 .obj_size =
sizeof(
struct bt_sock)
253 sock->
ops = &hidp_sock_ops;
270 .create = hidp_sock_create
283 BT_ERR(
"Can't register HIDP socket");
289 BT_ERR(
"Failed to create HIDP proc file");
294 BT_INFO(
"HIDP socket layer initialized");
299 BT_ERR(
"Can't register HIDP socket");
308 BT_ERR(
"Can't unregister HIDP socket");