From: Sean Anderson Date: Thu, 18 Aug 2022 16:16:35 +0000 (-0400) Subject: net: fman: memac: Use params instead of priv for max_speed X-Git-Tag: v6.1-rc5~319^2~397^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0e36be156c2c38d35f7a880f7ce0694b374e3f1;p=platform%2Fkernel%2Flinux-starfive.git net: fman: memac: Use params instead of priv for max_speed This option is present in params, so use it instead of the fman private version. Signed-off-by: Sean Anderson Acked-by: Camelia Groza Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 0ac8df8..c376b9b 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -388,11 +388,9 @@ static int memac_initialization(struct mac_device *mac_dev, struct device_node *mac_node) { int err; - struct mac_priv_s *priv; struct fman_mac_params params; struct fixed_phy_status *fixed_link; - priv = mac_dev->priv; mac_dev->set_promisc = memac_set_promiscuous; mac_dev->change_addr = memac_modify_mac_address; mac_dev->add_hash_mac_addr = memac_add_hash_mac_address; @@ -412,7 +410,7 @@ static int memac_initialization(struct mac_device *mac_dev, goto _return; params.internal_phy_node = of_parse_phandle(mac_node, "pcsphy-handle", 0); - if (priv->max_speed == SPEED_10000) + if (params.max_speed == SPEED_10000) params.phy_if = PHY_INTERFACE_MODE_XGMII; mac_dev->fman_mac = memac_config(¶ms);