Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15111025 authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller
Browse files

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: default avatarFlavio Leitner <fbl@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0683e70
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -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))