Commit 3c54711c authored by Gustavo F. Padovan's avatar Gustavo F. Padovan
Browse files

Bluetooth: Don't disable tasklets to call hdev->notify()



It's pointless, we aren't protecting anything since btusb_notify()
schedules a work to run, then all it operation happens without protection.
If protection is really needed here, we will fix it further.
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent bf4c6325
...@@ -419,11 +419,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) ...@@ -419,11 +419,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
hci_dev_hold(hdev); hci_dev_hold(hdev);
hci_conn_hash_add(hdev, conn); hci_conn_hash_add(hdev, conn);
if (hdev->notify) { if (hdev->notify)
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); hdev->notify(hdev, HCI_NOTIFY_CONN_ADD);
tasklet_enable(&hdev->tx_task);
}
atomic_set(&conn->devref, 0); atomic_set(&conn->devref, 0);
...@@ -468,11 +465,8 @@ int hci_conn_del(struct hci_conn *conn) ...@@ -468,11 +465,8 @@ int hci_conn_del(struct hci_conn *conn)
hci_chan_list_flush(conn); hci_chan_list_flush(conn);
hci_conn_hash_del(hdev, conn); hci_conn_hash_del(hdev, conn);
if (hdev->notify) { if (hdev->notify)
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); hdev->notify(hdev, HCI_NOTIFY_CONN_DEL);
tasklet_enable(&hdev->tx_task);
}
skb_queue_purge(&conn->data_q); skb_queue_purge(&conn->data_q);
......
...@@ -378,11 +378,8 @@ static void hci_cc_read_voice_setting(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -378,11 +378,8 @@ static void hci_cc_read_voice_setting(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG("%s voice setting 0x%04x", hdev->name, setting); BT_DBG("%s voice setting 0x%04x", hdev->name, setting);
if (hdev->notify) { if (hdev->notify)
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING); hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
tasklet_enable(&hdev->tx_task);
}
} }
static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb)
...@@ -409,11 +406,8 @@ static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb ...@@ -409,11 +406,8 @@ static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb
BT_DBG("%s voice setting 0x%04x", hdev->name, setting); BT_DBG("%s voice setting 0x%04x", hdev->name, setting);
if (hdev->notify) { if (hdev->notify)
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING); hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
tasklet_enable(&hdev->tx_task);
}
} }
static void hci_cc_host_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_host_buffer_size(struct hci_dev *hdev, struct sk_buff *skb)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment