projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ec5ae8
)
Bluetooth: Use the correct flag to decide to disable advertising
author
Johan Hedberg
<
[email protected]
>
Tue, 8 Jul 2014 12:07:51 +0000
(15:07 +0300)
committer
Marcel Holtmann
<
[email protected]
>
Tue, 8 Jul 2014 12:22:06 +0000
(14:22 +0200)
When deciding to call disable_advertising() we're interested in the real
state instead of the mgmt setting. Use therefore HCI_LE_ADV instead of
the HCI_ADVERTISING flag.
Signed-off-by: Johan Hedberg <
[email protected]
>
Signed-off-by: Marcel Holtmann <
[email protected]
>
net/bluetooth/mgmt.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/mgmt.c
b/net/bluetooth/mgmt.c
index 68c0698124fb30fb62b32b0cd5bae109957cccf8..9549d7366da249a2a9e39da79ac8d5afa8a08f05 100644
(file)
--- a/
net/bluetooth/mgmt.c
+++ b/
net/bluetooth/mgmt.c
@@
-1301,7
+1301,7
@@
static int clean_up_hci_state(struct hci_dev *hdev)
hci_req_add(&req, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);
}
- if (test_bit(HCI_
ADVERTISING
, &hdev->dev_flags))
+ if (test_bit(HCI_
LE_ADV
, &hdev->dev_flags))
disable_advertising(&req);
hci_stop_discovery(&req);
@@
-2230,7
+2230,7
@@
static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
hci_cp.le = val;
hci_cp.simul = lmp_le_br_capable(hdev);
} else {
- if (test_bit(HCI_
ADVERTISING
, &hdev->dev_flags))
+ if (test_bit(HCI_
LE_ADV
, &hdev->dev_flags))
disable_advertising(&req);
}