Commit 1b7bf4ed authored by Gustavo F. Padovan's avatar Gustavo F. Padovan Committed by Marcel Holtmann

Bluetooth: Use proper *_unaligned_le{16,32} helpers for L2CAP

Simplify more conversions to the right endian with the proper helpers.
Signed-off-by: default avatarGustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e686219a
...@@ -2924,7 +2924,7 @@ static inline int l2cap_information_req(struct l2cap_conn *conn, struct l2cap_cm ...@@ -2924,7 +2924,7 @@ static inline int l2cap_information_req(struct l2cap_conn *conn, struct l2cap_cm
if (enable_ertm) if (enable_ertm)
feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING
| L2CAP_FEAT_FCS; | L2CAP_FEAT_FCS;
put_unaligned(cpu_to_le32(feat_mask), (__le32 *) rsp->data); put_unaligned_le32(feat_mask, rsp->data);
l2cap_send_cmd(conn, cmd->ident, l2cap_send_cmd(conn, cmd->ident,
L2CAP_INFO_RSP, sizeof(buf), buf); L2CAP_INFO_RSP, sizeof(buf), buf);
} else if (type == L2CAP_IT_FIXED_CHAN) { } else if (type == L2CAP_IT_FIXED_CHAN) {
...@@ -3572,7 +3572,7 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -3572,7 +3572,7 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb)
break; break;
case L2CAP_CID_CONN_LESS: case L2CAP_CID_CONN_LESS:
psm = get_unaligned((__le16 *) skb->data); psm = get_unaligned_le16(skb->data);
skb_pull(skb, 2); skb_pull(skb, 2);
l2cap_conless_channel(conn, psm, skb); l2cap_conless_channel(conn, psm, skb);
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