summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorMaksim Krasnyanskiy <maxk@qualcomm.com>2002-10-13 16:23:01 -0700
committerMaksim Krasnyanskiy <maxk@qualcomm.com>2002-10-13 16:23:01 -0700
commitba4d161345176c1cc551ca3fbaaab8ebc790d49c (patch)
treed61b970cdb6ad6d4871c7ff2e5709de2a56344ff /include/net
parentb7f0e1d2e73c75d34247651dba9c5dac4f386008 (diff)
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.
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/bluetooth.h76
-rw-r--r--include/net/bluetooth/hci.h2
2 files changed, 29 insertions, 49 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 3253f7e9e06a..a7202d48b57c 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -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 */
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index b58ebef5397b..d67d9721e091 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.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;