Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3f8c6c9c
Commit
3f8c6c9c
authored
Dec 02, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
parents
aa2ba5f1
9a5df923
Changes
36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
209 additions
and
1559 deletions
+209
-1559
drivers/bluetooth/Kconfig
drivers/bluetooth/Kconfig
+0
-20
drivers/bluetooth/Makefile
drivers/bluetooth/Makefile
+0
-1
drivers/bluetooth/bcm203x.c
drivers/bluetooth/bcm203x.c
+2
-7
drivers/bluetooth/bfusb.c
drivers/bluetooth/bfusb.c
+3
-8
drivers/bluetooth/bpa10x.c
drivers/bluetooth/bpa10x.c
+2
-5
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/bt3c_cs.c
+4
-4
drivers/bluetooth/btsdio.c
drivers/bluetooth/btsdio.c
+1
-5
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+140
-89
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_bcsp.c
+0
-5
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_h4.c
+0
-5
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_ldisc.c
+2
-7
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+0
-1136
drivers/bluetooth/hci_usb.h
drivers/bluetooth/hci_usb.h
+0
-129
drivers/bluetooth/hci_vhci.c
drivers/bluetooth/hci_vhci.c
+0
-5
include/net/bluetooth/bluetooth.h
include/net/bluetooth/bluetooth.h
+2
-2
include/net/bluetooth/hci.h
include/net/bluetooth/hci.h
+1
-1
net/bluetooth/af_bluetooth.c
net/bluetooth/af_bluetooth.c
+25
-25
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/bnep.h
+1
-1
net/bluetooth/bnep/core.c
net/bluetooth/bnep/core.c
+0
-5
net/bluetooth/bnep/netdev.c
net/bluetooth/bnep/netdev.c
+0
-5
net/bluetooth/bnep/sock.c
net/bluetooth/bnep/sock.c
+0
-5
net/bluetooth/cmtp/capi.c
net/bluetooth/cmtp/capi.c
+0
-5
net/bluetooth/cmtp/core.c
net/bluetooth/cmtp/core.c
+0
-5
net/bluetooth/cmtp/sock.c
net/bluetooth/cmtp/sock.c
+0
-5
net/bluetooth/hci_conn.c
net/bluetooth/hci_conn.c
+0
-5
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+3
-8
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+0
-5
net/bluetooth/hci_sock.c
net/bluetooth/hci_sock.c
+0
-5
net/bluetooth/hci_sysfs.c
net/bluetooth/hci_sysfs.c
+1
-6
net/bluetooth/hidp/core.c
net/bluetooth/hidp/core.c
+0
-5
net/bluetooth/hidp/sock.c
net/bluetooth/hidp/sock.c
+0
-5
net/bluetooth/l2cap.c
net/bluetooth/l2cap.c
+0
-5
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+0
-5
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+1
-6
net/bluetooth/rfcomm/tty.c
net/bluetooth/rfcomm/tty.c
+21
-14
net/bluetooth/sco.c
net/bluetooth/sco.c
+0
-5
No files found.
drivers/bluetooth/Kconfig
View file @
3f8c6c9c
...
@@ -2,26 +2,6 @@
...
@@ -2,26 +2,6 @@
menu "Bluetooth device drivers"
menu "Bluetooth device drivers"
depends on BT
depends on BT
config BT_HCIUSB
tristate "HCI USB driver (old version)"
depends on USB && BT_HCIBTUSB=n
help
Bluetooth HCI USB driver.
This driver is required if you want to use Bluetooth devices with
USB interface.
Say Y here to compile support for Bluetooth USB devices into the
kernel or say M to compile it as module (hci_usb).
config BT_HCIUSB_SCO
bool "SCO (voice) support"
depends on BT_HCIUSB
help
This option enables the SCO support in the HCI USB driver. You need this
to transmit voice data with your Bluetooth USB device.
Say Y here to compile support for SCO over HCI USB.
config BT_HCIBTUSB
config BT_HCIBTUSB
tristate "HCI USB driver"
tristate "HCI USB driver"
depends on USB
depends on USB
...
...
drivers/bluetooth/Makefile
View file @
3f8c6c9c
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
# Makefile for the Linux Bluetooth HCI device drivers.
# Makefile for the Linux Bluetooth HCI device drivers.
#
#
obj-$(CONFIG_BT_HCIUSB)
+=
hci_usb.o
obj-$(CONFIG_BT_HCIVHCI)
+=
hci_vhci.o
obj-$(CONFIG_BT_HCIVHCI)
+=
hci_vhci.o
obj-$(CONFIG_BT_HCIUART)
+=
hci_uart.o
obj-$(CONFIG_BT_HCIUART)
+=
hci_uart.o
obj-$(CONFIG_BT_HCIBCM203X)
+=
bcm203x.o
obj-$(CONFIG_BT_HCIBCM203X)
+=
bcm203x.o
...
...
drivers/bluetooth/bcm203x.c
View file @
3f8c6c9c
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#ifndef CONFIG_BT_HCIBCM203X_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.2"
#define VERSION "1.2"
static
struct
usb_device_id
bcm203x_table
[]
=
{
static
struct
usb_device_id
bcm203x_table
[]
=
{
...
@@ -199,7 +194,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
...
@@ -199,7 +194,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
return
-
EIO
;
return
-
EIO
;
}
}
BT_DBG
(
"minidrv data %p size %
d
"
,
firmware
->
data
,
firmware
->
size
);
BT_DBG
(
"minidrv data %p size %
zu
"
,
firmware
->
data
,
firmware
->
size
);
size
=
max_t
(
uint
,
firmware
->
size
,
4096
);
size
=
max_t
(
uint
,
firmware
->
size
,
4096
);
...
@@ -227,7 +222,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
...
@@ -227,7 +222,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
return
-
EIO
;
return
-
EIO
;
}
}
BT_DBG
(
"firmware data %p size %
d
"
,
firmware
->
data
,
firmware
->
size
);
BT_DBG
(
"firmware data %p size %
zu
"
,
firmware
->
data
,
firmware
->
size
);
data
->
fw_data
=
kmalloc
(
firmware
->
size
,
GFP_KERNEL
);
data
->
fw_data
=
kmalloc
(
firmware
->
size
,
GFP_KERNEL
);
if
(
!
data
->
fw_data
)
{
if
(
!
data
->
fw_data
)
{
...
...
drivers/bluetooth/bfusb.c
View file @
3f8c6c9c
...
@@ -38,11 +38,6 @@
...
@@ -38,11 +38,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCIBFUSB_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.2"
#define VERSION "1.2"
static
struct
usb_driver
bfusb_driver
;
static
struct
usb_driver
bfusb_driver
;
...
@@ -221,7 +216,7 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)
...
@@ -221,7 +216,7 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
err
,
pipe
,
size
=
HCI_MAX_FRAME_SIZE
+
32
;
int
err
,
pipe
,
size
=
HCI_MAX_FRAME_SIZE
+
32
;
BT_DBG
(
"bfusb %p urb %p"
,
bfusb
,
urb
);
BT_DBG
(
"bfusb %p urb %p"
,
data
,
urb
);
if
(
!
urb
&&
!
(
urb
=
usb_alloc_urb
(
0
,
GFP_ATOMIC
)))
if
(
!
urb
&&
!
(
urb
=
usb_alloc_urb
(
0
,
GFP_ATOMIC
)))
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -354,7 +349,7 @@ static void bfusb_rx_complete(struct urb *urb)
...
@@ -354,7 +349,7 @@ static void bfusb_rx_complete(struct urb *urb)
int
count
=
urb
->
actual_length
;
int
count
=
urb
->
actual_length
;
int
err
,
hdr
,
len
;
int
err
,
hdr
,
len
;
BT_DBG
(
"bfusb %p urb %p skb %p len %d"
,
bfusb
,
urb
,
skb
,
skb
->
len
);
BT_DBG
(
"bfusb %p urb %p skb %p len %d"
,
data
,
urb
,
skb
,
skb
->
len
);
read_lock
(
&
data
->
lock
);
read_lock
(
&
data
->
lock
);
...
@@ -691,7 +686,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
...
@@ -691,7 +686,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
goto
error
;
goto
error
;
}
}
BT_DBG
(
"firmware data %p size %
d
"
,
firmware
->
data
,
firmware
->
size
);
BT_DBG
(
"firmware data %p size %
zu
"
,
firmware
->
data
,
firmware
->
size
);
if
(
bfusb_load_firmware
(
data
,
firmware
->
data
,
firmware
->
size
)
<
0
)
{
if
(
bfusb_load_firmware
(
data
,
firmware
->
data
,
firmware
->
size
)
<
0
)
{
BT_ERR
(
"Firmware loading failed"
);
BT_ERR
(
"Firmware loading failed"
);
...
...
drivers/bluetooth/bpa10x.c
View file @
3f8c6c9c
...
@@ -35,11 +35,6 @@
...
@@ -35,11 +35,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCIBPA10X_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "0.10"
#define VERSION "0.10"
static
struct
usb_device_id
bpa10x_table
[]
=
{
static
struct
usb_device_id
bpa10x_table
[]
=
{
...
@@ -489,6 +484,8 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
...
@@ -489,6 +484,8 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
hdev
->
owner
=
THIS_MODULE
;
hdev
->
owner
=
THIS_MODULE
;
set_bit
(
HCI_QUIRK_NO_RESET
,
&
hdev
->
quirks
);
err
=
hci_register_dev
(
hdev
);
err
=
hci_register_dev
(
hdev
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
hci_free_dev
(
hdev
);
hci_free_dev
(
hdev
);
...
...
drivers/bluetooth/bt3c_cs.c
View file @
3f8c6c9c
...
@@ -502,15 +502,15 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
...
@@ -502,15 +502,15 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
memset
(
b
,
0
,
sizeof
(
b
));
memset
(
b
,
0
,
sizeof
(
b
));
memcpy
(
b
,
ptr
+
2
,
2
);
memcpy
(
b
,
ptr
+
2
,
2
);
size
=
simple_strtol
(
b
,
NULL
,
16
);
size
=
simple_strto
u
l
(
b
,
NULL
,
16
);
memset
(
b
,
0
,
sizeof
(
b
));
memset
(
b
,
0
,
sizeof
(
b
));
memcpy
(
b
,
ptr
+
4
,
8
);
memcpy
(
b
,
ptr
+
4
,
8
);
addr
=
simple_strtol
(
b
,
NULL
,
16
);
addr
=
simple_strto
u
l
(
b
,
NULL
,
16
);
memset
(
b
,
0
,
sizeof
(
b
));
memset
(
b
,
0
,
sizeof
(
b
));
memcpy
(
b
,
ptr
+
(
size
*
2
)
+
2
,
2
);
memcpy
(
b
,
ptr
+
(
size
*
2
)
+
2
,
2
);
fcs
=
simple_strtol
(
b
,
NULL
,
16
);
fcs
=
simple_strto
u
l
(
b
,
NULL
,
16
);
memset
(
b
,
0
,
sizeof
(
b
));
memset
(
b
,
0
,
sizeof
(
b
));
for
(
tmp
=
0
,
i
=
0
;
i
<
size
;
i
++
)
{
for
(
tmp
=
0
,
i
=
0
;
i
<
size
;
i
++
)
{
...
@@ -530,7 +530,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
...
@@ -530,7 +530,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
memset
(
b
,
0
,
sizeof
(
b
));
memset
(
b
,
0
,
sizeof
(
b
));
for
(
i
=
0
;
i
<
(
size
-
4
)
/
2
;
i
++
)
{
for
(
i
=
0
;
i
<
(
size
-
4
)
/
2
;
i
++
)
{
memcpy
(
b
,
ptr
+
(
i
*
4
)
+
12
,
4
);
memcpy
(
b
,
ptr
+
(
i
*
4
)
+
12
,
4
);
tmp
=
simple_strtol
(
b
,
NULL
,
16
);
tmp
=
simple_strto
u
l
(
b
,
NULL
,
16
);
bt3c_put
(
iobase
,
tmp
);
bt3c_put
(
iobase
,
tmp
);
}
}
}
}
...
...
drivers/bluetooth/btsdio.c
View file @
3f8c6c9c
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCIBTSDIO_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "0.1"
#define VERSION "0.1"
static
const
struct
sdio_device_id
btsdio_table
[]
=
{
static
const
struct
sdio_device_id
btsdio_table
[]
=
{
...
@@ -91,6 +86,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
...
@@ -91,6 +86,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
err
=
sdio_writesb
(
data
->
func
,
REG_TDAT
,
skb
->
data
,
skb
->
len
);
err
=
sdio_writesb
(
data
->
func
,
REG_TDAT
,
skb
->
data
,
skb
->
len
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
skb_pull
(
skb
,
4
);
sdio_writeb
(
data
->
func
,
0x01
,
REG_PC_WRT
,
NULL
);
sdio_writeb
(
data
->
func
,
0x01
,
REG_PC_WRT
,
NULL
);
return
err
;
return
err
;
}
}
...
...
drivers/bluetooth/btusb.c
View file @
3f8c6c9c
This diff is collapsed.
Click to expand it.
drivers/bluetooth/hci_bcsp.c
View file @
3f8c6c9c
...
@@ -47,11 +47,6 @@
...
@@ -47,11 +47,6 @@
#include "hci_uart.h"
#include "hci_uart.h"
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
#define VERSION "0.3"
#define VERSION "0.3"
static
int
txcrc
=
1
;
static
int
txcrc
=
1
;
...
...
drivers/bluetooth/hci_h4.c
View file @
3f8c6c9c
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
#include "hci_uart.h"
#include "hci_uart.h"
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
#define VERSION "1.2"
#define VERSION "1.2"
struct
h4_struct
{
struct
h4_struct
{
...
...
drivers/bluetooth/hci_ldisc.c
View file @
3f8c6c9c
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
#include "hci_uart.h"
#include "hci_uart.h"
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
#define VERSION "2.2"
#define VERSION "2.2"
static
int
reset
=
0
;
static
int
reset
=
0
;
...
@@ -399,8 +394,8 @@ static int hci_uart_register_dev(struct hci_uart *hu)
...
@@ -399,8 +394,8 @@ static int hci_uart_register_dev(struct hci_uart *hu)
hdev
->
owner
=
THIS_MODULE
;
hdev
->
owner
=
THIS_MODULE
;
if
(
reset
)
if
(
!
reset
)
set_bit
(
HCI_QUIRK_
RESET_ON_INI
T
,
&
hdev
->
quirks
);
set_bit
(
HCI_QUIRK_
NO_RESE
T
,
&
hdev
->
quirks
);
if
(
hci_register_dev
(
hdev
)
<
0
)
{
if
(
hci_register_dev
(
hdev
)
<
0
)
{
BT_ERR
(
"Can't register HCI device"
);
BT_ERR
(
"Can't register HCI device"
);
...
...
drivers/bluetooth/hci_usb.c
deleted
100644 → 0
View file @
aa2ba5f1
This diff is collapsed.
Click to expand it.
drivers/bluetooth/hci_usb.h
deleted
100644 → 0
View file @
aa2ba5f1
/*
HCI USB driver for Linux Bluetooth protocol stack (BlueZ)
Copyright (C) 2000-2001 Qualcomm Incorporated
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
Copyright (C) 2003 Maxim Krasnyansky <maxk@qualcomm.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
SOFTWARE IS DISCLAIMED.
*/
/* Class, SubClass, and Protocol codes that describe a Bluetooth device */
#define HCI_DEV_CLASS 0xe0
/* Wireless class */
#define HCI_DEV_SUBCLASS 0x01
/* RF subclass */
#define HCI_DEV_PROTOCOL 0x01
/* Bluetooth programming protocol */
#define HCI_IGNORE 0x01
#define HCI_RESET 0x02
#define HCI_DIGIANSWER 0x04
#define HCI_CSR 0x08
#define HCI_SNIFFER 0x10
#define HCI_BCM92035 0x20
#define HCI_BROKEN_ISOC 0x40
#define HCI_WRONG_SCO_MTU 0x80
#define HCI_MAX_IFACE_NUM 3
#define HCI_MAX_BULK_TX 4
#define HCI_MAX_BULK_RX 1
#define HCI_MAX_ISOC_RX 2
#define HCI_MAX_ISOC_TX 2
#define HCI_MAX_ISOC_FRAMES 10
struct
_urb_queue
{
struct
list_head
head
;
spinlock_t
lock
;
};
struct
_urb
{
struct
list_head
list
;
struct
_urb_queue
*
queue
;
int
type
;
void
*
priv
;
struct
urb
urb
;
};
static
inline
void
_urb_queue_init
(
struct
_urb_queue
*
q
)
{
INIT_LIST_HEAD
(
&
q
->
head
);
spin_lock_init
(
&
q
->
lock
);
}
static
inline
void
_urb_queue_head
(
struct
_urb_queue
*
q
,
struct
_urb
*
_urb
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
q
->
lock
,
flags
);
/* _urb_unlink needs to know which spinlock to use, thus smp_mb(). */
_urb
->
queue
=
q
;
smp_mb
();
list_add
(
&
_urb
->
list
,
&
q
->
head
);
spin_unlock_irqrestore
(
&
q
->
lock
,
flags
);
}
static
inline
void
_urb_queue_tail
(
struct
_urb_queue
*
q
,
struct
_urb
*
_urb
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
q
->
lock
,
flags
);
/* _urb_unlink needs to know which spinlock to use, thus smp_mb(). */
_urb
->
queue
=
q
;
smp_mb
();
list_add_tail
(
&
_urb
->
list
,
&
q
->
head
);
spin_unlock_irqrestore
(
&
q
->
lock
,
flags
);
}
static
inline
void
_urb_unlink
(
struct
_urb
*
_urb
)
{
struct
_urb_queue
*
q
;
unsigned
long
flags
;
smp_mb
();
q
=
_urb
->
queue
;
/* If q is NULL, it will die at easy-to-debug NULL pointer dereference.
No need to BUG(). */
spin_lock_irqsave
(
&
q
->
lock
,
flags
);
list_del
(
&
_urb
->
list
);
_urb
->
queue
=
NULL
;
spin_unlock_irqrestore
(
&
q
->
lock
,
flags
);
}
struct
hci_usb
{
struct
hci_dev
*
hdev
;
unsigned
long
state
;
struct
usb_device
*
udev
;
struct
usb_host_endpoint
*
bulk_in_ep
;
struct
usb_host_endpoint
*
bulk_out_ep
;
struct
usb_host_endpoint
*
intr_in_ep
;
struct
usb_interface
*
isoc_iface
;
struct
usb_host_endpoint
*
isoc_out_ep
;
struct
usb_host_endpoint
*
isoc_in_ep
;
__u8
ctrl_req
;
struct
sk_buff_head
transmit_q
[
4
];
rwlock_t
completion_lock
;
atomic_t
pending_tx
[
4
];
/* Number of pending requests */
struct
_urb_queue
pending_q
[
4
];
/* Pending requests */
struct
_urb_queue
completed_q
[
4
];
/* Completed requests */
};
/* States */
#define HCI_USB_TX_PROCESS 1
#define HCI_USB_TX_WAKEUP 2
drivers/bluetooth/hci_vhci.c
View file @
3f8c6c9c
...
@@ -40,11 +40,6 @@
...
@@ -40,11 +40,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCIVHCI_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.2"
#define VERSION "1.2"
static
int
minor
=
MISC_DYNAMIC_MINOR
;
static
int
minor
=
MISC_DYNAMIC_MINOR
;
...
...
include/net/bluetooth/bluetooth.h
View file @
3f8c6c9c
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
#define SOL_RFCOMM 18
#define SOL_RFCOMM 18
#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
#define BT_
DBG(fmt, arg...) printk(KERN_INFO
"%s: " fmt "\n" , __func__ , ## arg)
#define BT_
ERR(fmt, arg...) printk(KERN_ERR
"%s: " fmt "\n" , __func__ , ## arg)
#define BT_
ERR(fmt, arg...) printk(KERN_ERR
"%s: " fmt "\n" , __func__ , ## arg)
#define BT_
DBG(fmt, arg...) pr_debug(
"%s: " fmt "\n" , __func__ , ## arg)
/* Connection and socket states */
/* Connection and socket states */
enum
{
enum
{
...
...
include/net/bluetooth/hci.h
View file @
3f8c6c9c
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
/* HCI device quirks */
/* HCI device quirks */
enum
{
enum
{
HCI_QUIRK_
RESET_ON_INI
T
,
HCI_QUIRK_
NO_RESE
T
,
HCI_QUIRK_RAW_DEVICE
,
HCI_QUIRK_RAW_DEVICE
,
HCI_QUIRK_FIXUP_BUFFER_SIZE
HCI_QUIRK_FIXUP_BUFFER_SIZE
};
};
...
...
net/bluetooth/af_bluetooth.c
View file @
3f8c6c9c
...
@@ -41,18 +41,14 @@
...
@@ -41,18 +41,14 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#ifndef CONFIG_BT_SOCK_DEBUG
#define VERSION "2.14"
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "2.13"
/* Bluetooth sockets */
/* Bluetooth sockets */
#define BT_MAX_PROTO 8
#define BT_MAX_PROTO 8
static
struct
net_proto_family
*
bt_proto
[
BT_MAX_PROTO
];
static
struct
net_proto_family
*
bt_proto
[
BT_MAX_PROTO
];
static
DEFINE_RWLOCK
(
bt_proto_lock
);
static
struct
lock_class_key
bt_slock_key
[
BT_MAX_PROTO
];
#ifdef CONFIG_DEBUG_LOCK_ALLOC
static
struct
lock_class_key
bt_lock_key
[
BT_MAX_PROTO
];
static
struct
lock_class_key
bt_lock_key
[
BT_MAX_PROTO
];
static
const
char
*
bt_key_strings
[
BT_MAX_PROTO
]
=
{
static
const
char
*
bt_key_strings
[
BT_MAX_PROTO
]
=
{
"sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP"
,
"sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP"
,
...
@@ -65,6 +61,7 @@ static const char *bt_key_strings[BT_MAX_PROTO] = {
...
@@ -65,6 +61,7 @@ static const char *bt_key_strings[BT_MAX_PROTO] = {
"sk_lock-AF_BLUETOOTH-BTPROTO_AVDTP"
,
"sk_lock-AF_BLUETOOTH-BTPROTO_AVDTP"
,
};
};
static
struct
lock_class_key
bt_slock_key
[
BT_MAX_PROTO
];
static
const
char
*
bt_slock_key_strings
[
BT_MAX_PROTO
]
=
{
static
const
char
*
bt_slock_key_strings
[
BT_MAX_PROTO
]
=
{
"slock-AF_BLUETOOTH-BTPROTO_L2CAP"
,
"slock-AF_BLUETOOTH-BTPROTO_L2CAP"
,
"slock-AF_BLUETOOTH-BTPROTO_HCI"
,
"slock-AF_BLUETOOTH-BTPROTO_HCI"
,
...
@@ -75,7 +72,25 @@ static const char *bt_slock_key_strings[BT_MAX_PROTO] = {
...
@@ -75,7 +72,25 @@ static const char *bt_slock_key_strings[BT_MAX_PROTO] = {
"slock-AF_BLUETOOTH-BTPROTO_HIDP"
,
"slock-AF_BLUETOOTH-BTPROTO_HIDP"
,
"slock-AF_BLUETOOTH-BTPROTO_AVDTP"
,
"slock-AF_BLUETOOTH-BTPROTO_AVDTP"
,
};
};
static
DEFINE_RWLOCK
(
bt_proto_lock
);
static
inline
void
bt_sock_reclassify_lock
(
struct
socket
*
sock
,
int
proto
)
{
struct
sock
*
sk
=
sock
->
sk
;
if
(
!
sk
)
return
;
BUG_ON
(
sock_owned_by_user
(
sk
));
sock_lock_init_class_and_name
(
sk
,
bt_slock_key_strings
[
proto
],
&
bt_slock_key
[
proto
],
bt_key_strings
[
proto
],
&
bt_lock_key
[
proto
]);
}
#else
static
inline
void
bt_sock_reclassify_lock
(
struct
socket
*
sock
,
int
proto
)
{
}
#endif
int
bt_sock_register
(
int
proto
,
struct
net_proto_family
*
ops
)
int
bt_sock_register
(
int
proto
,
struct
net_proto_family
*
ops
)
{
{
...
@@ -117,21 +132,6 @@ int bt_sock_unregister(int proto)
...
@@ -117,21 +132,6 @@ int bt_sock_unregister(int proto)
}
}
EXPORT_SYMBOL
(
bt_sock_unregister
);
EXPORT_SYMBOL
(
bt_sock_unregister
);
static
void
bt_reclassify_sock_lock
(
struct
socket
*
sock
,
int
proto
)
{
struct
sock
*
sk
=
sock
->
sk
;
if
(
!
sk
)
return
;
BUG_ON
(
sock_owned_by_user
(
sk
));
sock_lock_init_class_and_name
(
sk
,
bt_slock_key_strings
[
proto
],
&
bt_slock_key
[
proto
],
bt_key_strings
[
proto
],
&
bt_lock_key
[
proto
]);
}
static
int
bt_sock_create
(
struct
net
*
net
,
struct
socket
*
sock
,
int
proto
)
static
int
bt_sock_create
(
struct
net
*
net
,
struct
socket
*
sock
,
int
proto
)
{
{
int
err
;
int
err
;
...
@@ -151,7 +151,7 @@ static int bt_sock_create(struct net *net, struct socket *sock, int proto)
...
@@ -151,7 +151,7 @@ static int bt_sock_create(struct net *net, struct socket *sock, int proto)
if
(
bt_proto
[
proto
]
&&
try_module_get
(
bt_proto
[
proto
]
->
owner
))
{
if
(
bt_proto
[
proto
]
&&
try_module_get
(
bt_proto
[
proto
]
->
owner
))
{
err
=
bt_proto
[
proto
]
->
create
(
net
,
sock
,
proto
);
err
=
bt_proto
[
proto
]
->
create
(
net
,
sock
,
proto
);
bt_
reclassify_sock
_lock
(
sock
,
proto
);
bt_
sock_reclassify
_lock
(
sock
,
proto
);
module_put
(
bt_proto
[
proto
]
->
owner
);
module_put
(
bt_proto
[
proto
]
->
owner
);
}
}
...
@@ -240,7 +240,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -240,7 +240,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
size_t
copied
;
size_t
copied
;
int
err
;
int
err
;
BT_DBG
(
"sock %p sk %p len %
d
"
,
sock
,
sk
,
len
);
BT_DBG
(
"sock %p sk %p len %
zu
"
,
sock
,
sk
,
len
);
if
(
flags
&
(
MSG_OOB
))
if
(
flags
&
(
MSG_OOB
))
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
...
...
net/bluetooth/bnep/bnep.h
View file @
3f8c6c9c
...
@@ -161,7 +161,7 @@ struct bnep_session {
...
@@ -161,7 +161,7 @@ struct bnep_session {
struct
msghdr
msg
;
struct
msghdr
msg
;
struct
bnep_proto_filter
proto_filter
[
BNEP_MAX_PROTO_FILTERS
];
struct
bnep_proto_filter
proto_filter
[
BNEP_MAX_PROTO_FILTERS
];
u
64
mc_filter
;
u
nsigned
long
long
mc_filter
;
struct
socket
*
sock
;
struct
socket
*
sock
;
struct
net_device
*
dev
;
struct
net_device
*
dev
;
...
...
net/bluetooth/bnep/core.c
View file @
3f8c6c9c
...
@@ -52,11 +52,6 @@
...
@@ -52,11 +52,6 @@
#include "bnep.h"
#include "bnep.h"
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.3"
#define VERSION "1.3"
static
int
compress_src
=
1
;
static
int
compress_src
=
1
;
...
...
net/bluetooth/bnep/netdev.c
View file @
3f8c6c9c
...
@@ -41,11 +41,6 @@
...
@@ -41,11 +41,6 @@
#include "bnep.h"
#include "bnep.h"
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
#define BNEP_TX_QUEUE_LEN 20
#define BNEP_TX_QUEUE_LEN 20
static
int
bnep_net_open
(
struct
net_device
*
dev
)
static
int
bnep_net_open
(
struct
net_device
*
dev
)
...
...
net/bluetooth/bnep/sock.c
View file @
3f8c6c9c
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
#include "bnep.h"
#include "bnep.h"
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
static
int
bnep_sock_release
(
struct
socket
*
sock
)
static
int
bnep_sock_release
(
struct
socket
*
sock
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
...
net/bluetooth/cmtp/capi.c
View file @
3f8c6c9c
...
@@ -42,11 +42,6 @@
...
@@ -42,11 +42,6 @@
#include "cmtp.h"
#include "cmtp.h"
#ifndef CONFIG_BT_CMTP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define CAPI_INTEROPERABILITY 0x20
#define CAPI_INTEROPERABILITY 0x20
#define CAPI_INTEROPERABILITY_REQ CAPICMD(CAPI_INTEROPERABILITY, CAPI_REQ)
#define CAPI_INTEROPERABILITY_REQ CAPICMD(CAPI_INTEROPERABILITY, CAPI_REQ)
...
...
net/bluetooth/cmtp/core.c
View file @
3f8c6c9c
...
@@ -44,11 +44,6 @@
...
@@ -44,11 +44,6 @@
#include "cmtp.h"
#include "cmtp.h"
#ifndef CONFIG_BT_CMTP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.0"
#define VERSION "1.0"
static
DECLARE_RWSEM
(
cmtp_session_sem
);
static
DECLARE_RWSEM
(
cmtp_session_sem
);
...
...
net/bluetooth/cmtp/sock.c
View file @
3f8c6c9c
...
@@ -43,11 +43,6 @@
...
@@ -43,11 +43,6 @@
#include "cmtp.h"
#include "cmtp.h"
#ifndef CONFIG_BT_CMTP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
static
int
cmtp_sock_release
(
struct
socket
*
sock
)
static
int
cmtp_sock_release
(
struct
socket
*
sock
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
...
net/bluetooth/hci_conn.c
View file @
3f8c6c9c
...
@@ -45,11 +45,6 @@
...
@@ -45,11 +45,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
void
hci_acl_connect
(
struct
hci_conn
*
conn
)
void
hci_acl_connect
(
struct
hci_conn
*
conn
)
{
{
struct
hci_dev
*
hdev
=
conn
->
hdev
;
struct
hci_dev
*
hdev
=
conn
->
hdev
;
...
...
net/bluetooth/hci_core.c
View file @
3f8c6c9c
...
@@ -48,11 +48,6 @@
...
@@ -48,11 +48,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
static
void
hci_cmd_task
(
unsigned
long
arg
);
static
void
hci_cmd_task
(
unsigned
long
arg
);
static
void
hci_rx_task
(
unsigned
long
arg
);
static
void
hci_rx_task
(
unsigned
long
arg
);
static
void
hci_tx_task
(
unsigned
long
arg
);
static
void
hci_tx_task
(
unsigned
long
arg
);
...
@@ -205,7 +200,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
...
@@ -205,7 +200,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
/* Mandatory initialization */
/* Mandatory initialization */
/* Reset */
/* Reset */
if
(
test_bit
(
HCI_QUIRK_RESET_ON_INI
T
,
&
hdev
->
quirks
))
if
(
!
test_bit
(
HCI_QUIRK_NO_RESE
T
,
&
hdev
->
quirks
))
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
/* Read Local Supported Features */
/* Read Local Supported Features */
...
@@ -290,7 +285,7 @@ static void hci_linkpol_req(struct hci_dev *hdev, unsigned long opt)
...
@@ -290,7 +285,7 @@ static void hci_linkpol_req(struct hci_dev *hdev, unsigned long opt)
{
{
__le16
policy
=
cpu_to_le16
(
opt
);
__le16
policy
=
cpu_to_le16
(
opt
);
BT_DBG
(
"%s %x"
,
hdev
->
name
,
opt
);
BT_DBG
(
"%s %x"
,
hdev
->
name
,
policy
);
/* Default link policy */
/* Default link policy */
hci_send_cmd
(
hdev
,
HCI_OP_WRITE_DEF_LINK_POLICY
,
2
,
&
policy
);
hci_send_cmd
(
hdev
,
HCI_OP_WRITE_DEF_LINK_POLICY
,
2
,
&
policy
);
...
@@ -756,7 +751,7 @@ int hci_get_dev_list(void __user *arg)
...
@@ -756,7 +751,7 @@ int hci_get_dev_list(void __user *arg)
size
=
sizeof
(
*
dl
)
+
dev_num
*
sizeof
(
*
dr
);
size
=
sizeof
(
*
dl
)
+
dev_num
*
sizeof
(
*
dr
);
if
(
!
(
dl
=
k
m
alloc
(
size
,
GFP_KERNEL
)))
if
(
!
(
dl
=
k
z
alloc
(
size
,
GFP_KERNEL
)))
return
-
ENOMEM
;
return
-
ENOMEM
;
dr
=
dl
->
dev_req
;
dr
=
dl
->
dev_req
;
...
...
net/bluetooth/hci_event.c
View file @
3f8c6c9c
...
@@ -45,11 +45,6 @@
...
@@ -45,11 +45,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
/* Handle HCI Event packets */
/* Handle HCI Event packets */
static
void
hci_cc_inquiry_cancel
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
static
void
hci_cc_inquiry_cancel
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
...
...
net/bluetooth/hci_sock.c
View file @
3f8c6c9c
...
@@ -49,11 +49,6 @@
...
@@ -49,11 +49,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCI_SOCK_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
/* ----- HCI socket interface ----- */
/* ----- HCI socket interface ----- */
static
inline
int
hci_test_bit
(
int
nr
,
void
*
addr
)
static
inline
int
hci_test_bit
(
int
nr
,
void
*
addr
)
...
...
net/bluetooth/hci_sysfs.c
View file @
3f8c6c9c
...
@@ -6,11 +6,6 @@
...
@@ -6,11 +6,6 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
struct
class
*
bt_class
=
NULL
;
struct
class
*
bt_class
=
NULL
;
EXPORT_SYMBOL_GPL
(
bt_class
);
EXPORT_SYMBOL_GPL
(
bt_class
);
...
@@ -420,7 +415,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
...
@@ -420,7 +415,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
dev
->
class
=
bt_class
;
dev
->
class
=
bt_class
;
dev
->
parent
=
hdev
->
parent
;
dev
->
parent
=
hdev
->
parent
;
dev_set_name
(
dev
,
hdev
->
name
);
dev_set_name
(
dev
,
"%s"
,
hdev
->
name
);
dev_set_drvdata
(
dev
,
hdev
);
dev_set_drvdata
(
dev
,
hdev
);
...
...
net/bluetooth/hidp/core.c
View file @
3f8c6c9c
...
@@ -47,11 +47,6 @@
...
@@ -47,11 +47,6 @@
#include "hidp.h"
#include "hidp.h"
#ifndef CONFIG_BT_HIDP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.2"
#define VERSION "1.2"
static
DECLARE_RWSEM
(
hidp_session_sem
);
static
DECLARE_RWSEM
(
hidp_session_sem
);
...
...
net/bluetooth/hidp/sock.c
View file @
3f8c6c9c
...
@@ -39,11 +39,6 @@
...
@@ -39,11 +39,6 @@
#include "hidp.h"
#include "hidp.h"
#ifndef CONFIG_BT_HIDP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
static
int
hidp_sock_release
(
struct
socket
*
sock
)
static
int
hidp_sock_release
(
struct
socket
*
sock
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
...
net/bluetooth/l2cap.c
View file @
3f8c6c9c
...
@@ -50,11 +50,6 @@
...
@@ -50,11 +50,6 @@
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/l2cap.h>
#ifndef CONFIG_BT_L2CAP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "2.11"
#define VERSION "2.11"
static
u32
l2cap_feat_mask
=
0x0000
;
static
u32
l2cap_feat_mask
=
0x0000
;
...
...
net/bluetooth/rfcomm/core.c
View file @
3f8c6c9c
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/rfcomm.h>
#include <net/bluetooth/rfcomm.h>
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "1.10"
#define VERSION "1.10"
static
int
disable_cfc
=
0
;
static
int
disable_cfc
=
0
;
...
...
net/bluetooth/rfcomm/sock.c
View file @
3f8c6c9c
...
@@ -50,11 +50,6 @@
...
@@ -50,11 +50,6 @@
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/rfcomm.h>
#include <net/bluetooth/rfcomm.h>
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
static
const
struct
proto_ops
rfcomm_sock_ops
;
static
const
struct
proto_ops
rfcomm_sock_ops
;
static
struct
bt_sock_list
rfcomm_sk_list
=
{
static
struct
bt_sock_list
rfcomm_sk_list
=
{
...
@@ -644,7 +639,7 @@ static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -644,7 +639,7 @@ static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
msg
->
msg_namelen
=
0
;
msg
->
msg_namelen
=
0
;
BT_DBG
(
"sk %p size %
d
"
,
sk
,
size
);
BT_DBG
(
"sk %p size %
zu
"
,
sk
,
size
);
lock_sock
(
sk
);
lock_sock
(
sk
);
...
...
net/bluetooth/rfcomm/tty.c
View file @
3f8c6c9c
...
@@ -39,11 +39,6 @@
...
@@ -39,11 +39,6 @@
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/rfcomm.h>
#include <net/bluetooth/rfcomm.h>
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define RFCOMM_TTY_MAGIC 0x6d02
/* magic number for rfcomm struct */
#define RFCOMM_TTY_MAGIC 0x6d02
/* magic number for rfcomm struct */
#define RFCOMM_TTY_PORTS RFCOMM_MAX_DEV
/* whole lotta rfcomm devices */
#define RFCOMM_TTY_PORTS RFCOMM_MAX_DEV
/* whole lotta rfcomm devices */
#define RFCOMM_TTY_MAJOR 216
/* device node major id of the usb/bluetooth.c driver */
#define RFCOMM_TTY_MAJOR 216
/* device node major id of the usb/bluetooth.c driver */
...
@@ -58,7 +53,7 @@ struct rfcomm_dev {
...
@@ -58,7 +53,7 @@ struct rfcomm_dev {
char
name
[
12
];
char
name
[
12
];
int
id
;
int
id
;
unsigned
long
flags
;
unsigned
long
flags
;
int
opened
;
atomic_t
opened
;
int
err
;
int
err
;
bdaddr_t
src
;
bdaddr_t
src
;
...
@@ -261,6 +256,8 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
...
@@ -261,6 +256,8 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
dev
->
flags
=
req
->
flags
&
dev
->
flags
=
req
->
flags
&
((
1
<<
RFCOMM_RELEASE_ONHUP
)
|
(
1
<<
RFCOMM_REUSE_DLC
));
((
1
<<
RFCOMM_RELEASE_ONHUP
)
|
(
1
<<
RFCOMM_REUSE_DLC
));
atomic_set
(
&
dev
->
opened
,
0
);
init_waitqueue_head
(
&
dev
->
wait
);
init_waitqueue_head
(
&
dev
->
wait
);
tasklet_init
(
&
dev
->
wakeup_task
,
rfcomm_tty_wakeup
,
(
unsigned
long
)
dev
);
tasklet_init
(
&
dev
->
wakeup_task
,
rfcomm_tty_wakeup
,
(
unsigned
long
)
dev
);
...
@@ -330,10 +327,10 @@ static void rfcomm_dev_del(struct rfcomm_dev *dev)
...
@@ -330,10 +327,10 @@ static void rfcomm_dev_del(struct rfcomm_dev *dev)
{
{
BT_DBG
(
"dev %p"
,
dev
);
BT_DBG
(
"dev %p"
,
dev
);
if
(
test_bit
(
RFCOMM_TTY_RELEASED
,
&
dev
->
flags
))
BUG_ON
(
test_and_set_bit
(
RFCOMM_TTY_RELEASED
,
&
dev
->
flags
));
BUG_ON
(
1
);
else
if
(
atomic_read
(
&
dev
->
opened
)
>
0
)
set_bit
(
RFCOMM_TTY_RELEASED
,
&
dev
->
flags
)
;
return
;
write_lock_bh
(
&
rfcomm_dev_lock
);
write_lock_bh
(
&
rfcomm_dev_lock
);
list_del_init
(
&
dev
->
list
);
list_del_init
(
&
dev
->
list
);
...
@@ -689,9 +686,10 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
...
@@ -689,9 +686,10 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
if
(
!
dev
)
if
(
!
dev
)
return
-
ENODEV
;
return
-
ENODEV
;
BT_DBG
(
"dev %p dst %s channel %d opened %d"
,
dev
,
batostr
(
&
dev
->
dst
),
dev
->
channel
,
dev
->
opened
);
BT_DBG
(
"dev %p dst %s channel %d opened %d"
,
dev
,
batostr
(
&
dev
->
dst
),
dev
->
channel
,
atomic_read
(
&
dev
->
opened
));
if
(
dev
->
opened
++
!=
0
)
if
(
atomic_inc_return
(
&
dev
->
opened
)
>
1
)
return
0
;
return
0
;
dlc
=
dev
->
dlc
;
dlc
=
dev
->
dlc
;
...
@@ -747,9 +745,10 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
...
@@ -747,9 +745,10 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
if
(
!
dev
)
if
(
!
dev
)
return
;
return
;
BT_DBG
(
"tty %p dev %p dlc %p opened %d"
,
tty
,
dev
,
dev
->
dlc
,
dev
->
opened
);
BT_DBG
(
"tty %p dev %p dlc %p opened %d"
,
tty
,
dev
,
dev
->
dlc
,
atomic_read
(
&
dev
->
opened
));
if
(
--
dev
->
opened
==
0
)
{
if
(
atomic_dec_and_test
(
&
dev
->
opened
)
)
{
if
(
dev
->
tty_dev
->
parent
)
if
(
dev
->
tty_dev
->
parent
)
device_move
(
dev
->
tty_dev
,
NULL
);
device_move
(
dev
->
tty_dev
,
NULL
);
...
@@ -763,6 +762,14 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
...
@@ -763,6 +762,14 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
tty
->
driver_data
=
NULL
;
tty
->
driver_data
=
NULL
;
dev
->
tty
=
NULL
;
dev
->
tty
=
NULL
;
rfcomm_dlc_unlock
(
dev
->
dlc
);
rfcomm_dlc_unlock
(
dev
->
dlc
);
if
(
test_bit
(
RFCOMM_TTY_RELEASED
,
&
dev
->
flags
))
{
write_lock_bh
(
&
rfcomm_dev_lock
);
list_del_init
(
&
dev
->
list
);
write_unlock_bh
(
&
rfcomm_dev_lock
);
rfcomm_dev_put
(
dev
);
}
}
}
rfcomm_dev_put
(
dev
);
rfcomm_dev_put
(
dev
);
...
...
net/bluetooth/sco.c
View file @
3f8c6c9c
...
@@ -48,11 +48,6 @@
...
@@ -48,11 +48,6 @@
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/sco.h>
#include <net/bluetooth/sco.h>
#ifndef CONFIG_BT_SCO_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
#define VERSION "0.6"
#define VERSION "0.6"
static
int
disable_esco
=
0
;
static
int
disable_esco
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment