aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-12-14 19:58:44 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-18 14:07:57 -0500
commit3c54711c4fd103edf2044ab60726939f1de02b0c (patch)
tree3d223484adad4b641deff803182d97f9ece914b2
parentbf4c63252490ba78fb833cc7acf1a5b1900c970f (diff)
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: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r--net/bluetooth/hci_conn.c10
-rw-r--r--net/bluetooth/hci_event.c10
2 files changed, 4 insertions, 16 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 5e9e193ac71e..385cccbcafe0 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -419,11 +419,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
419 hci_dev_hold(hdev); 419 hci_dev_hold(hdev);
420 420
421 hci_conn_hash_add(hdev, conn); 421 hci_conn_hash_add(hdev, conn);
422 if (hdev->notify) { 422 if (hdev->notify)
423 tasklet_disable(&hdev->tx_task);
424 hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); 423 hdev->notify(hdev, HCI_NOTIFY_CONN_ADD);
425 tasklet_enable(&hdev->tx_task);
426 }
427 424
428 atomic_set(&conn->devref, 0); 425 atomic_set(&conn->devref, 0);
429 426
@@ -468,11 +465,8 @@ int hci_conn_del(struct hci_conn *conn)
468 hci_chan_list_flush(conn); 465 hci_chan_list_flush(conn);
469 466
470 hci_conn_hash_del(hdev, conn); 467 hci_conn_hash_del(hdev, conn);
471 if (hdev->notify) { 468 if (hdev->notify)
472 tasklet_disable(&hdev->tx_task);
473 hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); 469 hdev->notify(hdev, HCI_NOTIFY_CONN_DEL);
474 tasklet_enable(&hdev->tx_task);
475 }
476 470
477 skb_queue_purge(&conn->data_q); 471 skb_queue_purge(&conn->data_q);
478 472
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 0a9501f17366..93ecb2dfa177 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -378,11 +378,8 @@ static void hci_cc_read_voice_setting(struct hci_dev *hdev, struct sk_buff *skb)
378 378
379 BT_DBG("%s voice setting 0x%04x", hdev->name, setting); 379 BT_DBG("%s voice setting 0x%04x", hdev->name, setting);
380 380
381 if (hdev->notify) { 381 if (hdev->notify)
382 tasklet_disable(&hdev->tx_task);
383 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING); 382 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
384 tasklet_enable(&hdev->tx_task);
385 }
386} 383}
387 384
388static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb) 385static 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 406
410 BT_DBG("%s voice setting 0x%04x", hdev->name, setting); 407 BT_DBG("%s voice setting 0x%04x", hdev->name, setting);
411 408
412 if (hdev->notify) { 409 if (hdev->notify)
413 tasklet_disable(&hdev->tx_task);
414 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING); 410 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
415 tasklet_enable(&hdev->tx_task);
416 }
417} 411}
418 412
419static void hci_cc_host_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) 413static void hci_cc_host_buffer_size(struct hci_dev *hdev, struct sk_buff *skb)