u_ecm.h 822 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * u_ecm.h
  3. *
  4. * Utility definitions for the ecm function
  5. *
  6. * Copyright (c) 2013 Samsung Electronics Co., Ltd.
  7. * http://www.samsung.com
  8. *
  9. * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #ifndef U_ECM_H
  16. #define U_ECM_H
  17. #include <linux/usb/composite.h>
  18. struct f_ecm_opts {
  19. struct usb_function_instance func_inst;
  20. struct net_device *net;
  21. bool bound;
  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_ECM_H */