Commit 6e3fccfc authored by David S. Miller's avatar David S. Miller

Merge http://linux-mh.bkbits.net/bluetooth-2.6

into kernel.bkbits.net:/home/davem/bluetooth-2.6
parents c517cfc4 130a7545
...@@ -359,6 +359,8 @@ P: Maxim Krasnyansky ...@@ -359,6 +359,8 @@ P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
L: bluez-devel@lists.sf.net L: bluez-devel@lists.sf.net
W: http://bluez.sf.net W: http://bluez.sf.net
W: http://www.bluez.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH RFCOMM LAYER BLUETOOTH RFCOMM LAYER
...@@ -366,7 +368,6 @@ P: Marcel Holtmann ...@@ -366,7 +368,6 @@ P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
P: Maxim Krasnyansky P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
W: http://bluez.sf.net
S: Maintained S: Maintained
BLUETOOTH BNEP LAYER BLUETOOTH BNEP LAYER
...@@ -374,71 +375,60 @@ P: Marcel Holtmann ...@@ -374,71 +375,60 @@ P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
P: Maxim Krasnyansky P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
W: http://bluez.sf.net
S: Maintained S: Maintained
BLUETOOTH CMTP LAYER BLUETOOTH CMTP LAYER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI USB DRIVER BLUETOOTH HCI UART DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
P: Maxim Krasnyansky P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
W: http://bluez.sf.net
S: Maintained S: Maintained
BLUETOOTH HCI UART DRIVER BLUETOOTH HCI USB DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
P: Maxim Krasnyansky P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
W: http://bluez.sf.net
S: Maintained S: Maintained
BLUETOOTH HCI BCM203X DRIVER BLUETOOTH HCI BCM203X DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI BFUSB DRIVER BLUETOOTH HCI BFUSB DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI DTL1 DRIVER BLUETOOTH HCI DTL1 DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI BLUECARD DRIVER BLUETOOTH HCI BLUECARD DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI BT3C DRIVER BLUETOOTH HCI BT3C DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI BTUART DRIVER BLUETOOTH HCI BTUART DRIVER
P: Marcel Holtmann P: Marcel Holtmann
M: marcel@holtmann.org M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BLUETOOTH HCI VHCI DRIVER BLUETOOTH HCI VHCI DRIVER
P: Maxim Krasnyansky P: Maxim Krasnyansky
M: maxk@qualcomm.com M: maxk@qualcomm.com
W: http://bluez.sf.net
S: Maintained S: Maintained
BONDING DRIVER BONDING DRIVER
......
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
* Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com> * Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (c) 2000 Mark Douglas Corner <mcorner@umich.edu> * Copyright (c) 2000 Mark Douglas Corner <mcorner@umich.edu>
* *
* $Id: hci_usb.c,v 1.8 2002/07/18 17:23:09 maxk Exp $
*/ */
#define VERSION "2.5"
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -57,9 +55,9 @@ ...@@ -57,9 +55,9 @@
#ifndef CONFIG_BT_HCIUSB_DEBUG #ifndef CONFIG_BT_HCIUSB_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#undef BT_DMP #undef BT_DMP
#define BT_DMP( A... ) #define BT_DMP(D...)
#endif #endif
#ifndef CONFIG_BT_HCIUSB_ZERO_PACKET #ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
...@@ -67,6 +65,8 @@ ...@@ -67,6 +65,8 @@
#define URB_ZERO_PACKET 0 #define URB_ZERO_PACKET 0
#endif #endif
#define VERSION "2.6"
static struct usb_driver hci_usb_driver; static struct usb_driver hci_usb_driver;
static struct usb_device_id bluetooth_ids[] = { static struct usb_device_id bluetooth_ids[] = {
...@@ -100,6 +100,9 @@ static struct usb_device_id blacklist_ids[] = { ...@@ -100,6 +100,9 @@ static struct usb_device_id blacklist_ids[] = {
/* Digianswer device */ /* Digianswer device */
{ USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER }, { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
/* RTX Telecom based adapter with buggy SCO support */
{ USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -821,7 +824,6 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -821,7 +824,6 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
return -ENODEV; return -ENODEV;
/* Find endpoints that we need */ /* Find endpoints that we need */
uif = intf->cur_altsetting; uif = intf->cur_altsetting;
for (e = 0; e < uif->desc.bNumEndpoints; e++) { for (e = 0; e < uif->desc.bNumEndpoints; e++) {
ep = &uif->endpoint[e]; ep = &uif->endpoint[e];
...@@ -864,14 +866,15 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -864,14 +866,15 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
husb->ctrl_req = HCI_CTRL_REQ; husb->ctrl_req = HCI_CTRL_REQ;
/* Find isochronous endpoints that we can use */ /* Find isochronous endpoints that we can use */
size = 0; size = 0;
isoc_iface = NULL; isoc_iface = NULL;
isoc_alts = 0; isoc_alts = 0;
isoc_ifnum = 1; isoc_ifnum = 1;
#ifdef CONFIG_BT_HCIUSB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
if (!(id->driver_info & HCI_BROKEN_ISOC))
isoc_iface = usb_ifnum_to_if(udev, isoc_ifnum); isoc_iface = usb_ifnum_to_if(udev, isoc_ifnum);
if (isoc_iface) { if (isoc_iface) {
int a; int a;
struct usb_host_endpoint *isoc_out_ep = NULL; struct usb_host_endpoint *isoc_out_ep = NULL;
......
...@@ -23,12 +23,6 @@ ...@@ -23,12 +23,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: hci_usb.h,v 1.2 2002/03/18 19:10:04 maxk Exp $
*/
#ifdef __KERNEL__
/* Class, SubClass, and Protocol codes that describe a Bluetooth device */ /* Class, SubClass, and Protocol codes that describe a Bluetooth device */
#define HCI_DEV_CLASS 0xe0 /* Wireless class */ #define HCI_DEV_CLASS 0xe0 /* Wireless class */
#define HCI_DEV_SUBCLASS 0x01 /* RF subclass */ #define HCI_DEV_SUBCLASS 0x01 /* RF subclass */
...@@ -40,6 +34,7 @@ ...@@ -40,6 +34,7 @@
#define HCI_IGNORE 0x01 #define HCI_IGNORE 0x01
#define HCI_RESET 0x02 #define HCI_RESET 0x02
#define HCI_DIGIANSWER 0x04 #define HCI_DIGIANSWER 0x04
#define HCI_BROKEN_ISOC 0x08
#define HCI_MAX_IFACE_NUM 3 #define HCI_MAX_IFACE_NUM 3
...@@ -106,12 +101,6 @@ static inline void _urb_unlink(struct _urb *_urb) ...@@ -106,12 +101,6 @@ static inline void _urb_unlink(struct _urb *_urb)
struct _urb *_urb_dequeue(struct _urb_queue *q); struct _urb *_urb_dequeue(struct _urb_queue *q);
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
struct hci_usb { struct hci_usb {
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -130,17 +119,15 @@ struct hci_usb { ...@@ -130,17 +119,15 @@ struct hci_usb {
__u8 ctrl_req; __u8 ctrl_req;
struct sk_buff_head transmit_q[4]; struct sk_buff_head transmit_q[4];
struct sk_buff *reassembly[4]; // Reassembly buffers struct sk_buff *reassembly[4]; /* Reassembly buffers */
rwlock_t completion_lock; rwlock_t completion_lock;
atomic_t pending_tx[4]; // Number of pending requests atomic_t pending_tx[4]; /* Number of pending requests */
struct _urb_queue pending_q[4]; // Pending requests struct _urb_queue pending_q[4]; /* Pending requests */
struct _urb_queue completed_q[4]; // Completed requests struct _urb_queue completed_q[4]; /* Completed requests */
}; };
/* States */ /* States */
#define HCI_USB_TX_PROCESS 1 #define HCI_USB_TX_PROCESS 1
#define HCI_USB_TX_WAKEUP 2 #define HCI_USB_TX_WAKEUP 2
#endif /* __KERNEL__ */
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: bluetooth.h,v 1.8 2002/04/17 17:37:20 maxk Exp $
*/
#ifndef __BLUETOOTH_H #ifndef __BLUETOOTH_H
#define __BLUETOOTH_H #define __BLUETOOTH_H
...@@ -49,6 +45,7 @@ ...@@ -49,6 +45,7 @@
#define BTPROTO_RFCOMM 3 #define BTPROTO_RFCOMM 3
#define BTPROTO_BNEP 4 #define BTPROTO_BNEP 4
#define BTPROTO_CMTP 5 #define BTPROTO_CMTP 5
#define BTPROTO_HIDP 6
#define SOL_HCI 0 #define SOL_HCI 0
#define SOL_L2CAP 6 #define SOL_L2CAP 6
......
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: hci.h,v 1.4 2002/04/18 22:26:15 maxk Exp $
*/
#ifndef __HCI_H #ifndef __HCI_H
#define __HCI_H #define __HCI_H
......
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: hci_core.h,v 1.3 2002/04/17 18:55:21 maxk Exp $
*/
#ifndef __HCI_CORE_H #ifndef __HCI_CORE_H
#define __HCI_CORE_H #define __HCI_CORE_H
......
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: l2cap.h,v 1.1.1.1 2002/03/08 21:03:15 maxk Exp $
*/
#ifndef __L2CAP_H #ifndef __L2CAP_H
#define __L2CAP_H #define __L2CAP_H
......
...@@ -21,14 +21,6 @@ ...@@ -21,14 +21,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
RPN support - Dirk Husemann <hud@zurich.ibm.com>
*/
/*
* $Id: rfcomm.h,v 1.29 2002/10/02 20:26:17 maxk Exp $
*/
#ifndef __RFCOMM_H #ifndef __RFCOMM_H
#define __RFCOMM_H #define __RFCOMM_H
......
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/*
* $Id: sco.h,v 1.1.1.1 2002/03/08 21:03:15 maxk Exp $
*/
#ifndef __SCO_H #ifndef __SCO_H
#define __SCO_H #define __SCO_H
......
...@@ -14,22 +14,20 @@ menuconfig BT ...@@ -14,22 +14,20 @@ menuconfig BT
Linux Bluetooth subsystem consist of several layers: Linux Bluetooth subsystem consist of several layers:
Bluetooth Core (HCI device and connection manager, scheduler) Bluetooth Core (HCI device and connection manager, scheduler)
HCI Device drivers (interface to the hardware) HCI Device drivers (Interface to the hardware)
L2CAP Module (L2CAP protocol) SCO Module (SCO audio links)
SCO Module (SCO links) L2CAP Module (Logical Link Control and Adaptation Protocol)
RFCOMM Module (RFCOMM protocol) RFCOMM Module (RFCOMM Protocol)
BNEP Module (BNEP protocol) BNEP Module (Bluetooth Network Encapsulation Protocol)
CMTP Module (CMTP protocol) CMTP Module (CAPI Message Transport Protocol)
Say Y here to enable Linux Bluetooth support and to build Bluetooth Core Say Y here to compile Bluetooth support into the kernel or say M to
layer. compile it as module (bluetooth).
To use Linux Bluetooth subsystem, you will need several user-space To use Linux Bluetooth subsystem, you will need several user-space
utilities like hciconfig and hcid. These utilities and updates to utilities like hciconfig and hcid. These utilities and updates to
Bluetooth kernel modules are provided in the BlueZ packages. Bluetooth kernel modules are provided in the BlueZ packages.
For more information, see <http://bluez.sourceforge.net/>. For more information, see <http://www.bluez.org/>.
If you want to compile Bluetooth Core as module (bluetooth) say M here.
config BT_L2CAP config BT_L2CAP
tristate "L2CAP protocol support" tristate "L2CAP protocol support"
......
...@@ -9,4 +9,4 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/ ...@@ -9,4 +9,4 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/
obj-$(CONFIG_BT_BNEP) += bnep/ obj-$(CONFIG_BT_BNEP) += bnep/
obj-$(CONFIG_BT_CMTP) += cmtp/ obj-$(CONFIG_BT_CMTP) += cmtp/
bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o syms.o bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o
...@@ -22,12 +22,7 @@ ...@@ -22,12 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth address family and sockets. */
* Bluetooth address family and sockets.
*
* $Id: af_bluetooth.c,v 1.3 2002/04/17 17:37:15 maxk Exp $
*/
#define VERSION "2.4"
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -53,13 +48,16 @@ ...@@ -53,13 +48,16 @@
#ifndef CONFIG_BT_SOCK_DEBUG #ifndef CONFIG_BT_SOCK_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
#define VERSION "2.5"
struct proc_dir_entry *proc_bt; struct proc_dir_entry *proc_bt;
EXPORT_SYMBOL(proc_bt);
/* Bluetooth sockets */ /* Bluetooth sockets */
#define BT_MAX_PROTO 6 #define BT_MAX_PROTO 7
static struct net_proto_family *bt_proto[BT_MAX_PROTO]; static struct net_proto_family *bt_proto[BT_MAX_PROTO];
static kmem_cache_t *bt_sock_cache; static kmem_cache_t *bt_sock_cache;
...@@ -75,6 +73,7 @@ int bt_sock_register(int proto, struct net_proto_family *ops) ...@@ -75,6 +73,7 @@ int bt_sock_register(int proto, struct net_proto_family *ops)
bt_proto[proto] = ops; bt_proto[proto] = ops;
return 0; return 0;
} }
EXPORT_SYMBOL(bt_sock_register);
int bt_sock_unregister(int proto) int bt_sock_unregister(int proto)
{ {
...@@ -87,6 +86,7 @@ int bt_sock_unregister(int proto) ...@@ -87,6 +86,7 @@ int bt_sock_unregister(int proto)
bt_proto[proto] = NULL; bt_proto[proto] = NULL;
return 0; return 0;
} }
EXPORT_SYMBOL(bt_sock_unregister);
static int bt_sock_create(struct socket *sock, int proto) static int bt_sock_create(struct socket *sock, int proto)
{ {
...@@ -136,6 +136,7 @@ struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio ...@@ -136,6 +136,7 @@ struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio
return sk; return sk;
} }
EXPORT_SYMBOL(bt_sock_alloc);
void bt_sock_link(struct bt_sock_list *l, struct sock *sk) void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
{ {
...@@ -143,6 +144,7 @@ void bt_sock_link(struct bt_sock_list *l, struct sock *sk) ...@@ -143,6 +144,7 @@ void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
sk_add_node(sk, &l->head); sk_add_node(sk, &l->head);
write_unlock_bh(&l->lock); write_unlock_bh(&l->lock);
} }
EXPORT_SYMBOL(bt_sock_link);
void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
{ {
...@@ -150,6 +152,7 @@ void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) ...@@ -150,6 +152,7 @@ void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
sk_del_node_init(sk); sk_del_node_init(sk);
write_unlock_bh(&l->lock); write_unlock_bh(&l->lock);
} }
EXPORT_SYMBOL(bt_sock_unlink);
void bt_accept_enqueue(struct sock *parent, struct sock *sk) void bt_accept_enqueue(struct sock *parent, struct sock *sk)
{ {
...@@ -160,6 +163,7 @@ void bt_accept_enqueue(struct sock *parent, struct sock *sk) ...@@ -160,6 +163,7 @@ void bt_accept_enqueue(struct sock *parent, struct sock *sk)
bt_sk(sk)->parent = parent; bt_sk(sk)->parent = parent;
parent->sk_ack_backlog++; parent->sk_ack_backlog++;
} }
EXPORT_SYMBOL(bt_accept_enqueue);
static void bt_accept_unlink(struct sock *sk) static void bt_accept_unlink(struct sock *sk)
{ {
...@@ -199,6 +203,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock) ...@@ -199,6 +203,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL(bt_accept_dequeue);
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len, int flags) struct msghdr *msg, size_t len, int flags)
...@@ -235,6 +240,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -235,6 +240,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
return err ? : copied; return err ? : copied;
} }
EXPORT_SYMBOL(bt_sock_recvmsg);
static inline unsigned int bt_accept_poll(struct sock *parent) static inline unsigned int bt_accept_poll(struct sock *parent)
{ {
...@@ -287,6 +293,7 @@ unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w ...@@ -287,6 +293,7 @@ unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w
return mask; return mask;
} }
EXPORT_SYMBOL(bt_sock_poll);
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
{ {
...@@ -322,6 +329,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) ...@@ -322,6 +329,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
remove_wait_queue(sk->sk_sleep, &wait); remove_wait_queue(sk->sk_sleep, &wait);
return err; return err;
} }
EXPORT_SYMBOL(bt_sock_wait_state);
static struct net_proto_family bt_sock_family_ops = { static struct net_proto_family bt_sock_family_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -4,12 +4,8 @@ config BT_BNEP ...@@ -4,12 +4,8 @@ config BT_BNEP
select CRC32 select CRC32
help help
BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
emulation layer on top of Bluetooth. BNEP is required for Bluetooth emulation layer on top of Bluetooth. BNEP is required for
PAN (Personal Area Network). Bluetooth PAN (Personal Area Network).
To use BNEP, you will need user-space utilities provided in the
BlueZ-PAN package.
For more information, see <http://bluez.sourceforge.net>.
Say Y here to compile BNEP support into the kernel or say M to Say Y here to compile BNEP support into the kernel or say M to
compile it as module (bnep). compile it as module (bnep).
......
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth HCI connection handling. */
* HCI Connection handling.
*
* $Id: hci_conn.c,v 1.2 2002/04/17 17:37:16 maxk Exp $
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -54,7 +50,7 @@ ...@@ -54,7 +50,7 @@
#ifndef CONFIG_BT_HCI_CORE_DEBUG #ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
void hci_acl_connect(struct hci_conn *conn) void hci_acl_connect(struct hci_conn *conn)
...@@ -252,6 +248,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src) ...@@ -252,6 +248,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
read_unlock_bh(&hci_dev_list_lock); read_unlock_bh(&hci_dev_list_lock);
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_get_route);
/* Create SCO or ACL connection. /* Create SCO or ACL connection.
* Device _must_ be locked */ * Device _must_ be locked */
...@@ -294,6 +291,7 @@ struct hci_conn * hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst) ...@@ -294,6 +291,7 @@ struct hci_conn * hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst)
return acl; return acl;
} }
} }
EXPORT_SYMBOL(hci_connect);
/* Authenticate remote device */ /* Authenticate remote device */
int hci_conn_auth(struct hci_conn *conn) int hci_conn_auth(struct hci_conn *conn)
...@@ -310,6 +308,7 @@ int hci_conn_auth(struct hci_conn *conn) ...@@ -310,6 +308,7 @@ int hci_conn_auth(struct hci_conn *conn)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(hci_conn_auth);
/* Enable encryption */ /* Enable encryption */
int hci_conn_encrypt(struct hci_conn *conn) int hci_conn_encrypt(struct hci_conn *conn)
...@@ -330,6 +329,7 @@ int hci_conn_encrypt(struct hci_conn *conn) ...@@ -330,6 +329,7 @@ int hci_conn_encrypt(struct hci_conn *conn)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(hci_conn_encrypt);
/* Drop all connection on the device */ /* Drop all connection on the device */
void hci_conn_hash_flush(struct hci_dev *hdev) void hci_conn_hash_flush(struct hci_dev *hdev)
......
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth HCI core. */
* Bluetooth HCI Core.
*
* $Id: hci_core.c,v 1.6 2002/04/17 17:37:16 maxk Exp $
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -55,7 +51,7 @@ ...@@ -55,7 +51,7 @@
#ifndef CONFIG_BT_HCI_CORE_DEBUG #ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
static void hci_cmd_task(unsigned long arg); static void hci_cmd_task(unsigned long arg);
...@@ -288,6 +284,7 @@ struct hci_dev *hci_dev_get(int index) ...@@ -288,6 +284,7 @@ struct hci_dev *hci_dev_get(int index)
read_unlock(&hci_dev_list_lock); read_unlock(&hci_dev_list_lock);
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_dev_get);
/* ---- Inquiry support ---- */ /* ---- Inquiry support ---- */
void inquiry_cache_flush(struct hci_dev *hdev) void inquiry_cache_flush(struct hci_dev *hdev)
...@@ -779,6 +776,7 @@ struct hci_dev *hci_alloc_dev(void) ...@@ -779,6 +776,7 @@ struct hci_dev *hci_alloc_dev(void)
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_alloc_dev);
/* Free HCI device */ /* Free HCI device */
void hci_free_dev(struct hci_dev *hdev) void hci_free_dev(struct hci_dev *hdev)
...@@ -786,6 +784,7 @@ void hci_free_dev(struct hci_dev *hdev) ...@@ -786,6 +784,7 @@ void hci_free_dev(struct hci_dev *hdev)
/* will free via class release */ /* will free via class release */
class_device_put(&hdev->class_dev); class_device_put(&hdev->class_dev);
} }
EXPORT_SYMBOL(hci_free_dev);
/* Register HCI device */ /* Register HCI device */
int hci_register_dev(struct hci_dev *hdev) int hci_register_dev(struct hci_dev *hdev)
...@@ -845,6 +844,7 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -845,6 +844,7 @@ int hci_register_dev(struct hci_dev *hdev)
return id; return id;
} }
EXPORT_SYMBOL(hci_register_dev);
/* Unregister HCI device */ /* Unregister HCI device */
int hci_unregister_dev(struct hci_dev *hdev) int hci_unregister_dev(struct hci_dev *hdev)
...@@ -864,6 +864,7 @@ int hci_unregister_dev(struct hci_dev *hdev) ...@@ -864,6 +864,7 @@ int hci_unregister_dev(struct hci_dev *hdev)
__hci_dev_put(hdev); __hci_dev_put(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_unregister_dev);
/* Suspend HCI device */ /* Suspend HCI device */
int hci_suspend_dev(struct hci_dev *hdev) int hci_suspend_dev(struct hci_dev *hdev)
...@@ -871,6 +872,7 @@ int hci_suspend_dev(struct hci_dev *hdev) ...@@ -871,6 +872,7 @@ int hci_suspend_dev(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_SUSPEND); hci_notify(hdev, HCI_DEV_SUSPEND);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_suspend_dev);
/* Resume HCI device */ /* Resume HCI device */
int hci_resume_dev(struct hci_dev *hdev) int hci_resume_dev(struct hci_dev *hdev)
...@@ -878,6 +880,7 @@ int hci_resume_dev(struct hci_dev *hdev) ...@@ -878,6 +880,7 @@ int hci_resume_dev(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_RESUME); hci_notify(hdev, HCI_DEV_RESUME);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_resume_dev);
/* ---- Interface to upper protocols ---- */ /* ---- Interface to upper protocols ---- */
...@@ -903,6 +906,7 @@ int hci_register_proto(struct hci_proto *hp) ...@@ -903,6 +906,7 @@ int hci_register_proto(struct hci_proto *hp)
return err; return err;
} }
EXPORT_SYMBOL(hci_register_proto);
int hci_unregister_proto(struct hci_proto *hp) int hci_unregister_proto(struct hci_proto *hp)
{ {
...@@ -924,6 +928,7 @@ int hci_unregister_proto(struct hci_proto *hp) ...@@ -924,6 +928,7 @@ int hci_unregister_proto(struct hci_proto *hp)
return err; return err;
} }
EXPORT_SYMBOL(hci_unregister_proto);
static int hci_send_frame(struct sk_buff *skb) static int hci_send_frame(struct sk_buff *skb)
{ {
...@@ -980,6 +985,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void *p ...@@ -980,6 +985,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void *p
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_cmd);
/* Get data from the previously sent command */ /* Get data from the previously sent command */
void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf) void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf)
...@@ -1056,6 +1062,7 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) ...@@ -1056,6 +1062,7 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
hci_sched_tx(hdev); hci_sched_tx(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_acl);
/* Send SCO data */ /* Send SCO data */
int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
...@@ -1082,6 +1089,7 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) ...@@ -1082,6 +1089,7 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
hci_sched_tx(hdev); hci_sched_tx(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_sco);
/* ---- HCI TX task (outgoing data) ---- */ /* ---- HCI TX task (outgoing data) ---- */
......
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth HCI event handling. */
* HCI Events.
*
* $Id: hci_event.c,v 1.3 2002/04/17 17:37:16 maxk Exp $
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -54,7 +50,7 @@ ...@@ -54,7 +50,7 @@
#ifndef CONFIG_BT_HCI_CORE_DEBUG #ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
/* Handle HCI Event packets */ /* Handle HCI Event packets */
...@@ -940,3 +936,4 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data) ...@@ -940,3 +936,4 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data)
hci_send_to_sock(hdev, skb); hci_send_to_sock(hdev, skb);
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL(hci_si_event);
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth HCI sockets. */
* Bluetooth HCI socket layer.
*
* $Id: hci_sock.c,v 1.4 2002/04/18 22:26:14 maxk Exp $
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -56,7 +52,7 @@ ...@@ -56,7 +52,7 @@
#ifndef CONFIG_BT_HCI_SOCK_DEBUG #ifndef CONFIG_BT_HCI_SOCK_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
/* ----- HCI socket interface ----- */ /* ----- HCI socket interface ----- */
...@@ -139,7 +135,6 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -139,7 +135,6 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb)
if (sock_queue_rcv_skb(sk, nskb)) if (sock_queue_rcv_skb(sk, nskb))
kfree_skb(nskb); kfree_skb(nskb);
} }
read_unlock(&hci_sk_list.lock); read_unlock(&hci_sk_list.lock);
} }
......
/* Bluetooth HCI driver model support. */
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -7,7 +9,7 @@ ...@@ -7,7 +9,7 @@
#ifndef CONFIG_BT_HCI_CORE_DEBUG #ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
static ssize_t show_name(struct class_device *cdev, char *buf) static ssize_t show_name(struct class_device *cdev, char *buf)
......
...@@ -22,12 +22,7 @@ ...@@ -22,12 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth L2CAP core and sockets. */
* Bluetooth L2CAP core and sockets.
*
* $Id: l2cap.c,v 1.15 2002/09/09 01:14:52 maxk Exp $
*/
#define VERSION "2.1"
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -59,9 +54,11 @@ ...@@ -59,9 +54,11 @@
#ifndef CONFIG_BT_L2CAP_DEBUG #ifndef CONFIG_BT_L2CAP_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
#define VERSION "2.2"
static struct proto_ops l2cap_sock_ops; static struct proto_ops l2cap_sock_ops;
struct bt_sock_list l2cap_sk_list = { struct bt_sock_list l2cap_sk_list = {
...@@ -407,6 +404,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_ ...@@ -407,6 +404,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
} }
write_lock_bh(&l2cap_sk_list.lock); write_lock_bh(&l2cap_sk_list.lock);
if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) { if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) {
err = -EADDRINUSE; err = -EADDRINUSE;
} else { } else {
...@@ -416,6 +414,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_ ...@@ -416,6 +414,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
l2cap_pi(sk)->sport = la->l2_psm; l2cap_pi(sk)->sport = la->l2_psm;
sk->sk_state = BT_BOUND; sk->sk_state = BT_BOUND;
} }
write_unlock_bh(&l2cap_sk_list.lock); write_unlock_bh(&l2cap_sk_list.lock);
done: done:
...@@ -550,7 +549,24 @@ static int l2cap_sock_listen(struct socket *sock, int backlog) ...@@ -550,7 +549,24 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)
} }
if (!l2cap_pi(sk)->psm) { if (!l2cap_pi(sk)->psm) {
bdaddr_t *src = &bt_sk(sk)->src;
u16 psm;
err = -EINVAL; err = -EINVAL;
write_lock_bh(&l2cap_sk_list.lock);
for (psm = 0x1001; psm < 0x1100; psm += 2)
if (!__l2cap_get_sock_by_addr(psm, src)) {
l2cap_pi(sk)->psm = htobs(psm);
l2cap_pi(sk)->sport = htobs(psm);
err = 0;
break;
}
write_unlock_bh(&l2cap_sk_list.lock);
if (err < 0)
goto done; goto done;
} }
...@@ -834,7 +850,8 @@ static int l2cap_sock_shutdown(struct socket *sock, int how) ...@@ -834,7 +850,8 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)
BT_DBG("sock %p, sk %p", sock, sk); BT_DBG("sock %p, sk %p", sock, sk);
if (!sk) return 0; if (!sk)
return 0;
lock_sock(sk); lock_sock(sk);
if (!sk->sk_shutdown) { if (!sk->sk_shutdown) {
...@@ -856,7 +873,8 @@ static int l2cap_sock_release(struct socket *sock) ...@@ -856,7 +873,8 @@ static int l2cap_sock_release(struct socket *sock)
BT_DBG("sock %p, sk %p", sock, sk); BT_DBG("sock %p, sk %p", sock, sk);
if (!sk) return 0; if (!sk)
return 0;
err = l2cap_sock_shutdown(sock, 2); err = l2cap_sock_shutdown(sock, 2);
...@@ -1306,8 +1324,7 @@ static inline int l2cap_conf_output(struct sock *sk, void **ptr) ...@@ -1306,8 +1324,7 @@ static inline int l2cap_conf_output(struct sock *sk, void **ptr)
int result = 0; int result = 0;
/* Configure output options and let the other side know /* Configure output options and let the other side know
* which ones we don't like. * which ones we don't like. */
*/
if (pi->conf_mtu < pi->omtu) { if (pi->conf_mtu < pi->omtu) {
l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu); l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
result = L2CAP_CONF_UNACCEPT; result = L2CAP_CONF_UNACCEPT;
...@@ -1533,13 +1550,11 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr ...@@ -1533,13 +1550,11 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
case L2CAP_CONF_UNACCEPT: case L2CAP_CONF_UNACCEPT:
if (++l2cap_pi(sk)->conf_retry < L2CAP_CONF_MAX_RETRIES) { if (++l2cap_pi(sk)->conf_retry < L2CAP_CONF_MAX_RETRIES) {
char req[128]; char req[128];
/* /* It does not make sense to adjust L2CAP parameters
It does not make sense to adjust L2CAP parameters * that are currently defined in the spec. We simply
that are currently defined in the spec. We simply * resend config request that we sent earlier. It is
resend config request that we sent earlier. It is * stupid, but it helps qualification testing which
stupid :) but it helps qualification testing * expects at least some response from us. */
which expects at least some response from us.
*/
l2cap_send_req(conn, L2CAP_CONF_REQ, l2cap_send_req(conn, L2CAP_CONF_REQ,
l2cap_build_conf_req(sk, req), req); l2cap_build_conf_req(sk, req), req);
goto done; goto done;
...@@ -2138,8 +2153,8 @@ static struct proto_ops l2cap_sock_ops = { ...@@ -2138,8 +2153,8 @@ static struct proto_ops l2cap_sock_ops = {
static struct net_proto_family l2cap_sock_family_ops = { static struct net_proto_family l2cap_sock_family_ops = {
.family = PF_BLUETOOTH, .family = PF_BLUETOOTH,
.create = l2cap_sock_create,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.create = l2cap_sock_create,
}; };
static struct hci_proto l2cap_hci_proto = { static struct hci_proto l2cap_hci_proto = {
...@@ -2190,8 +2205,8 @@ static void __exit l2cap_exit(void) ...@@ -2190,8 +2205,8 @@ static void __exit l2cap_exit(void)
void l2cap_load(void) void l2cap_load(void)
{ {
/* Dummy function to trigger automatic L2CAP module loading by /* Dummy function to trigger automatic L2CAP module loading by
other modules that use L2CAP sockets but don not use any other * other modules that use L2CAP sockets but don not use any othe
symbols from it. */ * symbols from it. */
return; return;
} }
EXPORT_SYMBOL(l2cap_load); EXPORT_SYMBOL(l2cap_load);
......
...@@ -22,11 +22,10 @@ ...@@ -22,11 +22,10 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth kernel library. */
* Bluetooth kernel library.
* #include <linux/config.h>
* $Id: lib.c,v 1.1 2002/03/08 21:06:59 maxk Exp $ #include <linux/module.h>
*/
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/stddef.h> #include <linux/stddef.h>
...@@ -58,6 +57,7 @@ void bt_dump(char *pref, __u8 *buf, int count) ...@@ -58,6 +57,7 @@ void bt_dump(char *pref, __u8 *buf, int count)
if (line[0]) if (line[0])
printk(KERN_INFO "%s:%s\n", pref, line); printk(KERN_INFO "%s:%s\n", pref, line);
} }
EXPORT_SYMBOL(bt_dump);
void baswap(bdaddr_t *dst, bdaddr_t *src) void baswap(bdaddr_t *dst, bdaddr_t *src)
{ {
...@@ -68,6 +68,7 @@ void baswap(bdaddr_t *dst, bdaddr_t *src) ...@@ -68,6 +68,7 @@ void baswap(bdaddr_t *dst, bdaddr_t *src)
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
d[i] = s[5 - i]; d[i] = s[5 - i];
} }
EXPORT_SYMBOL(baswap);
char *batostr(bdaddr_t *ba) char *batostr(bdaddr_t *ba)
{ {
...@@ -81,6 +82,7 @@ char *batostr(bdaddr_t *ba) ...@@ -81,6 +82,7 @@ char *batostr(bdaddr_t *ba)
return str[i]; return str[i];
} }
EXPORT_SYMBOL(batostr);
/* Bluetooth error codes to Unix errno mapping */ /* Bluetooth error codes to Unix errno mapping */
int bt_err(__u16 code) int bt_err(__u16 code)
...@@ -173,3 +175,4 @@ int bt_err(__u16 code) ...@@ -173,3 +175,4 @@ int bt_err(__u16 code)
return ENOSYS; return ENOSYS;
} }
} }
EXPORT_SYMBOL(bt_err);
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <net/bluetooth/l2cap.h> #include <net/bluetooth/l2cap.h>
#include <net/bluetooth/rfcomm.h> #include <net/bluetooth/rfcomm.h>
#define VERSION "1.2" #define VERSION "1.3"
#ifndef CONFIG_BT_RFCOMM_DEBUG #ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG #undef BT_DBG
......
...@@ -398,6 +398,27 @@ int rfcomm_sock_listen(struct socket *sock, int backlog) ...@@ -398,6 +398,27 @@ int rfcomm_sock_listen(struct socket *sock, int backlog)
goto done; goto done;
} }
if (!rfcomm_pi(sk)->channel) {
bdaddr_t *src = &bt_sk(sk)->src;
u8 channel;
err = -EINVAL;
write_lock_bh(&rfcomm_sk_list.lock);
for (channel = 1; channel < 31; channel++)
if (!__rfcomm_get_sock_by_addr(channel, src)) {
rfcomm_pi(sk)->channel = channel;
err = 0;
break;
}
write_unlock_bh(&rfcomm_sk_list.lock);
if (err < 0)
goto done;
}
sk->sk_max_ack_backlog = backlog; sk->sk_max_ack_backlog = backlog;
sk->sk_ack_backlog = 0; sk->sk_ack_backlog = 0;
sk->sk_state = BT_LISTEN; sk->sk_state = BT_LISTEN;
......
...@@ -22,12 +22,7 @@ ...@@ -22,12 +22,7 @@
SOFTWARE IS DISCLAIMED. SOFTWARE IS DISCLAIMED.
*/ */
/* /* Bluetooth SCO sockets. */
* Bluetooth SCO sockets.
*
* $Id: sco.c,v 1.3 2002/04/17 17:37:16 maxk Exp $
*/
#define VERSION "0.3"
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -58,9 +53,11 @@ ...@@ -58,9 +53,11 @@
#ifndef CONFIG_BT_SCO_DEBUG #ifndef CONFIG_BT_SCO_DEBUG
#undef BT_DBG #undef BT_DBG
#define BT_DBG( A... ) #define BT_DBG(D...)
#endif #endif
#define VERSION "0.3"
static struct proto_ops sco_sock_ops; static struct proto_ops sco_sock_ops;
static struct bt_sock_list sco_sk_list = { static struct bt_sock_list sco_sk_list = {
...@@ -1000,8 +997,8 @@ static struct proto_ops sco_sock_ops = { ...@@ -1000,8 +997,8 @@ static struct proto_ops sco_sock_ops = {
static struct net_proto_family sco_sock_family_ops = { static struct net_proto_family sco_sock_family_ops = {
.family = PF_BLUETOOTH, .family = PF_BLUETOOTH,
.create = sco_sock_create,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.create = sco_sock_create,
}; };
static struct hci_proto sco_hci_proto = { static struct hci_proto sco_hci_proto = {
......
/*
BlueZ - Bluetooth protocol stack for Linux
Copyright (C) 2000-2001 Qualcomm Incorporated
Written 2000,2001 by 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.
*/
/*
* Bluetooth symbols.
*
* $Id: syms.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
/* HCI Core */
EXPORT_SYMBOL(hci_alloc_dev);
EXPORT_SYMBOL(hci_free_dev);
EXPORT_SYMBOL(hci_register_dev);
EXPORT_SYMBOL(hci_unregister_dev);
EXPORT_SYMBOL(hci_suspend_dev);
EXPORT_SYMBOL(hci_resume_dev);
EXPORT_SYMBOL(hci_register_proto);
EXPORT_SYMBOL(hci_unregister_proto);
EXPORT_SYMBOL(hci_get_route);
EXPORT_SYMBOL(hci_connect);
EXPORT_SYMBOL(hci_dev_get);
EXPORT_SYMBOL(hci_conn_auth);
EXPORT_SYMBOL(hci_conn_encrypt);
EXPORT_SYMBOL(hci_send_acl);
EXPORT_SYMBOL(hci_send_sco);
EXPORT_SYMBOL(hci_send_cmd);
EXPORT_SYMBOL(hci_si_event);
/* Bluetooth lib */
EXPORT_SYMBOL(bt_dump);
EXPORT_SYMBOL(baswap);
EXPORT_SYMBOL(batostr);
EXPORT_SYMBOL(bt_err);
/* Bluetooth sockets */
EXPORT_SYMBOL(bt_sock_register);
EXPORT_SYMBOL(bt_sock_unregister);
EXPORT_SYMBOL(bt_sock_alloc);
EXPORT_SYMBOL(bt_sock_link);
EXPORT_SYMBOL(bt_sock_unlink);
EXPORT_SYMBOL(bt_sock_recvmsg);
EXPORT_SYMBOL(bt_sock_poll);
EXPORT_SYMBOL(bt_accept_enqueue);
EXPORT_SYMBOL(bt_accept_dequeue);
EXPORT_SYMBOL(bt_sock_wait_state);
EXPORT_SYMBOL(proc_bt);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment