diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index a9eb0d0d1afd01..2b79e87aae7e6c 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) { + BT_WARN("No change to encryption state (encrypt 0x%02x)", evt->encrypt); + bt_conn_unref(conn); + return; + } + conn->encrypt = evt->encrypt; #if defined(CONFIG_BT_SMP)