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 <andrzejtp2010@gmail.com> 11 */ 12 13 #ifndef U_NCM_H 14 #define U_NCM_H 15 16 #include <linux/usb/composite.h> 17 18 #include "u_ether.h" 19 20 struct f_ncm_opts { 21 struct usb_function_instance func_inst; 22 struct net_device *net; 23 24 struct gether_opts net_opts; 25 struct config_group *ncm_interf_group; 26 struct usb_os_desc ncm_os_desc; 27 char ncm_ext_compat_id[16]; 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 u16 max_segment_size; 38 }; 39 40 #endif /* U_NCM_H */ 41