aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-04-02 06:41:10 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-04-02 10:09:27 -0400
commitf7d9e97592aeb7742084814c5f37e25571b2d51d (patch)
tree4c22cf825ac013964cb09fb76f00fd8990f13757
parentf60cb30579d3401cab1ed36b42df5c0568ae0ba7 (diff)
Bluetooth: Remove unneeded recv_event variable
Now that the synchronous HCI requests use the new API and a new private variable the recv_evt member of hci_dev is no-longer needed. This patch removes it. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--net/bluetooth/hci_core.c3
-rw-r--r--net/bluetooth/hci_event.c12
3 files changed, 0 insertions, 16 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 257ac04c00e1..4cefee0b6330 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -326,7 +326,6 @@ struct hci_dev {
326 struct sk_buff_head raw_q; 326 struct sk_buff_head raw_q;
327 struct sk_buff_head cmd_q; 327 struct sk_buff_head cmd_q;
328 328
329 struct sk_buff *recv_evt;
330 struct sk_buff *sent_cmd; 329 struct sk_buff *sent_cmd;
331 struct sk_buff *reassembly[NUM_REASSEMBLY]; 330 struct sk_buff *reassembly[NUM_REASSEMBLY];
332 331
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5cbb0957edc7..6192f6e3242f 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1690,9 +1690,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
1690 hdev->sent_cmd = NULL; 1690 hdev->sent_cmd = NULL;
1691 } 1691 }
1692 1692
1693 kfree_skb(hdev->recv_evt);
1694 hdev->recv_evt = NULL;
1695
1696 /* After this point our queues are empty 1693 /* After this point our queues are empty
1697 * and no tasks are scheduled. */ 1694 * and no tasks are scheduled. */
1698 hdev->close(hdev); 1695 hdev->close(hdev);
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 7c69eb3629b7..dc9547c11c45 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5052,18 +5052,6 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
5052 u8 status = 0, event = hdr->evt; 5052 u8 status = 0, event = hdr->evt;
5053 u16 opcode = HCI_OP_NOP; 5053 u16 opcode = HCI_OP_NOP;
5054 5054
5055 hci_dev_lock(hdev);
5056
5057 /* Received events are (currently) only needed when a request is
5058 * ongoing so avoid unnecessary memory allocation.
5059 */
5060 if (hci_req_pending(hdev)) {
5061 kfree_skb(hdev->recv_evt);
5062 hdev->recv_evt = skb_clone(skb, GFP_KERNEL);
5063 }
5064
5065 hci_dev_unlock(hdev);
5066
5067 if (hdev->sent_cmd && bt_cb(hdev->sent_cmd)->req.event == event) { 5055 if (hdev->sent_cmd && bt_cb(hdev->sent_cmd)->req.event == event) {
5068 struct hci_command_hdr *cmd_hdr = (void *) hdev->sent_cmd->data; 5056 struct hci_command_hdr *cmd_hdr = (void *) hdev->sent_cmd->data;
5069 opcode = __le16_to_cpu(cmd_hdr->opcode); 5057 opcode = __le16_to_cpu(cmd_hdr->opcode);