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
10632c9e
Commit
10632c9e
authored
Oct 29, 2002
by
Marcel Holtmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/ua/repos/l/linux-bt/bt-2.5
parents
5e5ac463
25d73f23
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
79 additions
and
53 deletions
+79
-53
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_bcsp.c
+7
-1
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_h4.c
+7
-1
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_ldisc.c
+4
-5
drivers/bluetooth/hci_uart.h
drivers/bluetooth/hci_uart.h
+1
-1
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+1
-3
drivers/bluetooth/hci_vhci.c
drivers/bluetooth/hci_vhci.c
+1
-3
include/net/bluetooth/bluetooth.h
include/net/bluetooth/bluetooth.h
+1
-1
net/bluetooth/af_bluetooth.c
net/bluetooth/af_bluetooth.c
+4
-4
net/bluetooth/bnep/core.c
net/bluetooth/bnep/core.c
+18
-11
net/bluetooth/hci_sock.c
net/bluetooth/hci_sock.c
+5
-2
net/bluetooth/l2cap.c
net/bluetooth/l2cap.c
+7
-6
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+2
-3
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+3
-2
net/bluetooth/rfcomm/tty.c
net/bluetooth/rfcomm/tty.c
+11
-4
net/bluetooth/sco.c
net/bluetooth/sco.c
+7
-6
No files found.
drivers/bluetooth/hci_bcsp.c
View file @
10632c9e
...
...
@@ -701,7 +701,13 @@ static struct hci_uart_proto bcsp = {
int
bcsp_init
(
void
)
{
return
hci_uart_register_proto
(
&
bcsp
);
int
err
=
hci_uart_register_proto
(
&
bcsp
);
if
(
!
err
)
BT_INFO
(
"HCI BCSP protocol initialized"
);
else
BT_ERR
(
"HCI BCSP protocol registration failed"
);
return
err
;
}
int
bcsp_deinit
(
void
)
...
...
drivers/bluetooth/hci_h4.c
View file @
10632c9e
...
...
@@ -269,7 +269,13 @@ static struct hci_uart_proto h4p = {
int
h4_init
(
void
)
{
return
hci_uart_register_proto
(
&
h4p
);
int
err
=
hci_uart_register_proto
(
&
h4p
);
if
(
!
err
)
BT_INFO
(
"HCI H4 protocol initialized"
);
else
BT_ERR
(
"HCI H4 protocol registration failed"
);
return
err
;
}
int
h4_deinit
(
void
)
...
...
drivers/bluetooth/hci_ldisc.c
View file @
10632c9e
...
...
@@ -344,6 +344,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
if
(
tty
!=
hu
->
tty
)
return
;
if
(
test_bit
(
HCI_UART_PROTO_SET
,
&
hu
->
flags
))
hci_uart_tx_wakeup
(
hu
);
}
...
...
@@ -521,9 +522,7 @@ int __init hci_uart_init(void)
static
struct
tty_ldisc
hci_uart_ldisc
;
int
err
;
BT_INFO
(
"Bluetooth HCI UART driver ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"HCI UART driver ver %s"
,
VERSION
);
/* Register the tty discipline */
...
...
@@ -541,7 +540,7 @@ int __init hci_uart_init(void)
hci_uart_ldisc
.
write_wakeup
=
hci_uart_tty_wakeup
;
if
((
err
=
tty_register_ldisc
(
N_HCI
,
&
hci_uart_ldisc
)))
{
BT_ERR
(
"
Can't register HCI line discipline
(%d)"
,
err
);
BT_ERR
(
"
HCI line discipline registration failed.
(%d)"
,
err
);
return
err
;
}
...
...
drivers/bluetooth/hci_uart.h
View file @
10632c9e
...
...
@@ -68,7 +68,7 @@ struct hci_uart {
};
/* HCI_UART flag bits */
#define HCI_UART_PROTO_SET 0
x00
#define HCI_UART_PROTO_SET 0
/* TX states */
#define HCI_UART_SENDING 1
...
...
drivers/bluetooth/hci_usb.c
View file @
10632c9e
...
...
@@ -805,9 +805,7 @@ int hci_usb_init(void)
{
int
err
;
BT_INFO
(
"Bluetooth HCI USB driver ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"HCI USB driver ver %s"
,
VERSION
);
if
((
err
=
usb_register
(
&
hci_usb_driver
))
<
0
)
BT_ERR
(
"Failed to register HCI USB driver"
);
...
...
drivers/bluetooth/hci_vhci.c
View file @
10632c9e
...
...
@@ -331,9 +331,7 @@ static struct miscdevice hci_vhci_miscdev=
int
__init
hci_vhci_init
(
void
)
{
BT_INFO
(
"Bluetooth VHCI driver ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"VHCI driver ver %s"
,
VERSION
);
if
(
misc_register
(
&
hci_vhci_miscdev
))
{
BT_ERR
(
"Can't register misc device %d
\n
"
,
VHCI_MINOR
);
...
...
include/net/bluetooth/bluetooth.h
View file @
10632c9e
...
...
@@ -53,7 +53,7 @@
#define SOL_SCO 17
#define SOL_RFCOMM 18
#define BT_INFO(fmt, arg...) printk(KERN_INFO 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" , __FUNCTION__ , ## arg)
#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg)
...
...
net/bluetooth/af_bluetooth.c
View file @
10632c9e
...
...
@@ -326,9 +326,7 @@ extern int hci_sock_cleanup(void);
static
int
__init
bt_init
(
void
)
{
BT_INFO
(
"Bluetooth Core ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"Core ver %s"
,
VERSION
);
proc_mkdir
(
"bluetooth"
,
NULL
);
...
...
@@ -338,12 +336,14 @@ static int __init bt_init(void)
SLAB_HWCACHE_ALIGN
,
0
,
0
);
if
(
!
bt_sock_cache
)
{
BT_ERR
(
"
Bluetooth s
ocket cache creation failed"
);
BT_ERR
(
"
S
ocket cache creation failed"
);
return
-
ENOMEM
;
}
sock_register
(
&
bt_sock_family_ops
);
BT_INFO
(
"HCI device and connection manager initialized"
);
hci_sock_init
();
return
0
;
}
...
...
net/bluetooth/bnep/core.c
View file @
10632c9e
...
...
@@ -561,6 +561,8 @@ int bnep_add_connection(struct bnep_conadd_req *req, struct socket *sock)
else
strcpy
(
dev
->
name
,
"bnep%d"
);
memset
(
dev
->
broadcast
,
0xff
,
ETH_ALEN
);
/* This is rx header therefor addresses are swaped.
* ie eh.h_dest is our local address. */
memcpy
(
s
->
eh
.
h_dest
,
&
src
,
ETH_ALEN
);
...
...
@@ -702,16 +704,21 @@ int bnep_get_coninfo(struct bnep_coninfo *ci)
static
int
__init
bnep_init_module
(
void
)
{
BT_INFO
(
"BNEP: BNEP2 ver %s
\n
"
"BNEP: Copyright (C) 2002 Inventel
\n
"
"BNEP: Written 2001,2002 by
\n
"
"BNEP:
\t
Clement Moreau <clement.moreau@inventel.fr> "
"David Libault <david.libault@inventel.fr>
\n
"
"BNEP: Copyright (C) 2002 Maxim Krasnyanskiy <maxk@qualcomm.com>"
,
VERSION
);
char
flt
[
50
]
=
""
;
bnep_sock_init
();
#ifdef CONFIG_BT_BNEP_PROTO_FILTER
strcat
(
flt
,
"protocol "
);
#endif
#ifdef CONFIG_BT_BNEP_MC_FILTER
strcat
(
flt
,
"multicast"
);
#endif
BT_INFO
(
"BNEP (Ethernet Emulation) ver %s"
,
VERSION
);
if
(
flt
[
0
])
BT_INFO
(
"BNEP filters: %s"
,
flt
);
bnep_sock_init
();
return
0
;
}
...
...
@@ -723,6 +730,6 @@ static void __exit bnep_cleanup_module(void)
module_init
(
bnep_init_module
);
module_exit
(
bnep_cleanup_module
);
MODULE_DESCRIPTION
(
"BNEP ver "
VERSION
);
MODULE_AUTHOR
(
"David Libault <david.libault@inventel.fr> Maxim Krasnyanskiy <maxk@qualcomm.com>"
);
MODULE_DESCRIPTION
(
"B
luetooth B
NEP ver "
VERSION
);
MODULE_AUTHOR
(
"David Libault <david.libault@inventel.fr>
,
Maxim Krasnyanskiy <maxk@qualcomm.com>"
);
MODULE_LICENSE
(
"GPL"
);
net/bluetooth/hci_sock.c
View file @
10632c9e
...
...
@@ -628,18 +628,21 @@ struct notifier_block hci_sock_nblock = {
int
hci_sock_init
(
void
)
{
if
(
bt_sock_register
(
BTPROTO_HCI
,
&
hci_sock_family_ops
))
{
BT_ERR
(
"
Can't register HCI socket
"
);
BT_ERR
(
"
HCI socket registration failed
"
);
return
-
EPROTO
;
}
hci_register_notifier
(
&
hci_sock_nblock
);
BT_INFO
(
"HCI socket layer initialized"
);
return
0
;
}
int
hci_sock_cleanup
(
void
)
{
if
(
bt_sock_unregister
(
BTPROTO_HCI
))
BT_ERR
(
"
Can't unregister HCI socket
"
);
BT_ERR
(
"
HCI socket unregistration failed
"
);
hci_unregister_notifier
(
&
hci_sock_nblock
);
return
0
;
...
...
net/bluetooth/l2cap.c
View file @
10632c9e
...
...
@@ -2079,19 +2079,20 @@ int __init l2cap_init(void)
int
err
;
if
((
err
=
bt_sock_register
(
BTPROTO_L2CAP
,
&
l2cap_sock_family_ops
)))
{
BT_ERR
(
"
Can't register L2CAP socket
"
);
BT_ERR
(
"
L2CAP socket registration failed
"
);
return
err
;
}
if
((
err
=
hci_register_proto
(
&
l2cap_hci_proto
)))
{
BT_ERR
(
"
Can't register L2CAP protocol
"
);
BT_ERR
(
"
L2CAP protocol registration failed
"
);
return
err
;
}
create_proc_read_entry
(
"bluetooth/l2cap"
,
0
,
0
,
l2cap_read_proc
,
NULL
);
BT_INFO
(
"Bluetooth L2CAP ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"L2CAP ver %s"
,
VERSION
);
BT_INFO
(
"L2CAP socket layer initialized"
);
return
0
;
}
...
...
@@ -2101,10 +2102,10 @@ void l2cap_cleanup(void)
/* Unregister socket and protocol */
if
(
bt_sock_unregister
(
BTPROTO_L2CAP
))
BT_ERR
(
"
Can't unregister L2CAP socket
"
);
BT_ERR
(
"
L2CAP socket unregistration failed
"
);
if
(
hci_unregister_proto
(
&
l2cap_hci_proto
))
BT_ERR
(
"
Can't unregister L2CAP protocol
"
);
BT_ERR
(
"
L2CAP protocol unregistration failed
"
);
}
module_init
(
l2cap_init
);
...
...
net/bluetooth/rfcomm/core.c
View file @
10632c9e
...
...
@@ -1783,6 +1783,8 @@ int __init rfcomm_init(void)
{
kernel_thread
(
rfcomm_run
,
NULL
,
CLONE_FS
|
CLONE_FILES
|
CLONE_SIGHAND
);
BT_INFO
(
"RFCOMM ver %s"
,
VERSION
);
rfcomm_init_sockets
();
#ifdef CONFIG_BT_RFCOMM_TTY
...
...
@@ -1791,9 +1793,6 @@ int __init rfcomm_init(void)
create_proc_read_entry
(
"bluetooth/rfcomm"
,
0
,
0
,
rfcomm_read_proc
,
NULL
);
BT_INFO
(
"Bluetooth RFCOMM ver %s"
,
VERSION
);
BT_INFO
(
"Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>"
);
return
0
;
}
...
...
net/bluetooth/rfcomm/sock.c
View file @
10632c9e
...
...
@@ -822,10 +822,11 @@ int rfcomm_init_sockets(void)
int
err
;
if
((
err
=
bt_sock_register
(
BTPROTO_RFCOMM
,
&
rfcomm_sock_family_ops
)))
{
BT_ERR
(
"
Can't register RFCOMM socket layer"
);
BT_ERR
(
"
RFCOMM socket layer registration failed. %d"
,
err
);
return
err
;
}
BT_INFO
(
"RFCOMM socket layer initialized"
);
return
0
;
}
...
...
@@ -835,5 +836,5 @@ void rfcomm_cleanup_sockets(void)
/* Unregister socket, protocol and notifier */
if
((
err
=
bt_sock_unregister
(
BTPROTO_RFCOMM
)))
BT_ERR
(
"
Can't unregister RFCOMM socket layer
%d"
,
err
);
BT_ERR
(
"
RFCOMM socket layer unregistration failed.
%d"
,
err
);
}
net/bluetooth/rfcomm/tty.c
View file @
10632c9e
...
...
@@ -500,10 +500,10 @@ static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
BT_DBG
(
"dlc %p dev %p v24_sig 0x%02x"
,
dlc
,
dev
,
v24_sig
);
dev
->
modem_status
=
(
v24_sig
&
RFCOMM_V24_RTC
)
?
(
TIOCM_DSR
|
TIOCM_DTR
)
:
0
|
(
v24_sig
&
RFCOMM_V24_RTR
)
?
(
TIOCM_RTS
|
TIOCM_CTS
)
:
0
|
(
v24_sig
&
RFCOMM_V24_IC
)
?
TIOCM_RI
:
0
|
(
v24_sig
&
RFCOMM_V24_DV
)
?
TIOCM_CD
:
0
;
(
(
v24_sig
&
RFCOMM_V24_RTC
)
?
(
TIOCM_DSR
|
TIOCM_DTR
)
:
0
)
|
(
(
v24_sig
&
RFCOMM_V24_RTR
)
?
(
TIOCM_RTS
|
TIOCM_CTS
)
:
0
)
|
(
(
v24_sig
&
RFCOMM_V24_IC
)
?
TIOCM_RI
:
0
)
|
(
(
v24_sig
&
RFCOMM_V24_DV
)
?
TIOCM_CD
:
0
)
;
}
/* ---- TTY functions ---- */
...
...
@@ -572,6 +572,11 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
if
(
dlc
->
state
==
BT_CONNECTED
)
break
;
if
(
signal_pending
(
current
))
{
err
=
-
EINTR
;
break
;
}
schedule
();
}
set_current_state
(
TASK_RUNNING
);
...
...
@@ -899,6 +904,8 @@ int rfcomm_init_ttys(void)
return
-
1
;
}
BT_INFO
(
"RFCOMM TTY layer initialized"
);
return
0
;
}
...
...
net/bluetooth/sco.c
View file @
10632c9e
...
...
@@ -969,19 +969,20 @@ int __init sco_init(void)
int
err
;
if
((
err
=
bt_sock_register
(
BTPROTO_SCO
,
&
sco_sock_family_ops
)))
{
BT_ERR
(
"
Can't register SCO socket layer
"
);
BT_ERR
(
"
SCO socket registration failed
"
);
return
err
;
}
if
((
err
=
hci_register_proto
(
&
sco_hci_proto
)))
{
BT_ERR
(
"
Can't register SCO protocol
"
);
BT_ERR
(
"
SCO protocol registration failed
"
);
return
err
;
}
create_proc_read_entry
(
"bluetooth/sco"
,
0
,
0
,
sco_read_proc
,
NULL
);
BT_INFO
(
"Bluetooth SCO ver %s Copyright (C) 2000,2001 Qualcomm Inc"
,
VERSION
);
BT_INFO
(
"Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"
);
BT_INFO
(
"SCO (Voice Link) ver %s"
,
VERSION
);
BT_INFO
(
"SCO socket layer initialized"
);
return
0
;
}
...
...
@@ -993,10 +994,10 @@ void sco_cleanup(void)
/* Unregister socket, protocol and notifier */
if
((
err
=
bt_sock_unregister
(
BTPROTO_SCO
)))
BT_ERR
(
"
Can't unregister SCO socket layer
%d"
,
err
);
BT_ERR
(
"
SCO socket unregistration failed.
%d"
,
err
);
if
((
err
=
hci_unregister_proto
(
&
sco_hci_proto
)))
BT_ERR
(
"
Can't unregister SCO protocol
%d"
,
err
);
BT_ERR
(
"
SCO protocol unregistration failed.
%d"
,
err
);
}
module_init
(
sco_init
);
...
...
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