u_rndis.h 1001 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * u_rndis.h
  4. *
  5. * Utility definitions for the subset 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_RNDIS_H
  13. #define U_RNDIS_H
  14. #include <linux/usb/composite.h>
  15. struct f_rndis_opts {
  16. struct usb_function_instance func_inst;
  17. u32 vendor_id;
  18. const char *manufacturer;
  19. struct net_device *net;
  20. bool bound;
  21. bool borrowed_net;
  22. struct config_group *rndis_interf_group;
  23. struct usb_os_desc rndis_os_desc;
  24. char rndis_ext_compat_id[16];
  25. u8 class;
  26. u8 subclass;
  27. u8 protocol;
  28. /*
  29. * Read/write access to configfs attributes is handled by configfs.
  30. *
  31. * This is to protect the data from concurrent access by read/write
  32. * and create symlink/remove symlink.
  33. */
  34. struct mutex lock;
  35. int refcnt;
  36. };
  37. void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net);
  38. #endif /* U_RNDIS_H */