Merge "Bluetooth: Use correct endianness in L2CAP configuration fallback" into msm-3.0
This commit is contained in:
committed by
QuIC Gerrit Code Review
commit
c82aa018a6
@@ -3749,9 +3749,9 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
|
|||||||
|
|
||||||
/* Initialize rfc in case no rfc option is received */
|
/* Initialize rfc in case no rfc option is received */
|
||||||
rfc.mode = pi->mode;
|
rfc.mode = pi->mode;
|
||||||
rfc.retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
|
rfc.retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO);
|
||||||
rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
|
rfc.monitor_timeout = cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO);
|
||||||
rfc.max_pdu_size = L2CAP_DEFAULT_MAX_PDU_SIZE;
|
rfc.max_pdu_size = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
|
||||||
|
|
||||||
while (len >= L2CAP_CONF_OPT_SIZE) {
|
while (len >= L2CAP_CONF_OPT_SIZE) {
|
||||||
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
||||||
@@ -3849,9 +3849,9 @@ static void l2cap_conf_rfc_get(struct sock *sk, void *rsp, int len)
|
|||||||
|
|
||||||
/* Initialize rfc in case no rfc option is received */
|
/* Initialize rfc in case no rfc option is received */
|
||||||
rfc.mode = pi->mode;
|
rfc.mode = pi->mode;
|
||||||
rfc.retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
|
rfc.retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO);
|
||||||
rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
|
rfc.monitor_timeout = cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO);
|
||||||
rfc.max_pdu_size = L2CAP_DEFAULT_MAX_PDU_SIZE;
|
rfc.max_pdu_size = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
|
||||||
|
|
||||||
if ((pi->mode != L2CAP_MODE_ERTM) && (pi->mode != L2CAP_MODE_STREAMING))
|
if ((pi->mode != L2CAP_MODE_ERTM) && (pi->mode != L2CAP_MODE_STREAMING))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user