]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bnxt_en: VF/NPAR should return -EOPNOTSUPP for unsupported ethtool ops.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 1 Jul 2016 22:46:19 +0000 (18:46 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Jul 2016 18:52:35 +0000 (14:52 -0400)
Returning 0 for doing nothing is confusing to the user.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index d7ab2d7982c25b73832d5dc112460a4607211a25..c63ed2fc5b9792f7a171551389c325018fee4d7c 100644 (file)
@@ -961,7 +961,7 @@ static int bnxt_set_pauseparam(struct net_device *dev,
        struct bnxt_link_info *link_info = &bp->link_info;
 
        if (!BNXT_SINGLE_PF(bp))
-               return rc;
+               return -EOPNOTSUPP;
 
        if (epause->autoneg) {
                if (!(link_info->autoneg & BNXT_AUTONEG_SPEED))
@@ -1483,7 +1483,7 @@ static int bnxt_set_eee(struct net_device *dev, struct ethtool_eee *edata)
        int rc = 0;
 
        if (!BNXT_SINGLE_PF(bp))
-               return 0;
+               return -EOPNOTSUPP;
 
        if (!(bp->flags & BNXT_FLAG_EEE_CAP))
                return -EOPNOTSUPP;