lkml.org 
[lkml]   [2014]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3.15 058/122] Bluetooth: Reuse hci_stop_discovery function when cleaning up HCI state
Date
3.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hedberg <johan.hedberg@intel.com>

commit f8680f128b01212895a9afb31032f6ffe91bd771 upstream.

When cleaning up the HCI state as part of the power-off procedure we can
reuse the hci_stop_discovery() function instead of explicitly sending
HCI command related to discovery. The added benefit of this is that it
takes care of canceling name resolving and inquiry which were not
previously covered by the code.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
net/bluetooth/mgmt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1098,9 +1098,7 @@ static int clean_up_hci_state(struct hci
if (test_bit(HCI_ADVERTISING, &hdev->dev_flags))
disable_advertising(&req);

- if (test_bit(HCI_LE_SCAN, &hdev->dev_flags)) {
- hci_req_add_le_scan_disable(&req);
- }
+ hci_stop_discovery(&req);

list_for_each_entry(conn, &hdev->conn_hash.list, list) {
struct hci_cp_disconnect dc;



\
 
 \ /
  Last update: 2014-07-08 09:21    [W:0.696 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site