GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / net / ethernet / aquantia / atlantic / aq_nic_internal.h
1 /*
2  * aQuantia Corporation Network Driver
3  * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  */
9
10 /* File aq_nic_internal.h: Definition of private object structure. */
11
12 #ifndef AQ_NIC_INTERNAL_H
13 #define AQ_NIC_INTERNAL_H
14
15 struct aq_nic_s {
16         struct aq_obj_s header;
17         struct aq_vec_s *aq_vec[AQ_CFG_VECS_MAX];
18         struct aq_ring_s *aq_ring_tx[AQ_CFG_VECS_MAX * AQ_CFG_TCS_MAX];
19         struct aq_hw_s *aq_hw;
20         struct net_device *ndev;
21         struct aq_pci_func_s *aq_pci_func;
22         unsigned int aq_vecs;
23         unsigned int packet_filter;
24         unsigned int power_state;
25         u8 port;
26         struct aq_hw_ops aq_hw_ops;
27         struct aq_hw_caps_s aq_hw_caps;
28         struct aq_nic_cfg_s aq_nic_cfg;
29         struct timer_list service_timer;
30         struct timer_list polling_timer;
31         struct aq_hw_link_status_s link_status;
32         struct {
33                 u32 count;
34                 u8 ar[AQ_CFG_MULTICAST_ADDRESS_MAX][ETH_ALEN];
35         } mc_list;
36 };
37
38 #define AQ_NIC_FLAGS_IS_NOT_READY (AQ_NIC_FLAG_STOPPING | \
39                         AQ_NIC_FLAG_RESETTING | AQ_NIC_FLAG_CLOSING | \
40                         AQ_NIC_FLAG_ERR_UNPLUG | AQ_NIC_FLAG_ERR_HW)
41
42 #define AQ_NIC_FLAGS_IS_NOT_TX_READY (AQ_NIC_FLAGS_IS_NOT_READY | \
43                                         AQ_NIC_LINK_DOWN)
44
45 #endif /* AQ_NIC_INTERNAL_H */