diff options
-rw-r--r-- | src/drivers/net/intelxl.c | 10 | ||||
-rw-r--r-- | src/drivers/net/intelxl.h | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/drivers/net/intelxl.c b/src/drivers/net/intelxl.c index 3cba4ccc3..0f5e70d76 100644 --- a/src/drivers/net/intelxl.c +++ b/src/drivers/net/intelxl.c @@ -63,8 +63,6 @@ static int intelxl_fetch_mac ( struct intelxl_nic *intelxl, union intelxl_receive_address mac; uint32_t prtpm_sal; uint32_t prtpm_sah; - uint32_t prtgl_sah; - size_t mfs; /* Read NVM-loaded address */ prtpm_sal = readl ( intelxl->regs + INTELXL_PRTPM_SAL ); @@ -84,11 +82,6 @@ static int intelxl_fetch_mac ( struct intelxl_nic *intelxl, intelxl, eth_ntoa ( mac.raw ) ); memcpy ( netdev->hw_addr, mac.raw, ETH_ALEN ); - /* Get maximum frame size */ - prtgl_sah = readl ( intelxl->regs + INTELXL_PRTGL_SAH ); - mfs = INTELXL_PRTGL_SAH_MFS_GET ( prtgl_sah ); - netdev->max_pkt_len = ( mfs - 4 /* CRC */ ); - return 0; } @@ -1363,7 +1356,7 @@ static int intelxl_open ( struct net_device *netdev ) { memcpy ( mac.raw, netdev->ll_addr, sizeof ( mac.raw ) ); prtgl_sal = le32_to_cpu ( mac.reg.low ); prtgl_sah = ( le32_to_cpu ( mac.reg.high ) | - INTELXL_PRTGL_SAH_MFS_SET ( intelxl->mfs ) ); + INTELXL_PRTGL_SAH_MFS ( intelxl->mfs ) ); writel ( prtgl_sal, intelxl->regs + INTELXL_PRTGL_SAL ); writel ( prtgl_sah, intelxl->regs + INTELXL_PRTGL_SAH ); @@ -1639,6 +1632,7 @@ static int intelxl_probe ( struct pci_device *pci ) { goto err_alloc; } netdev_init ( netdev, &intelxl_operations ); + netdev->max_pkt_len = INTELXL_MAX_PKT_LEN; intelxl = netdev->priv; pci_set_drvdata ( pci, netdev ); netdev->dev = &pci->dev; diff --git a/src/drivers/net/intelxl.h b/src/drivers/net/intelxl.h index 7e4932619..ddd3e888c 100644 --- a/src/drivers/net/intelxl.h +++ b/src/drivers/net/intelxl.h @@ -750,6 +750,9 @@ intelxl_init_ring ( struct intelxl_ring *ring, unsigned int count, size_t len, */ #define INTELXL_RX_FILL 16 +/** Maximum packet length (excluding CRC) */ +#define INTELXL_MAX_PKT_LEN ( 9728 - 4 /* CRC */ ) + /****************************************************************************** * * Top level @@ -826,8 +829,7 @@ intelxl_init_ring ( struct intelxl_ring *ring, unsigned int count, size_t len, /** Port MAC Address High Register */ #define INTELXL_PRTGL_SAH 0x1e2140 -#define INTELXL_PRTGL_SAH_MFS_GET(x) ( (x) >> 16 ) /**< Max frame size */ -#define INTELXL_PRTGL_SAH_MFS_SET(x) ( (x) << 16 ) /**< Max frame size */ +#define INTELXL_PRTGL_SAH_MFS(x) ( (x) << 16 ) /**< Max frame size */ /** Physical Function MAC Address Low Register */ #define INTELXL_PRTPM_SAL 0x1e4440 |