27 #include <linux/export.h>
36 static int bnep_sock_release(
struct socket *
sock)
38 struct sock *
sk = sock->
sk;
40 BT_DBG(
"sock %p sk %p", sock, sk);
52 static int bnep_sock_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
62 BT_DBG(
"cmd %x arg %lx", cmd, arg);
80 ca.device[
sizeof(
ca.device)-1] = 0;
131 static int bnep_sock_compat_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
142 cl.ci = compat_ptr(uci);
155 return bnep_sock_ioctl(sock, cmd, arg);
159 static const struct proto_ops bnep_sock_ops = {
162 .release = bnep_sock_release,
163 .ioctl = bnep_sock_ioctl,
165 .compat_ioctl = bnep_sock_compat_ioctl,
182 static struct proto bnep_proto = {
185 .obj_size =
sizeof(
struct bt_sock)
204 sock->
ops = &bnep_sock_ops;
220 .create = bnep_sock_create
233 BT_ERR(
"Can't register BNEP socket");
239 BT_ERR(
"Failed to create BNEP proc file");
244 BT_INFO(
"BNEP socket layer initialized");
257 BT_ERR(
"Can't unregister BNEP socket");