Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291005
b: refs/heads/master
c: 0cbf4ed
h: refs/heads/master
i:
  291003: d45275f
v: v3
  • Loading branch information
Johan Hedberg committed Feb 21, 2012
1 parent 2b7a15b commit 493c4cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 5400c044f3fac38f521362d76711e4c170f78b89
refs/heads/master: 0cbf4ed6e6f43ac399afefdd14a1ee86db8de7d0
10 changes: 9 additions & 1 deletion trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,17 @@ static void service_cache_off(struct work_struct *work)

static void mgmt_init_hdev(struct hci_dev *hdev)
{
if (!test_and_set_bit(HCI_MGMT, &hdev->dev_flags))
if (!test_and_set_bit(HCI_MGMT, &hdev->dev_flags)) {
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);
}

if (!test_and_set_bit(HCI_SERVICE_CACHE, &hdev->dev_flags))
schedule_delayed_work(&hdev->service_cache,
msecs_to_jiffies(SERVICE_CACHE_TIMEOUT));
Expand Down

0 comments on commit 493c4cb

Please sign in to comment.