Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/821432/?format=api
{ "id": 821432, "url": "http://patchwork.ozlabs.org/api/patches/821432/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171004175839.28364-2-alan.brady@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20171004175839.28364-2-alan.brady@intel.com>", "list_archive_url": null, "date": "2017-10-04T17:58:27", "name": "[01/13,net-next] i40e: rename 'cmd' variables in ethtool interface", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "427db422d93a5ef9d7da9c830faeec67ede21119", "submitter": { "id": 69551, "url": "http://patchwork.ozlabs.org/api/people/69551/?format=api", "name": "Alan Brady", "email": "alan.brady@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171004175839.28364-2-alan.brady@intel.com/mbox/", "series": [ { "id": 6427, "url": "http://patchwork.ozlabs.org/api/series/6427/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=6427", "date": "2017-10-04T17:58:26", "name": "i40e: refactor ethtool interface", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/6427/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/821432/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/821432/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@osuosl.org" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y6kHv6f4bz9t7R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 5 Oct 2017 05:02:03 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 511FC888FD;\n\tWed, 4 Oct 2017 18:02:02 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id n8JGJHzlJ7DE; Wed, 4 Oct 2017 18:02:00 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7B2BE888D7;\n\tWed, 4 Oct 2017 18:02:00 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0C3951CE7B9\n\tfor <intel-wired-lan@osuosl.org>;\n\tWed, 4 Oct 2017 18:01:48 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0715982076\n\tfor <intel-wired-lan@osuosl.org>;\n\tWed, 4 Oct 2017 18:01:48 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id RJI56aBouDjb for <intel-wired-lan@osuosl.org>;\n\tWed, 4 Oct 2017 18:01:44 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 00C1A820B9\n\tfor <intel-wired-lan@osuosl.org>;\n\tWed, 4 Oct 2017 18:01:43 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t04 Oct 2017 11:01:43 -0700", "from dev1-atbrady.jf.intel.com ([10.165.248.38])\n\tby FMSMGA003.fm.intel.com with ESMTP; 04 Oct 2017 11:01:42 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,478,1500966000\"; d=\"scan'208\";a=\"906754368\"", "From": "Alan Brady <alan.brady@intel.com>", "To": "intel-wired-lan@osuosl.org", "Date": "Wed, 4 Oct 2017 10:58:27 -0700", "Message-Id": "<20171004175839.28364-2-alan.brady@intel.com>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20171004175839.28364-1-alan.brady@intel.com>", "References": "<20171004175839.28364-1-alan.brady@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 01/13 net-next] i40e: rename 'cmd'\n\tvariables in ethtool interface", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "After the switch to the new ethtool API, ethtool passes us\nethtool_ksettings structs instead of ethtool_command structs, however we\nwere still referring to them as 'cmd' variables. This renames them to\n'ks' variables which makes the code easier to understand.\n\nSigned-off-by: Alan Brady <alan.brady@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 139 +++++++++++++------------\n 1 file changed, 70 insertions(+), 69 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 72d5f2cdf419..4ed5deab7e68 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -378,12 +378,12 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported,\n /**\n * i40e_get_settings_link_up - Get the Link settings for when link is up\n * @hw: hw structure\n- * @ecmd: ethtool command to fill in\n+ * @ks: ethtool ksettings to fill in\n * @netdev: network interface device structure\n- *\n+ * @pf: pointer to physical function struct\n **/\n static void i40e_get_settings_link_up(struct i40e_hw *hw,\n-\t\t\t\t struct ethtool_link_ksettings *cmd,\n+\t\t\t\t struct ethtool_link_ksettings *ks,\n \t\t\t\t struct net_device *netdev,\n \t\t\t\t struct i40e_pf *pf)\n {\n@@ -394,9 +394,9 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,\n \tu32 supported, advertising;\n \n \tethtool_convert_link_mode_to_legacy_u32(&supported,\n-\t\t\t\t\t\tcmd->link_modes.supported);\n+\t\t\t\t\t\tks->link_modes.supported);\n \tethtool_convert_link_mode_to_legacy_u32(&advertising,\n-\t\t\t\t\t\tcmd->link_modes.advertising);\n+\t\t\t\t\t\tks->link_modes.advertising);\n \n \t/* Initialize supported and advertised settings based on phy settings */\n \tswitch (hw_link_info->phy_type) {\n@@ -528,48 +528,49 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,\n \t/* Set speed and duplex */\n \tswitch (link_speed) {\n \tcase I40E_LINK_SPEED_40GB:\n-\t\tcmd->base.speed = SPEED_40000;\n+\t\tks->base.speed = SPEED_40000;\n \t\tbreak;\n \tcase I40E_LINK_SPEED_25GB:\n #ifdef SPEED_25000\n-\t\tcmd->base.speed = SPEED_25000;\n+\t\tks->base.speed = SPEED_25000;\n #else\n \t\tnetdev_info(netdev,\n \t\t\t \"Speed is 25G, display not supported by this version of ethtool.\\n\");\n #endif\n \t\tbreak;\n \tcase I40E_LINK_SPEED_20GB:\n-\t\tcmd->base.speed = SPEED_20000;\n+\t\tks->base.speed = SPEED_20000;\n \t\tbreak;\n \tcase I40E_LINK_SPEED_10GB:\n-\t\tcmd->base.speed = SPEED_10000;\n+\t\tks->base.speed = SPEED_10000;\n \t\tbreak;\n \tcase I40E_LINK_SPEED_1GB:\n-\t\tcmd->base.speed = SPEED_1000;\n+\t\tks->base.speed = SPEED_1000;\n \t\tbreak;\n \tcase I40E_LINK_SPEED_100MB:\n-\t\tcmd->base.speed = SPEED_100;\n+\t\tks->base.speed = SPEED_100;\n \t\tbreak;\n \tdefault:\n \t\tbreak;\n \t}\n-\tcmd->base.duplex = DUPLEX_FULL;\n+\tks->base.duplex = DUPLEX_FULL;\n \n-\tethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,\n+\tethtool_convert_legacy_u32_to_link_mode(ks->link_modes.supported,\n \t\t\t\t\t\tsupported);\n-\tethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,\n+\tethtool_convert_legacy_u32_to_link_mode(ks->link_modes.advertising,\n \t\t\t\t\t\tadvertising);\n }\n \n /**\n * i40e_get_settings_link_down - Get the Link settings for when link is down\n * @hw: hw structure\n- * @ecmd: ethtool command to fill in\n+ * @ks: ethtool ksettings to fill in\n+ * @pf: pointer to physical function struct\n *\n * Reports link settings that can be determined when link is down\n **/\n static void i40e_get_settings_link_down(struct i40e_hw *hw,\n-\t\t\t\t\tstruct ethtool_link_ksettings *cmd,\n+\t\t\t\t\tstruct ethtool_link_ksettings *ks,\n \t\t\t\t\tstruct i40e_pf *pf)\n {\n \tu32 supported, advertising;\n@@ -579,25 +580,25 @@ static void i40e_get_settings_link_down(struct i40e_hw *hw,\n \t */\n \ti40e_phy_type_to_ethtool(pf, &supported, &advertising);\n \n-\tethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,\n+\tethtool_convert_legacy_u32_to_link_mode(ks->link_modes.supported,\n \t\t\t\t\t\tsupported);\n-\tethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,\n+\tethtool_convert_legacy_u32_to_link_mode(ks->link_modes.advertising,\n \t\t\t\t\t\tadvertising);\n \n \t/* With no link speed and duplex are unknown */\n-\tcmd->base.speed = SPEED_UNKNOWN;\n-\tcmd->base.duplex = DUPLEX_UNKNOWN;\n+\tks->base.speed = SPEED_UNKNOWN;\n+\tks->base.duplex = DUPLEX_UNKNOWN;\n }\n \n /**\n- * i40e_get_settings - Get Link Speed and Duplex settings\n+ * i40e_get_link_ksettings - Get Link Speed and Duplex settings\n * @netdev: network interface device structure\n- * @ecmd: ethtool command\n+ * @ks: ethtool ksettings\n *\n * Reports speed/duplex settings based on media_type\n **/\n static int i40e_get_link_ksettings(struct net_device *netdev,\n-\t\t\t\t struct ethtool_link_ksettings *cmd)\n+\t\t\t\t struct ethtool_link_ksettings *ks)\n {\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_pf *pf = np->vsi->back;\n@@ -607,74 +608,74 @@ static int i40e_get_link_ksettings(struct net_device *netdev,\n \tu32 advertising;\n \n \tif (link_up)\n-\t\ti40e_get_settings_link_up(hw, cmd, netdev, pf);\n+\t\ti40e_get_settings_link_up(hw, ks, netdev, pf);\n \telse\n-\t\ti40e_get_settings_link_down(hw, cmd, pf);\n+\t\ti40e_get_settings_link_down(hw, ks, pf);\n \n \t/* Now set the settings that don't rely on link being up/down */\n \t/* Set autoneg settings */\n-\tcmd->base.autoneg = ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ?\n-\t\t\t AUTONEG_ENABLE : AUTONEG_DISABLE);\n+\tks->base.autoneg = ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ?\n+\t\t\t AUTONEG_ENABLE : AUTONEG_DISABLE);\n \n \tswitch (hw->phy.media_type) {\n \tcase I40E_MEDIA_TYPE_BACKPLANE:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, supported,\n+\t\tethtool_link_ksettings_add_link_mode(ks, supported,\n \t\t\t\t\t\t Autoneg);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, supported,\n+\t\tethtool_link_ksettings_add_link_mode(ks, supported,\n \t\t\t\t\t\t Backplane);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Autoneg);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Backplane);\n-\t\tcmd->base.port = PORT_NONE;\n+\t\tks->base.port = PORT_NONE;\n \t\tbreak;\n \tcase I40E_MEDIA_TYPE_BASET:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, supported, TP);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising, TP);\n-\t\tcmd->base.port = PORT_TP;\n+\t\tethtool_link_ksettings_add_link_mode(ks, supported, TP);\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising, TP);\n+\t\tks->base.port = PORT_TP;\n \t\tbreak;\n \tcase I40E_MEDIA_TYPE_DA:\n \tcase I40E_MEDIA_TYPE_CX4:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising, FIBRE);\n-\t\tcmd->base.port = PORT_DA;\n+\t\tethtool_link_ksettings_add_link_mode(ks, supported, FIBRE);\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising, FIBRE);\n+\t\tks->base.port = PORT_DA;\n \t\tbreak;\n \tcase I40E_MEDIA_TYPE_FIBER:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);\n-\t\tcmd->base.port = PORT_FIBRE;\n+\t\tethtool_link_ksettings_add_link_mode(ks, supported, FIBRE);\n+\t\tks->base.port = PORT_FIBRE;\n \t\tbreak;\n \tcase I40E_MEDIA_TYPE_UNKNOWN:\n \tdefault:\n-\t\tcmd->base.port = PORT_OTHER;\n+\t\tks->base.port = PORT_OTHER;\n \t\tbreak;\n \t}\n \n \t/* Set flow control settings */\n-\tethtool_link_ksettings_add_link_mode(cmd, supported, Pause);\n+\tethtool_link_ksettings_add_link_mode(ks, supported, Pause);\n \n \tswitch (hw->fc.requested_mode) {\n \tcase I40E_FC_FULL:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Pause);\n \t\tbreak;\n \tcase I40E_FC_TX_PAUSE:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Asym_Pause);\n \t\tbreak;\n \tcase I40E_FC_RX_PAUSE:\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Pause);\n-\t\tethtool_link_ksettings_add_link_mode(cmd, advertising,\n+\t\tethtool_link_ksettings_add_link_mode(ks, advertising,\n \t\t\t\t\t\t Asym_Pause);\n \t\tbreak;\n \tdefault:\n \t\tethtool_convert_link_mode_to_legacy_u32(\n-\t\t\t&advertising, cmd->link_modes.advertising);\n+\t\t\t&advertising, ks->link_modes.advertising);\n \n \t\tadvertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause);\n \n \t\tethtool_convert_legacy_u32_to_link_mode(\n-\t\t\tcmd->link_modes.advertising, advertising);\n+\t\t\tks->link_modes.advertising, advertising);\n \t\tbreak;\n \t}\n \n@@ -682,14 +683,14 @@ static int i40e_get_link_ksettings(struct net_device *netdev,\n }\n \n /**\n- * i40e_set_settings - Set Speed and Duplex\n+ * i40e_set_link_ksettings - Set Speed and Duplex\n * @netdev: network interface device structure\n- * @ecmd: ethtool command\n+ * @ks: ethtool ksettings\n *\n * Set speed/duplex per media_types advertised/forced\n **/\n static int i40e_set_link_ksettings(struct net_device *netdev,\n-\t\t\t\t const struct ethtool_link_ksettings *cmd)\n+\t\t\t\t const struct ethtool_link_ksettings *ks)\n {\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_aq_get_phy_abilities_resp abilities;\n@@ -697,8 +698,8 @@ static int i40e_set_link_ksettings(struct net_device *netdev,\n \tstruct i40e_pf *pf = np->vsi->back;\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_hw *hw = &pf->hw;\n-\tstruct ethtool_link_ksettings safe_cmd;\n-\tstruct ethtool_link_ksettings copy_cmd;\n+\tstruct ethtool_link_ksettings safe_ks;\n+\tstruct ethtool_link_ksettings copy_ks;\n \ti40e_status status = 0;\n \tbool change = false;\n \tint timeout = 50;\n@@ -733,31 +734,31 @@ static int i40e_set_link_ksettings(struct net_device *netdev,\n \t\treturn -EOPNOTSUPP;\n \t}\n \n-\t/* copy the cmd to copy_cmd to avoid modifying the origin */\n-\tmemcpy(©_cmd, cmd, sizeof(struct ethtool_link_ksettings));\n+\t/* copy the ksettings to copy_ks to avoid modifying the origin */\n+\tmemcpy(©_ks, ks, sizeof(struct ethtool_link_ksettings));\n \n \t/* get our own copy of the bits to check against */\n-\tmemset(&safe_cmd, 0, sizeof(struct ethtool_link_ksettings));\n-\ti40e_get_link_ksettings(netdev, &safe_cmd);\n+\tmemset(&safe_ks, 0, sizeof(struct ethtool_link_ksettings));\n+\ti40e_get_link_ksettings(netdev, &safe_ks);\n \n-\t/* save autoneg and speed out of cmd */\n-\tautoneg = cmd->base.autoneg;\n+\t/* save autoneg and speed out of ksettings */\n+\tautoneg = ks->base.autoneg;\n \tethtool_convert_link_mode_to_legacy_u32(&advertise,\n-\t\t\t\t\t\tcmd->link_modes.advertising);\n+\t\t\t\t\t\tks->link_modes.advertising);\n \n \t/* set autoneg and speed back to what they currently are */\n-\tcopy_cmd.base.autoneg = safe_cmd.base.autoneg;\n+\tcopy_ks.base.autoneg = safe_ks.base.autoneg;\n \tethtool_convert_link_mode_to_legacy_u32(\n-\t\t&tmp, safe_cmd.link_modes.advertising);\n+\t\t&tmp, safe_ks.link_modes.advertising);\n \tethtool_convert_legacy_u32_to_link_mode(\n-\t\tcopy_cmd.link_modes.advertising, tmp);\n+\t\tcopy_ks.link_modes.advertising, tmp);\n \n-\tcopy_cmd.base.cmd = safe_cmd.base.cmd;\n+\tcopy_ks.base.cmd = safe_ks.base.cmd;\n \n-\t/* If copy_cmd and safe_cmd are not the same now, then they are\n+\t/* If copy_ks and safe_ks are not the same now, then they are\n \t * trying to set something that we do not support\n \t */\n-\tif (memcmp(©_cmd, &safe_cmd, sizeof(struct ethtool_link_ksettings)))\n+\tif (memcmp(©_ks, &safe_ks, sizeof(struct ethtool_link_ksettings)))\n \t\treturn -EOPNOTSUPP;\n \n \twhile (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) {\n@@ -787,7 +788,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,\n \t\tif (!(hw->phy.link_info.an_info & I40E_AQ_AN_COMPLETED)) {\n \t\t\t/* If autoneg is not supported, return error */\n \t\t\tif (!ethtool_link_ksettings_test_link_mode(\n-\t\t\t\t &safe_cmd, supported, Autoneg)) {\n+\t\t\t\t &safe_ks, supported, Autoneg)) {\n \t\t\t\tnetdev_info(netdev, \"Autoneg not supported on this phy\\n\");\n \t\t\t\terr = -EINVAL;\n \t\t\t\tgoto done;\n@@ -804,7 +805,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,\n \t\t\t * that can disable it, so otherwise return error\n \t\t\t */\n \t\t\tif (ethtool_link_ksettings_test_link_mode(\n-\t\t\t\t &safe_cmd, supported, Autoneg) &&\n+\t\t\t\t &safe_ks, supported, Autoneg) &&\n \t\t\t hw->phy.link_info.phy_type !=\n \t\t\t I40E_PHY_TYPE_10GBASE_T) {\n \t\t\t\tnetdev_info(netdev, \"Autoneg cannot be disabled on this phy\\n\");\n@@ -819,7 +820,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,\n \t}\n \n \tethtool_convert_link_mode_to_legacy_u32(&tmp,\n-\t\t\t\t\t\tsafe_cmd.link_modes.supported);\n+\t\t\t\t\t\tsafe_ks.link_modes.supported);\n \tif (advertise & ~tmp) {\n \t\terr = -EINVAL;\n \t\tgoto done;\n", "prefixes": [ "01/13", "net-next" ] }