mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 13:50:52 +07:00
Bluetooth: Fix Endian Bug.
Fix network to host endian conversion for L2CAP chan id. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
3f17790c2d
commit
6e4aff1037
@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
|
||||
}
|
||||
|
||||
if (la.l2_cid)
|
||||
err = l2cap_add_scid(chan, la.l2_cid);
|
||||
err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
|
||||
else
|
||||
err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
|
||||
|
||||
@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
|
||||
if (la.l2_cid && la.l2_psm)
|
||||
return -EINVAL;
|
||||
|
||||
err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
|
||||
err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
|
||||
&la.l2_bdaddr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user