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:
Mariusz Skamra 2015-10-14 15:28:40 +02:00 committed by Anas Nashif
commit ee224e8bb0

View file

@ -57,8 +57,7 @@
BT_GATT_PERM_WRITE_ENCRYPT)
#define BT_GATT_PERM_AUTHEN_MASK (BT_GATT_PERM_READ_AUTHEN | \
BT_GATT_PERM_WRITE_AUTHEN)
#define BT_ATT_OP_CMD_MASK (BT_ATT_OP_WRITE_CMD & \
BT_ATT_OP_SIGNED_WRITE_CMD)
#define BT_ATT_OP_CMD_FLAG 0x40
/* ATT request context */
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 */
if ((hdr->code & BT_ATT_OP_CMD_MASK)) {
if ((hdr->code & BT_ATT_OP_CMD_FLAG)) {
goto done;
}