Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341948
b: refs/heads/master
c: ffa88e0
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo Padovan committed Dec 3, 2012
1 parent a3b2fc9 commit c2d781e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20714bfef84d3e690c9c6f8e9cd46543b5ae1eed
refs/heads/master: ffa88e02bc67a1496fae762ad899e8f49136e7a1
6 changes: 3 additions & 3 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR)
#define lmp_pause_enc_capable(dev) ((dev)->features[5] & LMP_PAUSE_ENC)
#define lmp_ext_inq_capable(dev) ((dev)->features[6] & LMP_EXT_INQ)
#define lmp_le_br_capable(dev) ((dev)->features[6] & LMP_SIMUL_LE_BR)
#define lmp_le_br_capable(dev) !!((dev)->features[6] & LMP_SIMUL_LE_BR)
#define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR)
#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH)
#define lmp_lsto_capable(dev) ((dev)->features[7] & LMP_LSTO)
Expand All @@ -776,8 +776,8 @@ void hci_conn_del_sysfs(struct hci_conn *conn);

/* ----- Extended LMP capabilities ----- */
#define lmp_host_ssp_capable(dev) ((dev)->host_features[0] & LMP_HOST_SSP)
#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)
#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)

/* ----- HCI protocols ----- */
#define HCI_PROTO_DEFER 0x01
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,10 @@ static void hci_set_le_support(struct hci_dev *hdev)

if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
cp.le = 1;
cp.simul = !!lmp_le_br_capable(hdev);
cp.simul = lmp_le_br_capable(hdev);
}

if (cp.le != !!lmp_host_le_capable(hdev))
if (cp.le != lmp_host_le_capable(hdev))
hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(cp),
&cp);
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
}

val = !!cp->val;
enabled = !!lmp_host_le_capable(hdev);
enabled = lmp_host_le_capable(hdev);

if (!hdev_is_powered(hdev) || val == enabled) {
bool changed = false;
Expand Down Expand Up @@ -1261,7 +1261,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)

if (val) {
hci_cp.le = val;
hci_cp.simul = !!lmp_le_br_capable(hdev);
hci_cp.simul = lmp_le_br_capable(hdev);
}

err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp),
Expand Down Expand Up @@ -2924,13 +2924,13 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
struct hci_cp_write_le_host_supported cp;

cp.le = 1;
cp.simul = !!lmp_le_br_capable(hdev);
cp.simul = lmp_le_br_capable(hdev);

/* Check first if we already have the right
* host state (host features set)
*/
if (cp.le != !!lmp_host_le_capable(hdev) ||
cp.simul != !!lmp_host_le_br_capable(hdev))
if (cp.le != lmp_host_le_capable(hdev) ||
cp.simul != lmp_host_le_br_capable(hdev))
hci_send_cmd(hdev,
HCI_OP_WRITE_LE_HOST_SUPPORTED,
sizeof(cp), &cp);
Expand Down

0 comments on commit c2d781e

Please sign in to comment.