Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 486028 | Differences between
and this patch

Collapse All | Expand All

(-)rtbth_v3.9.3/Makefile (+11 lines)
Lines 2-7 Link Here
2
2
3
CONFIG_RTBTH = m
3
CONFIG_RTBTH = m
4
MOD_NAME = rtbth
4
MOD_NAME = rtbth
5
MDIR = kernel/drivers/bluetooth
5
obj-$(CONFIG_RTBTH) := $(MOD_NAME).o
6
obj-$(CONFIG_RTBTH) := $(MOD_NAME).o
6
$(MOD_NAME)-objs := rtbth_core_main.o \
7
$(MOD_NAME)-objs := rtbth_core_main.o \
7
					rtbth_core_init.o \
8
					rtbth_core_init.o \
Lines 22-24 Link Here
22
all:
23
all:
23
	$(MAKE) -C $(LINUX_SRC) M=$(PWD) modules
24
	$(MAKE) -C $(LINUX_SRC) M=$(PWD) modules
24
25
26
clean:
27
	$(MAKE) -C $(LINUX_SRC) M=$(PWD) clean
28
29
install: all
30
	$(MAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=$(MDIR) \
31
		-C $(LINUX_SRC) M=$(PWD) modules_install
32
	depmod -a
33
	install -m 0755 -o root -g root tools/49rtbt $(DESTDIR)/usr/lib/pm-utils/sleep.d/
34
	install -m 0755 -o root -g root tools/rtbt $(DESTDIR)/usr/bin/
35
	install -m 0644 -o root -g root tools/ralink-bt.conf $(DESTDIR)/etc/modprobe.d/
(-)rtbth_v3.9.3/include/rt_linux.h (+1 lines)
Lines 27-32 Link Here
27
#ifndef __RTBT_LINUX_H
27
#ifndef __RTBT_LINUX_H
28
#define __RTBT_LINUX_H
28
#define __RTBT_LINUX_H
29
29
30
#define KTHREAD_SUPPORT
30
31
31
#include <linux/module.h>
32
#include <linux/module.h>
32
#include <linux/version.h>
33
#include <linux/version.h>
(-)rtbth_v3.9.3/rtbth_core_bluez.c (-13 / +14 lines)
Lines 86-92 Link Here
86
int rtbt_hci_dev_send(struct sk_buff *skb)
86
int rtbt_hci_dev_send(struct sk_buff *skb)
87
{
87
{
88
	struct hci_dev *hdev = (struct hci_dev *)skb->dev;
88
	struct hci_dev *hdev = (struct hci_dev *)skb->dev;
89
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hdev->driver_data;
89
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hdev);
90
	struct rtbt_hps_ops *hps_ops;
90
	struct rtbt_hps_ops *hps_ops;
91
	unsigned char pkt_type;
91
	unsigned char pkt_type;
92
	int status;
92
	int status;
Lines 136-142 Link Here
136
			
136
			
137
		case HCI_SCODATA_PKT:
137
		case HCI_SCODATA_PKT:
138
			printk("-->%s():sco len=%d,time=0x%lx\n", __FUNCTION__, skb->len, jiffies);
138
			printk("-->%s():sco len=%d,time=0x%lx\n", __FUNCTION__, skb->len, jiffies);
139
			os_ctrl->sco_tx_seq = bt_cb(skb)->tx_seq;
139
			os_ctrl->sco_tx_seq = bt_cb(skb)->control.txseq;
140
			os_ctrl->sco_time_hci = jiffies;
140
			os_ctrl->sco_time_hci = jiffies;
141
			
141
			
142
			status = hps_ops->hci_sco_data(os_ctrl->dev_ctrl, skb->data, skb->len);
142
			status = hps_ops->hci_sco_data(os_ctrl->dev_ctrl, skb->data, skb->len);
Lines 223-229 Link Here
223
int rtbt_hci_dev_open(struct hci_dev *hdev)
223
int rtbt_hci_dev_open(struct hci_dev *hdev)
224
{
224
{
225
	NTSTATUS status = STATUS_FAILURE;
225
	NTSTATUS status = STATUS_FAILURE;
226
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hdev->driver_data;
226
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hdev);
227
	//struct rtbt_hps_ops *hps_ops;
227
	//struct rtbt_hps_ops *hps_ops;
228
228
229
	printk("-->%s()\n", __FUNCTION__);
229
	printk("-->%s()\n", __FUNCTION__);
Lines 251-257 Link Here
251
int rtbt_hci_dev_close(struct hci_dev *hdev)
251
int rtbt_hci_dev_close(struct hci_dev *hdev)
252
{
252
{
253
	NTSTATUS status = STATUS_FAILURE;
253
	NTSTATUS status = STATUS_FAILURE;
254
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hdev->driver_data;
254
	struct rtbt_os_ctrl *os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hdev);
255
	
255
	
256
	printk("--->%s()\n", __FUNCTION__);
256
	printk("--->%s()\n", __FUNCTION__);
257
257
Lines 295-301 Link Here
295
295
296
	printk("--->%s()\n", __FUNCTION__);
296
	printk("--->%s()\n", __FUNCTION__);
297
297
298
    __hci_dev_hold(hdev);
298
    hci_dev_hold(hdev);
299
299
300
    //rtbt_hci_dev_close(hciDev);
300
    //rtbt_hci_dev_close(hciDev);
301
	/* un-register HCI device */
301
	/* un-register HCI device */
Lines 304-313 Link Here
304
		return -1;
304
		return -1;
305
	}
305
	}
306
		
306
		
307
	if (hci_unregister_dev(hdev) < 0)
307
	/*if (hci_unregister_dev(hdev) < 0)
308
		printk("Can't unregister HCI device %s\n", hdev->name);
308
		printk("Can't unregister HCI device %s\n", hdev->name);
309
309
*/
310
    __hci_dev_put(hdev);
310
    hci_unregister_dev(hdev);
311
    hci_dev_put(hdev);
311
312
312
	printk("<---%s():Success\n", __FUNCTION__);
313
	printk("<---%s():Success\n", __FUNCTION__);
313
	return 0;
314
	return 0;
Lines 319-325 Link Here
319
320
320
	printk("--->%s()\n", __FUNCTION__);
321
	printk("--->%s()\n", __FUNCTION__);
321
322
322
    __hci_dev_hold(hdev);
323
    hci_dev_hold(hdev);
323
    
324
    
324
	/* Register HCI device */
325
	/* Register HCI device */
325
	if (hci_register_dev(hdev) < 0) {
326
	if (hci_register_dev(hdev) < 0) {
Lines 327-333 Link Here
327
		return -ENODEV;
328
		return -ENODEV;
328
	}
329
	}
329
330
330
	__hci_dev_put(hdev);
331
	hci_dev_put(hdev);
331
332
332
	printk("<---%s():Success\n", __FUNCTION__);
333
	printk("<---%s():Success\n", __FUNCTION__);
333
	return 0;
334
	return 0;
Lines 396-410 Link Here
396
	os_ctrl->if_dev = if_dev;
397
	os_ctrl->if_dev = if_dev;
397
	os_ctrl->hps_ops->recv = rtbt_hci_dev_receive;
398
	os_ctrl->hps_ops->recv = rtbt_hci_dev_receive;
398
	
399
	
399
	hdev->driver_data = os_ctrl;
400
	hci_set_drvdata(hdev, os_ctrl);
400
	hdev->open = rtbt_hci_dev_open;
401
	hdev->open = rtbt_hci_dev_open;
401
	hdev->close = rtbt_hci_dev_close;
402
	hdev->close = rtbt_hci_dev_close;
402
	hdev->flush = rtbt_hci_dev_flush;
403
	hdev->flush = rtbt_hci_dev_flush;
403
	hdev->send = rtbt_hci_dev_send;
404
	hdev->send = rtbt_hci_dev_send;
404
	hdev->destruct = rtbt_hci_dev_destruct;
405
//	hdev->destruct = rtbt_hci_dev_destruct;
405
	hdev->ioctl = rtbt_hci_dev_ioctl;
406
	hdev->ioctl = rtbt_hci_dev_ioctl;
406
407
407
	hdev->owner = THIS_MODULE;
408
//	hdev->owner = THIS_MODULE;
408
409
409
	printk("<--%s():alloc hdev(0x%lx) done\n", __FUNCTION__, (ULONG)hdev);
410
	printk("<--%s():alloc hdev(0x%lx) done\n", __FUNCTION__, (ULONG)hdev);
410
	
411
	
(-)rtbth_v3.9.3/rtbth_core_pci.c (-9 / +9 lines)
Lines 35-41 Link Here
35
#ifdef OS_ABL_SUPPORT
35
#ifdef OS_ABL_SUPPORT
36
/* struct pci_device_id *rtbt_pci_ids = NULL; */
36
/* struct pci_device_id *rtbt_pci_ids = NULL; */
37
#else
37
#else
38
static struct pci_device_id rtbt_pci_ids[] __devinitdata = {
38
static struct pci_device_id rtbt_pci_ids[]  = {
39
	{PCI_DEVICE(0x1814, 0x3298)},
39
	{PCI_DEVICE(0x1814, 0x3298)},
40
	{}
40
	{}
41
};
41
};
Lines 57-63 Link Here
57
		return -1;
57
		return -1;
58
	}
58
	}
