提交 c8afe8d0 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Fix valid LE PSM check

The range of valid LE PSMs is 0x0001-0x00ff so the check should be for
"less than or equal to" instead of "less than".
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 f1324ea5
......@@ -1851,7 +1851,7 @@ static bool is_valid_psm(u16 psm, u8 dst_type)
return false;
if (bdaddr_type_is_le(dst_type))
return (psm < 0x00ff);
return (psm <= 0x00ff);
/* PSM must be odd and lsb of upper byte must be 0 */
return ((psm & 0x0101) == 0x0001);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册