u_ncm.h 780 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * u_ncm.h
  4. *
  5. * Utility definitions for the ncm function
  6. *
  7. * Copyright (c) 2013 Samsung Electronics Co., Ltd.
  8. * http://www.samsung.com
  9. *
  10. * Author: Andrzej Pietrasiewicz <[email protected]>
  11. */
  12. #ifndef U_NCM_H
  13. #define U_NCM_H
  14. #include <linux/usb/composite.h>
  15. struct f_ncm_opts {
  16. struct usb_function_instance func_inst;
  17. struct net_device *net;
  18. bool bound;
  19. struct config_group *ncm_interf_group;
  20. struct usb_os_desc ncm_os_desc;
  21. char ncm_ext_compat_id[16];
  22. /*
  23. * Read/write access to configfs attributes is handled by configfs.
  24. *
  25. * This is to protect the data from concurrent access by read/write
  26. * and create symlink/remove symlink.
  27. */
  28. struct mutex lock;
  29. int refcnt;
  30. };
  31. #endif /* U_NCM_H */