From patchwork Fri Sep 30 14:21:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12995539 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71284C433F5 for ; Fri, 30 Sep 2022 14:22:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232049AbiI3OWE (ORCPT ); Fri, 30 Sep 2022 10:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232051AbiI3OVk (ORCPT ); Fri, 30 Sep 2022 10:21:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED485C9033 for ; Fri, 30 Sep 2022 07:21:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A6EE8B828F5 for ; Fri, 30 Sep 2022 14:21:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E84D9C43470; Fri, 30 Sep 2022 14:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664547682; bh=tn+uJp0hCNGEKULAk5syyPS6VXE7a+H6ka8mHscdn84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ousdle2eN82l/jA3OUd5ngGhhWksrj2O+xWNaHvBn/w4CcOrocrtSi87WTyVQZqUV 3HgtGj2MyeBplCFtZSpaVfyvTBLhwvrRrHGakfUHl5IMLmxra9j8d5jH41B1CmFijX XEPadd1vTvz5ldvbt/goZXHV8msRP87Eu3tqSHwNDrY993STQjasUvQ0DAlj0X/5c3 eD82mN94GjVXQoXSI+Q2kZ0RK0skjk9ChPmhPLsJhGOw5ws+BAg1SkUWvRKVEQzdAa 50PLVVNfhNfZ2gL5a2aF5oo9AaMe4BSCfoBg9TH9cjqQBAqDLqadFEggQh8WrPwi3a 3Gf0Ct2NOg9VA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski Cc: Russell King , Andrew Lunn , Vladimir Oltean , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net-next 04/12] net: phylink: rename phylink_sfp_config() Date: Fri, 30 Sep 2022 16:21:02 +0200 Message-Id: <20220930142110.15372-5-kabel@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220930142110.15372-1-kabel@kernel.org> References: <20220930142110.15372-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: "Russell King (Oracle)" phylink_sfp_config() now only deals with configuring the MAC for a SFP containing a PHY. Rename it to be specific. Signed-off-by: Russell King (Oracle) Signed-off-by: Marek BehĂșn --- drivers/net/phy/phylink.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index ab32ef767d69..f6e9231f0cbe 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -2867,9 +2867,8 @@ static void phylink_sfp_set_config(struct phylink *pl, u8 mode, phylink_mac_initial_config(pl, false); } -static int phylink_sfp_config(struct phylink *pl, u8 mode, - const unsigned long *supported, - const unsigned long *advertising) +static int phylink_sfp_config_phy(struct phylink *pl, u8 mode, + struct phy_device *phy) { __ETHTOOL_DECLARE_LINK_MODE_MASK(support1); __ETHTOOL_DECLARE_LINK_MODE_MASK(support); @@ -2877,10 +2876,10 @@ static int phylink_sfp_config(struct phylink *pl, u8 mode, phy_interface_t iface; int ret; - linkmode_copy(support, supported); + linkmode_copy(support, phy->supported); memset(&config, 0, sizeof(config)); - linkmode_copy(config.advertising, advertising); + linkmode_copy(config.advertising, phy->advertising); config.interface = PHY_INTERFACE_MODE_NA; config.speed = SPEED_UNKNOWN; config.duplex = DUPLEX_UNKNOWN; @@ -3093,7 +3092,7 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) mode = MLO_AN_INBAND; /* Do the initial configuration */ - ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising); + ret = phylink_sfp_config_phy(pl, mode, phy); if (ret < 0) return ret;