資源簡介
linux下RTL8821藍牙驅動,ubuntu

代碼片段和文件信息
/*
?*
?*??Realtek?Bluetooth?USB?driver
?*
?*
?*??This?program?is?free?software;?you?can?redistribute?it?and/or?modify
?*??it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?*??the?Free?Software?Foundation;?either?version?2?of?the?License?or
?*??(at?your?option)?any?later?version.
?*
?*??This?program?is?distributed?in?the?hope?that?it?will?be?useful
?*??but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*??MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*??GNU?General?Public?License?for?more?details.
?*
?*??You?should?have?received?a?copy?of?the?GNU?General?Public?License
?*??along?with?this?program;?if?not?write?to?the?Free?Software
?*??Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
?*
?*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“rtk_bt.h“
#define?VERSION?“3.1“
#ifdef?BTCOEX
#include?“rtk_coex.h“
#endif
static?uint8_t?gEVersion?=?0xFF;
#if?HCI_VERSION_CODE?>=?KERNEL_VERSION(3?7?1)
static?bool?reset?=?0;
#endif
static?struct?usb_driver?btusb_driver;
static?struct?usb_device_id?btusb_table[]?=?{
{
.match_flags?=?USB_DEVICE_ID_MATCH_VENDOR?|
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor?=?0x0bda
.bInterfaceClass?=?0xe0
.bInterfaceSubClass?=?0x01
.bInterfaceProtocol?=?0x01
}?{
.match_flags?=?USB_DEVICE_ID_MATCH_VENDOR?|
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor?=?0x13d3
.bInterfaceClass?=?0xe0
.bInterfaceSubClass?=?0x01
.bInterfaceProtocol?=?0x01
}?{
.match_flags?=?USB_DEVICE_ID_MATCH_VENDOR?|
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor?=?0x0489
.bInterfaceClass?=?0xe0
.bInterfaceSubClass?=?0x01
.bInterfaceProtocol?=?0x01
}?{?}
};
static?void?rtk_free(struct?btusb_data?*data)
{
#if?LINUX_VERSION_CODE? kfree(data);
#endif
return;
}
static?struct?btusb_data?*rtk_alloc(struct?usb_interface?*intf)
{
struct?btusb_data?*data;
#if?LINUX_VERSION_CODE? data?=?kzalloc(sizeof(*data)?GFP_KERNEL);
#else
data?=?devm_kzalloc(&intf->dev?sizeof(*data)?GFP_KERNEL);
#endif
return?data;
}
MODULE_DEVICE_TABLE(usb?btusb_table);
static?int?inc_tx(struct?btusb_data?*data)
{
unsigned?long?flags;
int?rv;
spin_lock_irqsave(&data->txlock?flags);
rv?=?test_bit(BTUSB_SUSPENDING?&data->flags);
if?(!rv)
data->tx_in_flight++;
spin_unlock_irqrestore(&data->txlock?flags);
return?rv;
}
#if?HCI_VERSION_CODE?>=?KERNEL_VERSION(3?18?0)
static?inline?void?btusb_free_frags(struct?btusb_data?*data)
{
unsigned?long?flags;
spin_lock_irqsave(&data->rxlock?flags);
kfree_skb(data->evt_skb);
data->evt_skb?=?NULL;
kfree_skb(data->acl_skb);
data->acl_skb?=?NULL;
kfree_skb(data->sco_skb);
data->sco_skb?=?NULL;
spin_un
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-04-10?10:45??LINUX_BT\
?????目錄???????????0??2017-04-10?10:46??LINUX_BT\8821AU\
?????文件?????????321??2017-04-10?10:46??LINUX_BT\8821AU\Makefile
?????文件???????40024??2017-04-10?10:36??LINUX_BT\8821AU\rtl8821a_fw
?????目錄???????????0??2017-06-30?19:50??LINUX_BT\bluetooth_usb_driver\
?????文件?????????300??2017-03-14?14:37??LINUX_BT\bluetooth_usb_driver\Makefile
?????文件???????68598??2017-04-10?10:56??LINUX_BT\bluetooth_usb_driver\rtk_bt.c
?????文件????????5577??2017-03-14?14:37??LINUX_BT\bluetooth_usb_driver\rtk_bt.h
?????文件???????67923??2017-03-14?14:37??LINUX_BT\bluetooth_usb_driver\rtk_coex.c
?????文件????????9894??2017-03-14?14:37??LINUX_BT\bluetooth_usb_driver\rtk_coex.h
?????目錄???????????0??2017-06-30?20:50??LINUX_BT\bluetooth_usb_driver\SI\
?????文件???????53248??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IAB
?????文件?????????848??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IAD
?????文件???????12288??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IMB
?????文件?????????448??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IMD
?????文件??????????16??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PFI
?????文件?????????776??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PO
?????文件????????1760??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PR
?????文件????????8608??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PRI
?????文件??????103884??2017-06-30?19:51??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PS
?????文件??????????39??2017-06-30?20:50??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.SearchResults
?????文件???????13669??2017-06-30?20:50??LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.WK3
?????文件?????????761??2017-04-10?10:45??LINUX_BT\Makefile
?????文件????????5209??2017-03-14?14:37??LINUX_BT\Readme.txt
- 上一篇:游程編碼實現圖像壓縮
- 下一篇:springCloud demo
評論
共有 條評論