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>
(cherry picked from commit 78466c8)
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak committed Jul 17, 2024
1 parent 4e7d9d0 commit 2211c34
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 @@ -8516,7 +8516,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 2211c34

Please sign in to comment.