Skip to content

Commit 8148a2e

Browse files
committed
rtl8723au_bt: Fix to build on all kernels
The API changed at kernel 3.13. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
1 parent 246312d commit 8148a2e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rtk_btusb.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <linux/errno.h>
3131
#include <linux/skbuff.h>
3232
#include <linux/usb.h>
33+
#include <linux/version.h>
34+
3335
#include <net/bluetooth/bluetooth.h>
3436
#include <net/bluetooth/hci_core.h>
3537

@@ -606,9 +608,14 @@ static int btusb_flush(struct hci_dev *hdev)
606608
return 0;
607609
}
608610

611+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
612+
static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
613+
{
614+
#else
609615
static int btusb_send_frame(struct sk_buff *skb)
610616
{
611-
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
617+
struct hci_dev *hdev = (struct hci_dev *)skb->dev;
618+
#endif
612619
struct btusb_data *data = GET_DRV_DATA(hdev);
613620
struct usb_ctrlrequest *dr;
614621
struct urb *urb;

0 commit comments

Comments
 (0)