Commit c78ae283 authored by Marcel Holtmann's avatar Marcel Holtmann

Bluetooth: Unobfuscate tasklet_schedule usage

The tasklet schedule function helpers are just an obfuscation. So remove
them and call the schedule functions directly.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 76bca880
...@@ -367,22 +367,6 @@ static inline void hci_conn_put(struct hci_conn *conn) ...@@ -367,22 +367,6 @@ static inline void hci_conn_put(struct hci_conn *conn)
} }
} }
/* ----- HCI tasks ----- */
static inline void hci_sched_cmd(struct hci_dev *hdev)
{
tasklet_schedule(&hdev->cmd_task);
}
static inline void hci_sched_rx(struct hci_dev *hdev)
{
tasklet_schedule(&hdev->rx_task);
}
static inline void hci_sched_tx(struct hci_dev *hdev)
{
tasklet_schedule(&hdev->tx_task);
}
/* ----- HCI Devices ----- */ /* ----- HCI Devices ----- */
static inline void __hci_dev_put(struct hci_dev *d) static inline void __hci_dev_put(struct hci_dev *d)
{ {
......
...@@ -193,8 +193,9 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) ...@@ -193,8 +193,9 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
while ((skb = skb_dequeue(&hdev->driver_init))) { while ((skb = skb_dequeue(&hdev->driver_init))) {
bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; bt_cb(skb)->pkt_type = HCI_COMMAND_PKT;
skb->dev = (void *) hdev; skb->dev = (void *) hdev;
skb_queue_tail(&hdev->cmd_q, skb); skb_queue_tail(&hdev->cmd_q, skb);
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
} }
skb_queue_purge(&hdev->driver_init); skb_queue_purge(&hdev->driver_init);
...@@ -1005,7 +1006,8 @@ int hci_recv_frame(struct sk_buff *skb) ...@@ -1005,7 +1006,8 @@ int hci_recv_frame(struct sk_buff *skb)
/* Queue frame for rx task */ /* Queue frame for rx task */
skb_queue_tail(&hdev->rx_q, skb); skb_queue_tail(&hdev->rx_q, skb);
hci_sched_rx(hdev); tasklet_schedule(&hdev->rx_task);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_recv_frame); EXPORT_SYMBOL(hci_recv_frame);
...@@ -1216,8 +1218,9 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param) ...@@ -1216,8 +1218,9 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param)
bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; bt_cb(skb)->pkt_type = HCI_COMMAND_PKT;
skb->dev = (void *) hdev; skb->dev = (void *) hdev;
skb_queue_tail(&hdev->cmd_q, skb); skb_queue_tail(&hdev->cmd_q, skb);
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
return 0; return 0;
} }
...@@ -1294,7 +1297,8 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) ...@@ -1294,7 +1297,8 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
spin_unlock_bh(&conn->data_q.lock); spin_unlock_bh(&conn->data_q.lock);
} }
hci_sched_tx(hdev); tasklet_schedule(&hdev->tx_task);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_acl); EXPORT_SYMBOL(hci_send_acl);
...@@ -1321,8 +1325,10 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) ...@@ -1321,8 +1325,10 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
skb->dev = (void *) hdev; skb->dev = (void *) hdev;
bt_cb(skb)->pkt_type = HCI_SCODATA_PKT; bt_cb(skb)->pkt_type = HCI_SCODATA_PKT;
skb_queue_tail(&conn->data_q, skb); skb_queue_tail(&conn->data_q, skb);
hci_sched_tx(hdev); tasklet_schedule(&hdev->tx_task);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_sco); EXPORT_SYMBOL(hci_send_sco);
...@@ -1635,7 +1641,7 @@ static void hci_cmd_task(unsigned long arg) ...@@ -1635,7 +1641,7 @@ static void hci_cmd_task(unsigned long arg)
hdev->cmd_last_tx = jiffies; hdev->cmd_last_tx = jiffies;
} else { } else {
skb_queue_head(&hdev->cmd_q, skb); skb_queue_head(&hdev->cmd_q, skb);
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
} }
} }
} }
...@@ -1320,7 +1320,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk ...@@ -1320,7 +1320,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
if (ev->ncmd) { if (ev->ncmd) {
atomic_set(&hdev->cmd_cnt, 1); atomic_set(&hdev->cmd_cnt, 1);
if (!skb_queue_empty(&hdev->cmd_q)) if (!skb_queue_empty(&hdev->cmd_q))
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
} }
} }
...@@ -1386,7 +1386,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -1386,7 +1386,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (ev->ncmd) { if (ev->ncmd) {
atomic_set(&hdev->cmd_cnt, 1); atomic_set(&hdev->cmd_cnt, 1);
if (!skb_queue_empty(&hdev->cmd_q)) if (!skb_queue_empty(&hdev->cmd_q))
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
} }
} }
...@@ -1454,7 +1454,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s ...@@ -1454,7 +1454,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s
} }
} }
hci_sched_tx(hdev); tasklet_schedule(&hdev->tx_task);
tasklet_enable(&hdev->tx_task); tasklet_enable(&hdev->tx_task);
} }
......
...@@ -445,10 +445,10 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -445,10 +445,10 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
if (test_bit(HCI_RAW, &hdev->flags) || (ogf == 0x3f)) { if (test_bit(HCI_RAW, &hdev->flags) || (ogf == 0x3f)) {
skb_queue_tail(&hdev->raw_q, skb); skb_queue_tail(&hdev->raw_q, skb);
hci_sched_tx(hdev); tasklet_schedule(&hdev->tx_task);
} else { } else {
skb_queue_tail(&hdev->cmd_q, skb); skb_queue_tail(&hdev->cmd_q, skb);
hci_sched_cmd(hdev); tasklet_schedule(&hdev->cmd_task);
} }
} else { } else {
if (!capable(CAP_NET_RAW)) { if (!capable(CAP_NET_RAW)) {
...@@ -457,7 +457,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -457,7 +457,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
} }
skb_queue_tail(&hdev->raw_q, skb); skb_queue_tail(&hdev->raw_q, skb);
hci_sched_tx(hdev); tasklet_schedule(&hdev->tx_task);
} }
err = len; err = len;
......
Markdown is supported
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