162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * u_ncm.h
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Utility definitions for the ncm function
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd.
862306a36Sopenharmony_ci *		http://www.samsung.com
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#ifndef U_NCM_H
1462306a36Sopenharmony_ci#define U_NCM_H
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#include <linux/usb/composite.h>
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_cistruct f_ncm_opts {
1962306a36Sopenharmony_ci	struct usb_function_instance	func_inst;
2062306a36Sopenharmony_ci	struct net_device		*net;
2162306a36Sopenharmony_ci	bool				bound;
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci	struct config_group		*ncm_interf_group;
2462306a36Sopenharmony_ci	struct usb_os_desc		ncm_os_desc;
2562306a36Sopenharmony_ci	char				ncm_ext_compat_id[16];
2662306a36Sopenharmony_ci	/*
2762306a36Sopenharmony_ci	 * Read/write access to configfs attributes is handled by configfs.
2862306a36Sopenharmony_ci	 *
2962306a36Sopenharmony_ci	 * This is to protect the data from concurrent access by read/write
3062306a36Sopenharmony_ci	 * and create symlink/remove symlink.
3162306a36Sopenharmony_ci	 */
3262306a36Sopenharmony_ci	struct mutex			lock;
3362306a36Sopenharmony_ci	int				refcnt;
3462306a36Sopenharmony_ci};
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#endif /* U_NCM_H */
37