diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c index d4f179f96dcb..9103e3e36c28 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | |||
@@ -511,7 +511,7 @@ netxen_nic_get_pauseparam(struct net_device *dev, | |||
511 | break; | 511 | break; |
512 | } | 512 | } |
513 | } else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { | 513 | } else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { |
514 | if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS)) | 514 | if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS)) |
515 | return; | 515 | return; |
516 | pause->rx_pause = 1; | 516 | pause->rx_pause = 1; |
517 | val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL); | 517 | val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL); |
@@ -577,7 +577,7 @@ netxen_nic_set_pauseparam(struct net_device *dev, | |||
577 | } | 577 | } |
578 | NXWR32(adapter, NETXEN_NIU_GB_PAUSE_CTL, val); | 578 | NXWR32(adapter, NETXEN_NIU_GB_PAUSE_CTL, val); |
579 | } else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { | 579 | } else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { |
580 | if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS)) | 580 | if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS)) |
581 | return -EIO; | 581 | return -EIO; |
582 | val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL); | 582 | val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL); |
583 | if (port == 0) { | 583 | if (port == 0) { |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c index de96a948bb7f..946160fa5843 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | |||
@@ -365,7 +365,7 @@ static int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) | |||
365 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) | 365 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) |
366 | return 0; | 366 | return 0; |
367 | 367 | ||
368 | if (port > NETXEN_NIU_MAX_XG_PORTS) | 368 | if (port >= NETXEN_NIU_MAX_XG_PORTS) |
369 | return -EINVAL; | 369 | return -EINVAL; |
370 | 370 | ||
371 | mac_cfg = 0; | 371 | mac_cfg = 0; |
@@ -392,7 +392,7 @@ static int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) | |||
392 | u32 port = adapter->physical_port; | 392 | u32 port = adapter->physical_port; |
393 | u16 board_type = adapter->ahw.board_type; | 393 | u16 board_type = adapter->ahw.board_type; |
394 | 394 | ||
395 | if (port > NETXEN_NIU_MAX_XG_PORTS) | 395 | if (port >= NETXEN_NIU_MAX_XG_PORTS) |
396 | return -EINVAL; | 396 | return -EINVAL; |
397 | 397 | ||
398 | mac_cfg = NXRD32(adapter, NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port)); | 398 | mac_cfg = NXRD32(adapter, NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port)); |