netxen: explicity handle pause autoneg parameter
The hardware doesn't support controlling pause frames autoneg, so report that back correctly to userspace. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0683e707c
commit
15111025f6
|
@ -488,6 +488,8 @@ netxen_nic_get_pauseparam(struct net_device *dev,
|
||||||
__u32 val;
|
__u32 val;
|
||||||
int port = adapter->physical_port;
|
int port = adapter->physical_port;
|
||||||
|
|
||||||
|
pause->autoneg = 0;
|
||||||
|
|
||||||
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
|
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
|
||||||
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
|
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
|
||||||
return;
|
return;
|
||||||
|
@ -532,6 +534,11 @@ netxen_nic_set_pauseparam(struct net_device *dev,
|
||||||
struct netxen_adapter *adapter = netdev_priv(dev);
|
struct netxen_adapter *adapter = netdev_priv(dev);
|
||||||
__u32 val;
|
__u32 val;
|
||||||
int port = adapter->physical_port;
|
int port = adapter->physical_port;
|
||||||
|
|
||||||
|
/* not supported */
|
||||||
|
if (pause->autoneg)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* read mode */
|
/* read mode */
|
||||||
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
|
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
|
||||||
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
|
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
|
||||||
|
|
Loading…
Reference in New Issue