Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341951
b: refs/heads/master
c: 5d05416
h: refs/heads/master
i:
  341949: 18be2f9
  341947: a3b2fc9
  341943: 15ed11c
  341935: ebe9b0f
  341919: e7c5ee3
  341887: 37d4e48
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Dec 3, 2012
1 parent 7c6e967 commit b92d3ee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ced5c338d7b696021058c23fb6a286def2171df5
refs/heads/master: 5d05416e0907b0dd30b62b002bed3b85e6efbd61
16 changes: 16 additions & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,22 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define lmp_host_le_capable(dev) !!((dev)->host_features[0] & LMP_HOST_LE)
#define lmp_host_le_br_capable(dev) !!((dev)->host_features[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 == HCI_AMP &&
test_bit(HCI_UP, &hdev->flags))
ret = true;
read_unlock(&hci_dev_list_lock);

return ret;
}

/* ----- HCI protocols ----- */
#define HCI_PROTO_DEFER 0x01

Expand Down
1 change: 1 addition & 0 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ static bool __amp_capable(struct l2cap_chan *chan)
struct l2cap_conn *conn = chan->conn;

if (enable_hs &&
hci_amp_capable() &&
chan->chan_policy == BT_CHANNEL_POLICY_AMP_PREFERRED &&
conn->fixed_chan_mask & L2CAP_FC_A2MP)
return true;
Expand Down

0 comments on commit b92d3ee

Please sign in to comment.