Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f2529c2c
Commit
f2529c2c
authored
Jul 05, 2011
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
parents
a0b8de35
163f4dab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
net/bluetooth/hci_conn.c
net/bluetooth/hci_conn.c
+3
-0
net/bluetooth/hidp/core.c
net/bluetooth/hidp/core.c
+11
-7
net/bluetooth/hidp/hidp.h
net/bluetooth/hidp/hidp.h
+1
-0
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+3
-2
No files found.
net/bluetooth/hci_conn.c
View file @
f2529c2c
...
...
@@ -393,6 +393,9 @@ int hci_conn_del(struct hci_conn *conn)
hci_dev_put
(
hdev
);
if
(
conn
->
handle
==
0
)
kfree
(
conn
);
return
0
;
}
...
...
net/bluetooth/hidp/core.c
View file @
f2529c2c
...
...
@@ -464,7 +464,8 @@ static void hidp_idle_timeout(unsigned long arg)
{
struct
hidp_session
*
session
=
(
struct
hidp_session
*
)
arg
;
kthread_stop
(
session
->
task
);
atomic_inc
(
&
session
->
terminate
);
wake_up_process
(
session
->
task
);
}
static
void
hidp_set_timer
(
struct
hidp_session
*
session
)
...
...
@@ -535,7 +536,8 @@ static void hidp_process_hid_control(struct hidp_session *session,
skb_queue_purge
(
&
session
->
ctrl_transmit
);
skb_queue_purge
(
&
session
->
intr_transmit
);
kthread_stop
(
session
->
task
);
atomic_inc
(
&
session
->
terminate
);
wake_up_process
(
current
);
}
}
...
...
@@ -706,9 +708,8 @@ static int hidp_session(void *arg)
add_wait_queue
(
sk_sleep
(
intr_sk
),
&
intr_wait
);
session
->
waiting_for_startup
=
0
;
wake_up_interruptible
(
&
session
->
startup_queue
);
while
(
!
kthread_should_stop
())
{
set_current_state
(
TASK_INTERRUPTIBLE
);
set_current_state
(
TASK_INTERRUPTIBLE
);
while
(
!
atomic_read
(
&
session
->
terminate
))
{
if
(
ctrl_sk
->
sk_state
!=
BT_CONNECTED
||
intr_sk
->
sk_state
!=
BT_CONNECTED
)
break
;
...
...
@@ -726,6 +727,7 @@ static int hidp_session(void *arg)
hidp_process_transmit
(
session
);
schedule
();
set_current_state
(
TASK_INTERRUPTIBLE
);
}
set_current_state
(
TASK_RUNNING
);
remove_wait_queue
(
sk_sleep
(
intr_sk
),
&
intr_wait
);
...
...
@@ -1060,7 +1062,8 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
err_add_device:
hid_destroy_device
(
session
->
hid
);
session
->
hid
=
NULL
;
kthread_stop
(
session
->
task
);
atomic_inc
(
&
session
->
terminate
);
wake_up_process
(
session
->
task
);
unlink:
hidp_del_timer
(
session
);
...
...
@@ -1111,7 +1114,8 @@ int hidp_del_connection(struct hidp_conndel_req *req)
skb_queue_purge
(
&
session
->
ctrl_transmit
);
skb_queue_purge
(
&
session
->
intr_transmit
);
kthread_stop
(
session
->
task
);
atomic_inc
(
&
session
->
terminate
);
wake_up_process
(
session
->
task
);
}
}
else
err
=
-
ENOENT
;
...
...
net/bluetooth/hidp/hidp.h
View file @
f2529c2c
...
...
@@ -142,6 +142,7 @@ struct hidp_session {
uint
ctrl_mtu
;
uint
intr_mtu
;
atomic_t
terminate
;
struct
task_struct
*
task
;
unsigned
char
keys
[
8
];
...
...
net/bluetooth/l2cap_core.c
View file @
f2529c2c
...
...
@@ -2323,7 +2323,8 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
sk
=
chan
->
sk
;
if
(
sk
->
sk_state
!=
BT_CONFIG
)
{
if
((
bt_sk
(
sk
)
->
defer_setup
&&
sk
->
sk_state
!=
BT_CONNECT2
)
||
(
!
bt_sk
(
sk
)
->
defer_setup
&&
sk
->
sk_state
!=
BT_CONFIG
))
{
struct
l2cap_cmd_rej
rej
;
rej
.
reason
=
cpu_to_le16
(
0x0002
);
...
...
@@ -2334,7 +2335,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
/* Reject if config buffer is too small. */
len
=
cmd_len
-
sizeof
(
*
req
);
if
(
chan
->
conf_len
+
len
>
sizeof
(
chan
->
conf_req
))
{
if
(
len
<
0
||
chan
->
conf_len
+
len
>
sizeof
(
chan
->
conf_req
))
{
l2cap_send_cmd
(
conn
,
cmd
->
ident
,
L2CAP_CONF_RSP
,
l2cap_build_conf_rsp
(
chan
,
rsp
,
L2CAP_CONF_REJECT
,
flags
),
rsp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment