diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-08-10 14:55:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-10 16:16:58 -0400 |
commit | 533b12c88d895cf42d5f439e25be2a2ea026b9e8 (patch) | |
tree | 6d678d8e5e530caee30b85755a481af2219317e0 /net | |
parent | 94597ab23ea10b3bdcba534be00a9f7b35791c07 (diff) | |
parent | db12d647ccc971ed120199dc7ea5be2b5887d328 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 3e3cd9d4e52c..fadf26b4ed7c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2705,8 +2705,9 @@ done: | |||
2705 | case L2CAP_MODE_ERTM: | 2705 | case L2CAP_MODE_ERTM: |
2706 | pi->remote_tx_win = rfc.txwin_size; | 2706 | pi->remote_tx_win = rfc.txwin_size; |
2707 | pi->remote_max_tx = rfc.max_transmit; | 2707 | pi->remote_max_tx = rfc.max_transmit; |
2708 | if (rfc.max_pdu_size > pi->conn->mtu - 10) | 2708 | |
2709 | rfc.max_pdu_size = le16_to_cpu(pi->conn->mtu - 10); | 2709 | if (le16_to_cpu(rfc.max_pdu_size) > pi->conn->mtu - 10) |
2710 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); | ||
2710 | 2711 | ||
2711 | pi->remote_mps = le16_to_cpu(rfc.max_pdu_size); | 2712 | pi->remote_mps = le16_to_cpu(rfc.max_pdu_size); |
2712 | 2713 | ||
@@ -2723,8 +2724,8 @@ done: | |||
2723 | break; | 2724 | break; |
2724 | 2725 | ||
2725 | case L2CAP_MODE_STREAMING: | 2726 | case L2CAP_MODE_STREAMING: |
2726 | if (rfc.max_pdu_size > pi->conn->mtu - 10) | 2727 | if (le16_to_cpu(rfc.max_pdu_size) > pi->conn->mtu - 10) |
2727 | rfc.max_pdu_size = le16_to_cpu(pi->conn->mtu - 10); | 2728 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); |
2728 | 2729 | ||
2729 | pi->remote_mps = le16_to_cpu(rfc.max_pdu_size); | 2730 | pi->remote_mps = le16_to_cpu(rfc.max_pdu_size); |
2730 | 2731 | ||
@@ -2806,7 +2807,6 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data, | |||
2806 | if (*result == L2CAP_CONF_SUCCESS) { | 2807 | if (*result == L2CAP_CONF_SUCCESS) { |
2807 | switch (rfc.mode) { | 2808 | switch (rfc.mode) { |
2808 | case L2CAP_MODE_ERTM: | 2809 | case L2CAP_MODE_ERTM: |
2809 | pi->remote_tx_win = rfc.txwin_size; | ||
2810 | pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); | 2810 | pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); |
2811 | pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); | 2811 | pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); |
2812 | pi->mps = le16_to_cpu(rfc.max_pdu_size); | 2812 | 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 | done: | 2862 | done: |
2863 | switch (rfc.mode) { | 2863 | switch (rfc.mode) { |
2864 | case L2CAP_MODE_ERTM: | 2864 | case L2CAP_MODE_ERTM: |
2865 | pi->remote_tx_win = rfc.txwin_size; | ||
2866 | pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); | 2865 | pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); |
2867 | pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); | 2866 | pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); |
2868 | pi->mps = le16_to_cpu(rfc.max_pdu_size); | 2867 | pi->mps = le16_to_cpu(rfc.max_pdu_size); |