提交 d58b622b 编写于 作者: D David S. Miller
...@@ -164,6 +164,9 @@ static inline int hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev * ...@@ -164,6 +164,9 @@ static inline int hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *
{ {
int ret; int ret;
if (!test_bit(HCI_UP, &hdev->flags))
return -ENETDOWN;
/* Serialize all requests */ /* Serialize all requests */
hci_req_lock(hdev); hci_req_lock(hdev);
ret = __hci_request(hdev, req, opt, timeout); ret = __hci_request(hdev, req, opt, timeout);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册