X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fbluetooth%2Fhci_core.c;h=278a3ace14f664e019a85109ae6450e9ed13cff6;hb=8a0795d9b8ce2247f9b34da81f8a229702c90f2d;hp=f5b21cb936996b87ec7138d8b8b81c3e1fa6f006;hpb=eda3d8f5604860aae1bb9996bb5efc4213778369;p=linux-2.6-omap-h63xx.git diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f5b21cb9369..278a3ace14f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -164,6 +164,9 @@ static inline int hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev * { int ret; + if (!test_bit(HCI_UP, &hdev->flags)) + return -ENETDOWN; + /* Serialize all requests */ hci_req_lock(hdev); ret = __hci_request(hdev, req, opt, timeout);