summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-13 10:38:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-13 10:38:12 -0700
commit2f2c779583e9646097b57599f8efeb8eca7bd654 (patch)
treeaa7c88eb4f4deb668cba56e6f1fddd8dcc5006cf /net/bluetooth/l2cap.c
parent2897c684d1d5140e0e0302e73660c7cb97981b27 (diff)
parent3c09e2647b5e1f1f9fd383971468823c2505e1b0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits) ctcm: rename READ/WRITE defines to avoid redefinitions claw: rename READ/WRITE defines to avoid redefinitions phylib: available for any speed ethernet can: add limit for nframes and clean up signed/unsigned variables pkt_sched: Check .walk and .leaf class handlers pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops caif-spi: Bugfix SPI_DATA_POS settings were inverted. caif: Bugfix - Increase default headroom size for control channel. net: make netpoll_rx return bool for !CONFIG_NETPOLL Bluetooth: Use 3-DH5 payload size for default ERTM max PDU size Bluetooth: Fix incorrect setting of remote_tx_win for L2CAP ERTM Bluetooth: Change default L2CAP ERTM retransmit timeout Bluetooth: Fix endianness issue with L2CAP MPS configuration net: Use NET_XMIT_SUCCESS where possible. isdn: mISDN: call pci_disable_device() if pci_probe() failed isdn: avm: call pci_disable_device() if pci_probe() failed isdn: avm: call pci_disable_device() if pci_probe() failed usbnet: rx_submit() should return an error code. pkt_sched: Add some basic qdisc class ops verification. Was: [PATCH] sfq: add dummy bind/unbind handles pkt_sched: sch_sfq: Add dummy unbind_tcf and put handles. Was: [PATCH] sfq: add dummy bind/unbind handles ...
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 3e3cd9d4e52..fadf26b4ed7 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2705,8 +2705,9 @@ done:
case L2CAP_MODE_ERTM:
pi->remote_tx_win = rfc.txwin_size;
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);
@@ -2723,8 +2724,8 @@ done:
break;
case L2CAP_MODE_STREAMING:
- 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);
@@ -2806,7 +2807,6 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
if (*result == L2CAP_CONF_SUCCESS) {
switch (rfc.mode) {
case L2CAP_MODE_ERTM:
- pi->remote_tx_win = rfc.txwin_size;
pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
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)
done:
switch (rfc.mode) {
case L2CAP_MODE_ERTM:
- pi->remote_tx_win = rfc.txwin_size;
pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
pi->mps = le16_to_cpu(rfc.max_pdu_size);