u_ncm.h 668 B

12345678910111213141516171819202122232425262728293031323334
  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 <andrzej.p@samsung.com>
  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. /*
  20. * Read/write access to configfs attributes is handled by configfs.
  21. *
  22. * This is to protect the data from concurrent access by read/write
  23. * and create symlink/remove symlink.
  24. */
  25. struct mutex lock;
  26. int refcnt;
  27. };
  28. #endif /* U_NCM_H */