aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc.h
diff options
context:
space:
mode:
authorSasha Neftin <sasha.neftin@intel.com>2018-10-11 10:17:13 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-10-17 13:14:03 -0700
commitc9a11c23ceb65db7ecc5735e7428311d70e74ba9 (patch)
tree9d52fe6e7e45df154f1949049c71a40386f4f0c8 /drivers/net/ethernet/intel/igc/igc.h
parent146740f9abc4976e4f0af1aa302efee1c699d2e4 (diff)
igc: Add netdev
Now that we have the ability to configure the basic settings on the device we can start allocating and configuring a netdev for the interface. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc.h')
-rw-r--r--drivers/net/ethernet/intel/igc/igc.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 481b2ee694fa..2e819cac19e5 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -28,15 +28,63 @@
extern char igc_driver_name[];
extern char igc_driver_version[];
+/* Transmit and receive queues */
+#define IGC_MAX_RX_QUEUES 4
+#define IGC_MAX_TX_QUEUES 4
+
+#define MAX_Q_VECTORS 8
+#define MAX_STD_JUMBO_FRAME_SIZE 9216
+
+enum igc_state_t {
+ __IGC_TESTING,
+ __IGC_RESETTING,
+ __IGC_DOWN,
+ __IGC_PTP_TX_IN_PROGRESS,
+};
+
+struct igc_q_vector {
+ struct igc_adapter *adapter; /* backlink */
+
+ struct napi_struct napi;
+};
+
+struct igc_mac_addr {
+ u8 addr[ETH_ALEN];
+ u8 queue;
+ u8 state; /* bitmask */
+};
+
+#define IGC_MAC_STATE_DEFAULT 0x1
+#define IGC_MAC_STATE_MODIFIED 0x2
+#define IGC_MAC_STATE_IN_USE 0x4
+
/* Board specific private data structure */
struct igc_adapter {
+ struct net_device *netdev;
+
+ unsigned long state;
+ unsigned int flags;
+ unsigned int num_q_vectors;
+ u16 link_speed;
+ u16 link_duplex;
+
+ u8 port_num;
+
u8 __iomem *io_addr;
+ struct work_struct watchdog_task;
+
+ int msg_enable;
+ u32 max_frame_size;
/* OS defined structs */
struct pci_dev *pdev;
/* structs defined in igc_hw.h */
struct igc_hw hw;
+
+ struct igc_q_vector *q_vector[MAX_Q_VECTORS];
+
+ struct igc_mac_addr *mac_table;
};
#endif /* _IGC_H_ */