mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Bluetooth: Add le16 macro to Retransmission and Monitor Timeouts values
Fix a possible problem with Big Endian machines. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
1c7621596d
commit
10467e9e9b
1 changed files with 8 additions and 6 deletions
|
|
@ -2487,8 +2487,10 @@ done:
|
|||
|
||||
pi->remote_mps = le16_to_cpu(rfc.max_pdu_size);
|
||||
|
||||
rfc.retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
|
||||
rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
|
||||
rfc.retrans_timeout =
|
||||
le16_to_cpu(L2CAP_DEFAULT_RETRANS_TO);
|
||||
rfc.monitor_timeout =
|
||||
le16_to_cpu(L2CAP_DEFAULT_MONITOR_TO);
|
||||
|
||||
pi->conf_state |= L2CAP_CONF_MODE_DONE;
|
||||
|
||||
|
|
@ -2578,8 +2580,8 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
|
|||
switch (rfc.mode) {
|
||||
case L2CAP_MODE_ERTM:
|
||||
pi->remote_tx_win = rfc.txwin_size;
|
||||
pi->retrans_timeout = rfc.retrans_timeout;
|
||||
pi->monitor_timeout = rfc.monitor_timeout;
|
||||
pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
|
||||
pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
|
||||
pi->mps = le16_to_cpu(rfc.max_pdu_size);
|
||||
break;
|
||||
case L2CAP_MODE_STREAMING:
|
||||
|
|
@ -2634,8 +2636,8 @@ done:
|
|||
switch (rfc.mode) {
|
||||
case L2CAP_MODE_ERTM:
|
||||
pi->remote_tx_win = rfc.txwin_size;
|
||||
pi->retrans_timeout = rfc.retrans_timeout;
|
||||
pi->monitor_timeout = rfc.monitor_timeout;
|
||||
pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
|
||||
pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
|
||||
pi->mps = le16_to_cpu(rfc.max_pdu_size);
|
||||
break;
|
||||
case L2CAP_MODE_STREAMING:
|
||||
|
|
|
|||
Loading…
Reference in a new issue