• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * net_device_adapter.h
3  *
4  * net device adapter of linux
5  *
6  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
7  *
8  * This software is licensed under the terms of the GNU General Public
9  * License version 2, as published by the Free Software Foundation, and
10  * may be copied, distributed, and modified under those terms.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  */
18 
19 #ifndef HDF_NET_DEVICE_ADAPTER_FULL_H
20 #define HDF_NET_DEVICE_ADAPTER_FULL_H
21 
22 #include <linux/netdevice.h>
23 #include <uapi/linux/if.h>
24 
25 #include "net_device_impl.h"
26 
27 /**
28  * data sending results, just define locked here, ok and busy reference linux definition for enum netdev_tx.
29  */
30 #define NETDEV_TX_LOCKED 0x20
31 
32 int32_t RegisterNetDeviceImpl(struct NetDeviceImpl *ndImpl);
33 int32_t UnRegisterNetDeviceImpl(struct NetDeviceImpl *ndImpl);
34 
35 struct FullNetDevicePriv {
36     struct net_device *dev;
37     struct NetDeviceImpl *impl;
38 };
39 
40 #endif /* HDF_NET_DEVICE_ADAPTER_FULL_H */
41 
42