diagfwd_smux.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (c) 2012,2014 The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef DIAGFWD_SMUX_H
  13. #define DIAGFWD_SMUX_H
  14. #include <linux/smux.h>
  15. #define SMUX_1 0
  16. #define NUM_SMUX_DEV 1
  17. #define DIAG_SMUX_NAME_SZ 24
  18. struct diag_smux_info {
  19. int id;
  20. int lcid;
  21. int dev_id;
  22. char name[DIAG_SMUX_NAME_SZ];
  23. unsigned char *read_buf;
  24. int read_len;
  25. int in_busy;
  26. int enabled;
  27. int inited;
  28. int opened;
  29. struct work_struct read_work;
  30. struct workqueue_struct *smux_wq;
  31. };
  32. extern struct diag_smux_info diag_smux[NUM_SMUX_DEV];
  33. int diag_smux_init(void);
  34. void diag_smux_exit(void);
  35. #endif