qeth: return with -EPERM if sniffing is not enabled
authorUrsula Braun <ursula.braun@de.ibm.com>
Tue, 15 Nov 2011 02:31:12 +0000 (02:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2011 22:27:59 +0000 (17:27 -0500)
Without appropriate configuration at the SE, a HiperSockets device
cannot be used for sniffing. Setting the sniffer attribute is rejected
with -EPERM.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_sys.c

index 0ea2fbfe0e993a42932221d52f0040aaf52b96db..d979bb26522ff8348df72caa8d2c5871deb7f5b4 100644 (file)
@@ -335,10 +335,10 @@ static ssize_t qeth_l3_dev_sniffer_store(struct device *dev,
                                        QETH_IN_BUF_COUNT_MAX)
                                qeth_realloc_buffer_pool(card,
                                        QETH_IN_BUF_COUNT_MAX);
-                       break;
                } else
                        rc = -EPERM;
-       default:   /* fall through */
+               break;
+       default:
                rc = -EINVAL;
        }
 out: