1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Huawei HiNIC PCI Express Linux driver
4 * Copyright(c) 2017 Huawei Technologies Co., Ltd
10 #include <linux/netdevice.h>
11 #include <linux/types.h>
12 #include <linux/semaphore.h>
13 #include <linux/workqueue.h>
14 #include <linux/bitops.h>
16 #include "hinic_hw_dev.h"
20 #define HINIC_DRV_NAME "hinic"
23 HINIC_LINK_UP
= BIT(0),
24 HINIC_INTF_UP
= BIT(1),
27 struct hinic_rx_mode_work
{
28 struct work_struct work
;
33 struct net_device
*netdev
;
34 struct hinic_hwdev
*hwdev
;
37 unsigned int tx_weight
;
38 unsigned int rx_weight
;
42 struct semaphore mgmt_lock
;
43 unsigned long *vlan_bitmap
;
45 struct hinic_rx_mode_work rx_mode_work
;
46 struct workqueue_struct
*workq
;
48 struct hinic_txq
*txqs
;
49 struct hinic_rxq
*rxqs
;
51 struct hinic_txq_stats tx_stats
;
52 struct hinic_rxq_stats rx_stats
;