aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-06-13 09:39:00 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-15 11:11:57 -0400
commit5bb09778e2196770d218e82904f15b558d9a1e50 (patch)
tree95aa4c9fdead4ce9f404cef89d2f9c9f6527cbe3 /drivers
parentad0fad9eb2577ffc2d1a4fd522e6a71fd51127fd (diff)
tg3: Show flowctrl settings through get_settings()
This patch adds code to present the flow control advertisements through the ethtool get_settings callback. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tg3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index b4f5e923515f..7b1e2abf0cea 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9936,6 +9936,18 @@ static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
9936 } 9936 }
9937 9937
9938 cmd->advertising = tp->link_config.advertising; 9938 cmd->advertising = tp->link_config.advertising;
9939 if (tg3_flag(tp, PAUSE_AUTONEG)) {
9940 if (tp->link_config.flowctrl & FLOW_CTRL_RX) {
9941 if (tp->link_config.flowctrl & FLOW_CTRL_TX) {
9942 cmd->advertising |= ADVERTISED_Pause;
9943 } else {
9944 cmd->advertising |= ADVERTISED_Pause |
9945 ADVERTISED_Asym_Pause;
9946 }
9947 } else if (tp->link_config.flowctrl & FLOW_CTRL_TX) {
9948 cmd->advertising |= ADVERTISED_Asym_Pause;
9949 }
9950 }
9939 if (netif_running(dev)) { 9951 if (netif_running(dev)) {
9940 ethtool_cmd_speed_set(cmd, tp->link_config.active_speed); 9952 ethtool_cmd_speed_set(cmd, tp->link_config.active_speed);
9941 cmd->duplex = tp->link_config.active_duplex; 9953 cmd->duplex = tp->link_config.active_duplex;