15fd54aceSGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0 200a2430fSAndrzej Pietrasiewicz /* 300a2430fSAndrzej Pietrasiewicz * u_ncm.h 400a2430fSAndrzej Pietrasiewicz * 500a2430fSAndrzej Pietrasiewicz * Utility definitions for the ncm function 600a2430fSAndrzej Pietrasiewicz * 700a2430fSAndrzej Pietrasiewicz * Copyright (c) 2013 Samsung Electronics Co., Ltd. 800a2430fSAndrzej Pietrasiewicz * http://www.samsung.com 900a2430fSAndrzej Pietrasiewicz * 101b4a3b51SAndrzej Pietrasiewicz * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> 1100a2430fSAndrzej Pietrasiewicz */ 1200a2430fSAndrzej Pietrasiewicz 1300a2430fSAndrzej Pietrasiewicz #ifndef U_NCM_H 1400a2430fSAndrzej Pietrasiewicz #define U_NCM_H 1500a2430fSAndrzej Pietrasiewicz 1600a2430fSAndrzej Pietrasiewicz #include <linux/usb/composite.h> 1700a2430fSAndrzej Pietrasiewicz 1800a2430fSAndrzej Pietrasiewicz struct f_ncm_opts { 1900a2430fSAndrzej Pietrasiewicz struct usb_function_instance func_inst; 2000a2430fSAndrzej Pietrasiewicz struct net_device *net; 2100a2430fSAndrzej Pietrasiewicz bool bound; 2200a2430fSAndrzej Pietrasiewicz 23*79340929SRomain Izard struct config_group *ncm_interf_group; 24*79340929SRomain Izard struct usb_os_desc ncm_os_desc; 25*79340929SRomain Izard char ncm_ext_compat_id[16]; 2600a2430fSAndrzej Pietrasiewicz /* 2700a2430fSAndrzej Pietrasiewicz * Read/write access to configfs attributes is handled by configfs. 2800a2430fSAndrzej Pietrasiewicz * 2900a2430fSAndrzej Pietrasiewicz * This is to protect the data from concurrent access by read/write 3000a2430fSAndrzej Pietrasiewicz * and create symlink/remove symlink. 3100a2430fSAndrzej Pietrasiewicz */ 3200a2430fSAndrzej Pietrasiewicz struct mutex lock; 3300a2430fSAndrzej Pietrasiewicz int refcnt; 3400a2430fSAndrzej Pietrasiewicz }; 3500a2430fSAndrzej Pietrasiewicz 3600a2430fSAndrzej Pietrasiewicz #endif /* U_NCM_H */ 37