162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * u_ecm.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Utility definitions for the ecm 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_ECM_H 1462306a36Sopenharmony_ci#define U_ECM_H 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#include <linux/usb/composite.h> 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_cistruct f_ecm_opts { 1962306a36Sopenharmony_ci struct usb_function_instance func_inst; 2062306a36Sopenharmony_ci struct net_device *net; 2162306a36Sopenharmony_ci bool bound; 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci /* 2462306a36Sopenharmony_ci * Read/write access to configfs attributes is handled by configfs. 2562306a36Sopenharmony_ci * 2662306a36Sopenharmony_ci * This is to protect the data from concurrent access by read/write 2762306a36Sopenharmony_ci * and create symlink/remove symlink. 2862306a36Sopenharmony_ci */ 2962306a36Sopenharmony_ci struct mutex lock; 3062306a36Sopenharmony_ci int refcnt; 3162306a36Sopenharmony_ci}; 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#endif /* U_ECM_H */ 34