]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Remove driver init queue from core
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 12 Nov 2012 05:02:16 +0000 (14:02 +0900)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 4 Apr 2013 16:28:25 +0000 (19:28 +0300)
The driver init queue is no longer needed. This can be all handled
inside the drivers now. So remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c

index 395e8f6982f9b60990a3f0c68b243c0ca5f61ee3..d4e13bf5ae59656ca6f86d2e00979f11ebb05239 100644 (file)
@@ -269,8 +269,6 @@ struct hci_dev {
 
        struct hci_dev_stats    stat;
 
-       struct sk_buff_head     driver_init;
-
        atomic_t                promisc;
 
        struct dentry           *debugfs;
index 0f00b8bc279f6437ec2accd39b462164315e839f..9570358adb771140ab20c46b7c9071bfcb5186d7 100644 (file)
@@ -316,29 +316,9 @@ static void amp_init(struct hci_request *req)
 static void hci_init1_req(struct hci_request *req, unsigned long opt)
 {
        struct hci_dev *hdev = req->hdev;
-       struct hci_request init_req;
-       struct sk_buff *skb;
 
        BT_DBG("%s %ld", hdev->name, opt);
 
-       /* Driver initialization */
-
-       hci_req_init(&init_req, hdev);
-
-       /* Special commands */
-       while ((skb = skb_dequeue(&hdev->driver_init))) {
-               bt_cb(skb)->pkt_type = HCI_COMMAND_PKT;
-               skb->dev = (void *) hdev;
-
-               if (skb_queue_empty(&init_req.cmd_q))
-                       bt_cb(skb)->req.start = true;
-
-               skb_queue_tail(&init_req.cmd_q, skb);
-       }
-       skb_queue_purge(&hdev->driver_init);
-
-       hci_req_run(&init_req, NULL);
-
        /* Reset */
        if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks))
                hci_reset_req(req, 0);
@@ -2144,7 +2124,6 @@ struct hci_dev *hci_alloc_dev(void)
        INIT_DELAYED_WORK(&hdev->discov_off, hci_discov_off);
        INIT_DELAYED_WORK(&hdev->le_scan_disable, le_scan_disable_work);
 
-       skb_queue_head_init(&hdev->driver_init);
        skb_queue_head_init(&hdev->rx_q);
        skb_queue_head_init(&hdev->cmd_q);
        skb_queue_head_init(&hdev->raw_q);
@@ -2163,8 +2142,6 @@ EXPORT_SYMBOL(hci_alloc_dev);
 /* Free HCI device */
 void hci_free_dev(struct hci_dev *hdev)
 {
-       skb_queue_purge(&hdev->driver_init);
-
        /* will free via device release */
        put_device(&hdev->dev);
 }