59
	
59
	
60
	os_ctrl = (struct rtbt_os_ctrl *)(hci_dev->driver_data);
60
	os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hci_dev);
61
	if (os_ctrl == NULL) {
61
	if (os_ctrl == NULL) {
62
		printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
62
		printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
63
		return -1;
63
		return -1;
Lines 84-90 Link Here
84
        return -1;
84
        return -1;
85
    }
85
    }
86
86
87
    os_ctrl = (struct rtbt_os_ctrl *)(hci_dev->driver_data);
87
    os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hci_dev);
88
    if (os_ctrl == NULL) {
88
    if (os_ctrl == NULL) {
89
        printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
89
        printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
90
        return -1;
90
        return -1;
Lines 98-104 Link Here
98
}
98
}
99
#endif /* CONFIG_PM */
99
#endif /* CONFIG_PM */
100
100
101
static int __devinit rtbt_pci_probe(struct pci_dev *pdev,
101
static int rtbt_pci_probe(struct pci_dev *pdev,
102
					const struct pci_device_id *id)
102
					const struct pci_device_id *id)
103
{
103
{
104
	const char *print_name;
104
	const char *print_name;
Lines 225-231 Link Here
225
	return -1;
225
	return -1;
226
}
226
}
227
227
228
static void __devexit rtbt_pci_remove(struct pci_dev *pdev)
228
static void  rtbt_pci_remove(struct pci_dev *pdev)
229
{
229
{
230
	struct hci_dev *hci_dev = (struct hci_dev *)pci_get_drvdata(pdev);
230
	struct hci_dev *hci_dev = (struct hci_dev *)pci_get_drvdata(pdev);
231
	struct rtbt_os_ctrl *os_ctrl;
231
	struct rtbt_os_ctrl *os_ctrl;
Lines 237-243 Link Here
237
		return;
237
		return;
238
	}
238
	}
