From: Ganesh Goudar Date: Tue, 17 Apr 2018 09:47:11 +0000 (+0530) Subject: cxgb4vf: display pause settings X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a64dcddc5cdfbf1d4d0af519c30cd6c2e4828282;p=openwrt%2Fstaging%2Fblogic.git cxgb4vf: display pause settings Add support to display pause settings Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 9a81b52307a9..71f13bd2b5e4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c @@ -1419,6 +1419,22 @@ static int cxgb4vf_get_link_ksettings(struct net_device *dev, base->duplex = DUPLEX_UNKNOWN; } + if (pi->link_cfg.fc & PAUSE_RX) { + if (pi->link_cfg.fc & PAUSE_TX) { + ethtool_link_ksettings_add_link_mode(link_ksettings, + advertising, + Pause); + } else { + ethtool_link_ksettings_add_link_mode(link_ksettings, + advertising, + Asym_Pause); + } + } else if (pi->link_cfg.fc & PAUSE_TX) { + ethtool_link_ksettings_add_link_mode(link_ksettings, + advertising, + Asym_Pause); + } + base->autoneg = pi->link_cfg.autoneg; if (pi->link_cfg.pcaps & FW_PORT_CAP32_ANEG) ethtool_link_ksettings_add_link_mode(link_ksettings,