Commit ba4d1613 authored by Maksim Krasnyanskiy's avatar Maksim Krasnyanskiy

Consistent naming for Bluetooth function and constants.

Some of them were named like BT_XXX and bt_xxx others BLUEZ_XXX and bluez_xxx.
From now on use BT_XXX and bt_xxx throughout Bluetooth code, including CONFIG_ defines.
Clean up small typos and misspelling along the way.
parent b7f0e1d2
......@@ -38,7 +38,7 @@ obj-$(CONFIG_I2O) += message/
obj-$(CONFIG_I2C) += i2c/
obj-$(CONFIG_PHONE) += telephony/
obj-$(CONFIG_MD) += md/
obj-$(CONFIG_BLUEZ) += bluetooth/
obj-$(CONFIG_BT) += bluetooth/
obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
obj-$(CONFIG_ISDN_BOOL) += isdn/
......
HCI UART driver
CONFIG_BLUEZ_HCIUART
CONFIG_BT_HCIUART
Bluetooth HCI UART driver.
This driver is required if you want to use Bluetooth devices with
serial port interface. You will also need this driver if you have
......@@ -10,7 +10,7 @@ CONFIG_BLUEZ_HCIUART
kernel or say M to compile it as module (hci_uart.o).
HCI UART (H4) protocol support
CONFIG_BLUEZ_HCIUART_H4
CONFIG_BT_HCIUART_H4
UART (H4) is serial protocol for communication between Bluetooth
device and host. This protocol is required for most Bluetooth devices
with UART interface, including PCMCIA and CF cards.
......@@ -18,7 +18,7 @@ CONFIG_BLUEZ_HCIUART_H4
Say Y here to compile support for HCI UART (H4) protocol.
HCI BCSP protocol support
CONFIG_BLUEZ_HCIUART_BCSP
CONFIG_BT_HCIUART_BCSP
BCSP (BlueCore Serial Protocol) is serial protocol for communication
between Bluetooth device and host. This protocol is required for non
USB Bluetooth devices based on CSR BlueCore chip, including PCMCIA and
......@@ -27,7 +27,7 @@ CONFIG_BLUEZ_HCIUART_BCSP
Say Y here to compile support for HCI BCSP protocol.
HCI USB driver
CONFIG_BLUEZ_HCIUSB
CONFIG_BT_HCIUSB
Bluetooth HCI USB driver.
This driver is required if you want to use Bluetooth devices with
USB interface.
......@@ -36,7 +36,7 @@ CONFIG_BLUEZ_HCIUSB
kernel or say M to compile it as module (hci_usb.o).
HCI USB zero packet support
CONFIG_BLUEZ_USB_ZERO_PACKET
CONFIG_BT_USB_ZERO_PACKET
Support for USB zero packets.
This option is provided only as a work around for buggy Bluetooth USB
devices. Do _not_ enable it unless you know for sure that your device
......@@ -44,7 +44,7 @@ CONFIG_BLUEZ_USB_ZERO_PACKET
Most people should say N here.
HCI VHCI Virtual HCI device driver
CONFIG_BLUEZ_HCIVHCI
CONFIG_BT_HCIVHCI
Bluetooth Virtual HCI device driver.
This driver is required if you want to use HCI Emulation software.
......@@ -52,7 +52,7 @@ CONFIG_BLUEZ_HCIVHCI
kernel or say M to compile it as module (hci_vhci.o).
HCI DTL1 (PC Card) device driver
CONFIG_BLUEZ_HCIDTL1
CONFIG_BT_HCIDTL1
Bluetooth HCI DTL1 (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
Nokia DTL1 interface:
......@@ -63,7 +63,7 @@ CONFIG_BLUEZ_HCIDTL1
kernel or say M to compile it as module (dtl1_cs.o).
HCI BT3C (PC Card) device driver
CONFIG_BLUEZ_HCIBT3C
CONFIG_BT_HCIBT3C
Bluetooth HCI BT3C (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
3Com BT3C interface:
......@@ -77,7 +77,7 @@ CONFIG_BLUEZ_HCIBT3C
kernel or say M to compile it as module (bt3c_cs.o).
HCI BlueCard (PC Card) device driver
CONFIG_BLUEZ_HCIBLUECARD
CONFIG_BT_HCIBLUECARD
Bluetooth HCI BlueCard (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
Anycom BlueCard interface:
......
mainmenu_option next_comment
comment 'Bluetooth device drivers'
dep_tristate 'HCI USB driver' CONFIG_BLUEZ_HCIUSB $CONFIG_BLUEZ $CONFIG_USB
if [ "$CONFIG_BLUEZ_HCIUSB" != "n" ]; then
bool ' USB zero packet support' CONFIG_BLUEZ_USB_ZERO_PACKET
dep_tristate 'HCI USB driver' CONFIG_BT_HCIUSB $CONFIG_BT $CONFIG_USB
if [ "$CONFIG_BT_HCIUSB" != "n" ]; then
bool ' USB zero packet support' CONFIG_BT_USB_ZERO_PACKET
fi
dep_tristate 'HCI UART driver' CONFIG_BLUEZ_HCIUART $CONFIG_BLUEZ
if [ "$CONFIG_BLUEZ_HCIUART" != "n" ]; then
bool ' UART (H4) protocol support' CONFIG_BLUEZ_HCIUART_H4
bool ' BCSP protocol support' CONFIG_BLUEZ_HCIUART_BCSP
dep_tristate 'HCI UART driver' CONFIG_BT_HCIUART $CONFIG_BT
if [ "$CONFIG_BT_HCIUART" != "n" ]; then
bool ' UART (H4) protocol support' CONFIG_BT_HCIUART_H4
bool ' BCSP protocol support' CONFIG_BT_HCIUART_BCSP
fi
dep_tristate 'HCI DTL1 (PC Card) driver' CONFIG_BLUEZ_HCIDTL1 $CONFIG_PCMCIA $CONFIG_BLUEZ
dep_tristate 'HCI DTL1 (PC Card) driver' CONFIG_BT_HCIDTL1 $CONFIG_PCMCIA $CONFIG_BT
dep_tristate 'HCI BT3C (PC Card) driver' CONFIG_BLUEZ_HCIBT3C $CONFIG_PCMCIA $CONFIG_BLUEZ
dep_tristate 'HCI BT3C (PC Card) driver' CONFIG_BT_HCIBT3C $CONFIG_PCMCIA $CONFIG_BT
dep_tristate 'HCI BlueCard (PC Card) driver' CONFIG_BLUEZ_HCIBLUECARD $CONFIG_PCMCIA $CONFIG_BLUEZ
dep_tristate 'HCI BlueCard (PC Card) driver' CONFIG_BT_HCIBLUECARD $CONFIG_PCMCIA $CONFIG_BT
dep_tristate 'HCI VHCI (Virtual HCI device) driver' CONFIG_BLUEZ_HCIVHCI $CONFIG_BLUEZ
dep_tristate 'HCI VHCI (Virtual HCI device) driver' CONFIG_BT_HCIVHCI $CONFIG_BT
endmenu
......@@ -2,16 +2,16 @@
# Makefile for the Linux Bluetooth HCI device drivers.
#
obj-$(CONFIG_BLUEZ_HCIUSB) += hci_usb.o
obj-$(CONFIG_BLUEZ_HCIVHCI) += hci_vhci.o
obj-$(CONFIG_BLUEZ_HCIUART) += hci_uart.o
obj-$(CONFIG_BLUEZ_HCIDTL1) += dtl1_cs.o
obj-$(CONFIG_BLUEZ_HCIBT3C) += bt3c_cs.o
obj-$(CONFIG_BLUEZ_HCIBLUECARD) += bluecard_cs.o
obj-$(CONFIG_BT_HCIUSB) += hci_usb.o
obj-$(CONFIG_BT_HCIVHCI) += hci_vhci.o
obj-$(CONFIG_BT_HCIUART) += hci_uart.o
obj-$(CONFIG_BT_HCIDTL1) += dtl1_cs.o
obj-$(CONFIG_BT_HCIBT3C) += bt3c_cs.o
obj-$(CONFIG_BT_HCIBLUECARD) += bluecard_cs.o
hci_uart-y := hci_ldisc.o
hci_uart-$(CONFIG_BLUEZ_HCIUART_H4) += hci_h4.o
hci_uart-$(CONFIG_BLUEZ_HCIUART_BCSP) += hci_bcsp.o
hci_uart-$(CONFIG_BT_HCIUART_H4) += hci_h4.o
hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o
hci_uart-objs := $(hci_uart-y)
include $(TOPDIR)/Rules.make
......@@ -60,7 +60,7 @@ MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("BlueZ driver for the Anycom BlueCard (LSE039/LSE041)");
MODULE_DESCRIPTION("Bluetooth driver for the Anycom BlueCard (LSE039/LSE041)");
MODULE_LICENSE("GPL");
......@@ -396,7 +396,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
if (info->rx_skb == NULL) {
info->rx_state = RECV_WAIT_PACKET_TYPE;
info->rx_count = 0;
if (!(info->rx_skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n");
return;
}
......@@ -571,7 +571,7 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)
/* Ericsson baud rate command */
unsigned char cmd[] = { HCI_COMMAND_PKT, 0x09, 0xfc, 0x01, 0x03 };
if (!(skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
if (!(skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n");
return -1;
}
......
......@@ -72,7 +72,7 @@ MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira <jop@di.uminho.pt>");
MODULE_DESCRIPTION("BlueZ driver for the 3Com Bluetooth PCMCIA card");
MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card");
MODULE_LICENSE("GPL");
......@@ -264,7 +264,7 @@ static void bt3c_receive(bt3c_info_t *info)
if (info->rx_skb == NULL) {
info->rx_state = RECV_WAIT_PACKET_TYPE;
info->rx_count = 0;
if (!(info->rx_skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bt3c_cs: Can't allocate mem for new packet.\n");
return;
}
......
......@@ -66,7 +66,7 @@ MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("BlueZ driver for Nokia Connectivity Card DTL-1");
MODULE_DESCRIPTION("Bluetooth driver for Nokia Connectivity Card DTL-1");
MODULE_LICENSE("GPL");
......@@ -238,7 +238,7 @@ static void dtl1_receive(dtl1_info_t *info)
/* Allocate packet */
if (info->rx_skb == NULL)
if (!(info->rx_skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "dtl1_cs: Can't allocate mem for new packet.\n");
info->rx_state = RECV_WAIT_NSH;
info->rx_count = NSHL;
......@@ -433,7 +433,7 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
nsh.zero = 0;
nsh.len = skb->len;
s = bluez_skb_alloc(NSHL + skb->len + 1, GFP_ATOMIC);
s = bt_skb_alloc(NSHL + skb->len + 1, GFP_ATOMIC);
skb_reserve(s, NSHL);
memcpy(skb_put(s, skb->len), skb->data, skb->len);
if (skb->len & 0x0001)
......
......@@ -57,7 +57,7 @@
#include "hci_uart.h"
#include "hci_bcsp.h"
#ifndef HCI_UART_DEBUG
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#undef BT_DMP
......@@ -176,7 +176,7 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
u8 hdr[4], chan;
int rel, i;
#ifdef CONFIG_BLUEZ_HCIUART_BCSP_TXCRC
#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC
u16 BCSP_CRC_INIT(bcsp_txmsg_crc);
#endif
......@@ -228,7 +228,7 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
BT_DBG("Sending packet with seqno %u", bcsp->msgq_txseq);
bcsp->msgq_txseq = ++(bcsp->msgq_txseq) & 0x07;
}
#ifdef CONFIG_BLUEZ_HCIUART_BCSP_TXCRC
#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC
hdr[0] |= 0x40;
#endif
......@@ -240,7 +240,7 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
/* Put BCSP header */
for (i = 0; i < 4; i++) {
bcsp_slip_one_byte(nskb, hdr[i]);
#ifdef CONFIG_BLUEZ_HCIUART_BCSP_TXCRC
#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC
bcsp_crc_update(&bcsp_txmsg_crc, hdr[i]);
#endif
}
......@@ -248,12 +248,12 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
/* Put payload */
for (i = 0; i < len; i++) {
bcsp_slip_one_byte(nskb, data[i]);
#ifdef CONFIG_BLUEZ_HCIUART_BCSP_TXCRC
#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC
bcsp_crc_update(&bcsp_txmsg_crc, data[i]);
#endif
}
#ifdef CONFIG_BLUEZ_HCIUART_BCSP_TXCRC
#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC
/* Put CRC */
bcsp_txmsg_crc = bcsp_crc_reverse(bcsp_txmsg_crc);
bcsp_slip_one_byte(nskb, (u8) ((bcsp_txmsg_crc >> 8) & 0x00ff));
......@@ -611,7 +611,7 @@ static int bcsp_recv(struct hci_uart *hu, void *data, int count)
* Allocate packet. Max len of a BCSP pkt=
* 0xFFF (payload) +4 (header) +2 (crc) */
bcsp->rx_skb = bluez_skb_alloc(0x1005, GFP_ATOMIC);
bcsp->rx_skb = bt_skb_alloc(0x1005, GFP_ATOMIC);
if (!bcsp->rx_skb) {
BT_ERR("Can't allocate mem for new packet");
bcsp->rx_state = BCSP_W4_PKT_DELIMITER;
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI UART(H4) protocol.
* Bluetooth HCI UART(H4) protocol.
*
* $Id: hci_h4.c,v 1.3 2002/09/09 01:17:32 maxk Exp $
*/
......@@ -56,7 +56,7 @@
#include "hci_uart.h"
#include "hci_h4.h"
#ifndef HCI_UART_DEBUG
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#undef BT_DMP
......@@ -238,7 +238,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
ptr++; count--;
/* Allocate packet */
h4->rx_skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
h4->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
if (!h4->rx_skb) {
BT_ERR("Can't allocate mem for new packet");
h4->rx_state = H4_W4_PACKET_TYPE;
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI UART driver.
* Bluetooth HCI UART driver.
*
* $Id: hci_ldisc.c,v 1.5 2002/10/02 18:37:20 maxk Exp $
*/
......@@ -55,7 +55,7 @@
#include <net/bluetooth/hci_core.h>
#include "hci_uart.h"
#ifndef HCI_UART_DEBUG
#ifndef CONFIG_BT_HCIUART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#undef BT_DMP
......@@ -507,11 +507,11 @@ static unsigned int hci_uart_tty_poll(struct tty_struct *tty, struct file *filp,
return 0;
}
#ifdef CONFIG_BLUEZ_HCIUART_H4
#ifdef CONFIG_BT_HCIUART_H4
int h4_init(void);
int h4_deinit(void);
#endif
#ifdef CONFIG_BLUEZ_HCIUART_BCSP
#ifdef CONFIG_BT_HCIUART_BCSP
int bcsp_init(void);
int bcsp_deinit(void);
#endif
......@@ -521,7 +521,7 @@ int __init hci_uart_init(void)
static struct tty_ldisc hci_uart_ldisc;
int err;
BT_INFO("BlueZ HCI UART driver ver %s Copyright (C) 2000,2001 Qualcomm Inc",
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>");
......@@ -545,10 +545,10 @@ int __init hci_uart_init(void)
return err;
}
#ifdef CONFIG_BLUEZ_HCIUART_H4
#ifdef CONFIG_BT_HCIUART_H4
h4_init();
#endif
#ifdef CONFIG_BLUEZ_HCIUART_BCSP
#ifdef CONFIG_BT_HCIUART_BCSP
bcsp_init();
#endif
......@@ -559,10 +559,10 @@ void hci_uart_cleanup(void)
{
int err;
#ifdef CONFIG_BLUEZ_HCIUART_H4
#ifdef CONFIG_BT_HCIUART_H4
h4_deinit();
#endif
#ifdef CONFIG_BLUEZ_HCIUART_BCSP
#ifdef CONFIG_BT_HCIUART_BCSP
bcsp_deinit();
#endif
......@@ -575,5 +575,5 @@ module_init(hci_uart_init);
module_exit(hci_uart_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ HCI UART driver ver " VERSION);
MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI USB driver.
* Bluetooth HCI USB driver.
* Based on original USB Bluetooth driver for Linux kernel
* Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (c) 2000 Mark Douglas Corner <mcorner@umich.edu>
......@@ -59,14 +59,14 @@
#define HCI_MAX_PENDING (HCI_MAX_BULK_RX + HCI_MAX_BULK_TX + 1)
#ifndef HCI_USB_DEBUG
#ifndef CONFIG_BT_HCIUSB_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#undef BT_DMP
#define BT_DMP( A... )
#endif
#ifndef CONFIG_BLUEZ_USB_ZERO_PACKET
#ifndef CONFIG_BT_USB_ZERO_PACKET
#undef USB_ZERO_PACKET
#define USB_ZERO_PACKET 0
#endif
......@@ -167,7 +167,7 @@ static int hci_usb_rx_submit(struct hci_usb *husb, struct urb *urb)
size = HCI_MAX_FRAME_SIZE;
if (!(skb = bluez_skb_alloc(size, GFP_ATOMIC))) {
if (!(skb = bt_skb_alloc(size, GFP_ATOMIC))) {
usb_free_urb(urb);
return -ENOMEM;
}
......@@ -465,7 +465,7 @@ static void hci_usb_interrupt(struct urb *urb)
if (count > len)
goto bad_len;
skb = bluez_skb_alloc(len, GFP_ATOMIC);
skb = bt_skb_alloc(len, GFP_ATOMIC);
if (!skb) {
BT_ERR("%s no memory for event packet", husb->hdev.name);
goto done;
......@@ -569,7 +569,7 @@ static void hci_usb_rx_complete(struct urb *urb)
if (count != size) {
BT_ERR("%s corrupted ACL packet: count %d, dlen %d",
husb->hdev.name, count, dlen);
bluez_dump("hci_usb", skb->data, count);
bt_dump("hci_usb", skb->data, count);
husb->hdev.stat.err_rx++;
goto resubmit;
}
......@@ -781,7 +781,7 @@ int hci_usb_init(void)
{
int err;
BT_INFO("BlueZ HCI USB driver ver %s Copyright (C) 2000,2001 Qualcomm Inc",
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>");
......@@ -800,5 +800,5 @@ module_init(hci_usb_init);
module_exit(hci_usb_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ HCI USB driver ver " VERSION);
MODULE_DESCRIPTION("Bluetooth HCI USB driver ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI virtual device driver.
* Bluetooth HCI virtual device driver.
*
* $Id: hci_vhci.c,v 1.3 2002/04/17 17:37:20 maxk Exp $
*/
......@@ -136,7 +136,7 @@ static inline ssize_t hci_vhci_get_user(struct hci_vhci_struct *hci_vhci, const
if (count > HCI_MAX_FRAME_SIZE)
return -EINVAL;
if (!(skb = bluez_skb_alloc(count, GFP_KERNEL)))
if (!(skb = bt_skb_alloc(count, GFP_KERNEL)))
return -ENOMEM;
if (copy_from_user(skb_put(skb, count), buf, count)) {
......@@ -331,7 +331,7 @@ static struct miscdevice hci_vhci_miscdev=
int __init hci_vhci_init(void)
{
BT_INFO("BlueZ VHCI driver ver %s Copyright (C) 2000,2001 Qualcomm Inc",
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>");
......@@ -352,5 +352,5 @@ module_init(hci_vhci_init);
module_exit(hci_vhci_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ VHCI driver ver " VERSION);
MODULE_DESCRIPTION("Bluetooth VHCI driver ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -40,7 +40,7 @@
#endif
/* Reserv for core and drivers use */
#define BLUEZ_SKB_RESERVE 8
#define BT_SKB_RESERVE 8
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
......@@ -57,29 +57,12 @@
#define SOL_SCO 17
#define SOL_RFCOMM 18
/* Debugging */
#ifdef CONFIG_BLUEZ_DEBUG
#define HCI_CORE_DEBUG 1
#define HCI_SOCK_DEBUG 1
#define HCI_UART_DEBUG 1
#define HCI_USB_DEBUG 1
//#define HCI_DATA_DUMP 1
#define L2CAP_DEBUG 1
#define SCO_DEBUG 1
#define AF_BLUETOOTH_DEBUG 1
#endif /* CONFIG_BLUEZ_DEBUG */
extern void bluez_dump(char *pref, __u8 *buf, int count);
#define BT_INFO(fmt, arg...) printk(KERN_INFO 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)
#ifdef HCI_DATA_DUMP
#define BT_DMP(buf, len) bluez_dump(__FUNCTION__, buf, len)
#define BT_DMP(buf, len) bt_dump(__FUNCTION__, buf, len)
#else
#define BT_DMP(D...)
#endif
......@@ -127,9 +110,9 @@ bdaddr_t *strtoba(char *str);
/* Common socket structures and functions */
#define bluez_sk(__sk) ((struct bluez_sock *) __sk)
#define bt_sk(__sk) ((struct bt_sock *) __sk)
struct bluez_sock {
struct bt_sock {
struct sock sk;
bdaddr_t src;
bdaddr_t dst;
......@@ -137,48 +120,48 @@ struct bluez_sock {
struct sock *parent;
};
struct bluez_sock_list {
struct bt_sock_list {
struct sock *head;
rwlock_t lock;
};
int bluez_sock_register(int proto, struct net_proto_family *ops);
int bluez_sock_unregister(int proto);
struct sock *bluez_sock_alloc(struct socket *sock, int proto, int pi_size, int prio);
void bluez_sock_link(struct bluez_sock_list *l, struct sock *s);
void bluez_sock_unlink(struct bluez_sock_list *l, struct sock *s);
int bluez_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, int len, int flags, struct scm_cookie *scm);
uint bluez_sock_poll(struct file * file, struct socket *sock, poll_table *wait);
int bluez_sock_w4_connect(struct sock *sk, int flags);
int bt_sock_register(int proto, struct net_proto_family *ops);
int bt_sock_unregister(int proto);
struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio);
void bt_sock_link(struct bt_sock_list *l, struct sock *s);
void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, int len, int flags, struct scm_cookie *scm);
uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait);
int bt_sock_w4_connect(struct sock *sk, int flags);
void bluez_accept_enqueue(struct sock *parent, struct sock *sk);
struct sock *bluez_accept_dequeue(struct sock *parent, struct socket *newsock);
void bt_accept_enqueue(struct sock *parent, struct sock *sk);
struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
/* Skb helpers */
struct bluez_skb_cb {
int incomming;
struct bt_skb_cb {
int incoming;
};
#define bluez_cb(skb) ((struct bluez_skb_cb *)(skb->cb))
#define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb))
static inline struct sk_buff *bluez_skb_alloc(unsigned int len, int how)
static inline struct sk_buff *bt_skb_alloc(unsigned int len, int how)
{
struct sk_buff *skb;
if ((skb = alloc_skb(len + BLUEZ_SKB_RESERVE, how))) {
skb_reserve(skb, BLUEZ_SKB_RESERVE);
bluez_cb(skb)->incomming = 0;
if ((skb = alloc_skb(len + BT_SKB_RESERVE, how))) {
skb_reserve(skb, BT_SKB_RESERVE);
bt_cb(skb)->incoming = 0;
}
return skb;
}
static inline struct sk_buff *bluez_skb_send_alloc(struct sock *sk, unsigned long len,
static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, unsigned long len,
int nb, int *err)
{
struct sk_buff *skb;
if ((skb = sock_alloc_send_skb(sk, len + BLUEZ_SKB_RESERVE, nb, err))) {
skb_reserve(skb, BLUEZ_SKB_RESERVE);
bluez_cb(skb)->incomming = 0;
if ((skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err))) {
skb_reserve(skb, BT_SKB_RESERVE);
bt_cb(skb)->incoming = 0;
}
return skb;
......@@ -193,11 +176,8 @@ static inline int skb_frags_no(struct sk_buff *skb)
return n;
}
int hci_core_init(void);
int hci_core_cleanup(void);
int hci_sock_init(void);
int hci_sock_cleanup(void);
void bt_dump(char *pref, __u8 *buf, int count);
int bterr(__u16 code);
int bt_err(__u16 code);
#endif /* __BLUETOOTH_H */
......@@ -582,7 +582,7 @@ typedef struct {
} __attribute__ ((packed)) evt_read_remote_version_complete;
#define EVT_READ_REMOTE_VERSION_COMPLETE_SIZE 8
/* Internal events generated by BlueZ stack */
/* Internal events generated by Bluetooth stack */
#define EVT_STACK_INTERNAL 0xfd
typedef struct {
__u16 type;
......
......@@ -27,7 +27,7 @@ obj-$(CONFIG_NETROM) += netrom/
obj-$(CONFIG_ROSE) += rose/
obj-$(CONFIG_AX25) += ax25/
obj-$(CONFIG_IRDA) += irda/
obj-$(CONFIG_BLUEZ) += bluetooth/
obj-$(CONFIG_BT) += bluetooth/
obj-$(CONFIG_SUNRPC) += sunrpc/
obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_DECNET) += decnet/
......
Bluetooth subsystem support
CONFIG_BLUEZ
CONFIG_BT
Bluetooth is low-cost, low-power, short-range wireless technology.
It was designed as a replacement for cables and other short-range
technologies like IrDA. Bluetooth operates in personal area range
......@@ -25,7 +25,7 @@ CONFIG_BLUEZ
If you want to compile Bluetooth Core as module (bluetooth.o) say M here.
L2CAP protocol support
CONFIG_BLUEZ_L2CAP
CONFIG_BT_L2CAP
L2CAP (Logical Link Control and Adaptation Protocol) provides
connection oriented and connection-less data transport. L2CAP
support is required for most Bluetooth applications.
......@@ -34,7 +34,7 @@ CONFIG_BLUEZ_L2CAP
compile it as module (l2cap.o).
SCO links support
CONFIG_BLUEZ_SCO
CONFIG_BT_SCO
SCO link provides voice transport over Bluetooth. SCO support is
required for voice applications like Headset and Audio.
......
......@@ -4,11 +4,11 @@
export-objs := syms.o
obj-$(CONFIG_BLUEZ) += bluetooth.o
obj-$(CONFIG_BLUEZ_L2CAP) += l2cap.o
obj-$(CONFIG_BLUEZ_SCO) += sco.o
obj-$(CONFIG_BLUEZ_RFCOMM) += rfcomm/
obj-$(CONFIG_BLUEZ_BNEP) += bnep/
obj-$(CONFIG_BT) += bluetooth.o
obj-$(CONFIG_BT_L2CAP) += l2cap.o
obj-$(CONFIG_BT_SCO) += sco.o
obj-$(CONFIG_BT_RFCOMM) += rfcomm/
obj-$(CONFIG_BT_BNEP) += bnep/
bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o lib.o syms.o
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ 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 $
*/
......@@ -51,66 +51,66 @@
#include <net/bluetooth/bluetooth.h>
#ifndef AF_BLUETOOTH_DEBUG
#ifndef CONFIG_BT_SOCK_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
/* Bluetooth sockets */
#define BLUEZ_MAX_PROTO 5
static struct net_proto_family *bluez_proto[BLUEZ_MAX_PROTO];
#define BT_MAX_PROTO 5
static struct net_proto_family *bt_proto[BT_MAX_PROTO];
static kmem_cache_t *bluez_sock_cache;
static kmem_cache_t *bt_sock_cache;
int bluez_sock_register(int proto, struct net_proto_family *ops)
int bt_sock_register(int proto, struct net_proto_family *ops)
{
if (proto >= BLUEZ_MAX_PROTO)
if (proto >= BT_MAX_PROTO)
return -EINVAL;
if (bluez_proto[proto])
if (bt_proto[proto])
return -EEXIST;
bluez_proto[proto] = ops;
bt_proto[proto] = ops;
return 0;
}
int bluez_sock_unregister(int proto)
int bt_sock_unregister(int proto)
{
if (proto >= BLUEZ_MAX_PROTO)
if (proto >= BT_MAX_PROTO)
return -EINVAL;
if (!bluez_proto[proto])
if (!bt_proto[proto])
return -ENOENT;
bluez_proto[proto] = NULL;
bt_proto[proto] = NULL;
return 0;
}
static int bluez_sock_create(struct socket *sock, int proto)
static int bt_sock_create(struct socket *sock, int proto)
{
if (proto > BLUEZ_MAX_PROTO)
if (proto > BT_MAX_PROTO)
return -EINVAL;
#if defined(CONFIG_KMOD)
if (!bluez_proto[proto]) {
if (!bt_proto[proto]) {
char module_name[30];
sprintf(module_name, "bt-proto-%d", proto);
request_module(module_name);
}
#endif
if (!bluez_proto[proto])
if (!bt_proto[proto])
return -ENOENT;
return bluez_proto[proto]->create(sock, proto);
return bt_proto[proto]->create(sock, proto);
}
struct sock *bluez_sock_alloc(struct socket *sock, int proto, int pi_size, int prio)
struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio)
{
struct sock *sk;
void *pi;
sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct bluez_sock), bluez_sock_cache);
sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct bt_sock), bt_sock_cache);
if (!sk)
return NULL;
......@@ -125,7 +125,7 @@ struct sock *bluez_sock_alloc(struct socket *sock, int proto, int pi_size, int p
}
sock_init_data(sock, sk);
INIT_LIST_HEAD(&bluez_sk(sk)->accept_q);
INIT_LIST_HEAD(&bt_sk(sk)->accept_q);
sk->zapped = 0;
sk->protocol = proto;
......@@ -134,7 +134,7 @@ struct sock *bluez_sock_alloc(struct socket *sock, int proto, int pi_size, int p
return sk;
}
void bluez_sock_link(struct bluez_sock_list *l, struct sock *sk)
void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
{
write_lock_bh(&l->lock);
sk->next = l->head;
......@@ -143,7 +143,7 @@ void bluez_sock_link(struct bluez_sock_list *l, struct sock *sk)
write_unlock_bh(&l->lock);
}
void bluez_sock_unlink(struct bluez_sock_list *l, struct sock *sk)
void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
{
struct sock **skp;
......@@ -158,45 +158,45 @@ void bluez_sock_unlink(struct bluez_sock_list *l, struct sock *sk)
write_unlock_bh(&l->lock);
}
void bluez_accept_enqueue(struct sock *parent, struct sock *sk)
void bt_accept_enqueue(struct sock *parent, struct sock *sk)
{
BT_DBG("parent %p, sk %p", parent, sk);
sock_hold(sk);
list_add_tail(&bluez_sk(sk)->accept_q, &bluez_sk(parent)->accept_q);
bluez_sk(sk)->parent = parent;
list_add_tail(&bt_sk(sk)->accept_q, &bt_sk(parent)->accept_q);
bt_sk(sk)->parent = parent;
parent->ack_backlog++;
}
static void bluez_accept_unlink(struct sock *sk)
static void bt_accept_unlink(struct sock *sk)
{
BT_DBG("sk %p state %d", sk, sk->state);
list_del_init(&bluez_sk(sk)->accept_q);
bluez_sk(sk)->parent->ack_backlog--;
bluez_sk(sk)->parent = NULL;
list_del_init(&bt_sk(sk)->accept_q);
bt_sk(sk)->parent->ack_backlog--;
bt_sk(sk)->parent = NULL;
sock_put(sk);
}
struct sock *bluez_accept_dequeue(struct sock *parent, struct socket *newsock)
struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
{
struct list_head *p, *n;
struct sock *sk;
BT_DBG("parent %p", parent);
list_for_each_safe(p, n, &bluez_sk(parent)->accept_q) {
sk = (struct sock *) list_entry(p, struct bluez_sock, accept_q);
list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
lock_sock(sk);
if (sk->state == BT_CLOSED) {
release_sock(sk);
bluez_accept_unlink(sk);
bt_accept_unlink(sk);
continue;
}
if (sk->state == BT_CONNECTED || !newsock) {
bluez_accept_unlink(sk);
bt_accept_unlink(sk);
if (newsock)
sock_graft(sk, newsock);
release_sock(sk);
......@@ -207,7 +207,7 @@ struct sock *bluez_accept_dequeue(struct sock *parent, struct socket *newsock)
return NULL;
}
int bluez_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int len, int flags, struct scm_cookie *scm)
{
int noblock = flags & MSG_DONTWAIT;
......@@ -242,7 +242,7 @@ int bluez_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
return err ? : copied;
}
unsigned int bluez_sock_poll(struct file * file, struct socket *sock, poll_table *wait)
unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait)
{
struct sock *sk = sock->sk;
unsigned int mask;
......@@ -259,7 +259,7 @@ unsigned int bluez_sock_poll(struct file * file, struct socket *sock, poll_table
mask |= POLLHUP;
if (!skb_queue_empty(&sk->receive_queue) ||
!list_empty(&bluez_sk(sk)->accept_q) ||
!list_empty(&bt_sk(sk)->accept_q) ||
(sk->shutdown & RCV_SHUTDOWN))
mask |= POLLIN | POLLRDNORM;
......@@ -277,7 +277,7 @@ unsigned int bluez_sock_poll(struct file * file, struct socket *sock, poll_table
return mask;
}
int bluez_sock_w4_connect(struct sock *sk, int flags)
int bt_sock_w4_connect(struct sock *sk, int flags)
{
DECLARE_WAITQUEUE(wait, current);
long timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
......@@ -316,50 +316,51 @@ int bluez_sock_w4_connect(struct sock *sk, int flags)
return err;
}
struct net_proto_family bluez_sock_family_ops =
struct net_proto_family bt_sock_family_ops =
{
PF_BLUETOOTH, bluez_sock_create
PF_BLUETOOTH, bt_sock_create
};
static int __init bluez_init(void)
extern int hci_sock_init(void);
extern int hci_sock_cleanup(void);
static int __init bt_init(void)
{
BT_INFO("BlueZ Core ver %s Copyright (C) 2000,2001 Qualcomm Inc",
BT_INFO("Bluetooth Core ver %s Copyright (C) 2000,2001 Qualcomm Inc",
VERSION);
BT_INFO("Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>");
proc_mkdir("bluetooth", NULL);
/* Init socket cache */
bluez_sock_cache = kmem_cache_create("bluez_sock",
sizeof(struct bluez_sock), 0,
bt_sock_cache = kmem_cache_create("bt_sock",
sizeof(struct bt_sock), 0,
SLAB_HWCACHE_ALIGN, 0, 0);
if (!bluez_sock_cache) {
BT_ERR("BlueZ socket cache creation failed");
if (!bt_sock_cache) {
BT_ERR("Bluetooth socket cache creation failed");
return -ENOMEM;
}
sock_register(&bluez_sock_family_ops);
sock_register(&bt_sock_family_ops);
hci_core_init();
hci_sock_init();
return 0;
}
static void __exit bluez_cleanup(void)
static void __exit bt_cleanup(void)
{
hci_sock_cleanup();
hci_core_cleanup();
sock_unregister(PF_BLUETOOTH);
kmem_cache_destroy(bluez_sock_cache);
kmem_cache_destroy(bt_sock_cache);
remove_proc_entry("bluetooth", NULL);
}
subsys_initcall(bluez_init);
module_exit(bluez_cleanup);
subsys_initcall(bt_init);
module_exit(bt_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ Core ver " VERSION);
MODULE_DESCRIPTION("Bluetooth Core ver " VERSION);
MODULE_LICENSE("GPL");
BNEP protocol support
CONFIG_BLUEZ_BNEP
CONFIG_BT_BNEP
BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
emulation layer on top of Bluetooth. BNEP is required for Bluetooth
PAN (Personal Area Network).
......@@ -12,10 +12,10 @@ CONFIG_BLUEZ_BNEP
compile it as module (bnep.o).
BNEP multicast filter support
CONFIG_BLUEZ_BNEP_MC_FILTER
CONFIG_BT_BNEP_MC_FILTER
This option enables the multicast filter support for BNEP.
BNEP protocol filter support
CONFIG_BLUEZ_BNEP_PROTO_FILTER
CONFIG_BT_BNEP_PROTO_FILTER
This option enables the protocol filter support for BNEP.
dep_tristate 'BNEP protocol support' CONFIG_BLUEZ_BNEP $CONFIG_BLUEZ_L2CAP
dep_tristate 'BNEP protocol support' CONFIG_BT_BNEP $CONFIG_BT_L2CAP
if [ "$CONFIG_BLUEZ_BNEP" != "n" ]; then
bool ' Multicast filter support' CONFIG_BLUEZ_BNEP_MC_FILTER
bool ' Protocol filter support' CONFIG_BLUEZ_BNEP_PROTO_FILTER
if [ "$CONFIG_BT_BNEP" != "n" ]; then
bool ' Multicast filter support' CONFIG_BT_BNEP_MC_FILTER
bool ' Protocol filter support' CONFIG_BT_BNEP_PROTO_FILTER
fi
......@@ -2,7 +2,7 @@
# Makefile for the Linux Bluetooth BNEP layer.
#
obj-$(CONFIG_BLUEZ_BNEP) += bnep.o
obj-$(CONFIG_BT_BNEP) += bnep.o
bnep-objs := core.o sock.o netdev.o crc32.o
......
......@@ -58,7 +58,7 @@
#include "bnep.h"
#ifndef CONFIG_BLUEZ_BNEP_DEBUG
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
......@@ -144,7 +144,7 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, struct sk_buff *skb)
BT_DBG("filter len %d", n);
#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
#ifdef CONFIG_BT_BNEP_PROTO_FILTER
n /= 4;
if (n <= BNEP_MAX_PROTO_FILTERS) {
struct bnep_proto_filter *f = s->proto_filter;
......@@ -186,7 +186,7 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, struct sk_buff *skb)
BT_DBG("filter len %d", n);
#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
#ifdef CONFIG_BT_BNEP_MC_FILTER
n /= (ETH_ALEN * 2);
if (n > 0) {
......@@ -538,8 +538,8 @@ int bnep_add_connection(struct bnep_conadd_req *req, struct socket *sock)
BT_DBG("");
baswap((void *) dst, &bluez_sk(sock->sk)->dst);
baswap((void *) src, &bluez_sk(sock->sk)->src);
baswap((void *) dst, &bt_sk(sock->sk)->dst);
baswap((void *) src, &bt_sk(sock->sk)->src);
s = kmalloc(sizeof(struct bnep_session), GFP_KERNEL);
if (!s)
......@@ -572,12 +572,12 @@ int bnep_add_connection(struct bnep_conadd_req *req, struct socket *sock)
s->msg.msg_flags = MSG_NOSIGNAL;
#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
#ifdef CONFIG_BT_BNEP_MC_FILTER
/* Set default mc filter */
set_bit(bnep_mc_hash(dev->broadcast), (ulong *) &s->mc_filter);
#endif
#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
#ifdef CONFIG_BT_BNEP_PROTO_FILTER
/* Set default protocol filter */
/* (IPv4, ARP) */
......
......@@ -46,7 +46,7 @@
#include "bnep.h"
#ifndef CONFIG_BLUEZ_BNEP_DEBUG
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......@@ -73,7 +73,7 @@ static struct net_device_stats *bnep_net_get_stats(struct net_device *dev)
static void bnep_net_set_mc_list(struct net_device *dev)
{
#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
#ifdef CONFIG_BT_BNEP_MC_FILTER
struct bnep_session *s = dev->priv;
struct sock *sk = s->sock->sk;
struct bnep_set_filter_req *r;
......@@ -143,7 +143,7 @@ static int bnep_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return -EINVAL;
}
#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
#ifdef CONFIG_BT_BNEP_MC_FILTER
static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s)
{
struct ethhdr *eh = (void *) skb->data;
......@@ -154,7 +154,7 @@ static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s
}
#endif
#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
#ifdef CONFIG_BT_BNEP_PROTO_FILTER
/* Determine ether protocol. Based on eth_type_trans. */
static inline u16 bnep_net_eth_proto(struct sk_buff *skb)
{
......@@ -192,14 +192,14 @@ static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
BT_DBG("skb %p, dev %p", skb, dev);
#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
#ifdef CONFIG_BT_BNEP_MC_FILTER
if (bnep_net_mc_filter(skb, s)) {
kfree_skb(skb);
return 0;
}
#endif
#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
#ifdef CONFIG_BT_BNEP_PROTO_FILTER
if (bnep_net_proto_filter(skb, s)) {
kfree_skb(skb);
return 0;
......
......@@ -50,7 +50,7 @@
#include "bnep.h"
#ifndef CONFIG_BLUEZ_BNEP_DEBUG
#ifndef CONFIG_BT_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......@@ -198,7 +198,7 @@ static int bnep_sock_create(struct socket *sock, int protocol)
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
if (!(sk = bluez_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL)))
if (!(sk = bt_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL)))
return -ENOMEM;
sock->ops = &bnep_sock_ops;
......@@ -219,13 +219,13 @@ static struct net_proto_family bnep_sock_family_ops = {
int bnep_sock_init(void)
{
bluez_sock_register(BTPROTO_BNEP, &bnep_sock_family_ops);
bt_sock_register(BTPROTO_BNEP, &bnep_sock_family_ops);
return 0;
}
int bnep_sock_cleanup(void)
{
if (bluez_sock_unregister(BTPROTO_BNEP))
if (bt_sock_unregister(BTPROTO_BNEP))
BT_ERR("Can't unregister BNEP socket");
return 0;
}
......@@ -52,7 +52,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#ifndef HCI_CORE_DEBUG
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI Core.
* Bluetooth HCI Core.
*
* $Id: hci_core.c,v 1.6 2002/04/17 17:37:16 maxk Exp $
*/
......@@ -53,7 +53,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#ifndef HCI_CORE_DEBUG
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......@@ -168,7 +168,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev,
switch (hdev->req_status) {
case HCI_REQ_DONE:
err = -bterr(hdev->req_result);
err = -bt_err(hdev->req_result);
break;
case HCI_REQ_CANCELED:
......@@ -877,7 +877,7 @@ int hci_recv_frame(struct sk_buff *skb)
BT_DBG("%s type %d len %d", hdev->name, skb->pkt_type, skb->len);
/* Incomming skb */
bluez_cb(skb)->incomming = 1;
bt_cb(skb)->incoming = 1;
/* Time stamp */
do_gettimeofday(&skb->stamp);
......@@ -1001,7 +1001,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void *p
BT_DBG("%s ogf 0x%x ocf 0x%x plen %d", hdev->name, ogf, ocf, plen);
if (!(skb = bluez_skb_alloc(len, GFP_ATOMIC))) {
if (!(skb = bt_skb_alloc(len, GFP_ATOMIC))) {
BT_ERR("%s Can't allocate memory for HCI command", hdev->name);
return -ENOMEM;
}
......@@ -1250,7 +1250,7 @@ static void hci_tx_task(unsigned long arg)
read_unlock(&hci_task_lock);
}
/* ----- HCI RX task (incomming data proccessing) ----- */
/* ----- HCI RX task (incoming data proccessing) ----- */
/* ACL data packet */
static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
......@@ -1406,15 +1406,3 @@ static void hci_cmd_task(unsigned long arg)
}
}
}
/* ---- Initialization ---- */
int hci_core_init(void)
{
return 0;
}
int hci_core_cleanup(void)
{
return 0;
}
......@@ -52,7 +52,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#ifndef HCI_CORE_DEBUG
#ifndef CONFIG_BT_HCI_CORE_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......@@ -68,7 +68,7 @@ static void hci_cc_link_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
default:
BT_DBG("%s Command complete: ogf LINK_CTL ocf %x", hdev->name, ocf);
break;
};
}
}
/* Command Complete OGF LINK_POLICY */
......@@ -103,7 +103,7 @@ static void hci_cc_link_policy(struct hci_dev *hdev, __u16 ocf, struct sk_buff *
BT_DBG("%s: Command complete: ogf LINK_POLICY ocf %x",
hdev->name, ocf);
break;
};
}
}
/* Command Complete OGF HOST_CTL */
......@@ -213,7 +213,7 @@ static void hci_cc_host_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
default:
BT_DBG("%s Command complete: ogf HOST_CTL ocf %x", hdev->name, ocf);
break;
};
}
}
/* Command Complete OGF INFO_PARAM */
......@@ -287,7 +287,7 @@ static void hci_cc_info_param(struct hci_dev *hdev, __u16 ocf, struct sk_buff *s
default:
BT_DBG("%s Command complete: ogf INFO_PARAM ocf %x", hdev->name, ocf);
break;
};
}
}
/* Command Status OGF LINK_CTL */
......@@ -376,7 +376,7 @@ static void hci_cs_link_ctl(struct hci_dev *hdev, __u16 ocf, __u8 status)
BT_DBG("%s Command status: ogf LINK_CTL ocf %x status %d",
hdev->name, ocf, status);
break;
};
}
}
/* Command Status OGF LINK_POLICY */
......@@ -388,7 +388,7 @@ static void hci_cs_link_policy(struct hci_dev *hdev, __u16 ocf, __u8 status)
default:
BT_DBG("%s Command status: ogf HOST_POLICY ocf %x", hdev->name, ocf);
break;
};
}
}
/* Command Status OGF HOST_CTL */
......@@ -400,7 +400,7 @@ static void hci_cs_host_ctl(struct hci_dev *hdev, __u16 ocf, __u8 status)
default:
BT_DBG("%s Command status: ogf HOST_CTL ocf %x", hdev->name, ocf);
break;
};
}
}
/* Command Status OGF INFO_PARAM */
......@@ -412,7 +412,7 @@ static void hci_cs_info_param(struct hci_dev *hdev, __u16 ocf, __u8 status)
default:
BT_DBG("%s Command status: ogf INFO_PARAM ocf %x", hdev->name, ocf);
break;
};
}
}
/* Inquiry Complete */
......@@ -849,7 +849,7 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data)
void *ptr;
size = HCI_EVENT_HDR_SIZE + EVT_STACK_INTERNAL_SIZE + dlen;
skb = bluez_skb_alloc(size, GFP_ATOMIC);
skb = bt_skb_alloc(size, GFP_ATOMIC);
if (!skb)
return;
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ HCI socket layer.
* Bluetooth HCI socket layer.
*
* $Id: hci_sock.c,v 1.4 2002/04/18 22:26:14 maxk Exp $
*/
......@@ -53,7 +53,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#ifndef HCI_SOCK_DEBUG
#ifndef CONFIG_BT_HCI_SOCK_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
......@@ -79,7 +79,7 @@ static struct hci_sec_filter hci_sec_filter = {
}
};
static struct bluez_sock_list hci_sk_list = {
static struct bt_sock_list hci_sk_list = {
.lock = RW_LOCK_UNLOCKED
};
......@@ -144,7 +144,7 @@ static int hci_sock_release(struct socket *sock)
if (!sk)
return 0;
bluez_sock_unlink(&hci_sk_list, sk);
bt_sock_unlink(&hci_sk_list, sk);
if (hdev) {
atomic_dec(&hdev->promisc);
......@@ -310,7 +310,7 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
__u32 mask = hci_pi(sk)->cmsg_mask;
if (mask & HCI_CMSG_DIR)
put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(int), &bluez_cb(skb)->incomming);
put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(int), &bt_cb(skb)->incoming);
if (mask & HCI_CMSG_TSTAMP)
put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(skb->stamp), &skb->stamp);
......@@ -378,7 +378,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
goto done;
}
if (!(skb = bluez_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &err)))
if (!(skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &err)))
goto done;
if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
......@@ -568,14 +568,14 @@ static int hci_sock_create(struct socket *sock, int protocol)
sock->ops = &hci_sock_ops;
sk = bluez_sock_alloc(sock, protocol, sizeof(struct hci_pinfo), GFP_KERNEL);
sk = bt_sock_alloc(sock, protocol, sizeof(struct hci_pinfo), GFP_KERNEL);
if (!sk)
return -ENOMEM;
sock->state = SS_UNCONNECTED;
sk->state = BT_OPEN;
bluez_sock_link(&hci_sk_list, sk);
bt_sock_link(&hci_sk_list, sk);
MOD_INC_USE_COUNT;
return 0;
......@@ -627,7 +627,7 @@ struct notifier_block hci_sock_nblock = {
int hci_sock_init(void)
{
if (bluez_sock_register(BTPROTO_HCI, &hci_sock_family_ops)) {
if (bt_sock_register(BTPROTO_HCI, &hci_sock_family_ops)) {
BT_ERR("Can't register HCI socket");
return -EPROTO;
}
......@@ -638,7 +638,7 @@ int hci_sock_init(void)
int hci_sock_cleanup(void)
{
if (bluez_sock_unregister(BTPROTO_HCI))
if (bt_sock_unregister(BTPROTO_HCI))
BT_ERR("Can't unregister HCI socket");
hci_unregister_notifier(&hci_sock_nblock);
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ L2CAP core and sockets.
* Bluetooth L2CAP core and sockets.
*
* $Id: l2cap.c,v 1.15 2002/09/09 01:14:52 maxk Exp $
*/
......@@ -57,14 +57,14 @@
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/l2cap.h>
#ifndef L2CAP_DEBUG
#ifndef CONFIG_BT_L2CAP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
static struct proto_ops l2cap_sock_ops;
struct bluez_sock_list l2cap_sk_list = {
struct bt_sock_list l2cap_sk_list = {
.lock = RW_LOCK_UNLOCKED
};
......@@ -188,8 +188,8 @@ static inline void l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, stru
int l2cap_connect(struct sock *sk)
{
bdaddr_t *src = &bluez_sk(sk)->src;
bdaddr_t *dst = &bluez_sk(sk)->dst;
bdaddr_t *src = &bt_sk(sk)->src;
bdaddr_t *dst = &bt_sk(sk)->dst;
struct l2cap_conn *conn;
struct hci_conn *hcon;
struct hci_dev *hdev;
......@@ -248,7 +248,7 @@ static struct sock *__l2cap_get_sock_by_addr(__u16 psm, bdaddr_t *src)
struct sock *sk;
for (sk = l2cap_sk_list.head; sk; sk = sk->next) {
if (l2cap_pi(sk)->psm == psm &&
!bacmp(&bluez_sk(sk)->src, src))
!bacmp(&bt_sk(sk)->src, src))
break;
}
return sk;
......@@ -267,11 +267,11 @@ static struct sock *__l2cap_get_sock_by_psm(int state, __u16 psm, bdaddr_t *src)
if (l2cap_pi(sk)->psm == psm) {
/* Exact match. */
if (!bacmp(&bluez_sk(sk)->src, src))
if (!bacmp(&bt_sk(sk)->src, src))
break;
/* Closest match */
if (!bacmp(&bluez_sk(sk)->src, BDADDR_ANY))
if (!bacmp(&bt_sk(sk)->src, BDADDR_ANY))
sk1 = sk;
}
}
......@@ -310,7 +310,7 @@ static void l2cap_sock_cleanup_listen(struct sock *parent)
BT_DBG("parent %p", parent);
/* Close not yet accepted channels */
while ((sk = bluez_accept_dequeue(parent, NULL)))
while ((sk = bt_accept_dequeue(parent, NULL)))
l2cap_sock_close(sk);
parent->state = BT_CLOSED;
......@@ -328,7 +328,7 @@ static void l2cap_sock_kill(struct sock *sk)
BT_DBG("sk %p state %d", sk, sk->state);
/* Kill poor orphan */
bluez_sock_unlink(&l2cap_sk_list, sk);
bt_sock_unlink(&l2cap_sk_list, sk);
sk->dead = 1;
sock_put(sk);
}
......@@ -409,7 +409,7 @@ static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, int prio)
{
struct sock *sk;
sk = bluez_sock_alloc(sock, proto, sizeof(struct l2cap_pinfo), prio);
sk = bt_sock_alloc(sock, proto, sizeof(struct l2cap_pinfo), prio);
if (!sk)
return NULL;
......@@ -421,7 +421,7 @@ static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, int prio)
l2cap_sock_init_timer(sk);
bluez_sock_link(&l2cap_sk_list, sk);
bt_sock_link(&l2cap_sk_list, sk);
MOD_INC_USE_COUNT;
return sk;
......@@ -471,7 +471,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
err = -EADDRINUSE;
} else {
/* Save source address */
bacpy(&bluez_sk(sk)->src, &la->l2_bdaddr);
bacpy(&bt_sk(sk)->src, &la->l2_bdaddr);
l2cap_pi(sk)->psm = la->l2_psm;
sk->state = BT_BOUND;
}
......@@ -524,14 +524,14 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
}
/* Set destination address and psm */
bacpy(&bluez_sk(sk)->dst, &la->l2_bdaddr);
bacpy(&bt_sk(sk)->dst, &la->l2_bdaddr);
l2cap_pi(sk)->psm = la->l2_psm;
if ((err = l2cap_connect(sk)))
goto done;
wait:
err = bluez_sock_w4_connect(sk, flags);
err = bt_sock_w4_connect(sk, flags);
done:
release_sock(sk);
......@@ -586,7 +586,7 @@ int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int flags)
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk->sleep, &wait);
while (!(nsk = bluez_accept_dequeue(sk, newsock))) {
while (!(nsk = bt_accept_dequeue(sk, newsock))) {
set_current_state(TASK_INTERRUPTIBLE);
if (!timeo) {
err = -EAGAIN;
......@@ -633,9 +633,9 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *l
*len = sizeof(struct sockaddr_l2);
if (peer)
bacpy(&la->l2_bdaddr, &bluez_sk(sk)->dst);
bacpy(&la->l2_bdaddr, &bt_sk(sk)->dst);
else
bacpy(&la->l2_bdaddr, &bluez_sk(sk)->src);
bacpy(&la->l2_bdaddr, &bt_sk(sk)->src);
la->l2_psm = l2cap_pi(sk)->psm;
return 0;
......@@ -892,7 +892,7 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct so
__l2cap_chan_link(l, sk);
if (parent)
bluez_accept_enqueue(parent, sk);
bt_accept_enqueue(parent, sk);
}
/* Delete channel.
......@@ -900,7 +900,7 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct so
static void l2cap_chan_del(struct sock *sk, int err)
{
struct l2cap_conn *conn = l2cap_pi(sk)->conn;
struct sock *parent = bluez_sk(sk)->parent;
struct sock *parent = bt_sk(sk)->parent;
l2cap_sock_clear_timer(sk);
......@@ -954,7 +954,7 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
static void l2cap_chan_ready(struct sock *sk)
{
struct sock *parent = bluez_sk(sk)->parent;
struct sock *parent = bt_sk(sk)->parent;
BT_DBG("sk %p, parent %p", sk, parent);
......@@ -1019,7 +1019,7 @@ static int l2cap_chan_send(struct sock *sk, struct msghdr *msg, int len)
count = MIN(conn->mtu - hlen, len);
skb = bluez_skb_send_alloc(sk, hlen + count,
skb = bt_skb_send_alloc(sk, hlen + count,
msg->msg_flags & MSG_DONTWAIT, &err);
if (!skb)
return err;
......@@ -1045,7 +1045,7 @@ static int l2cap_chan_send(struct sock *sk, struct msghdr *msg, int len)
while (len) {
count = MIN(conn->mtu, len);
*frag = bluez_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err);
*frag = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err);
if (!*frag)
goto fail;
......@@ -1105,7 +1105,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn,
len = L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE + dlen;
count = MIN(conn->mtu, len);
skb = bluez_skb_alloc(count, GFP_ATOMIC);
skb = bt_skb_alloc(count, GFP_ATOMIC);
if (!skb)
return NULL;
......@@ -1131,7 +1131,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn,
while (len) {
count = MIN(conn->mtu, len);
*frag = bluez_skb_alloc(count, GFP_ATOMIC);
*frag = bt_skb_alloc(count, GFP_ATOMIC);
if (!*frag)
goto fail;
......@@ -1374,8 +1374,8 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, l2cap_cmd_hdr *cmd,
hci_conn_hold(conn->hcon);
l2cap_sock_init(sk, parent);
bacpy(&bluez_sk(sk)->src, conn->src);
bacpy(&bluez_sk(sk)->dst, conn->dst);
bacpy(&bt_sk(sk)->src, conn->src);
bacpy(&bt_sk(sk)->dst, conn->dst);
l2cap_pi(sk)->psm = psm;
l2cap_pi(sk)->dcid = scid;
......@@ -1785,10 +1785,10 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
if (sk->state != BT_LISTEN)
continue;
if (!bacmp(&bluez_sk(sk)->src, bdaddr)) {
if (!bacmp(&bt_sk(sk)->src, bdaddr)) {
lm1 |= (HCI_LM_ACCEPT | l2cap_pi(sk)->link_mode);
exact++;
} else if (!bacmp(&bluez_sk(sk)->src, BDADDR_ANY))
} else if (!bacmp(&bt_sk(sk)->src, BDADDR_ANY))
lm2 |= (HCI_LM_ACCEPT | l2cap_pi(sk)->link_mode);
}
read_unlock(&l2cap_sk_list.lock);
......@@ -1810,7 +1810,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, __u8 status)
if (conn)
l2cap_conn_ready(conn);
} else
l2cap_conn_del(hcon, bterr(status));
l2cap_conn_del(hcon, bt_err(status));
return 0;
}
......@@ -1822,7 +1822,7 @@ static int l2cap_disconn_ind(struct hci_conn *hcon, __u8 reason)
if (hcon->type != ACL_LINK)
return 0;
l2cap_conn_del(hcon, bterr(reason));
l2cap_conn_del(hcon, bt_err(reason));
return 0;
}
......@@ -1958,7 +1958,7 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, __u16
}
/* Allocate skb for the complete frame (with header) */
if (!(conn->rx_skb = bluez_skb_alloc(len, GFP_ATOMIC)))
if (!(conn->rx_skb = bt_skb_alloc(len, GFP_ATOMIC)))
goto drop;
memcpy(skb_put(conn->rx_skb, skb->len), skb->data, skb->len);
......@@ -1996,7 +1996,7 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, __u16
}
/* ----- Proc fs support ------ */
static int l2cap_sock_dump(char *buf, struct bluez_sock_list *list)
static int l2cap_sock_dump(char *buf, struct bt_sock_list *list)
{
struct l2cap_pinfo *pi;
struct sock *sk;
......@@ -2007,7 +2007,7 @@ static int l2cap_sock_dump(char *buf, struct bluez_sock_list *list)
for (sk = list->head; sk; sk = sk->next) {
pi = l2cap_pi(sk);
ptr += sprintf(ptr, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d 0x%x\n",
batostr(&bluez_sk(sk)->src), batostr(&bluez_sk(sk)->dst),
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->state, pi->psm, pi->scid, pi->dcid, pi->imtu, pi->omtu,
pi->link_mode);
}
......@@ -2051,8 +2051,8 @@ static struct proto_ops l2cap_sock_ops = {
.accept = l2cap_sock_accept,
.getname = l2cap_sock_getname,
.sendmsg = l2cap_sock_sendmsg,
.recvmsg = bluez_sock_recvmsg,
.poll = bluez_sock_poll,
.recvmsg = bt_sock_recvmsg,
.poll = bt_sock_poll,
.mmap = sock_no_mmap,
.socketpair = sock_no_socketpair,
.ioctl = sock_no_ioctl,
......@@ -2081,7 +2081,7 @@ int __init l2cap_init(void)
{
int err;
if ((err = bluez_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops))) {
if ((err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops))) {
BT_ERR("Can't register L2CAP socket");
return err;
}
......@@ -2093,7 +2093,7 @@ int __init l2cap_init(void)
create_proc_read_entry("bluetooth/l2cap", 0, 0, l2cap_read_proc, NULL);
BT_INFO("BlueZ L2CAP ver %s Copyright (C) 2000,2001 Qualcomm Inc", VERSION);
BT_INFO("Bluetooth L2CAP ver %s Copyright (C) 2000,2001 Qualcomm Inc", VERSION);
BT_INFO("Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>");
return 0;
}
......@@ -2103,7 +2103,7 @@ void l2cap_cleanup(void)
remove_proc_entry("bluetooth/l2cap", NULL);
/* Unregister socket and protocol */
if (bluez_sock_unregister(BTPROTO_L2CAP))
if (bt_sock_unregister(BTPROTO_L2CAP))
BT_ERR("Can't unregister L2CAP socket");
if (hci_unregister_proto(&l2cap_hci_proto))
......@@ -2114,5 +2114,5 @@ module_init(l2cap_init);
module_exit(l2cap_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ L2CAP ver " VERSION);
MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ kernel library.
* Bluetooth kernel library.
*
* $Id: lib.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
*/
......@@ -35,7 +35,7 @@
#include <net/bluetooth/bluetooth.h>
void bluez_dump(char *pref, __u8 *buf, int count)
void bt_dump(char *pref, __u8 *buf, int count)
{
char *ptr;
char line[100];
......@@ -83,7 +83,7 @@ char *batostr(bdaddr_t *ba)
}
/* Bluetooth error codes to Unix errno mapping */
int bterr(__u16 code)
int bt_err(__u16 code)
{
switch (code) {
case 0:
......@@ -171,5 +171,5 @@ int bterr(__u16 code)
default:
return ENOSYS;
};
}
}
RFCOMM protocol support
CONFIG_BLUEZ_RFCOMM
CONFIG_BT_RFCOMM
RFCOMM provides connection oriented stream transport. RFCOMM
support is required for Dialup Networking, OBEX and other Bluetooth
applications.
......@@ -8,5 +8,5 @@ CONFIG_BLUEZ_RFCOMM
compile it as module (rfcomm.o).
RFCOMM TTY emulation support
CONFIG_BLUEZ_RFCOMM_TTY
CONFIG_BT_RFCOMM_TTY
This option enables TTY emulation support for RFCOMM channels.
dep_tristate 'RFCOMM protocol support' CONFIG_BLUEZ_RFCOMM $CONFIG_BLUEZ_L2CAP
dep_tristate 'RFCOMM protocol support' CONFIG_BT_RFCOMM $CONFIG_BT_L2CAP
if [ "$CONFIG_BLUEZ_RFCOMM" != "n" ]; then
bool ' RFCOMM TTY support' CONFIG_BLUEZ_RFCOMM_TTY
if [ "$CONFIG_BT_RFCOMM" != "n" ]; then
bool ' RFCOMM TTY support' CONFIG_BT_RFCOMM_TTY
fi
......@@ -2,10 +2,10 @@
# Makefile for the Linux Bluetooth RFCOMM layer.
#
obj-$(CONFIG_BLUEZ_RFCOMM) += rfcomm.o
obj-$(CONFIG_BT_RFCOMM) += rfcomm.o
rfcomm-y := core.o sock.o crc.o
rfcomm-$(CONFIG_BLUEZ_RFCOMM_TTY) += tty.o
rfcomm-$(CONFIG_BT_RFCOMM_TTY) += tty.o
rfcomm-objs := $(rfcomm-y)
include $(TOPDIR)/Rules.make
......@@ -26,7 +26,7 @@
*/
/*
* RFCOMM core.
* Bluetooth RFCOMM core.
*
* $Id: core.c,v 1.42 2002/10/01 23:26:25 maxk Exp $
*/
......@@ -53,7 +53,7 @@
#define VERSION "0.3"
#ifndef CONFIG_BLUEZ_RFCOMM_DEBUG
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
......@@ -489,10 +489,10 @@ struct rfcomm_session *rfcomm_session_get(bdaddr_t *src, bdaddr_t *dst)
{
struct rfcomm_session *s;
struct list_head *p, *n;
struct bluez_sock *sk;
struct bt_sock *sk;
list_for_each_safe(p, n, &session_list) {
s = list_entry(p, struct rfcomm_session, list);
sk = bluez_sk(s->sock->sk);
sk = bt_sk(s->sock->sk);
if ((!bacmp(src, BDADDR_ANY) || !bacmp(&sk->src, src)) &&
!bacmp(&sk->dst, dst))
......@@ -577,9 +577,9 @@ void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src, bdaddr_t *d
{
struct sock *sk = s->sock->sk;
if (src)
bacpy(src, &bluez_sk(sk)->src);
bacpy(src, &bt_sk(sk)->src);
if (dst)
bacpy(dst, &bluez_sk(sk)->dst);
bacpy(dst, &bt_sk(sk)->dst);
}
/* ---- RFCOMM frame sending ---- */
......@@ -1509,7 +1509,7 @@ static inline void rfcomm_accept_connection(struct rfcomm_session *s)
/* Fast check for a new connection.
* Avoids unnesesary socket allocations. */
if (list_empty(&bluez_sk(sock->sk)->accept_q))
if (list_empty(&bt_sk(sock->sk)->accept_q))
return;
BT_DBG("session %p", s);
......@@ -1727,7 +1727,7 @@ static int rfcomm_dlc_dump(char *buf)
d = list_entry(pp, struct rfcomm_dlc, list);
ptr += sprintf(ptr, "dlc %s %s %ld %d %d %d %d\n",
batostr(&bluez_sk(sk)->src), batostr(&bluez_sk(sk)->dst),
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
d->state, d->dlci, d->mtu, d->rx_credits, d->tx_credits);
}
}
......@@ -1771,13 +1771,13 @@ int __init rfcomm_init(void)
rfcomm_init_sockets();
#ifdef CONFIG_BLUEZ_RFCOMM_TTY
#ifdef CONFIG_BT_RFCOMM_TTY
rfcomm_init_ttys();
#endif
create_proc_read_entry("bluetooth/rfcomm", 0, 0, rfcomm_read_proc, NULL);
BT_INFO("BlueZ RFCOMM ver %s", VERSION);
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;
......@@ -1796,7 +1796,7 @@ void rfcomm_cleanup(void)
remove_proc_entry("bluetooth/rfcomm", NULL);
#ifdef CONFIG_BLUEZ_RFCOMM_TTY
#ifdef CONFIG_BT_RFCOMM_TTY
rfcomm_cleanup_ttys();
#endif
......@@ -1808,5 +1808,5 @@ module_init(rfcomm_init);
module_exit(rfcomm_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("BlueZ RFCOMM ver " VERSION);
MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -52,14 +52,14 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/rfcomm.h>
#ifndef CONFIG_BLUEZ_RFCOMM_DEBUG
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
static struct proto_ops rfcomm_sock_ops;
static struct bluez_sock_list rfcomm_sk_list = {
static struct bt_sock_list rfcomm_sk_list = {
.lock = RW_LOCK_UNLOCKED
};
......@@ -98,10 +98,10 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
sk->err = err;
sk->state = d->state;
parent = bluez_sk(sk)->parent;
parent = bt_sk(sk)->parent;
if (!parent) {
if (d->state == BT_CONNECTED)
rfcomm_session_getaddr(d->session, &bluez_sk(sk)->src, NULL);
rfcomm_session_getaddr(d->session, &bt_sk(sk)->src, NULL);
sk->state_change(sk);
} else
parent->data_ready(parent, 0);
......@@ -122,7 +122,7 @@ static struct sock *__rfcomm_get_sock_by_addr(int channel, bdaddr_t *src)
for (sk = rfcomm_sk_list.head; sk; sk = sk->next) {
if (rfcomm_pi(sk)->channel == channel &&
!bacmp(&bluez_sk(sk)->src, src))
!bacmp(&bt_sk(sk)->src, src))
break;
}
......@@ -142,11 +142,11 @@ static struct sock *__rfcomm_get_sock_by_channel(int state, __u16 channel, bdadd
if (rfcomm_pi(sk)->channel == channel) {
/* Exact match. */
if (!bacmp(&bluez_sk(sk)->src, src))
if (!bacmp(&bt_sk(sk)->src, src))
break;
/* Closest match */
if (!bacmp(&bluez_sk(sk)->src, BDADDR_ANY))
if (!bacmp(&bt_sk(sk)->src, BDADDR_ANY))
sk1 = sk;
}
}
......@@ -197,7 +197,7 @@ static void rfcomm_sock_cleanup_listen(struct sock *parent)
BT_DBG("parent %p", parent);
/* Close not yet accepted dlcs */
while ((sk = bluez_accept_dequeue(parent, NULL)))
while ((sk = bt_accept_dequeue(parent, NULL)))
rfcomm_sock_close(sk);
parent->state = BT_CLOSED;
......@@ -215,7 +215,7 @@ static void rfcomm_sock_kill(struct sock *sk)
BT_DBG("sk %p state %d refcnt %d", sk, sk->state, atomic_read(&sk->refcnt));
/* Kill poor orphan */
bluez_sock_unlink(&rfcomm_sk_list, sk);
bt_sock_unlink(&rfcomm_sk_list, sk);
sk->dead = 1;
sock_put(sk);
}
......@@ -265,7 +265,7 @@ static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, int prio)
struct rfcomm_dlc *d;
struct sock *sk;
sk = bluez_sock_alloc(sock, BTPROTO_RFCOMM, sizeof(struct rfcomm_pinfo), prio);
sk = bt_sock_alloc(sock, BTPROTO_RFCOMM, sizeof(struct rfcomm_pinfo), prio);
if (!sk)
return NULL;
......@@ -290,7 +290,7 @@ static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, int prio)
sk->protocol = proto;
sk->state = BT_OPEN;
bluez_sock_link(&rfcomm_sk_list, sk);
bt_sock_link(&rfcomm_sk_list, sk);
BT_DBG("sk %p", sk);
......@@ -342,7 +342,7 @@ static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr
err = -EADDRINUSE;
} else {
/* Save source address */
bacpy(&bluez_sk(sk)->src, &sa->rc_bdaddr);
bacpy(&bt_sk(sk)->src, &sa->rc_bdaddr);
rfcomm_pi(sk)->channel = sa->rc_channel;
sk->state = BT_BOUND;
}
......@@ -375,12 +375,12 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
lock_sock(sk);
sk->state = BT_CONNECT;
bacpy(&bluez_sk(sk)->dst, &sa->rc_bdaddr);
bacpy(&bt_sk(sk)->dst, &sa->rc_bdaddr);
rfcomm_pi(sk)->channel = sa->rc_channel;
err = rfcomm_dlc_open(d, &bluez_sk(sk)->src, &sa->rc_bdaddr, sa->rc_channel);
err = rfcomm_dlc_open(d, &bt_sk(sk)->src, &sa->rc_bdaddr, sa->rc_channel);
if (!err)
err = bluez_sock_w4_connect(sk, flags);
err = bt_sock_w4_connect(sk, flags);
release_sock(sk);
return err;
......@@ -429,7 +429,7 @@ int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int flags)
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk->sleep, &wait);
while (!(nsk = bluez_accept_dequeue(sk, newsock))) {
while (!(nsk = bt_accept_dequeue(sk, newsock))) {
set_current_state(TASK_INTERRUPTIBLE);
if (!timeo) {
err = -EAGAIN;
......@@ -475,9 +475,9 @@ static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *
sa->rc_family = AF_BLUETOOTH;
sa->rc_channel = rfcomm_pi(sk)->channel;
if (peer)
bacpy(&sa->rc_bdaddr, &bluez_sk(sk)->dst);
bacpy(&sa->rc_bdaddr, &bt_sk(sk)->dst);
else
bacpy(&sa->rc_bdaddr, &bluez_sk(sk)->src);
bacpy(&sa->rc_bdaddr, &bt_sk(sk)->src);
*len = sizeof(struct sockaddr_rc);
return 0;
......@@ -707,7 +707,7 @@ static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned lon
lock_sock(sk);
#ifdef CONFIG_BLUEZ_RFCOMM_TTY
#ifdef CONFIG_BT_RFCOMM_TTY
err = rfcomm_dev_ioctl(sk, cmd, arg);
#else
err = -EOPNOTSUPP;
......@@ -762,12 +762,12 @@ int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc *
goto done;
rfcomm_sock_init(sk, parent);
bacpy(&bluez_sk(sk)->src, &src);
bacpy(&bluez_sk(sk)->dst, &dst);
bacpy(&bt_sk(sk)->src, &src);
bacpy(&bt_sk(sk)->dst, &dst);
rfcomm_pi(sk)->channel = channel;
sk->state = BT_CONFIG;
bluez_accept_enqueue(parent, sk);
bt_accept_enqueue(parent, sk);
/* Accept connection and return socket DLC */
*d = rfcomm_pi(sk)->dlc;
......@@ -781,7 +781,7 @@ int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc *
/* ---- Proc fs support ---- */
int rfcomm_sock_dump(char *buf)
{
struct bluez_sock_list *list = &rfcomm_sk_list;
struct bt_sock_list *list = &rfcomm_sk_list;
struct rfcomm_pinfo *pi;
struct sock *sk;
char *ptr = buf;
......@@ -791,7 +791,7 @@ int rfcomm_sock_dump(char *buf)
for (sk = list->head; sk; sk = sk->next) {
pi = rfcomm_pi(sk);
ptr += sprintf(ptr, "sk %s %s %d %d\n",
batostr(&bluez_sk(sk)->src), batostr(&bluez_sk(sk)->dst),
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->state, rfcomm_pi(sk)->channel);
}
......@@ -814,7 +814,7 @@ static struct proto_ops rfcomm_sock_ops = {
.setsockopt = rfcomm_sock_setsockopt,
.getsockopt = rfcomm_sock_getsockopt,
.ioctl = rfcomm_sock_ioctl,
.poll = bluez_sock_poll,
.poll = bt_sock_poll,
.socketpair = sock_no_socketpair,
.mmap = sock_no_mmap
};
......@@ -828,7 +828,7 @@ int rfcomm_init_sockets(void)
{
int err;
if ((err = bluez_sock_register(BTPROTO_RFCOMM, &rfcomm_sock_family_ops))) {
if ((err = bt_sock_register(BTPROTO_RFCOMM, &rfcomm_sock_family_ops))) {
BT_ERR("Can't register RFCOMM socket layer");
return err;
}
......@@ -841,6 +841,6 @@ void rfcomm_cleanup_sockets(void)
int err;
/* Unregister socket, protocol and notifier */
if ((err = bluez_sock_unregister(BTPROTO_RFCOMM)))
if ((err = bt_sock_unregister(BTPROTO_RFCOMM)))
BT_ERR("Can't unregister RFCOMM socket layer %d", err);
}
......@@ -40,7 +40,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/rfcomm.h>
#ifndef CONFIG_BLUEZ_RFCOMM_DEBUG
#ifndef CONFIG_BT_RFCOMM_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
#endif
......
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ SCO sockets.
* Bluetooth SCO sockets.
*
* $Id: sco.c,v 1.3 2002/04/17 17:37:16 maxk Exp $
*/
......@@ -56,14 +56,14 @@
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/sco.h>
#ifndef SCO_DEBUG
#ifndef CONFIG_BT_SCO_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
static struct proto_ops sco_sock_ops;
static struct bluez_sock_list sco_sk_list = {
static struct bt_sock_list sco_sk_list = {
.lock = RW_LOCK_UNLOCKED
};
......@@ -200,8 +200,8 @@ static inline int sco_chan_add(struct sco_conn *conn, struct sock *sk, struct so
int sco_connect(struct sock *sk)
{
bdaddr_t *src = &bluez_sk(sk)->src;
bdaddr_t *dst = &bluez_sk(sk)->dst;
bdaddr_t *src = &bt_sk(sk)->src;
bdaddr_t *dst = &bt_sk(sk)->dst;
struct sco_conn *conn;
struct hci_conn *hcon;
struct hci_dev *hdev;
......@@ -259,7 +259,7 @@ static inline int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
BT_DBG("sk %p len %d", sk, len);
count = MIN(conn->mtu, len);
if (!(skb = bluez_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err)))
if (!(skb = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err)))
return err;
if (memcpy_fromiovec(skb_put(skb, count), msg->msg_iov, count)) {
......@@ -303,7 +303,7 @@ static struct sock *__sco_get_sock_by_addr(bdaddr_t *ba)
struct sock *sk;
for (sk = sco_sk_list.head; sk; sk = sk->next) {
if (!bacmp(&bluez_sk(sk)->src, ba))
if (!bacmp(&bt_sk(sk)->src, ba))
break;
}
......@@ -324,11 +324,11 @@ static struct sock *sco_get_sock_listen(bdaddr_t *src)
continue;
/* Exact match. */
if (!bacmp(&bluez_sk(sk)->src, src))
if (!bacmp(&bt_sk(sk)->src, src))
break;
/* Closest match */
if (!bacmp(&bluez_sk(sk)->src, BDADDR_ANY))
if (!bacmp(&bt_sk(sk)->src, BDADDR_ANY))
sk1 = sk;
}
......@@ -357,7 +357,7 @@ static void sco_sock_cleanup_listen(struct sock *parent)
BT_DBG("parent %p", parent);
/* Close not yet accepted channels */
while ((sk = bluez_accept_dequeue(parent, NULL)))
while ((sk = bt_accept_dequeue(parent, NULL)))
sco_sock_close(sk);
parent->state = BT_CLOSED;
......@@ -375,7 +375,7 @@ static void sco_sock_kill(struct sock *sk)
BT_DBG("sk %p state %d", sk, sk->state);
/* Kill poor orphan */
bluez_sock_unlink(&sco_sk_list, sk);
bt_sock_unlink(&sco_sk_list, sk);
sk->dead = 1;
sock_put(sk);
}
......@@ -429,7 +429,7 @@ static struct sock *sco_sock_alloc(struct socket *sock, int proto, int prio)
{
struct sock *sk;
sk = bluez_sock_alloc(sock, proto, sizeof(struct sco_pinfo), prio);
sk = bt_sock_alloc(sock, proto, sizeof(struct sco_pinfo), prio);
if (!sk)
return NULL;
......@@ -439,7 +439,7 @@ static struct sock *sco_sock_alloc(struct socket *sock, int proto, int prio)
sco_sock_init_timer(sk);
bluez_sock_link(&sco_sk_list, sk);
bt_sock_link(&sco_sk_list, sk);
MOD_INC_USE_COUNT;
return sk;
......@@ -490,7 +490,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
err = -EADDRINUSE;
} else {
/* Save source address */
bacpy(&bluez_sk(sk)->src, &sa->sco_bdaddr);
bacpy(&bt_sk(sk)->src, &sa->sco_bdaddr);
sk->state = BT_BOUND;
}
......@@ -522,12 +522,12 @@ static int sco_sock_connect(struct socket *sock, struct sockaddr *addr, int alen
lock_sock(sk);
/* Set destination address and psm */
bacpy(&bluez_sk(sk)->dst, &sa->sco_bdaddr);
bacpy(&bt_sk(sk)->dst, &sa->sco_bdaddr);
if ((err = sco_connect(sk)))
goto done;
err = bluez_sock_w4_connect(sk, flags);
err = bt_sock_w4_connect(sk, flags);
done:
release_sock(sk);
......@@ -577,7 +577,7 @@ int sco_sock_accept(struct socket *sock, struct socket *newsock, int flags)
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk->sleep, &wait);
while (!(ch = bluez_accept_dequeue(sk, newsock))) {
while (!(ch = bt_accept_dequeue(sk, newsock))) {
set_current_state(TASK_INTERRUPTIBLE);
if (!timeo) {
err = -EAGAIN;
......@@ -624,9 +624,9 @@ static int sco_sock_getname(struct socket *sock, struct sockaddr *addr, int *len
*len = sizeof(struct sockaddr_sco);
if (peer)
bacpy(&sa->sco_bdaddr, &bluez_sk(sk)->dst);
bacpy(&sa->sco_bdaddr, &bt_sk(sk)->dst);
else
bacpy(&sa->sco_bdaddr, &bluez_sk(sk)->src);
bacpy(&sa->sco_bdaddr, &bt_sk(sk)->src);
return 0;
}
......@@ -751,7 +751,7 @@ static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *
conn->sk = sk;
if (parent)
bluez_accept_enqueue(parent, sk);
bt_accept_enqueue(parent, sk);
}
/* Delete channel.
......@@ -808,8 +808,8 @@ static void sco_conn_ready(struct sco_conn *conn)
sco_sock_init(sk, parent);
bacpy(&bluez_sk(sk)->src, conn->src);
bacpy(&bluez_sk(sk)->dst, conn->dst);
bacpy(&bt_sk(sk)->src, conn->src);
bacpy(&bt_sk(sk)->dst, conn->dst);
hci_conn_hold(conn->hcon);
__sco_chan_add(conn, sk, parent);
......@@ -849,7 +849,7 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
if (conn)
sco_conn_ready(conn);
} else
sco_conn_del(hcon, bterr(status));
sco_conn_del(hcon, bt_err(status));
return 0;
}
......@@ -861,7 +861,7 @@ int sco_disconn_ind(struct hci_conn *hcon, __u8 reason)
if (hcon->type != SCO_LINK)
return 0;
sco_conn_del(hcon, bterr(reason));
sco_conn_del(hcon, bt_err(reason));
return 0;
}
......@@ -885,7 +885,7 @@ int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
}
/* ----- Proc fs support ------ */
static int sco_sock_dump(char *buf, struct bluez_sock_list *list)
static int sco_sock_dump(char *buf, struct bt_sock_list *list)
{
struct sco_pinfo *pi;
struct sock *sk;
......@@ -896,7 +896,7 @@ static int sco_sock_dump(char *buf, struct bluez_sock_list *list)
for (sk = list->head; sk; sk = sk->next) {
pi = sco_pi(sk);
ptr += sprintf(ptr, "%s %s %d\n",
batostr(&bluez_sk(sk)->src), batostr(&bluez_sk(sk)->dst),
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->state);
}
......@@ -940,8 +940,8 @@ static struct proto_ops sco_sock_ops = {
.accept = sco_sock_accept,
.getname = sco_sock_getname,
.sendmsg = sco_sock_sendmsg,
.recvmsg = bluez_sock_recvmsg,
.poll = bluez_sock_poll,
.recvmsg = bt_sock_recvmsg,
.poll = bt_sock_poll,
.ioctl = sock_no_ioctl,
.mmap = sock_no_mmap,
.socketpair = sock_no_socketpair,
......@@ -968,7 +968,7 @@ int __init sco_init(void)
{
int err;
if ((err = bluez_sock_register(BTPROTO_SCO, &sco_sock_family_ops))) {
if ((err = bt_sock_register(BTPROTO_SCO, &sco_sock_family_ops))) {
BT_ERR("Can't register SCO socket layer");
return err;
}
......@@ -980,7 +980,7 @@ int __init sco_init(void)
create_proc_read_entry("bluetooth/sco", 0, 0, sco_read_proc, NULL);
BT_INFO("BlueZ SCO ver %s Copyright (C) 2000,2001 Qualcomm Inc", VERSION);
BT_INFO("Bluetooth SCO ver %s Copyright (C) 2000,2001 Qualcomm Inc", VERSION);
BT_INFO("Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>");
return 0;
}
......@@ -992,7 +992,7 @@ void sco_cleanup(void)
remove_proc_entry("bluetooth/sco", NULL);
/* Unregister socket, protocol and notifier */
if ((err = bluez_sock_unregister(BTPROTO_SCO)))
if ((err = bt_sock_unregister(BTPROTO_SCO)))
BT_ERR("Can't unregister SCO socket layer %d", err);
if ((err = hci_unregister_proto(&sco_hci_proto)))
......@@ -1003,5 +1003,5 @@ module_init(sco_init);
module_exit(sco_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ SCO ver " VERSION);
MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION);
MODULE_LICENSE("GPL");
......@@ -23,7 +23,7 @@
*/
/*
* BlueZ symbols.
* Bluetooth symbols.
*
* $Id: syms.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
*/
......@@ -59,20 +59,20 @@ EXPORT_SYMBOL(hci_send_sco);
EXPORT_SYMBOL(hci_send_raw);
EXPORT_SYMBOL(hci_si_event);
/* BlueZ lib */
EXPORT_SYMBOL(bluez_dump);
/* Bluetooth lib */
EXPORT_SYMBOL(bt_dump);
EXPORT_SYMBOL(baswap);
EXPORT_SYMBOL(batostr);
EXPORT_SYMBOL(bterr);
EXPORT_SYMBOL(bt_err);
/* BlueZ sockets */
EXPORT_SYMBOL(bluez_sock_register);
EXPORT_SYMBOL(bluez_sock_unregister);
EXPORT_SYMBOL(bluez_sock_alloc);
EXPORT_SYMBOL(bluez_sock_link);
EXPORT_SYMBOL(bluez_sock_unlink);
EXPORT_SYMBOL(bluez_sock_recvmsg);
EXPORT_SYMBOL(bluez_sock_poll);
EXPORT_SYMBOL(bluez_accept_enqueue);
EXPORT_SYMBOL(bluez_accept_dequeue);
EXPORT_SYMBOL(bluez_sock_w4_connect);
/* 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_w4_connect);
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