提交 00629e0f 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Add new hci_cb entries to the tail rather than the head

When processing hci_cb entries we want first registered callbacks to be
called first and later ones later. This is because eventually the L2CAP
callbacks that are part of the core will use this list and get
registered first. To keep the same order of calling L2CAP callbacks
before e.g. RFCOMM the order of elements needs to be this way.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 0af801b9
...@@ -3465,7 +3465,7 @@ int hci_register_cb(struct hci_cb *cb) ...@@ -3465,7 +3465,7 @@ int hci_register_cb(struct hci_cb *cb)
BT_DBG("%p name %s", cb, cb->name); BT_DBG("%p name %s", cb, cb->name);
write_lock(&hci_cb_list_lock); write_lock(&hci_cb_list_lock);
list_add(&cb->list, &hci_cb_list); list_add_tail(&cb->list, &hci_cb_list);
write_unlock(&hci_cb_list_lock); write_unlock(&hci_cb_list_lock);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册