hci_ldisc.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /*
  2. *
  3. * Bluetooth HCI UART driver
  4. *
  5. * Copyright (C) 2000-2001 Qualcomm Incorporated
  6. * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
  7. * Copyright (C) 2004-2005 Marcel Holtmann <marcel@holtmann.org>
  8. *
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. */
  25. #include <linux/module.h>
  26. #include <linux/kernel.h>
  27. #include <linux/init.h>
  28. #include <linux/types.h>
  29. #include <linux/fcntl.h>
  30. #include <linux/interrupt.h>
  31. #include <linux/ptrace.h>
  32. #include <linux/poll.h>
  33. #include <linux/slab.h>
  34. #include <linux/tty.h>
  35. #include <linux/errno.h>
  36. #include <linux/string.h>
  37. #include <linux/signal.h>
  38. #include <linux/ioctl.h>
  39. #include <linux/skbuff.h>
  40. #include <net/bluetooth/bluetooth.h>
  41. #include <net/bluetooth/hci_core.h>
  42. #include "btintel.h"
  43. #include "btbcm.h"
  44. #include "hci_uart.h"
  45. #define VERSION "2.3"
  46. static const struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];
  47. int hci_uart_register_proto(const struct hci_uart_proto *p)
  48. {
  49. if (p->id >= HCI_UART_MAX_PROTO)
  50. return -EINVAL;
  51. if (hup[p->id])
  52. return -EEXIST;
  53. hup[p->id] = p;
  54. BT_INFO("HCI UART protocol %s registered", p->name);
  55. return 0;
  56. }
  57. int hci_uart_unregister_proto(const struct hci_uart_proto *p)
  58. {
  59. if (p->id >= HCI_UART_MAX_PROTO)
  60. return -EINVAL;
  61. if (!hup[p->id])
  62. return -EINVAL;
  63. hup[p->id] = NULL;
  64. return 0;
  65. }
  66. static const struct hci_uart_proto *hci_uart_get_proto(unsigned int id)
  67. {
  68. if (id >= HCI_UART_MAX_PROTO)
  69. return NULL;
  70. return hup[id];
  71. }
  72. static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
  73. {
  74. struct hci_dev *hdev = hu->hdev;
  75. /* Update HCI stat counters */
  76. switch (pkt_type) {
  77. case HCI_COMMAND_PKT:
  78. hdev->stat.cmd_tx++;
  79. break;
  80. case HCI_ACLDATA_PKT:
  81. hdev->stat.acl_tx++;
  82. break;
  83. case HCI_SCODATA_PKT:
  84. hdev->stat.sco_tx++;
  85. break;
  86. }
  87. }
  88. static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
  89. {
  90. struct sk_buff *skb = hu->tx_skb;
  91. if (!skb)
  92. skb = hu->proto->dequeue(hu);
  93. else
  94. hu->tx_skb = NULL;
  95. return skb;
  96. }
  97. int hci_uart_tx_wakeup(struct hci_uart *hu)
  98. {
  99. if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) {
  100. set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
  101. return 0;
  102. }
  103. BT_DBG("");
  104. schedule_work(&hu->write_work);
  105. return 0;
  106. }
  107. static void hci_uart_write_work(struct work_struct *work)
  108. {
  109. struct hci_uart *hu = container_of(work, struct hci_uart, write_work);
  110. struct tty_struct *tty = hu->tty;
  111. struct hci_dev *hdev = hu->hdev;
  112. struct sk_buff *skb;
  113. /* REVISIT: should we cope with bad skbs or ->write() returning
  114. * and error value ?
  115. */
  116. restart:
  117. clear_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
  118. while ((skb = hci_uart_dequeue(hu))) {
  119. int len;
  120. set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
  121. len = tty->ops->write(tty, skb->data, skb->len);
  122. hdev->stat.byte_tx += len;
  123. skb_pull(skb, len);
  124. if (skb->len) {
  125. hu->tx_skb = skb;
  126. break;
  127. }
  128. hci_uart_tx_complete(hu, bt_cb(skb)->pkt_type);
  129. kfree_skb(skb);
  130. }
  131. if (test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state))
  132. goto restart;
  133. clear_bit(HCI_UART_SENDING, &hu->tx_state);
  134. }
  135. static void hci_uart_init_work(struct work_struct *work)
  136. {
  137. struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
  138. int err;
  139. if (!test_and_clear_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
  140. return;
  141. err = hci_register_dev(hu->hdev);
  142. if (err < 0) {
  143. BT_ERR("Can't register HCI device");
  144. hci_free_dev(hu->hdev);
  145. hu->hdev = NULL;
  146. hu->proto->close(hu);
  147. }
  148. set_bit(HCI_UART_REGISTERED, &hu->flags);
  149. }
  150. int hci_uart_init_ready(struct hci_uart *hu)
  151. {
  152. if (!test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
  153. return -EALREADY;
  154. schedule_work(&hu->init_ready);
  155. return 0;
  156. }
  157. /* ------- Interface to HCI layer ------ */
  158. /* Initialize device */
  159. static int hci_uart_open(struct hci_dev *hdev)
  160. {
  161. BT_DBG("%s %p", hdev->name, hdev);
  162. /* Nothing to do for UART driver */
  163. set_bit(HCI_RUNNING, &hdev->flags);
  164. return 0;
  165. }
  166. /* Reset device */
  167. static int hci_uart_flush(struct hci_dev *hdev)
  168. {
  169. struct hci_uart *hu = hci_get_drvdata(hdev);
  170. struct tty_struct *tty = hu->tty;
  171. BT_DBG("hdev %p tty %p", hdev, tty);
  172. if (hu->tx_skb) {
  173. kfree_skb(hu->tx_skb); hu->tx_skb = NULL;
  174. }
  175. /* Flush any pending characters in the driver and discipline. */
  176. tty_ldisc_flush(tty);
  177. tty_driver_flush_buffer(tty);
  178. if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
  179. hu->proto->flush(hu);
  180. return 0;
  181. }
  182. /* Close device */
  183. static int hci_uart_close(struct hci_dev *hdev)
  184. {
  185. BT_DBG("hdev %p", hdev);
  186. if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
  187. return 0;
  188. hci_uart_flush(hdev);
  189. hdev->flush = NULL;
  190. return 0;
  191. }
  192. /* Send frames from HCI layer */
  193. static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
  194. {
  195. struct hci_uart *hu = hci_get_drvdata(hdev);
  196. if (!test_bit(HCI_RUNNING, &hdev->flags))
  197. return -EBUSY;
  198. BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
  199. hu->proto->enqueue(hu, skb);
  200. hci_uart_tx_wakeup(hu);
  201. return 0;
  202. }
  203. static int hci_uart_setup(struct hci_dev *hdev)
  204. {
  205. struct hci_uart *hu = hci_get_drvdata(hdev);
  206. struct hci_rp_read_local_version *ver;
  207. struct sk_buff *skb;
  208. if (hu->proto->setup)
  209. return hu->proto->setup(hu);
  210. if (!test_bit(HCI_UART_VND_DETECT, &hu->hdev_flags))
  211. return 0;
  212. skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL,
  213. HCI_INIT_TIMEOUT);
  214. if (IS_ERR(skb)) {
  215. BT_ERR("%s: Reading local version information failed (%ld)",
  216. hdev->name, PTR_ERR(skb));
  217. return 0;
  218. }
  219. if (skb->len != sizeof(*ver)) {
  220. BT_ERR("%s: Event length mismatch for version information",
  221. hdev->name);
  222. goto done;
  223. }
  224. ver = (struct hci_rp_read_local_version *)skb->data;
  225. switch (le16_to_cpu(ver->manufacturer)) {
  226. #ifdef CONFIG_BT_HCIUART_INTEL
  227. case 2:
  228. hdev->set_bdaddr = btintel_set_bdaddr;
  229. btintel_check_bdaddr(hdev);
  230. break;
  231. #endif
  232. #ifdef CONFIG_BT_HCIUART_BCM
  233. case 15:
  234. hdev->set_bdaddr = btbcm_set_bdaddr;
  235. btbcm_check_bdaddr(hdev);
  236. break;
  237. #endif
  238. }
  239. done:
  240. kfree_skb(skb);
  241. return 0;
  242. }
  243. /* ------ LDISC part ------ */
  244. /* hci_uart_tty_open
  245. *
  246. * Called when line discipline changed to HCI_UART.
  247. *
  248. * Arguments:
  249. * tty pointer to tty info structure
  250. * Return Value:
  251. * 0 if success, otherwise error code
  252. */
  253. static int hci_uart_tty_open(struct tty_struct *tty)
  254. {
  255. struct hci_uart *hu;
  256. BT_DBG("tty %p", tty);
  257. /* Error if the tty has no write op instead of leaving an exploitable
  258. hole */
  259. if (tty->ops->write == NULL)
  260. return -EOPNOTSUPP;
  261. hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL);
  262. if (!hu) {
  263. BT_ERR("Can't allocate control structure");
  264. return -ENFILE;
  265. }
  266. tty->disc_data = hu;
  267. hu->tty = tty;
  268. tty->receive_room = 65536;
  269. INIT_WORK(&hu->init_ready, hci_uart_init_work);
  270. INIT_WORK(&hu->write_work, hci_uart_write_work);
  271. spin_lock_init(&hu->rx_lock);
  272. /* Flush any pending characters in the driver and line discipline. */
  273. /* FIXME: why is this needed. Note don't use ldisc_ref here as the
  274. open path is before the ldisc is referencable */
  275. if (tty->ldisc->ops->flush_buffer)
  276. tty->ldisc->ops->flush_buffer(tty);
  277. tty_driver_flush_buffer(tty);
  278. return 0;
  279. }
  280. /* hci_uart_tty_close()
  281. *
  282. * Called when the line discipline is changed to something
  283. * else, the tty is closed, or the tty detects a hangup.
  284. */
  285. static void hci_uart_tty_close(struct tty_struct *tty)
  286. {
  287. struct hci_uart *hu = tty->disc_data;
  288. struct hci_dev *hdev;
  289. BT_DBG("tty %p", tty);
  290. /* Detach from the tty */
  291. tty->disc_data = NULL;
  292. if (!hu)
  293. return;
  294. hdev = hu->hdev;
  295. if (hdev)
  296. hci_uart_close(hdev);
  297. cancel_work_sync(&hu->write_work);
  298. if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
  299. if (hdev) {
  300. if (test_bit(HCI_UART_REGISTERED, &hu->flags))
  301. hci_unregister_dev(hdev);
  302. hci_free_dev(hdev);
  303. }
  304. hu->proto->close(hu);
  305. }
  306. kfree(hu);
  307. }
  308. /* hci_uart_tty_wakeup()
  309. *
  310. * Callback for transmit wakeup. Called when low level
  311. * device driver can accept more send data.
  312. *
  313. * Arguments: tty pointer to associated tty instance data
  314. * Return Value: None
  315. */
  316. static void hci_uart_tty_wakeup(struct tty_struct *tty)
  317. {
  318. struct hci_uart *hu = tty->disc_data;
  319. BT_DBG("");
  320. if (!hu)
  321. return;
  322. clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
  323. if (tty != hu->tty)
  324. return;
  325. if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
  326. hci_uart_tx_wakeup(hu);
  327. }
  328. /* hci_uart_tty_receive()
  329. *
  330. * Called by tty low level driver when receive data is
  331. * available.
  332. *
  333. * Arguments: tty pointer to tty isntance data
  334. * data pointer to received data
  335. * flags pointer to flags for data
  336. * count count of received data in bytes
  337. *
  338. * Return Value: None
  339. */
  340. static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
  341. char *flags, int count)
  342. {
  343. struct hci_uart *hu = tty->disc_data;
  344. if (!hu || tty != hu->tty)
  345. return;
  346. if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
  347. return;
  348. spin_lock(&hu->rx_lock);
  349. hu->proto->recv(hu, data, count);
  350. if (hu->hdev)
  351. hu->hdev->stat.byte_rx += count;
  352. spin_unlock(&hu->rx_lock);
  353. tty_unthrottle(tty);
  354. }
  355. static int hci_uart_register_dev(struct hci_uart *hu)
  356. {
  357. struct hci_dev *hdev;
  358. BT_DBG("");
  359. /* Initialize and register HCI device */
  360. hdev = hci_alloc_dev();
  361. if (!hdev) {
  362. BT_ERR("Can't allocate HCI device");
  363. return -ENOMEM;
  364. }
  365. hu->hdev = hdev;
  366. hdev->bus = HCI_UART;
  367. hci_set_drvdata(hdev, hu);
  368. hdev->open = hci_uart_open;
  369. hdev->close = hci_uart_close;
  370. hdev->flush = hci_uart_flush;
  371. hdev->send = hci_uart_send_frame;
  372. hdev->setup = hci_uart_setup;
  373. SET_HCIDEV_DEV(hdev, hu->tty->dev);
  374. if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
  375. set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
  376. if (test_bit(HCI_UART_EXT_CONFIG, &hu->hdev_flags))
  377. set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks);
  378. if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
  379. set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
  380. if (test_bit(HCI_UART_CREATE_AMP, &hu->hdev_flags))
  381. hdev->dev_type = HCI_AMP;
  382. else
  383. hdev->dev_type = HCI_BREDR;
  384. if (test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
  385. return 0;
  386. if (hci_register_dev(hdev) < 0) {
  387. BT_ERR("Can't register HCI device");
  388. hci_free_dev(hdev);
  389. return -ENODEV;
  390. }
  391. set_bit(HCI_UART_REGISTERED, &hu->flags);
  392. return 0;
  393. }
  394. static int hci_uart_set_proto(struct hci_uart *hu, int id)
  395. {
  396. const struct hci_uart_proto *p;
  397. int err;
  398. p = hci_uart_get_proto(id);
  399. if (!p)
  400. return -EPROTONOSUPPORT;
  401. err = p->open(hu);
  402. if (err)
  403. return err;
  404. hu->proto = p;
  405. err = hci_uart_register_dev(hu);
  406. if (err) {
  407. p->close(hu);
  408. return err;
  409. }
  410. return 0;
  411. }
  412. static int hci_uart_set_flags(struct hci_uart *hu, unsigned long flags)
  413. {
  414. unsigned long valid_flags = BIT(HCI_UART_RAW_DEVICE) |
  415. BIT(HCI_UART_RESET_ON_INIT) |
  416. BIT(HCI_UART_CREATE_AMP) |
  417. BIT(HCI_UART_INIT_PENDING) |
  418. BIT(HCI_UART_EXT_CONFIG) |
  419. BIT(HCI_UART_VND_DETECT);
  420. if (flags & ~valid_flags)
  421. return -EINVAL;
  422. hu->hdev_flags = flags;
  423. return 0;
  424. }
  425. /* hci_uart_tty_ioctl()
  426. *
  427. * Process IOCTL system call for the tty device.
  428. *
  429. * Arguments:
  430. *
  431. * tty pointer to tty instance data
  432. * file pointer to open file object for device
  433. * cmd IOCTL command code
  434. * arg argument for IOCTL call (cmd dependent)
  435. *
  436. * Return Value: Command dependent
  437. */
  438. static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
  439. unsigned int cmd, unsigned long arg)
  440. {
  441. struct hci_uart *hu = tty->disc_data;
  442. int err = 0;
  443. BT_DBG("");
  444. /* Verify the status of the device */
  445. if (!hu)
  446. return -EBADF;
  447. switch (cmd) {
  448. case HCIUARTSETPROTO:
  449. if (!test_and_set_bit(HCI_UART_PROTO_SET, &hu->flags)) {
  450. err = hci_uart_set_proto(hu, arg);
  451. if (err) {
  452. clear_bit(HCI_UART_PROTO_SET, &hu->flags);
  453. return err;
  454. }
  455. } else
  456. return -EBUSY;
  457. break;
  458. case HCIUARTGETPROTO:
  459. if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
  460. return hu->proto->id;
  461. return -EUNATCH;
  462. case HCIUARTGETDEVICE:
  463. if (test_bit(HCI_UART_REGISTERED, &hu->flags))
  464. return hu->hdev->id;
  465. return -EUNATCH;
  466. case HCIUARTSETFLAGS:
  467. if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
  468. return -EBUSY;
  469. err = hci_uart_set_flags(hu, arg);
  470. if (err)
  471. return err;
  472. break;
  473. case HCIUARTGETFLAGS:
  474. return hu->hdev_flags;
  475. default:
  476. err = n_tty_ioctl_helper(tty, file, cmd, arg);
  477. break;
  478. }
  479. return err;
  480. }
  481. /*
  482. * We don't provide read/write/poll interface for user space.
  483. */
  484. static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file,
  485. unsigned char __user *buf, size_t nr)
  486. {
  487. return 0;
  488. }
  489. static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
  490. const unsigned char *data, size_t count)
  491. {
  492. return 0;
  493. }
  494. static unsigned int hci_uart_tty_poll(struct tty_struct *tty,
  495. struct file *filp, poll_table *wait)
  496. {
  497. return 0;
  498. }
  499. static int __init hci_uart_init(void)
  500. {
  501. static struct tty_ldisc_ops hci_uart_ldisc;
  502. int err;
  503. BT_INFO("HCI UART driver ver %s", VERSION);
  504. /* Register the tty discipline */
  505. memset(&hci_uart_ldisc, 0, sizeof (hci_uart_ldisc));
  506. hci_uart_ldisc.magic = TTY_LDISC_MAGIC;
  507. hci_uart_ldisc.name = "n_hci";
  508. hci_uart_ldisc.open = hci_uart_tty_open;
  509. hci_uart_ldisc.close = hci_uart_tty_close;
  510. hci_uart_ldisc.read = hci_uart_tty_read;
  511. hci_uart_ldisc.write = hci_uart_tty_write;
  512. hci_uart_ldisc.ioctl = hci_uart_tty_ioctl;
  513. hci_uart_ldisc.poll = hci_uart_tty_poll;
  514. hci_uart_ldisc.receive_buf = hci_uart_tty_receive;
  515. hci_uart_ldisc.write_wakeup = hci_uart_tty_wakeup;
  516. hci_uart_ldisc.owner = THIS_MODULE;
  517. err = tty_register_ldisc(N_HCI, &hci_uart_ldisc);
  518. if (err) {
  519. BT_ERR("HCI line discipline registration failed. (%d)", err);
  520. return err;
  521. }
  522. #ifdef CONFIG_BT_HCIUART_H4
  523. h4_init();
  524. #endif
  525. #ifdef CONFIG_BT_HCIUART_BCSP
  526. bcsp_init();
  527. #endif
  528. #ifdef CONFIG_BT_HCIUART_LL
  529. ll_init();
  530. #endif
  531. #ifdef CONFIG_BT_HCIUART_ATH3K
  532. ath_init();
  533. #endif
  534. #ifdef CONFIG_BT_HCIUART_3WIRE
  535. h5_init();
  536. #endif
  537. #ifdef CONFIG_BT_HCIUART_BCM
  538. bcm_init();
  539. #endif
  540. return 0;
  541. }
  542. static void __exit hci_uart_exit(void)
  543. {
  544. int err;
  545. #ifdef CONFIG_BT_HCIUART_H4
  546. h4_deinit();
  547. #endif
  548. #ifdef CONFIG_BT_HCIUART_BCSP
  549. bcsp_deinit();
  550. #endif
  551. #ifdef CONFIG_BT_HCIUART_LL
  552. ll_deinit();
  553. #endif
  554. #ifdef CONFIG_BT_HCIUART_ATH3K
  555. ath_deinit();
  556. #endif
  557. #ifdef CONFIG_BT_HCIUART_3WIRE
  558. h5_deinit();
  559. #endif
  560. #ifdef CONFIG_BT_HCIUART_BCM
  561. bcm_deinit();
  562. #endif
  563. /* Release tty registration of line discipline */
  564. err = tty_unregister_ldisc(N_HCI);
  565. if (err)
  566. BT_ERR("Can't unregister HCI line discipline (%d)", err);
  567. }
  568. module_init(hci_uart_init);
  569. module_exit(hci_uart_exit);
  570. MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
  571. MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
  572. MODULE_VERSION(VERSION);
  573. MODULE_LICENSE("GPL");
  574. MODULE_ALIAS_LDISC(N_HCI);