Commit 7990681c authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: Fix setting of MTU for ERTM and Streaming Mode

The desired MTU should be sent in an Config_Req for all modes.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent e702112f
...@@ -2569,11 +2569,11 @@ static int l2cap_build_conf_req(struct sock *sk, void *data) ...@@ -2569,11 +2569,11 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
} }
done: done:
if (pi->imtu != L2CAP_DEFAULT_MTU)
l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
switch (pi->mode) { switch (pi->mode) {
case L2CAP_MODE_BASIC: case L2CAP_MODE_BASIC:
if (pi->imtu != L2CAP_DEFAULT_MTU)
l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
if (!(pi->conn->feat_mask & L2CAP_FEAT_ERTM) && if (!(pi->conn->feat_mask & L2CAP_FEAT_ERTM) &&
!(pi->conn->feat_mask & L2CAP_FEAT_STREAMING)) !(pi->conn->feat_mask & L2CAP_FEAT_STREAMING))
break; break;
......
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