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

Commit 3c02d1bb authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

bnxt_en: Fix ethtool -a reporting.



To report flow control tx/rx settings accurately regardless of autoneg
setting, we should use link_info->req_flow_ctrl.  Before this patch,
the reported settings were only correct when autoneg was on.

Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49b5c7a1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -855,10 +855,8 @@ static void bnxt_get_pauseparam(struct net_device *dev,
	if (BNXT_VF(bp))
		return;
	epause->autoneg = !!(link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL);
	epause->rx_pause =
		((link_info->auto_pause_setting & BNXT_LINK_PAUSE_RX) != 0);
	epause->tx_pause =
		((link_info->auto_pause_setting & BNXT_LINK_PAUSE_TX) != 0);
	epause->rx_pause = !!(link_info->req_flow_ctrl & BNXT_LINK_PAUSE_RX);
	epause->tx_pause = !!(link_info->req_flow_ctrl & BNXT_LINK_PAUSE_TX);
}

static int bnxt_set_pauseparam(struct net_device *dev,