Commit 92710fe6 authored by Jiawen Wu's avatar Jiawen Wu Committed by Jakub Kicinski

net: ngbe: Move defines into unified file

Remove ngbe.h, move defines into ngbe_type.h file.
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 524f6b29
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */
#ifndef _NGBE_H_
#define _NGBE_H_
#define NGBE_MAX_FDIR_INDICES 7
#define NGBE_MAX_RX_QUEUES (NGBE_MAX_FDIR_INDICES + 1)
#define NGBE_MAX_TX_QUEUES (NGBE_MAX_FDIR_INDICES + 1)
#define NGBE_ETH_LENGTH_OF_ADDRESS 6
#define NGBE_MAX_MSIX_VECTORS 0x09
#define NGBE_RAR_ENTRIES 32
/* TX/RX descriptor defines */
#define NGBE_DEFAULT_TXD 512 /* default ring size */
#define NGBE_DEFAULT_TX_WORK 256
#define NGBE_MAX_TXD 8192
#define NGBE_MIN_TXD 128
#define NGBE_DEFAULT_RXD 512 /* default ring size */
#define NGBE_DEFAULT_RX_WORK 256
#define NGBE_MAX_RXD 8192
#define NGBE_MIN_RXD 128
#define NGBE_MAC_STATE_DEFAULT 0x1
#define NGBE_MAC_STATE_MODIFIED 0x2
#define NGBE_MAC_STATE_IN_USE 0x4
extern char ngbe_driver_name[];
#endif /* _NGBE_H_ */
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "../libwx/wx_hw.h" #include "../libwx/wx_hw.h"
#include "ngbe_type.h" #include "ngbe_type.h"
#include "ngbe_hw.h" #include "ngbe_hw.h"
#include "ngbe.h"
int ngbe_eeprom_chksum_hostif(struct ngbe_adapter *adapter) int ngbe_eeprom_chksum_hostif(struct ngbe_adapter *adapter)
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "../libwx/wx_hw.h" #include "../libwx/wx_hw.h"
#include "ngbe_type.h" #include "ngbe_type.h"
#include "ngbe_hw.h" #include "ngbe_hw.h"
#include "ngbe.h"
char ngbe_driver_name[] = "ngbe"; char ngbe_driver_name[] = "ngbe";
/* ngbe_pci_tbl - PCI Device ID Table /* ngbe_pci_tbl - PCI Device ID Table
......
...@@ -90,6 +90,30 @@ ...@@ -90,6 +90,30 @@
#define NGBE_FW_CMD_ST_PASS 0x80658383 #define NGBE_FW_CMD_ST_PASS 0x80658383
#define NGBE_FW_CMD_ST_FAIL 0x70657376 #define NGBE_FW_CMD_ST_FAIL 0x70657376
#define NGBE_MAX_FDIR_INDICES 7
#define NGBE_MAX_RX_QUEUES (NGBE_MAX_FDIR_INDICES + 1)
#define NGBE_MAX_TX_QUEUES (NGBE_MAX_FDIR_INDICES + 1)
#define NGBE_ETH_LENGTH_OF_ADDRESS 6
#define NGBE_MAX_MSIX_VECTORS 0x09
#define NGBE_RAR_ENTRIES 32
/* TX/RX descriptor defines */
#define NGBE_DEFAULT_TXD 512 /* default ring size */
#define NGBE_DEFAULT_TX_WORK 256
#define NGBE_MAX_TXD 8192
#define NGBE_MIN_TXD 128
#define NGBE_DEFAULT_RXD 512 /* default ring size */
#define NGBE_DEFAULT_RX_WORK 256
#define NGBE_MAX_RXD 8192
#define NGBE_MIN_RXD 128
#define NGBE_MAC_STATE_DEFAULT 0x1
#define NGBE_MAC_STATE_MODIFIED 0x2
#define NGBE_MAC_STATE_IN_USE 0x4
enum ngbe_phy_type { enum ngbe_phy_type {
ngbe_phy_unknown = 0, ngbe_phy_unknown = 0,
ngbe_phy_none, ngbe_phy_none,
...@@ -177,4 +201,6 @@ struct ngbe_adapter { ...@@ -177,4 +201,6 @@ struct ngbe_adapter {
u16 bd_number; u16 bd_number;
}; };
extern char ngbe_driver_name[];
#endif /* _NGBE_TYPE_H_ */ #endif /* _NGBE_TYPE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment