Bluetooth: Remove useless HCI_PENDING_CLASS flag
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Mar 2013 22:06:56 +0000 (17:06 -0500)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 18 Mar 2013 17:02:01 +0000 (14:02 -0300)
Now that class related operations are tracked through asynchronous HCI
requests this flag is no longer needed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/hci.h
net/bluetooth/hci_event.c
net/bluetooth/mgmt.c

index 7f12c25f1fcaa763a697d80ebf95a06124c3adc8..1e723c76a8f60755e0a3f00c3364c11b7c59de32 100644 (file)
@@ -119,7 +119,6 @@ enum {
        HCI_CONNECTABLE,
        HCI_DISCOVERABLE,
        HCI_LINK_SECURITY,
-       HCI_PENDING_CLASS,
        HCI_PERIODIC_INQ,
 };
 
index d11b87bc1d1ada465c2c6e00b4d1b3745855cc84..5f2d008f33524f3452328c9cb6a593e7eeb0eee0 100644 (file)
@@ -194,8 +194,7 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
        clear_bit(HCI_RESET, &hdev->flags);
 
        /* Reset all non-persistent flags */
-       hdev->dev_flags &= ~(BIT(HCI_LE_SCAN) | BIT(HCI_PENDING_CLASS) |
-                            BIT(HCI_PERIODIC_INQ));
+       hdev->dev_flags &= ~(BIT(HCI_LE_SCAN) | BIT(HCI_PERIODIC_INQ));
 
        hdev->discovery.state = DISCOVERY_STOPPED;
        hdev->inq_tx_power = HCI_TX_POWER_INVALID;
index 8a0bbb914bed3b50a3bbaed8b8e28c3759a30011..3e3cb0102b1335b0c75d19f15ae4d4825403d0c7 100644 (file)
@@ -652,8 +652,6 @@ static void update_class(struct hci_request *req)
                return;
 
        hci_req_add(req, HCI_OP_WRITE_CLASS_OF_DEV, sizeof(cod), cod);
-
-       set_bit(HCI_PENDING_CLASS, &hdev->dev_flags);
 }
 
 static void service_cache_off(struct work_struct *work)
@@ -3762,8 +3760,6 @@ int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class,
        struct cmd_lookup match = { NULL, hdev, mgmt_status(status) };
        int err = 0;
 
-       clear_bit(HCI_PENDING_CLASS, &hdev->dev_flags);
-
        mgmt_pending_foreach(MGMT_OP_SET_DEV_CLASS, hdev, sk_lookup, &match);
        mgmt_pending_foreach(MGMT_OP_ADD_UUID, hdev, sk_lookup, &match);
        mgmt_pending_foreach(MGMT_OP_REMOVE_UUID, hdev, sk_lookup, &match);