mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
Bluetooth: Move hci_amp_capable() function into L2CAP core
The hci_amp_capable() function has only a single user inside the L2CAP core. Instead of exporting the function, place it next to its user. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
23f0cb41a2
commit
80d58d0b5b
2 changed files with 16 additions and 16 deletions
|
@ -795,22 +795,6 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
|
||||||
#define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE))
|
#define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE))
|
||||||
#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR))
|
#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR))
|
||||||
|
|
||||||
/* returns true if at least one AMP active */
|
|
||||||
static inline bool hci_amp_capable(void)
|
|
||||||
{
|
|
||||||
struct hci_dev *hdev;
|
|
||||||
bool ret = false;
|
|
||||||
|
|
||||||
read_lock(&hci_dev_list_lock);
|
|
||||||
list_for_each_entry(hdev, &hci_dev_list, list)
|
|
||||||
if (hdev->amp_type != AMP_TYPE_BREDR &&
|
|
||||||
test_bit(HCI_UP, &hdev->flags))
|
|
||||||
ret = true;
|
|
||||||
read_unlock(&hci_dev_list_lock);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----- HCI protocols ----- */
|
/* ----- HCI protocols ----- */
|
||||||
#define HCI_PROTO_DEFER 0x01
|
#define HCI_PROTO_DEFER 0x01
|
||||||
|
|
||||||
|
|
|
@ -1012,6 +1012,22 @@ static inline int __l2cap_no_conn_pending(struct l2cap_chan *chan)
|
||||||
return !test_bit(CONF_CONNECT_PEND, &chan->conf_state);
|
return !test_bit(CONF_CONNECT_PEND, &chan->conf_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* returns true if at least one AMP active */
|
||||||
|
static inline bool hci_amp_capable(void)
|
||||||
|
{
|
||||||
|
struct hci_dev *hdev;
|
||||||
|
bool ret = false;
|
||||||
|
|
||||||
|
read_lock(&hci_dev_list_lock);
|
||||||
|
list_for_each_entry(hdev, &hci_dev_list, list)
|
||||||
|
if (hdev->amp_type != AMP_TYPE_BREDR &&
|
||||||
|
test_bit(HCI_UP, &hdev->flags))
|
||||||
|
ret = true;
|
||||||
|
read_unlock(&hci_dev_list_lock);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static bool __amp_capable(struct l2cap_chan *chan)
|
static bool __amp_capable(struct l2cap_chan *chan)
|
||||||
{
|
{
|
||||||
struct l2cap_conn *conn = chan->conn;
|
struct l2cap_conn *conn = chan->conn;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue