The L2CAP socket parameter for CID are actually provided in little
endian. So convert our constants into little endian before comparing
them.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
if (la.l2_psm)
return -EINVAL;
/* We only allow ATT user space socket */
- if (la.l2_cid != L2CAP_CID_ATT)
+ if (la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT))
return -EINVAL;
}
if (la.l2_psm)
return -EINVAL;
/* We only allow ATT user space socket */
- if (la.l2_cid != L2CAP_CID_ATT)
+ if (la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT))
return -EINVAL;
}