diff options
author | Akeem G. Abodunrin <akeem.g.abodunrin@intel.com> | 2012-08-16 23:35:07 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-09-05 02:00:00 -0400 |
commit | 42f3c43bf6f2774172b417b629f6e7ccdc794cec (patch) | |
tree | 33006691ddf4a2d9b36f08f5f5c15fb21814d084 /drivers | |
parent | 9936a7bbe56df432838fef658aea6bcfdd994021 (diff) |
igb: Supported and Advertised Pause Frame
This patch add ethtool supports for Supported and Advertised Pause Frame,
based on Adapter Flow Control settings.
Signed-off-by: Akeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index c4def55567f5..a2944412a55e 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
@@ -148,9 +148,9 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
148 | SUPPORTED_100baseT_Full | | 148 | SUPPORTED_100baseT_Full | |
149 | SUPPORTED_1000baseT_Full| | 149 | SUPPORTED_1000baseT_Full| |
150 | SUPPORTED_Autoneg | | 150 | SUPPORTED_Autoneg | |
151 | SUPPORTED_TP); | 151 | SUPPORTED_TP | |
152 | ecmd->advertising = (ADVERTISED_TP | | 152 | SUPPORTED_Pause); |
153 | ADVERTISED_Pause); | 153 | ecmd->advertising = ADVERTISED_TP; |
154 | 154 | ||
155 | if (hw->mac.autoneg == 1) { | 155 | if (hw->mac.autoneg == 1) { |
156 | ecmd->advertising |= ADVERTISED_Autoneg; | 156 | ecmd->advertising |= ADVERTISED_Autoneg; |
@@ -158,6 +158,21 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
158 | ecmd->advertising |= hw->phy.autoneg_advertised; | 158 | ecmd->advertising |= hw->phy.autoneg_advertised; |
159 | } | 159 | } |
160 | 160 | ||
161 | if (hw->mac.autoneg != 1) | ||
162 | ecmd->advertising &= ~(ADVERTISED_Pause | | ||
163 | ADVERTISED_Asym_Pause); | ||
164 | |||
165 | if (hw->fc.requested_mode == e1000_fc_full) | ||
166 | ecmd->advertising |= ADVERTISED_Pause; | ||
167 | else if (hw->fc.requested_mode == e1000_fc_rx_pause) | ||
168 | ecmd->advertising |= (ADVERTISED_Pause | | ||
169 | ADVERTISED_Asym_Pause); | ||
170 | else if (hw->fc.requested_mode == e1000_fc_tx_pause) | ||
171 | ecmd->advertising |= ADVERTISED_Asym_Pause; | ||
172 | else | ||
173 | ecmd->advertising &= ~(ADVERTISED_Pause | | ||
174 | ADVERTISED_Asym_Pause); | ||
175 | |||
161 | ecmd->port = PORT_TP; | 176 | ecmd->port = PORT_TP; |
162 | ecmd->phy_address = hw->phy.addr; | 177 | ecmd->phy_address = hw->phy.addr; |
163 | } else { | 178 | } else { |