239
	
239
	
240
	os_ctrl = (struct rtbt_os_ctrl *)(hci_dev->driver_data);
240
	os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hci_dev);
241
	if (os_ctrl == NULL) {
241
	if (os_ctrl == NULL) {
242
		printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
242
		printk("%s(): hci_dev->driver_data is NULL!\n", __FUNCTION__);
243
		return;
243
		return;
Lines 289-297 Link Here
289
#endif /* OS_ABL_SUPPORT */
289
#endif /* OS_ABL_SUPPORT */
290
	.probe = rtbt_pci_probe,
290
	.probe = rtbt_pci_probe,
291
#if LINUX_VERSION_CODE >= 0x20412
291
#if LINUX_VERSION_CODE >= 0x20412
292
	.remove = __devexit_p(rtbt_pci_remove),
292
	.remove = (rtbt_pci_remove),
293
#else
293
#else
294
	.remove = __devexit(rtbt_pci_remove),
294
	.remove = (rtbt_pci_remove),
295
#endif
295
#endif
296
#ifdef CONFIG_PM
296
#ifdef CONFIG_PM
297
	.suspend = rtbt_pci_suspend,
297
	.suspend = rtbt_pci_suspend,
Lines 343-349 Link Here
343
	}
343
	}
344
	
344
	
345
	if (hdev){
345
	if (hdev){
346
		os_ctrl = (struct rtbt_os_ctrl *)hdev->driver_data;
346
		os_ctrl = (struct rtbt_os_ctrl *)hci_get_drvdata(hdev);
347
		ASSERT(os_ctrl);
347
		ASSERT(os_ctrl);
348
		if (os_ctrl && os_ctrl->if_ops.pci_ops.isr) {
348
		if (os_ctrl && os_ctrl->if_ops.pci_ops.isr) {
349
			retval = (os_ctrl->if_ops.pci_ops.isr)(os_ctrl->dev_ctrl);
349
			retval = (os_ctrl->if_ops.pci_ops.isr)(os_ctrl->dev_ctrl);
(-)rtbth_v3.9.3/rtbth_hlpr_linux.c (-1 / +1 lines)
Lines 572-578 Link Here
572
	
572
	
573
#ifndef KTHREAD_SUPPORT
573
#ifndef KTHREAD_SUPPORT
574
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
574
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
575
	daemonize((PSTRING)&pOSTask->taskName[0]);
575
	//daemonize((PSTRING)&pOSTask->taskName[0]);
576
576
577
	allow_signal(SIGTERM);
577
	allow_signal(SIGTERM);
578
	allow_signal(SIGKILL);
578
	allow_signal(SIGKILL);

Return to bug 486028