Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291093
b: refs/heads/master
c: 4f87da8
h: refs/heads/master
i:
  291091: b06c192
v: v3
  • Loading branch information
Johan Hedberg committed Mar 2, 2012
1 parent 60571a9 commit 20d301d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 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: 5f15903279143eb640f9ba1c0e72b52fe9e9e2a6
refs/heads/master: 4f87da80a5210e66fb47b0e839f4d05016986f78
4 changes: 0 additions & 4 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1034,16 +1034,12 @@ int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent);
/* HCI info for socket */
#define hci_pi(sk) ((struct hci_pinfo *) sk)

/* HCI socket flags */
#define HCI_PI_MGMT_INIT 0

struct hci_pinfo {
struct bt_sock bt;
struct hci_dev *hdev;
struct hci_filter filter;
__u32 cmsg_mask;
unsigned short channel;
unsigned long flags;
};

/* HCI security filter */
Expand Down
1 change: 0 additions & 1 deletion trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
goto done;
}

set_bit(HCI_PI_MGMT_INIT, &hci_pi(sk)->flags);
break;

case HCI_CHANNEL_MONITOR:
Expand Down
18 changes: 8 additions & 10 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,19 +615,17 @@ static void service_cache_off(struct work_struct *work)

static void mgmt_init_hdev(struct sock *sk, struct hci_dev *hdev)
{
if (!test_and_clear_bit(HCI_PI_MGMT_INIT, &hci_pi(sk)->flags))
if (test_and_set_bit(HCI_MGMT, &hdev->dev_flags))
return;

if (!test_and_set_bit(HCI_MGMT, &hdev->dev_flags)) {
INIT_DELAYED_WORK(&hdev->service_cache, service_cache_off);
INIT_DELAYED_WORK(&hdev->service_cache, service_cache_off);

/* Non-mgmt controlled devices get this bit set
* implicitly so that pairing works for them, however
* for mgmt we require user-space to explicitly enable
* it
*/
clear_bit(HCI_PAIRABLE, &hdev->dev_flags);
}
/* Non-mgmt controlled devices get this bit set
* implicitly so that pairing works for them, however
* for mgmt we require user-space to explicitly enable
* it
*/
clear_bit(HCI_PAIRABLE, &hdev->dev_flags);
}

static int read_controller_info(struct sock *sk, struct hci_dev *hdev,
Expand Down

0 comments on commit 20d301d

Please sign in to comment.