mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
Bluetooth: Rename bt_cb()->req into bt_cb()->hci
The SKB context buffer for HCI request is really not just for requests, information in their are preserved for the whole HCI layer. So it makes more sense to actually rename it into bt_cb()->hci and also call it then struct hci_ctrl. In addition that allows moving the decoded opcode for outgoing packets into that struct. So far it was just consuming valuable space from the main shared items. And opcode are not valid for L2CAP packets. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
d94a61040d
commit
242c0ebd37
5 changed files with 24 additions and 24 deletions
|
@ -56,8 +56,8 @@ static int req_run(struct hci_request *req, hci_req_complete_t complete,
|
|||
return -ENODATA;
|
||||
|
||||
skb = skb_peek_tail(&req->cmd_q);
|
||||
bt_cb(skb)->req.complete = complete;
|
||||
bt_cb(skb)->req.complete_skb = complete_skb;
|
||||
bt_cb(skb)->hci.req_complete = complete;
|
||||
bt_cb(skb)->hci.req_complete_skb = complete_skb;
|
||||
|
||||
spin_lock_irqsave(&hdev->cmd_q.lock, flags);
|
||||
skb_queue_splice_tail(&req->cmd_q, &hdev->cmd_q);
|
||||
|
@ -99,7 +99,7 @@ struct sk_buff *hci_prepare_cmd(struct hci_dev *hdev, u16 opcode, u32 plen,
|
|||
BT_DBG("skb len %d", skb->len);
|
||||
|
||||
bt_cb(skb)->pkt_type = HCI_COMMAND_PKT;
|
||||
bt_cb(skb)->opcode = opcode;
|
||||
bt_cb(skb)->hci.opcode = opcode;
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
@ -128,9 +128,9 @@ void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen,
|
|||
}
|
||||
|
||||
if (skb_queue_empty(&req->cmd_q))
|
||||
bt_cb(skb)->req.start = true;
|
||||
bt_cb(skb)->hci.req_start = true;
|
||||
|
||||
bt_cb(skb)->req.event = event;
|
||||
bt_cb(skb)->hci.req_event = event;
|
||||
|
||||
skb_queue_tail(&req->cmd_q, skb);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue