Diff between 1fb4f908184f36ef39b7d190fc322aae56b87587 and ac03584d41dd7a5176b78f76920d011613d7c3a1

Changed Files

File Additions Deletions Status
src/adapter.c +12 -0 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 146d141..68ce226 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2583,6 +2583,18 @@ static void load_irks(struct btd_adapter *adapter, GSList *irks)
 	unsigned int id;
 	GSList *l;
 
+	/*
+	 * If the controller does not support Low Energy operation,
+	 * there is no point in trying to load the identity resolving
+	 * keys into the kernel.
+	 *
+	 * While there is no harm in loading keys into the kernel,
+	 * this is an optimization since no long term keys will
+	 * be loaded.
+	 */
+	if (!(adapter->supported_settings & MGMT_SETTING_LE))
+		return;
+
 	irk_count = g_slist_length(irks);
 
 	DBG("hci%u irks %zu", adapter->dev_id, irk_count);