Bluetooth: Remove unnecessary hci_explicit_connect_lookup function
There's only one user of this helper which can be replaces with a call to hci_pend_le_action_lookup() and a check for params->explicit_connect. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
1ede9868f6
commit
17bc08f0d1
@ -1042,9 +1042,6 @@ void hci_conn_params_clear_disabled(struct hci_dev *hdev);
|
|||||||
struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
|
struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
|
||||||
bdaddr_t *addr,
|
bdaddr_t *addr,
|
||||||
u8 addr_type);
|
u8 addr_type);
|
||||||
struct hci_conn_params *hci_explicit_connect_lookup(struct hci_dev *hdev,
|
|
||||||
bdaddr_t *addr,
|
|
||||||
u8 addr_type);
|
|
||||||
|
|
||||||
void hci_uuids_clear(struct hci_dev *hdev);
|
void hci_uuids_clear(struct hci_dev *hdev);
|
||||||
|
|
||||||
|
@ -83,8 +83,9 @@ static void hci_connect_le_scan_cleanup(struct hci_conn *conn)
|
|||||||
bdaddr_type = irk->addr_type;
|
bdaddr_type = irk->addr_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
params = hci_explicit_connect_lookup(hdev, bdaddr, bdaddr_type);
|
params = hci_pend_le_action_lookup(&hdev->pend_le_conns, bdaddr,
|
||||||
if (!params)
|
bdaddr_type);
|
||||||
|
if (!params || !params->explicit_connect)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* The connection attempt was doing scan for new RPA, and is
|
/* The connection attempt was doing scan for new RPA, and is
|
||||||
|
@ -2940,23 +2940,6 @@ struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function requires the caller holds hdev->lock */
|
|
||||||
struct hci_conn_params *hci_explicit_connect_lookup(struct hci_dev *hdev,
|
|
||||||
bdaddr_t *addr,
|
|
||||||
u8 addr_type)
|
|
||||||
{
|
|
||||||
struct hci_conn_params *param;
|
|
||||||
|
|
||||||
list_for_each_entry(param, &hdev->pend_le_conns, action) {
|
|
||||||
if (bacmp(¶m->addr, addr) == 0 &&
|
|
||||||
param->addr_type == addr_type &&
|
|
||||||
param->explicit_connect)
|
|
||||||
return param;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function requires the caller holds hdev->lock */
|
/* This function requires the caller holds hdev->lock */
|
||||||
struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
|
struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
|
||||||
bdaddr_t *addr, u8 addr_type)
|
bdaddr_t *addr, u8 addr_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user