Skip to content

Instantly share code, notes, and snippets.

@initrunlevel0
Created April 18, 2014 05:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save initrunlevel0/11025774 to your computer and use it in GitHub Desktop.
Save initrunlevel0/11025774 to your computer and use it in GitHub Desktop.
rtbth (RT3290 Bluetooth Driver) in Linux >= 3.13 Patch
# rtbth patch for Kernel >= 3.13
Putu Wiramaswara Widya <putu@wirama.web.id>
## Howto
Use this thing with http://ppa.launchpad.net/barracuda72/ralink/ubuntu/pool/main/r/rtbth-dkms/rtbth-dkms_3.9.3-0ubuntu1~ppa3.tar.gz. Patch with this command line :
$ patch < rtbth_core_bluez.c.patch
--- rtbth_core_bluez.c.orig 2014-04-18 11:20:35.435982535 +0700
+++ rtbth_core_bluez.c 2014-04-18 11:57:25.808041727 +0700
@@ -83,9 +83,9 @@
static const char *pkt_type_str[]=
{"UNKNOWN", "HCI_CMD", "ACL_DATA", "SCO_DATA", "HCI_EVENT", "HCI_VENDOR", "ERROR_TYPE"};
-int rtbt_hci_dev_send(struct sk_buff *skb)
+int rtbt_hci_dev_send(struct hci_dev *hdev, struct sk_buff *skb)
{
- struct hci_dev *hdev = (struct hci_dev *)skb->dev;
+ //struct hci_dev *hdev = (struct hci_dev *)skb->dev;
struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hdev);
struct rtbt_hps_ops *hps_ops;
unsigned char pkt_type;
@@ -213,7 +213,7 @@
hdev->stat.byte_rx += len;
}
- status = hci_recv_frame(skb);
+ status = hci_recv_frame(hdev,skb);
//printk("<--%s()\n", __FUNCTION__);
@@ -403,7 +403,7 @@
hdev->flush = rtbt_hci_dev_flush;
hdev->send = rtbt_hci_dev_send;
// hdev->destruct = rtbt_hci_dev_destruct;
- hdev->ioctl = rtbt_hci_dev_ioctl;
+// hdev->ioctl = rtbt_hci_dev_ioctl;
// hdev->owner = THIS_MODULE;
@@ -412,3 +412,4 @@
return 0;
}
@iamashish7
Copy link

it doesn't work

@tusharkant15
Copy link

patching file rtbth_core_bluez.c
Hunk #1 FAILED at 83.
Hunk #2 FAILED at 213.
Hunk #3 FAILED at 403.
patch: **** malformed patch at line 36:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment