bluetooth.h (a8253684eb4b30abd3faf055bc475c23da748dc6) | bluetooth.h (da8912176fb0ff9fd60e14fa653108d96422b896) |
---|---|
1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 190 unchanged lines hidden (view full) --- 199#define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__) 200 201#if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG) 202#define BT_DBG(fmt, ...) bt_dbg(fmt "\n", ##__VA_ARGS__) 203#else 204#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) 205#endif 206 | 1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 190 unchanged lines hidden (view full) --- 199#define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__) 200 201#if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG) 202#define BT_DBG(fmt, ...) bt_dbg(fmt "\n", ##__VA_ARGS__) 203#else 204#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) 205#endif 206 |
207#define bt_dev_name(hdev) ((hdev) ? (hdev)->name : "null") 208 |
|
207#define bt_dev_info(hdev, fmt, ...) \ | 209#define bt_dev_info(hdev, fmt, ...) \ |
208 BT_INFO("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 210 BT_INFO("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
209#define bt_dev_warn(hdev, fmt, ...) \ | 211#define bt_dev_warn(hdev, fmt, ...) \ |
210 BT_WARN("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 212 BT_WARN("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
211#define bt_dev_err(hdev, fmt, ...) \ | 213#define bt_dev_err(hdev, fmt, ...) \ |
212 BT_ERR("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 214 BT_ERR("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
213#define bt_dev_dbg(hdev, fmt, ...) \ | 215#define bt_dev_dbg(hdev, fmt, ...) \ |
214 BT_DBG("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 216 BT_DBG("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
215 216#define bt_dev_warn_ratelimited(hdev, fmt, ...) \ | 217 218#define bt_dev_warn_ratelimited(hdev, fmt, ...) \ |
217 bt_warn_ratelimited("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 219 bt_warn_ratelimited("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
218#define bt_dev_err_ratelimited(hdev, fmt, ...) \ | 220#define bt_dev_err_ratelimited(hdev, fmt, ...) \ |
219 bt_err_ratelimited("%s: " fmt, (hdev)->name, ##__VA_ARGS__) | 221 bt_err_ratelimited("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__) |
220 221/* Connection and socket states */ 222enum { 223 BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ 224 BT_OPEN, 225 BT_BOUND, 226 BT_LISTEN, 227 BT_CONNECT, --- 110 unchanged lines hidden (view full) --- 338void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 339int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, 340 int flags); 341int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, 342 size_t len, int flags); 343__poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); 344int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 345int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); | 222 223/* Connection and socket states */ 224enum { 225 BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ 226 BT_OPEN, 227 BT_BOUND, 228 BT_LISTEN, 229 BT_CONNECT, --- 110 unchanged lines hidden (view full) --- 340void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 341int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, 342 int flags); 343int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, 344 size_t len, int flags); 345__poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); 346int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 347int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); |
346int bt_sock_wait_ready(struct sock *sk, unsigned long flags); | 348int bt_sock_wait_ready(struct sock *sk, unsigned int msg_flags); |
347 348void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh); 349void bt_accept_unlink(struct sock *sk); 350struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); 351 352/* Skb helpers */ 353struct l2cap_ctrl { 354 u8 sframe:1, --- 210 unchanged lines hidden --- | 349 350void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh); 351void bt_accept_unlink(struct sock *sk); 352struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); 353 354/* Skb helpers */ 355struct l2cap_ctrl { 356 u8 sframe:1, --- 210 unchanged lines hidden --- |