Hello.

On 3/6/2016 10:01 AM, Michael Chan wrote:

The supported bits and advertising bits in ethtool have the same
definitions.  The same is true for the firmware bits.  So use the
common function to handle the conversion for both supported and
advertising bits.

Signed-off-by: Michael Chan <mc...@broadcom.com>
---
  drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 29 +++++++----------------
  1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c 
b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 591c290..e2fe967 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
[...]
@@ -564,6 +545,15 @@ static u32 bnxt_fw_to_ethtool_lp_adv(struct bnxt_link_info 
*link_info)
        return _bnxt_fw_to_ethtool_adv_spds(fw_speeds, fw_pause);
  }

+static u32 bnxt_fw_to_ethtool_support_spds(struct bnxt_link_info *link_info)
+{
+       u16 fw_speeds = link_info->support_speeds;
+       u32 supported;
+
+       supported = _bnxt_fw_to_ethtool_adv_spds(fw_speeds, 0);
+       return (supported | SUPPORTED_Pause | SUPPORTED_Asym_Pause);

   Parens not needed here.

[...]

MBR, Sergei

Reply via email to