From patchwork Fri Oct 20 21:27:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13431199 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D30092FE0E for ; Fri, 20 Oct 2023 21:28:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="VPc2nKpZ" Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B32B3D6D for ; Fri, 20 Oct 2023 14:28:18 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5ab2cb900fcso889293a12.0 for ; Fri, 20 Oct 2023 14:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1697837298; x=1698442098; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=BMM08PPpP8N9Xwt7rJplYIgdnHpvZjXmQjWULq++WWM=; b=VPc2nKpZla/TnttO2lrZeGt2XO1tgyY/Et7aqZri2+Eg1XYpoY+DGkJGy/pBjFXcGI 7A2EtynTgQhrldbBNCEsVBnQoOrMd8jL8CkVho6KHJx4gvG2+No1PH2RMz3cT1HZJ0Ee k2bFtOIzD80y7OOsu2LLuorRQukaLfdGOMTOk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697837298; x=1698442098; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BMM08PPpP8N9Xwt7rJplYIgdnHpvZjXmQjWULq++WWM=; b=Ns/CUhf0eWiidIwNix6Fh5V4htZG/1OnbIeAz7tm9qr1VPvt2ZVJuYLl7jjG6+VJrh dH3c8p02djPC13f/o3+BkxOmkbWIlKTjgLGczp6WmU2H2+tVmsGCY+5baFyVFV/6ZXwg ahVQRMqznKreJ0OuDMPBYZ/7rLvrT3vFqJc41jJ/8/b1zlRIFLW+No0p3pK4Ts6zXS6N ijH3DM6WPXEH5FJSoUQ3S9JD/4D72jAjjh8xmMMijkM8zTtK9lE3+4EzNego/k16XpxP SQMr8zAMS1l1j9wA++VrmFivZTCRhfK/fkW1p012oZ1ySwviia9iHZvJrHA4AS39IPtX Cjkw== X-Gm-Message-State: AOJu0YyOgEmPp5dPIbkGD0rqf6d0TDMJhIP9HtpX4Kw8w8VSvF5jtNKy dXic7gV7/p7jiRAws75m9g9uyw== X-Google-Smtp-Source: AGHT+IFz46Qha3XB6Sh74avHl0uKnL4xZ5pQGlyGWLzmK6zSf/v68/a1V0moddCjJosEfrM3qnsH6A== X-Received: by 2002:a17:90b:2ec7:b0:27d:2ad2:4d9c with SMTP id ss7-20020a17090b2ec700b0027d2ad24d9cmr2802322pjb.35.1697837298003; Fri, 20 Oct 2023 14:28:18 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id j13-20020a17090a7e8d00b0026d4100e0e8sm1843348pjl.10.2023.10.20.14.28.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2023 14:28:17 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, gospo@broadcom.com, kalesh-anakkur.purayil@broadcom.com Subject: [PATCH net-next 7/8] bnxt_en: convert to linkmode_set_bit() API Date: Fri, 20 Oct 2023 14:27:56 -0700 Message-Id: <20231020212757.173551-8-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20231020212757.173551-1-michael.chan@broadcom.com> References: <20231020212757.173551-1-michael.chan@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Edwin Peer Barring the BNXT_FW_TO_ETHTOOL speed macros, which will be removed in the next patch, update code to use the newer API. No functional change. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 98a767becd0d..c72dfa0708e5 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -1816,31 +1816,31 @@ static void bnxt_get_ethtool_modes(struct bnxt_link_info *link_info, struct bnxt *bp = container_of(link_info, struct bnxt, link_info); if (!(bp->phy_flags & BNXT_PHY_FL_NO_PAUSE)) { - ethtool_link_ksettings_add_link_mode(lk_ksettings, supported, - Pause); - ethtool_link_ksettings_add_link_mode(lk_ksettings, supported, - Asym_Pause); + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, + lk_ksettings->link_modes.supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, + lk_ksettings->link_modes.supported); } if (link_info->support_auto_speeds || link_info->support_pam4_auto_speeds) - ethtool_link_ksettings_add_link_mode(lk_ksettings, supported, - Autoneg); + linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, + lk_ksettings->link_modes.supported); if (~link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL) return; if (link_info->auto_pause_setting & BNXT_LINK_PAUSE_RX) - ethtool_link_ksettings_add_link_mode(lk_ksettings, advertising, - Pause); + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, + lk_ksettings->link_modes.advertising); if (hweight8(link_info->auto_pause_setting & BNXT_LINK_PAUSE_BOTH) == 1) - ethtool_link_ksettings_add_link_mode(lk_ksettings, advertising, - Asym_Pause); + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, + lk_ksettings->link_modes.advertising); if (link_info->lp_pause & BNXT_LINK_PAUSE_RX) - ethtool_link_ksettings_add_link_mode(lk_ksettings, - lp_advertising, Pause); + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, + lk_ksettings->link_modes.lp_advertising); if (hweight8(link_info->lp_pause & BNXT_LINK_PAUSE_BOTH) == 1) - ethtool_link_ksettings_add_link_mode(lk_ksettings, - lp_advertising, Asym_Pause); + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, + lk_ksettings->link_modes.lp_advertising); } static void bnxt_fw_to_ethtool_advertised_fec(struct bnxt_link_info *link_info, @@ -1988,8 +1988,8 @@ static int bnxt_get_link_ksettings(struct net_device *dev, if (link_info->autoneg) { bnxt_fw_to_ethtool_advertised_spds(link_info, lk_ksettings); bnxt_fw_to_ethtool_advertised_fec(link_info, lk_ksettings); - ethtool_link_ksettings_add_link_mode(lk_ksettings, - advertising, Autoneg); + linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, + lk_ksettings->link_modes.advertising); base->autoneg = AUTONEG_ENABLE; if (link_info->phy_link_status == BNXT_LINK_LINK) bnxt_fw_to_ethtool_lp_adv(link_info, lk_ksettings); @@ -2000,15 +2000,15 @@ static int bnxt_get_link_ksettings(struct net_device *dev, base->port = PORT_NONE; if (link_info->media_type == PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP) { base->port = PORT_TP; - ethtool_link_ksettings_add_link_mode(lk_ksettings, supported, - TP); - ethtool_link_ksettings_add_link_mode(lk_ksettings, advertising, - TP); + linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, + lk_ksettings->link_modes.supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, + lk_ksettings->link_modes.advertising); } else { - ethtool_link_ksettings_add_link_mode(lk_ksettings, supported, - FIBRE); - ethtool_link_ksettings_add_link_mode(lk_ksettings, advertising, - FIBRE); + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, + lk_ksettings->link_modes.supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, + lk_ksettings->link_modes.advertising); if (link_info->media_type == PORT_PHY_QCFG_RESP_MEDIA_TYPE_DAC) base->port = PORT_DA;