diff options
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 43750439c52..e727555d4ee 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -56,6 +56,7 @@ | |||
56 | #define BT_SECURITY 4 | 56 | #define BT_SECURITY 4 |
57 | struct bt_security { | 57 | struct bt_security { |
58 | __u8 level; | 58 | __u8 level; |
59 | __u8 key_size; | ||
59 | }; | 60 | }; |
60 | #define BT_SECURITY_SDP 0 | 61 | #define BT_SECURITY_SDP 0 |
61 | #define BT_SECURITY_LOW 1 | 62 | #define BT_SECURITY_LOW 1 |
@@ -69,9 +70,19 @@ struct bt_security { | |||
69 | #define BT_FLUSHABLE_OFF 0 | 70 | #define BT_FLUSHABLE_OFF 0 |
70 | #define BT_FLUSHABLE_ON 1 | 71 | #define BT_FLUSHABLE_ON 1 |
71 | 72 | ||
72 | #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) | 73 | #define BT_POWER 9 |
73 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) | 74 | struct bt_power { |
74 | #define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg) | 75 | __u8 force_active; |
76 | }; | ||
77 | #define BT_POWER_FORCE_ACTIVE_OFF 0 | ||
78 | #define BT_POWER_FORCE_ACTIVE_ON 1 | ||
79 | |||
80 | __attribute__((format (printf, 2, 3))) | ||
81 | int bt_printk(const char *level, const char *fmt, ...); | ||
82 | |||
83 | #define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg) | ||
84 | #define BT_ERR(fmt, arg...) bt_printk(KERN_ERR, pr_fmt(fmt), ##arg) | ||
85 | #define BT_DBG(fmt, arg...) pr_debug(fmt "\n", ##arg) | ||
75 | 86 | ||
76 | /* Connection and socket states */ | 87 | /* Connection and socket states */ |
77 | enum { | 88 | enum { |
@@ -130,7 +141,8 @@ int bt_sock_register(int proto, const struct net_proto_family *ops); | |||
130 | int bt_sock_unregister(int proto); | 141 | int bt_sock_unregister(int proto); |
131 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); | 142 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); |
132 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); | 143 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); |
133 | int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags); | 144 | int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, |
145 | struct msghdr *msg, size_t len, int flags); | ||
134 | int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, | 146 | int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, |
135 | struct msghdr *msg, size_t len, int flags); | 147 | struct msghdr *msg, size_t len, int flags); |
136 | uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait); | 148 | uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait); |
@@ -150,6 +162,7 @@ struct bt_skb_cb { | |||
150 | __u8 retries; | 162 | __u8 retries; |
151 | __u8 sar; | 163 | __u8 sar; |
152 | unsigned short channel; | 164 | unsigned short channel; |
165 | __u8 force_active; | ||
153 | }; | 166 | }; |
154 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) | 167 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) |
155 | 168 | ||
@@ -164,8 +177,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) | |||
164 | return skb; | 177 | return skb; |
165 | } | 178 | } |
166 | 179 | ||
167 | static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, unsigned long len, | 180 | static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, |
168 | int nb, int *err) | 181 | unsigned long len, int nb, int *err) |
169 | { | 182 | { |
170 | struct sk_buff *skb; | 183 | struct sk_buff *skb; |
171 | 184 | ||
@@ -195,7 +208,7 @@ out: | |||
195 | return NULL; | 208 | return NULL; |
196 | } | 209 | } |
197 | 210 | ||
198 | int bt_err(__u16 code); | 211 | int bt_to_errno(__u16 code); |
199 | 212 | ||
200 | extern int hci_sock_init(void); | 213 | extern int hci_sock_init(void); |
201 | extern void hci_sock_cleanup(void); | 214 | extern void hci_sock_cleanup(void); |