|
@@ -2267,6 +2267,8 @@ done:
|
|
|
rfc.retrans_timeout = 0;
|
|
|
rfc.monitor_timeout = 0;
|
|
|
rfc.max_pdu_size = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
|
|
|
+ if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10)
|
|
|
+ rfc.max_pdu_size = pi->conn->mtu - 10;
|
|
|
|
|
|
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
|
|
|
sizeof(rfc), (unsigned long) &rfc);
|
|
@@ -2288,6 +2290,8 @@ done:
|
|
|
rfc.retrans_timeout = 0;
|
|
|
rfc.monitor_timeout = 0;
|
|
|
rfc.max_pdu_size = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
|
|
|
+ if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10)
|
|
|
+ rfc.max_pdu_size = pi->conn->mtu - 10;
|
|
|
|
|
|
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
|
|
|
sizeof(rfc), (unsigned long) &rfc);
|