diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-10-04 23:34:01 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-10-05 09:30:10 +0200 |
commit | 73d0d3c8671190ea982a8e79a7c79fbfe88f8f47 (patch) | |
tree | 5a994705148d72200a441ca53e53694c2810b993 /drivers/bluetooth/btmrvl_main.c | |
parent | Bluetooth: Introduce HCI_DEV_OPEN and HCI_DEV_CLOSE events (diff) | |
download | linux-73d0d3c8671190ea982a8e79a7c79fbfe88f8f47.tar.xz linux-73d0d3c8671190ea982a8e79a7c79fbfe88f8f47.zip |
Bluetooth: Move HCI_RUNNING check into hci_send_frame
In all callbacks for hdev->send the status of HCI_RUNNING is checked. So
instead of repeating that code in every driver, move the check into the
hci_send_frame function before calling hdev->send.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 050ad6ba1981..39552a8e9cc7 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c @@ -436,13 +436,6 @@ static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb) BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len); - if (!test_bit(HCI_RUNNING, &hdev->flags)) { - BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags); - print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET, - skb->data, skb->len); - return -EBUSY; - } - switch (bt_cb(skb)->pkt_type) { case HCI_COMMAND_PKT: hdev->stat.cmd_tx++; |