aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@nokia.com>2010-09-01 08:17:25 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2010-09-30 11:19:35 -0400
commit8183b775bc5b79b6b1e250019c9dd930554dfa94 (patch)
treecdd7ec2b4a8d0507a4ea51e1db393f6275e0cec0 /net/bluetooth
parent8c462b6047da80491b8cb6be878e8bf9313ac3e1 (diff)
Bluetooth: fix MTU L2CAP configuration parameter
When receiving L2CAP negative configuration response with respect to MTU parameter we modify wrong field. MTU here means proposed value of MTU that the remote device intends to transmit. So for local L2CAP socket it is pi->imtu. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com> Acked-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index c7847035562b..9fad312e53f2 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2771,10 +2771,10 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
2771 case L2CAP_CONF_MTU: 2771 case L2CAP_CONF_MTU:
2772 if (val < L2CAP_DEFAULT_MIN_MTU) { 2772 if (val < L2CAP_DEFAULT_MIN_MTU) {
2773 *result = L2CAP_CONF_UNACCEPT; 2773 *result = L2CAP_CONF_UNACCEPT;
2774 pi->omtu = L2CAP_DEFAULT_MIN_MTU; 2774 pi->imtu = L2CAP_DEFAULT_MIN_MTU;
2775 } else 2775 } else
2776 pi->omtu = val; 2776 pi->imtu = val;
2777 l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->omtu); 2777 l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
2778 break; 2778 break;
2779 2779
2780 case L2CAP_CONF_FLUSH_TO: 2780 case L2CAP_CONF_FLUSH_TO: