Bluetooth: ATT: Fix incorrect BT_ATT_OP_CMD_MASK
According to Core 4.2 Vol 3 Part F 3.3, Commands have 6th bit (startting from 0) set in ATT PDU. If the bit is set, no response shall be sent. Change-Id: I63f7303e1cf2f9479dae129cdf5d31d7aadc739d Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This commit is contained in:
parent
ceef6099dd
commit
ee224e8bb0
1 changed files with 2 additions and 3 deletions
|
@ -57,8 +57,7 @@
|
||||||
BT_GATT_PERM_WRITE_ENCRYPT)
|
BT_GATT_PERM_WRITE_ENCRYPT)
|
||||||
#define BT_GATT_PERM_AUTHEN_MASK (BT_GATT_PERM_READ_AUTHEN | \
|
#define BT_GATT_PERM_AUTHEN_MASK (BT_GATT_PERM_READ_AUTHEN | \
|
||||||
BT_GATT_PERM_WRITE_AUTHEN)
|
BT_GATT_PERM_WRITE_AUTHEN)
|
||||||
#define BT_ATT_OP_CMD_MASK (BT_ATT_OP_WRITE_CMD & \
|
#define BT_ATT_OP_CMD_FLAG 0x40
|
||||||
BT_ATT_OP_SIGNED_WRITE_CMD)
|
|
||||||
|
|
||||||
/* ATT request context */
|
/* ATT request context */
|
||||||
struct bt_att_req {
|
struct bt_att_req {
|
||||||
|
@ -1466,7 +1465,7 @@ static void bt_att_recv(struct bt_conn *conn, struct bt_buf *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Commands don't have response */
|
/* Commands don't have response */
|
||||||
if ((hdr->code & BT_ATT_OP_CMD_MASK)) {
|
if ((hdr->code & BT_ATT_OP_CMD_FLAG)) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue