hciops: Use g_slist_prepend instead of g_slist_append for storing keys
Once a key is generated it's likely to be used soon again. Therefore,
store it in the beginning of the list for fast lookup.
diff --git a/plugins/hciops.c b/plugins/hciops.c
index a416c25..4a67920 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -887,7 +887,7 @@
return;
}
- dev->keys = g_slist_append(dev->keys, key_info);
+ dev->keys = g_slist_prepend(dev->keys, key_info);
/* If we're connected and not dedicated bonding initiators we're
* done with the bonding process */