bluetooth.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. /*
  2. BlueZ - Bluetooth protocol stack for Linux
  3. Copyright (C) 2000-2001 Qualcomm Incorporated
  4. Written 2000,2001 by Maxim Krasnyansky <[email protected]>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License version 2 as
  7. published by the Free Software Foundation;
  8. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  9. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  10. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
  11. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
  12. CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
  13. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
  17. COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
  18. SOFTWARE IS DISCLAIMED.
  19. */
  20. #ifndef __BLUETOOTH_H
  21. #define __BLUETOOTH_H
  22. #include <linux/poll.h>
  23. #include <net/sock.h>
  24. #include <linux/seq_file.h>
  25. #define BT_SUBSYS_VERSION 2
  26. #define BT_SUBSYS_REVISION 22
  27. #ifndef AF_BLUETOOTH
  28. #define AF_BLUETOOTH 31
  29. #define PF_BLUETOOTH AF_BLUETOOTH
  30. #endif
  31. /* Bluetooth versions */
  32. #define BLUETOOTH_VER_1_1 1
  33. #define BLUETOOTH_VER_1_2 2
  34. #define BLUETOOTH_VER_2_0 3
  35. #define BLUETOOTH_VER_2_1 4
  36. #define BLUETOOTH_VER_4_0 6
  37. /* Reserv for core and drivers use */
  38. #define BT_SKB_RESERVE 8
  39. #define BTPROTO_L2CAP 0
  40. #define BTPROTO_HCI 1
  41. #define BTPROTO_SCO 2
  42. #define BTPROTO_RFCOMM 3
  43. #define BTPROTO_BNEP 4
  44. #define BTPROTO_CMTP 5
  45. #define BTPROTO_HIDP 6
  46. #define BTPROTO_AVDTP 7
  47. #define BTPROTO_ISO 8
  48. #define BTPROTO_LAST BTPROTO_ISO
  49. #define SOL_HCI 0
  50. #define SOL_L2CAP 6
  51. #define SOL_SCO 17
  52. #define SOL_RFCOMM 18
  53. #define BT_SECURITY 4
  54. struct bt_security {
  55. __u8 level;
  56. __u8 key_size;
  57. };
  58. #define BT_SECURITY_SDP 0
  59. #define BT_SECURITY_LOW 1
  60. #define BT_SECURITY_MEDIUM 2
  61. #define BT_SECURITY_HIGH 3
  62. #define BT_SECURITY_FIPS 4
  63. #define BT_DEFER_SETUP 7
  64. #define BT_FLUSHABLE 8
  65. #define BT_FLUSHABLE_OFF 0
  66. #define BT_FLUSHABLE_ON 1
  67. #define BT_POWER 9
  68. struct bt_power {
  69. __u8 force_active;
  70. };
  71. #define BT_POWER_FORCE_ACTIVE_OFF 0
  72. #define BT_POWER_FORCE_ACTIVE_ON 1
  73. #define BT_CHANNEL_POLICY 10
  74. /* BR/EDR only (default policy)
  75. * AMP controllers cannot be used.
  76. * Channel move requests from the remote device are denied.
  77. * If the L2CAP channel is currently using AMP, move the channel to BR/EDR.
  78. */
  79. #define BT_CHANNEL_POLICY_BREDR_ONLY 0
  80. /* BR/EDR Preferred
  81. * Allow use of AMP controllers.
  82. * If the L2CAP channel is currently on AMP, move it to BR/EDR.
  83. * Channel move requests from the remote device are allowed.
  84. */
  85. #define BT_CHANNEL_POLICY_BREDR_PREFERRED 1
  86. /* AMP Preferred
  87. * Allow use of AMP controllers
  88. * If the L2CAP channel is currently on BR/EDR and AMP controller
  89. * resources are available, initiate a channel move to AMP.
  90. * Channel move requests from the remote device are allowed.
  91. * If the L2CAP socket has not been connected yet, try to create
  92. * and configure the channel directly on an AMP controller rather
  93. * than BR/EDR.
  94. */
  95. #define BT_CHANNEL_POLICY_AMP_PREFERRED 2
  96. #define BT_VOICE 11
  97. struct bt_voice {
  98. __u16 setting;
  99. };
  100. #define BT_VOICE_TRANSPARENT 0x0003
  101. #define BT_VOICE_CVSD_16BIT 0x0060
  102. #define BT_SNDMTU 12
  103. #define BT_RCVMTU 13
  104. #define BT_PHY 14
  105. #define BT_PHY_BR_1M_1SLOT 0x00000001
  106. #define BT_PHY_BR_1M_3SLOT 0x00000002
  107. #define BT_PHY_BR_1M_5SLOT 0x00000004
  108. #define BT_PHY_EDR_2M_1SLOT 0x00000008
  109. #define BT_PHY_EDR_2M_3SLOT 0x00000010
  110. #define BT_PHY_EDR_2M_5SLOT 0x00000020
  111. #define BT_PHY_EDR_3M_1SLOT 0x00000040
  112. #define BT_PHY_EDR_3M_3SLOT 0x00000080
  113. #define BT_PHY_EDR_3M_5SLOT 0x00000100
  114. #define BT_PHY_LE_1M_TX 0x00000200
  115. #define BT_PHY_LE_1M_RX 0x00000400
  116. #define BT_PHY_LE_2M_TX 0x00000800
  117. #define BT_PHY_LE_2M_RX 0x00001000
  118. #define BT_PHY_LE_CODED_TX 0x00002000
  119. #define BT_PHY_LE_CODED_RX 0x00004000
  120. #define BT_MODE 15
  121. #define BT_MODE_BASIC 0x00
  122. #define BT_MODE_ERTM 0x01
  123. #define BT_MODE_STREAMING 0x02
  124. #define BT_MODE_LE_FLOWCTL 0x03
  125. #define BT_MODE_EXT_FLOWCTL 0x04
  126. #define BT_PKT_STATUS 16
  127. #define BT_SCM_PKT_STATUS 0x03
  128. #define BT_ISO_QOS 17
  129. #define BT_ISO_QOS_CIG_UNSET 0xff
  130. #define BT_ISO_QOS_CIS_UNSET 0xff
  131. #define BT_ISO_QOS_BIG_UNSET 0xff
  132. #define BT_ISO_QOS_BIS_UNSET 0xff
  133. struct bt_iso_io_qos {
  134. __u32 interval;
  135. __u16 latency;
  136. __u16 sdu;
  137. __u8 phy;
  138. __u8 rtn;
  139. };
  140. struct bt_iso_qos {
  141. union {
  142. __u8 cig;
  143. __u8 big;
  144. };
  145. union {
  146. __u8 cis;
  147. __u8 bis;
  148. };
  149. union {
  150. __u8 sca;
  151. __u8 sync_interval;
  152. };
  153. __u8 packing;
  154. __u8 framing;
  155. struct bt_iso_io_qos in;
  156. struct bt_iso_io_qos out;
  157. };
  158. #define BT_ISO_PHY_1M 0x01
  159. #define BT_ISO_PHY_2M 0x02
  160. #define BT_ISO_PHY_CODED 0x04
  161. #define BT_ISO_PHY_ANY (BT_ISO_PHY_1M | BT_ISO_PHY_2M | \
  162. BT_ISO_PHY_CODED)
  163. #define BT_CODEC 19
  164. struct bt_codec_caps {
  165. __u8 len;
  166. __u8 data[];
  167. } __packed;
  168. struct bt_codec {
  169. __u8 id;
  170. __u16 cid;
  171. __u16 vid;
  172. __u8 data_path;
  173. __u8 num_caps;
  174. } __packed;
  175. struct bt_codecs {
  176. __u8 num_codecs;
  177. struct bt_codec codecs[];
  178. } __packed;
  179. #define BT_CODEC_CVSD 0x02
  180. #define BT_CODEC_TRANSPARENT 0x03
  181. #define BT_CODEC_MSBC 0x05
  182. #define BT_ISO_BASE 20
  183. __printf(1, 2)
  184. void bt_info(const char *fmt, ...);
  185. __printf(1, 2)
  186. void bt_warn(const char *fmt, ...);
  187. __printf(1, 2)
  188. void bt_err(const char *fmt, ...);
  189. #if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)
  190. void bt_dbg_set(bool enable);
  191. bool bt_dbg_get(void);
  192. __printf(1, 2)
  193. void bt_dbg(const char *fmt, ...);
  194. #endif
  195. __printf(1, 2)
  196. void bt_warn_ratelimited(const char *fmt, ...);
  197. __printf(1, 2)
  198. void bt_err_ratelimited(const char *fmt, ...);
  199. #define BT_INFO(fmt, ...) bt_info(fmt "\n", ##__VA_ARGS__)
  200. #define BT_WARN(fmt, ...) bt_warn(fmt "\n", ##__VA_ARGS__)
  201. #define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__)
  202. #if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)
  203. #define BT_DBG(fmt, ...) bt_dbg(fmt "\n", ##__VA_ARGS__)
  204. #else
  205. #define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)
  206. #endif
  207. #define bt_dev_name(hdev) ((hdev) ? (hdev)->name : "null")
  208. #define bt_dev_info(hdev, fmt, ...) \
  209. BT_INFO("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  210. #define bt_dev_warn(hdev, fmt, ...) \
  211. BT_WARN("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  212. #define bt_dev_err(hdev, fmt, ...) \
  213. BT_ERR("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  214. #define bt_dev_dbg(hdev, fmt, ...) \
  215. BT_DBG("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  216. #define bt_dev_warn_ratelimited(hdev, fmt, ...) \
  217. bt_warn_ratelimited("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  218. #define bt_dev_err_ratelimited(hdev, fmt, ...) \
  219. bt_err_ratelimited("%s: " fmt, bt_dev_name(hdev), ##__VA_ARGS__)
  220. /* Connection and socket states */
  221. enum {
  222. BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */
  223. BT_OPEN,
  224. BT_BOUND,
  225. BT_LISTEN,
  226. BT_CONNECT,
  227. BT_CONNECT2,
  228. BT_CONFIG,
  229. BT_DISCONN,
  230. BT_CLOSED
  231. };
  232. /* If unused will be removed by compiler */
  233. static inline const char *state_to_string(int state)
  234. {
  235. switch (state) {
  236. case BT_CONNECTED:
  237. return "BT_CONNECTED";
  238. case BT_OPEN:
  239. return "BT_OPEN";
  240. case BT_BOUND:
  241. return "BT_BOUND";
  242. case BT_LISTEN:
  243. return "BT_LISTEN";
  244. case BT_CONNECT:
  245. return "BT_CONNECT";
  246. case BT_CONNECT2:
  247. return "BT_CONNECT2";
  248. case BT_CONFIG:
  249. return "BT_CONFIG";
  250. case BT_DISCONN:
  251. return "BT_DISCONN";
  252. case BT_CLOSED:
  253. return "BT_CLOSED";
  254. }
  255. return "invalid state";
  256. }
  257. /* BD Address */
  258. typedef struct {
  259. __u8 b[6];
  260. } __packed bdaddr_t;
  261. /* BD Address type */
  262. #define BDADDR_BREDR 0x00
  263. #define BDADDR_LE_PUBLIC 0x01
  264. #define BDADDR_LE_RANDOM 0x02
  265. static inline bool bdaddr_type_is_valid(u8 type)
  266. {
  267. switch (type) {
  268. case BDADDR_BREDR:
  269. case BDADDR_LE_PUBLIC:
  270. case BDADDR_LE_RANDOM:
  271. return true;
  272. }
  273. return false;
  274. }
  275. static inline bool bdaddr_type_is_le(u8 type)
  276. {
  277. switch (type) {
  278. case BDADDR_LE_PUBLIC:
  279. case BDADDR_LE_RANDOM:
  280. return true;
  281. }
  282. return false;
  283. }
  284. #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
  285. #define BDADDR_NONE (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
  286. /* Copy, swap, convert BD Address */
  287. static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
  288. {
  289. return memcmp(ba1, ba2, sizeof(bdaddr_t));
  290. }
  291. static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
  292. {
  293. memcpy(dst, src, sizeof(bdaddr_t));
  294. }
  295. void baswap(bdaddr_t *dst, const bdaddr_t *src);
  296. /* Common socket structures and functions */
  297. #define bt_sk(__sk) ((struct bt_sock *) __sk)
  298. struct bt_sock {
  299. struct sock sk;
  300. struct list_head accept_q;
  301. struct sock *parent;
  302. unsigned long flags;
  303. void (*skb_msg_name)(struct sk_buff *, void *, int *);
  304. void (*skb_put_cmsg)(struct sk_buff *, struct msghdr *, struct sock *);
  305. };
  306. enum {
  307. BT_SK_DEFER_SETUP,
  308. BT_SK_SUSPEND,
  309. };
  310. struct bt_sock_list {
  311. struct hlist_head head;
  312. rwlock_t lock;
  313. #ifdef CONFIG_PROC_FS
  314. int (* custom_seq_show)(struct seq_file *, void *);
  315. #endif
  316. };
  317. int bt_sock_register(int proto, const struct net_proto_family *ops);
  318. void bt_sock_unregister(int proto);
  319. void bt_sock_link(struct bt_sock_list *l, struct sock *s);
  320. void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
  321. int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
  322. int flags);
  323. int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
  324. size_t len, int flags);
  325. __poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
  326. int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
  327. int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
  328. int bt_sock_wait_ready(struct sock *sk, unsigned int msg_flags);
  329. void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh);
  330. void bt_accept_unlink(struct sock *sk);
  331. struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
  332. /* Skb helpers */
  333. struct l2cap_ctrl {
  334. u8 sframe:1,
  335. poll:1,
  336. final:1,
  337. fcs:1,
  338. sar:2,
  339. super:2;
  340. u16 reqseq;
  341. u16 txseq;
  342. u8 retries;
  343. __le16 psm;
  344. bdaddr_t bdaddr;
  345. struct l2cap_chan *chan;
  346. };
  347. struct sco_ctrl {
  348. u8 pkt_status;
  349. };
  350. struct hci_dev;
  351. typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);
  352. typedef void (*hci_req_complete_skb_t)(struct hci_dev *hdev, u8 status,
  353. u16 opcode, struct sk_buff *skb);
  354. #define HCI_REQ_START BIT(0)
  355. #define HCI_REQ_SKB BIT(1)
  356. struct hci_ctrl {
  357. struct sock *sk;
  358. u16 opcode;
  359. u8 req_flags;
  360. u8 req_event;
  361. union {
  362. hci_req_complete_t req_complete;
  363. hci_req_complete_skb_t req_complete_skb;
  364. };
  365. };
  366. struct mgmt_ctrl {
  367. struct hci_dev *hdev;
  368. u16 opcode;
  369. };
  370. struct bt_skb_cb {
  371. u8 pkt_type;
  372. u8 force_active;
  373. u16 expect;
  374. u8 incoming:1;
  375. union {
  376. struct l2cap_ctrl l2cap;
  377. struct sco_ctrl sco;
  378. struct hci_ctrl hci;
  379. struct mgmt_ctrl mgmt;
  380. };
  381. };
  382. #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
  383. #define hci_skb_pkt_type(skb) bt_cb((skb))->pkt_type
  384. #define hci_skb_expect(skb) bt_cb((skb))->expect
  385. #define hci_skb_opcode(skb) bt_cb((skb))->hci.opcode
  386. #define hci_skb_event(skb) bt_cb((skb))->hci.req_event
  387. #define hci_skb_sk(skb) bt_cb((skb))->hci.sk
  388. static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
  389. {
  390. struct sk_buff *skb;
  391. skb = alloc_skb(len + BT_SKB_RESERVE, how);
  392. if (skb)
  393. skb_reserve(skb, BT_SKB_RESERVE);
  394. return skb;
  395. }
  396. static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
  397. unsigned long len, int nb, int *err)
  398. {
  399. struct sk_buff *skb;
  400. skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err);
  401. if (skb)
  402. skb_reserve(skb, BT_SKB_RESERVE);
  403. if (!skb && *err)
  404. return NULL;
  405. *err = sock_error(sk);
  406. if (*err)
  407. goto out;
  408. if (sk->sk_shutdown) {
  409. *err = -ECONNRESET;
  410. goto out;
  411. }
  412. return skb;
  413. out:
  414. kfree_skb(skb);
  415. return NULL;
  416. }
  417. /* Shall not be called with lock_sock held */
  418. static inline struct sk_buff *bt_skb_sendmsg(struct sock *sk,
  419. struct msghdr *msg,
  420. size_t len, size_t mtu,
  421. size_t headroom, size_t tailroom)
  422. {
  423. struct sk_buff *skb;
  424. size_t size = min_t(size_t, len, mtu);
  425. int err;
  426. skb = bt_skb_send_alloc(sk, size + headroom + tailroom,
  427. msg->msg_flags & MSG_DONTWAIT, &err);
  428. if (!skb)
  429. return ERR_PTR(err);
  430. skb_reserve(skb, headroom);
  431. skb_tailroom_reserve(skb, mtu, tailroom);
  432. if (!copy_from_iter_full(skb_put(skb, size), size, &msg->msg_iter)) {
  433. kfree_skb(skb);
  434. return ERR_PTR(-EFAULT);
  435. }
  436. skb->priority = sk->sk_priority;
  437. return skb;
  438. }
  439. /* Similar to bt_skb_sendmsg but can split the msg into multiple fragments
  440. * accourding to the MTU.
  441. */
  442. static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk,
  443. struct msghdr *msg,
  444. size_t len, size_t mtu,
  445. size_t headroom, size_t tailroom)
  446. {
  447. struct sk_buff *skb, **frag;
  448. skb = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom);
  449. if (IS_ERR(skb))
  450. return skb;
  451. len -= skb->len;
  452. if (!len)
  453. return skb;
  454. /* Add remaining data over MTU as continuation fragments */
  455. frag = &skb_shinfo(skb)->frag_list;
  456. while (len) {
  457. struct sk_buff *tmp;
  458. tmp = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom);
  459. if (IS_ERR(tmp)) {
  460. return skb;
  461. }
  462. len -= tmp->len;
  463. *frag = tmp;
  464. frag = &(*frag)->next;
  465. }
  466. return skb;
  467. }
  468. int bt_to_errno(u16 code);
  469. __u8 bt_status(int err);
  470. void hci_sock_set_flag(struct sock *sk, int nr);
  471. void hci_sock_clear_flag(struct sock *sk, int nr);
  472. int hci_sock_test_flag(struct sock *sk, int nr);
  473. unsigned short hci_sock_get_channel(struct sock *sk);
  474. u32 hci_sock_get_cookie(struct sock *sk);
  475. int hci_sock_init(void);
  476. void hci_sock_cleanup(void);
  477. int bt_sysfs_init(void);
  478. void bt_sysfs_cleanup(void);
  479. int bt_procfs_init(struct net *net, const char *name,
  480. struct bt_sock_list *sk_list,
  481. int (*seq_show)(struct seq_file *, void *));
  482. void bt_procfs_cleanup(struct net *net, const char *name);
  483. extern struct dentry *bt_debugfs;
  484. int l2cap_init(void);
  485. void l2cap_exit(void);
  486. #if IS_ENABLED(CONFIG_BT_BREDR)
  487. int sco_init(void);
  488. void sco_exit(void);
  489. #else
  490. static inline int sco_init(void)
  491. {
  492. return 0;
  493. }
  494. static inline void sco_exit(void)
  495. {
  496. }
  497. #endif
  498. #if IS_ENABLED(CONFIG_BT_LE)
  499. int iso_init(void);
  500. int iso_exit(void);
  501. bool iso_enabled(void);
  502. #else
  503. static inline int iso_init(void)
  504. {
  505. return 0;
  506. }
  507. static inline int iso_exit(void)
  508. {
  509. return 0;
  510. }
  511. static inline bool iso_enabled(void)
  512. {
  513. return false;
  514. }
  515. #endif
  516. int mgmt_init(void);
  517. void mgmt_exit(void);
  518. void mgmt_cleanup(struct sock *sk);
  519. void bt_sock_reclassify_lock(struct sock *sk, int proto);
  520. #endif /* __BLUETOOTH_H */