Commit 820ae1b8 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by David S. Miller

[Bluetooth] Always include MTU in L2CAP config responses

When sending a positive config response it shall include the actual
MTU to be used on this channel. This differs from the Bluetooth 1.1
specification where it was enough to acknowledge the config request.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent ff2d367a
...@@ -1353,12 +1353,12 @@ static inline int l2cap_conf_output(struct sock *sk, void **ptr) ...@@ -1353,12 +1353,12 @@ static inline int l2cap_conf_output(struct sock *sk, void **ptr)
/* Configure output options and let the other side know /* Configure output options and let the other side know
* which ones we don't like. */ * which ones we don't like. */
if (pi->conf_mtu < pi->omtu) { if (pi->conf_mtu < pi->omtu)
l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
result = L2CAP_CONF_UNACCEPT; result = L2CAP_CONF_UNACCEPT;
} else { else
pi->omtu = pi->conf_mtu; pi->omtu = pi->conf_mtu;
}
l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
BT_DBG("sk %p result %d", sk, result); BT_DBG("sk %p result %d", sk, result);
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment