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
Kirill Smelkov
linux
Commits
533b12c8
Commit
533b12c8
authored
Aug 10, 2010
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
parents
94597ab2
db12d647
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
include/net/bluetooth/l2cap.h
include/net/bluetooth/l2cap.h
+2
-2
net/bluetooth/l2cap.c
net/bluetooth/l2cap.c
+5
-6
No files found.
include/net/bluetooth/l2cap.h
View file @
533b12c8
...
@@ -33,9 +33,9 @@
...
@@ -33,9 +33,9 @@
#define L2CAP_DEFAULT_FLUSH_TO 0xffff
#define L2CAP_DEFAULT_FLUSH_TO 0xffff
#define L2CAP_DEFAULT_TX_WINDOW 63
#define L2CAP_DEFAULT_TX_WINDOW 63
#define L2CAP_DEFAULT_MAX_TX 3
#define L2CAP_DEFAULT_MAX_TX 3
#define L2CAP_DEFAULT_RETRANS_TO
1000
/* 1 second
*/
#define L2CAP_DEFAULT_RETRANS_TO
2000
/* 2 seconds
*/
#define L2CAP_DEFAULT_MONITOR_TO 12000
/* 12 seconds */
#define L2CAP_DEFAULT_MONITOR_TO 12000
/* 12 seconds */
#define L2CAP_DEFAULT_MAX_PDU_SIZE
672
#define L2CAP_DEFAULT_MAX_PDU_SIZE
1009
/* Sized for 3-DH5 packet */
#define L2CAP_DEFAULT_ACK_TO 200
#define L2CAP_DEFAULT_ACK_TO 200
#define L2CAP_LOCAL_BUSY_TRIES 12
#define L2CAP_LOCAL_BUSY_TRIES 12
...
...
net/bluetooth/l2cap.c
View file @
533b12c8
...
@@ -2705,8 +2705,9 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
...
@@ -2705,8 +2705,9 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
case
L2CAP_MODE_ERTM
:
case
L2CAP_MODE_ERTM
:
pi
->
remote_tx_win
=
rfc
.
txwin_size
;
pi
->
remote_tx_win
=
rfc
.
txwin_size
;
pi
->
remote_max_tx
=
rfc
.
max_transmit
;
pi
->
remote_max_tx
=
rfc
.
max_transmit
;
if
(
rfc
.
max_pdu_size
>
pi
->
conn
->
mtu
-
10
)
rfc
.
max_pdu_size
=
le16_to_cpu
(
pi
->
conn
->
mtu
-
10
);
if
(
le16_to_cpu
(
rfc
.
max_pdu_size
)
>
pi
->
conn
->
mtu
-
10
)
rfc
.
max_pdu_size
=
cpu_to_le16
(
pi
->
conn
->
mtu
-
10
);
pi
->
remote_mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
pi
->
remote_mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
...
@@ -2723,8 +2724,8 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
...
@@ -2723,8 +2724,8 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
break
;
break
;
case
L2CAP_MODE_STREAMING
:
case
L2CAP_MODE_STREAMING
:
if
(
rfc
.
max_pdu_size
>
pi
->
conn
->
mtu
-
10
)
if
(
le16_to_cpu
(
rfc
.
max_pdu_size
)
>
pi
->
conn
->
mtu
-
10
)
rfc
.
max_pdu_size
=
le16_to_cpu
(
pi
->
conn
->
mtu
-
10
);
rfc
.
max_pdu_size
=
cpu_to_le16
(
pi
->
conn
->
mtu
-
10
);
pi
->
remote_mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
pi
->
remote_mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
...
@@ -2806,7 +2807,6 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
...
@@ -2806,7 +2807,6 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
if
(
*
result
==
L2CAP_CONF_SUCCESS
)
{
if
(
*
result
==
L2CAP_CONF_SUCCESS
)
{
switch
(
rfc
.
mode
)
{
switch
(
rfc
.
mode
)
{
case
L2CAP_MODE_ERTM
:
case
L2CAP_MODE_ERTM
:
pi
->
remote_tx_win
=
rfc
.
txwin_size
;
pi
->
retrans_timeout
=
le16_to_cpu
(
rfc
.
retrans_timeout
);
pi
->
retrans_timeout
=
le16_to_cpu
(
rfc
.
retrans_timeout
);
pi
->
monitor_timeout
=
le16_to_cpu
(
rfc
.
monitor_timeout
);
pi
->
monitor_timeout
=
le16_to_cpu
(
rfc
.
monitor_timeout
);
pi
->
mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
pi
->
mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
...
@@ -2862,7 +2862,6 @@ static void l2cap_conf_rfc_get(struct sock *sk, void *rsp, int len)
...
@@ -2862,7 +2862,6 @@ static void l2cap_conf_rfc_get(struct sock *sk, void *rsp, int len)
done:
done:
switch
(
rfc
.
mode
)
{
switch
(
rfc
.
mode
)
{
case
L2CAP_MODE_ERTM
:
case
L2CAP_MODE_ERTM
:
pi
->
remote_tx_win
=
rfc
.
txwin_size
;
pi
->
retrans_timeout
=
le16_to_cpu
(
rfc
.
retrans_timeout
);
pi
->
retrans_timeout
=
le16_to_cpu
(
rfc
.
retrans_timeout
);
pi
->
monitor_timeout
=
le16_to_cpu
(
rfc
.
monitor_timeout
);
pi
->
monitor_timeout
=
le16_to_cpu
(
rfc
.
monitor_timeout
);
pi
->
mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
pi
->
mps
=
le16_to_cpu
(
rfc
.
max_pdu_size
);
...
...
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