Commit eb2a8d20 authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Move mgmt_pending_find to avoid forward declarations

We will soon need this function for updating the advertising data, so
move it higher up in mgmt.c to avoid a forward declaration.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent a81070ba
...@@ -536,6 +536,18 @@ static u8 *create_uuid128_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len) ...@@ -536,6 +536,18 @@ static u8 *create_uuid128_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len)
return ptr; return ptr;
} }
static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
{
struct pending_cmd *cmd;
list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
if (cmd->opcode == opcode)
return cmd;
}
return NULL;
}
static u8 create_scan_rsp_data(struct hci_dev *hdev, u8 *ptr) static u8 create_scan_rsp_data(struct hci_dev *hdev, u8 *ptr)
{ {
u8 ad_len = 0; u8 ad_len = 0;
...@@ -886,18 +898,6 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, ...@@ -886,18 +898,6 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
} }
} }
static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
{
struct pending_cmd *cmd;
list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
if (cmd->opcode == opcode)
return cmd;
}
return NULL;
}
static void mgmt_pending_remove(struct pending_cmd *cmd) static void mgmt_pending_remove(struct pending_cmd *cmd)
{ {
list_del(&cmd->list); list_del(&cmd->list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment