From: Brian Gix <brian.gix@intel.com>
Date: Thu, 31 Mar 2022 11:07:47 -0700
Subject: Bluetooth: Keep MGMT pending queue ordered FIFO
Patch-mainline: v5.19-rc1
Git-commit: 31396dd53f32d5d82655d84ab31e193ace836688
References: jsc#PED-1407
Small change to add new commands to tail of the list, and find/remove them
from the head of the list.
Signed-off-by: Brian Gix <brian.gix@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
---
net/bluetooth/mgmt_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bluetooth/mgmt_util.c
+++ b/net/bluetooth/mgmt_util.c
@@ -297,7 +297,7 @@ struct mgmt_pending_cmd *mgmt_pending_ad
if (!cmd)
return NULL;
- list_add(&cmd->list, &hdev->mgmt_pending);
+ list_add_tail(&cmd->list, &hdev->mgmt_pending);
return cmd;
}