Bluetooth: Provide hdev parameter to hci_recv_frame() driver callback
To avoid casting skb->dev into hdev, just let the drivers provide the hdev directly when calling hci_recv_frame() function. This patch also fixes up all drivers to provide the hdev. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:

committed by
Johan Hedberg

parent
8909f6d2c4
commit
e1a2617069
@@ -600,15 +600,14 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
case HCI_SCODATA_PKT:
|
||||
case HCI_EVENT_PKT:
|
||||
bt_cb(skb)->pkt_type = type;
|
||||
skb->dev = (void *)hdev;
|
||||
skb_put(skb, buf_len);
|
||||
skb_pull(skb, SDIO_HEADER_LEN);
|
||||
|
||||
if (type == HCI_EVENT_PKT) {
|
||||
if (btmrvl_check_evtpkt(priv, skb))
|
||||
hci_recv_frame(skb);
|
||||
hci_recv_frame(hdev, skb);
|
||||
} else {
|
||||
hci_recv_frame(skb);
|
||||
hci_recv_frame(hdev, skb);
|
||||
}
|
||||
|
||||
hdev->stat.byte_rx += buf_len;
|
||||
@@ -616,12 +615,11 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
|
||||
case MRVL_VENDOR_PKT:
|
||||
bt_cb(skb)->pkt_type = HCI_VENDOR_PKT;
|
||||
skb->dev = (void *)hdev;
|
||||
skb_put(skb, buf_len);
|
||||
skb_pull(skb, SDIO_HEADER_LEN);
|
||||
|
||||
if (btmrvl_process_event(priv, skb))
|
||||
hci_recv_frame(skb);
|
||||
hci_recv_frame(hdev, skb);
|
||||
|
||||
hdev->stat.byte_rx += buf_len;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user