Skip to content

Commit

Permalink
Bluetooth: Controller: Use BT_HCI_ERR_UNSPECIFIED as needed
Browse files Browse the repository at this point in the history
A Host shall consider any error code that it does not
explicitly understand equivalent to the error code
Unspecified Error (0x1F).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak committed Jun 12, 2024
1 parent a5b3a14 commit 303ff3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/controller/hci/hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -6330,7 +6330,7 @@ static void encrypt_change(uint8_t err, uint16_t handle,
hci_evt_create(buf, BT_HCI_EVT_ENCRYPT_CHANGE, sizeof(*ep));
ep = net_buf_add(buf, sizeof(*ep));

ep->status = err;
ep->status = err ? err : (encryption_on ? err : BT_HCI_ERR_UNSPECIFIED);
ep->handle = sys_cpu_to_le16(handle);
ep->encrypt = encryption_on ? 1 : 0;
}
Expand Down

0 comments on commit 303ff3d

Please sign in to comment.