]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/core/ethtool.c
ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords
[mirror_ubuntu-zesty-kernel.git] / net / core / ethtool.c
index 2966cd0d7c934c50f0b5c49f10ac38deb288c1fd..f426c5ad6149deefb55f9aa9fccd3b1392206357 100644 (file)
@@ -655,7 +655,7 @@ static int ethtool_get_link_ksettings(struct net_device *dev,
            != link_ksettings.base.link_mode_masks_nwords) {
                /* wrong link mode nbits requested */
                memset(&link_ksettings, 0, sizeof(link_ksettings));
-               /* keep cmd field reset to 0 */
+               link_ksettings.base.cmd = ETHTOOL_GLINKSETTINGS;
                /* send back number of words required as negative val */
                compiletime_assert(__ETHTOOL_LINK_MODE_MASK_NU32 <= S8_MAX,
                                   "need too many bits for link modes!");