Skip to content

Commit 4160a17

Browse files
cvinayakanangl
authored andcommitted
[nrf fromtree] Bluetooth: Controller: Use BT_HCI_ERR_UNSPECIFIED as needed
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 <[email protected]> (cherry picked from commit 78466c8) Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 34675d9 commit 4160a17

File tree

1 file changed

+1
-1
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+1
-1
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8628,7 +8628,7 @@ static void encrypt_change(uint8_t err, uint16_t handle,
86288628
hci_evt_create(buf, BT_HCI_EVT_ENCRYPT_CHANGE, sizeof(*ep));
86298629
ep = net_buf_add(buf, sizeof(*ep));
86308630

8631-
ep->status = err;
8631+
ep->status = err ? err : (encryption_on ? err : BT_HCI_ERR_UNSPECIFIED);
86328632
ep->handle = sys_cpu_to_le16(handle);
86338633
ep->encrypt = encryption_on ? 1 : 0;
86348634
}

0 commit comments

Comments
 (0)