Bluetooth: Report error for HCI reset ioctl when device is down
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Report error for HCI reset ioctl when device is down
Even if this is legacy API, there is no reason to not report a proper error when trying to reset a HCI device that is down.
Signed-off-by Marcel Holtmann <[email protected]>
--- net/bluetooth/hci_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/bluetooth/hci_core.c +3 -1
@@ -1341,8 +1341,10 @@ int hci_dev_reset(__u16 dev)hci_req_lock (hdev); -if (!test_bit (HCI_UP , &hdev->flags)) +if (!test_bit (HCI_UP , &hdev->flags)) { + ret = -ENETDOWN ; goto done; + }/* Drop queues */ skb_queue_purge (&hdev->rx_q);
Signature · 1 line
1.8.3.1
Hi Marcel,
2013-08-26 Marcel Holtmann <[email protected]>:
Quoted 7 lines
Even if this is legacy API, there is no reason to not report a proper error when trying to reset a HCI device that is down.
Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo