diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index a9eb0d0d1afd015..0abe7c62d9a9d9b 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -1756,6 +1756,12 @@ static void hci_encrypt_change(struct net_buf *buf) return; } + if (conn->encrypt == evt->encrypt) { + LOG_WRN("No change to encryption state (encrypt 0x%02x)", evt->encrypt); + bt_conn_unref(conn); + return; + } + conn->encrypt = evt->encrypt; #if defined(CONFIG_BT_SMP)