--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
-@@ -122,8 +122,12 @@ int bt_sock_unregister(int proto)
+@@ -111,8 +111,12 @@ int bt_sock_unregister(int proto)
}
EXPORT_SYMBOL(bt_sock_unregister);
{
int err;
-@@ -141,7 +145,11 @@ static int bt_sock_create(struct net *ne
+@@ -130,7 +134,11 @@ static int bt_sock_create(struct net *ne
read_lock(&bt_proto_lock);
if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) {
if (!err)
bt_sock_reclassify_lock(sock->sk, proto);
module_put(bt_proto[proto]->owner);
-@@ -473,7 +481,11 @@ int bt_sock_ioctl(struct socket *sock, u
+@@ -463,7 +471,11 @@ int bt_sock_ioctl(struct socket *sock, u
if (sk->sk_state == BT_LISTEN)
return -EINVAL;
{
struct hci_ufilter uf = { .opcode = 0 };
struct sock *sk = sock->sk;
-@@ -1063,8 +1067,12 @@ static struct proto hci_sk_proto = {
+@@ -1056,8 +1061,12 @@ static struct proto hci_sk_proto = {
.obj_size = sizeof(struct hci_pinfo)
};
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
-@@ -72,7 +72,11 @@ static struct attribute_group bt_link_gr
+@@ -71,7 +71,11 @@ static struct attribute_group bt_link_gr
.attrs = bt_link_attrs,
};
&bt_link_group,
NULL
};
-@@ -141,7 +145,11 @@ void hci_conn_del_sysfs(struct hci_conn
+@@ -140,7 +144,11 @@ void hci_conn_del_sysfs(struct hci_conn
dev = device_find_child(&conn->dev, NULL, __match_tty);
if (!dev)
break;
put_device(dev);
}
-@@ -361,7 +369,11 @@ static struct attribute_group bt_host_gr
+@@ -378,7 +386,11 @@ static struct attribute_group bt_host_gr
.attrs = bt_host_attrs,
};
};
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
-@@ -398,6 +398,7 @@ err:
+@@ -379,6 +379,7 @@ err:
return ret;
}
static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
unsigned char report_type)
{
-@@ -456,6 +457,16 @@ err:
+@@ -437,6 +438,16 @@ err:
mutex_unlock(&session->report_mutex);
return ret;
}
static void hidp_idle_timeout(unsigned long arg)
{
-@@ -757,8 +768,14 @@ static int hidp_session(void *arg)
+@@ -738,8 +749,14 @@ static int hidp_session(void *arg)
}
if (session->hid) {
}
/* Wakeup user-space polling for socket errors */
-@@ -869,6 +886,70 @@ static void hidp_close(struct hid_device
+@@ -850,6 +867,70 @@ static void hidp_close(struct hid_device
{
}
static int hidp_parse(struct hid_device *hid)
{
struct hidp_session *session = hid->driver_data;
-@@ -956,7 +1037,9 @@ static int hidp_setup_hid(struct hidp_se
+@@ -937,7 +1018,9 @@ static int hidp_setup_hid(struct hidp_se
hid->dev.parent = &session->conn->dev;
hid->ll_driver = &hidp_hid_driver;
hid->hid_output_raw_report = hidp_output_raw_report;
return 0;
-@@ -967,6 +1050,7 @@ fault:
+@@ -948,6 +1031,7 @@ fault:
return err;
}
int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock)
{
-@@ -982,6 +1066,39 @@ int hidp_add_connection(struct hidp_conn
+@@ -963,6 +1047,39 @@ int hidp_add_connection(struct hidp_conn
BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size);
down_write(&hidp_session_sem);
s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst);
-@@ -1029,6 +1146,7 @@ int hidp_add_connection(struct hidp_conn
+@@ -1010,6 +1127,7 @@ int hidp_add_connection(struct hidp_conn
__hidp_link_session(session);
if (req->rd_size > 0) {
err = hidp_setup_hid(session, req);
if (err)
-@@ -1040,6 +1158,16 @@ int hidp_add_connection(struct hidp_conn
+@@ -1021,6 +1139,16 @@ int hidp_add_connection(struct hidp_conn
if (err < 0)
goto purge;
}
hidp_set_timer(session);
-@@ -1098,6 +1226,7 @@ unlink:
+@@ -1079,6 +1207,7 @@ unlink:
session->input = NULL;
}
if (session->hid) {
hid_destroy_device(session->hid);
session->hid = NULL;
-@@ -1111,10 +1240,15 @@ purge:
+@@ -1092,10 +1221,15 @@ purge:
skb_queue_purge(&session->ctrl_transmit);
skb_queue_purge(&session->intr_transmit);
}
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
-@@ -325,8 +325,13 @@ static struct sock *rfcomm_sock_alloc(st
+@@ -306,8 +306,13 @@ static struct sock *rfcomm_sock_alloc(st
return sk;
}
{
struct sock *sk;
-@@ -680,7 +685,11 @@ static int rfcomm_sock_setsockopt_old(st
+@@ -661,7 +666,11 @@ static int rfcomm_sock_setsockopt_old(st
return err;
}
struct bt_security sec;
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
-@@ -718,8 +718,12 @@ static int rfcomm_tty_open(struct tty_st
+@@ -713,8 +713,12 @@ static int rfcomm_tty_open(struct tty_st
remove_wait_queue(&dev->wait, &wait);
if (err == 0)
rfcomm_tty_copy_pending(dev);
-@@ -743,7 +747,11 @@ static void rfcomm_tty_close(struct tty_
+@@ -738,7 +742,11 @@ static void rfcomm_tty_close(struct tty_
if (!--dev->port.count) {
spin_unlock_irqrestore(&dev->port.lock, flags);
if (dev->tty_dev->parent)
/* Close DLC and dettach TTY */
rfcomm_dlc_close(dev->dlc, 0);
-@@ -819,7 +827,11 @@ static int rfcomm_tty_write_room(struct
+@@ -814,7 +822,11 @@ static int rfcomm_tty_write_room(struct
return room;
}
{
BT_DBG("tty %p cmd 0x%02x", tty, cmd);
-@@ -1078,7 +1090,11 @@ static void rfcomm_tty_hangup(struct tty
+@@ -1073,7 +1085,11 @@ static void rfcomm_tty_hangup(struct tty
}
}
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
-@@ -1087,7 +1103,11 @@ static int rfcomm_tty_tiocmget(struct tt
+@@ -1082,7 +1098,11 @@ static int rfcomm_tty_tiocmget(struct tt
return dev->modem_status;
}
struct rfcomm_dlc *dlc = dev->dlc;
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
-@@ -440,8 +440,12 @@ static struct sock *sco_sock_alloc(struc
+@@ -423,8 +423,12 @@ static struct sock *sco_sock_alloc(struc
return sk;
}
{
struct sock *sk;
-@@ -670,7 +674,11 @@ static int sco_sock_sendmsg(struct kiocb
+@@ -653,7 +657,11 @@ static int sco_sock_sendmsg(struct kiocb
return err;
}
int err = 0;
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
-@@ -195,8 +195,12 @@ static struct proto bnep_proto = {
+@@ -179,8 +179,12 @@ static struct proto bnep_proto = {
.obj_size = sizeof(struct bt_sock)
};
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
-@@ -242,8 +242,12 @@ static struct proto hidp_proto = {
+@@ -228,8 +228,12 @@ static struct proto hidp_proto = {
.obj_size = sizeof(struct bt_sock)
};
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
-@@ -539,7 +539,14 @@ static int l2cap_sock_setsockopt_old(str
+@@ -538,7 +538,14 @@ static int l2cap_sock_setsockopt_old(str
return err;
}
{
struct sock *sk = sock->sk;
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
-@@ -1079,8 +1086,12 @@ static struct sock *l2cap_sock_alloc(str
+@@ -1078,8 +1085,12 @@ static struct sock *l2cap_sock_alloc(str
return sk;
}
{
struct sock *sk;
-@@ -1092,7 +1103,11 @@ static int l2cap_sock_create(struct net
+@@ -1091,7 +1102,11 @@ static int l2cap_sock_create(struct net
sock->type != SOCK_DGRAM && sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;