diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-05 14:47:48 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-06 04:25:58 -0400 |
commit | 80d58d0b5b18b68addad61e228ced167f8b80dd3 (patch) | |
tree | 018b4c56884f862edcef6ec4d794640ae31eddf8 /net | |
parent | 23f0cb41a20e9850513fa4943f6a19525000cce2 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b0208e20390c..2efdb17d87a3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1012,6 +1012,22 @@ static inline int __l2cap_no_conn_pending(struct l2cap_chan *chan) | |||
1012 | return !test_bit(CONF_CONNECT_PEND, &chan->conf_state); | 1012 | return !test_bit(CONF_CONNECT_PEND, &chan->conf_state); |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | /* returns true if at least one AMP active */ | ||
1016 | static inline bool hci_amp_capable(void) | ||
1017 | { | ||
1018 | struct hci_dev *hdev; | ||
1019 | bool ret = false; | ||
1020 | |||
1021 | read_lock(&hci_dev_list_lock); | ||
1022 | list_for_each_entry(hdev, &hci_dev_list, list) | ||
1023 | if (hdev->amp_type != AMP_TYPE_BREDR && | ||
1024 | test_bit(HCI_UP, &hdev->flags)) | ||
1025 | ret = true; | ||
1026 | read_unlock(&hci_dev_list_lock); | ||
1027 | |||
1028 | return ret; | ||
1029 | } | ||
1030 | |||
1015 | static bool __amp_capable(struct l2cap_chan *chan) | 1031 | static bool __amp_capable(struct l2cap_chan *chan) |
1016 | { | 1032 | { |
1017 | struct l2cap_conn *conn = chan->conn; | 1033 | struct l2cap_conn *conn = chan->conn; |