|
@@ -511,7 +511,7 @@ netxen_nic_get_pauseparam(struct net_device *dev,
|
|
|
break;
|
|
|
}
|
|
|
} else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) {
|
|
|
- if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
|
|
|
+ if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS))
|
|
|
return;
|
|
|
pause->rx_pause = 1;
|
|
|
val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL);
|
|
@@ -577,7 +577,7 @@ netxen_nic_set_pauseparam(struct net_device *dev,
|
|
|
}
|
|
|
NXWR32(adapter, NETXEN_NIU_GB_PAUSE_CTL, val);
|
|
|
} else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) {
|
|
|
- if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
|
|
|
+ if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS))
|
|
|
return -EIO;
|
|
|
val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL);
|
|
|
if (port == 0) {
|