summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l3_sys.c
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2009-11-12 00:11:45 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-16 02:42:09 -0800
commit3fd434d846a2c87f8f705b6876f81e4053f93749 (patch)
treed4d20edd391abc26948c67c022061ef271e4c053 /drivers/s390/net/qeth_l3_sys.c
parentc3b4a740db3688b245282ac957a01f3fb8d1186d (diff)
qeth: allow dynamic change of rx checksumming
Technically there is no need to set the card offline to change RX checksumming. Get rid of this stupid limitation. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_sys.c')
-rw-r--r--drivers/s390/net/qeth_l3_sys.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c
index 88f200c8ea3c..3360b0941aa1 100644
--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -293,25 +293,26 @@ static ssize_t qeth_l3_dev_checksum_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct qeth_card *card = dev_get_drvdata(dev);
+ enum qeth_checksum_types csum_type;
char *tmp;
+ int rc;
if (!card)
return -EINVAL;
- if ((card->state != CARD_STATE_DOWN) &&
- (card->state != CARD_STATE_RECOVER))
- return -EPERM;
-
tmp = strsep((char **) &buf, "\n");
if (!strcmp(tmp, "sw_checksumming"))
- card->options.checksum_type = SW_CHECKSUMMING;
+ csum_type = SW_CHECKSUMMING;
else if (!strcmp(tmp, "hw_checksumming"))
- card->options.checksum_type = HW_CHECKSUMMING;
+ csum_type = HW_CHECKSUMMING;
else if (!strcmp(tmp, "no_checksumming"))
- card->options.checksum_type = NO_CHECKSUMMING;
- else {
+ csum_type = NO_CHECKSUMMING;
+ else
return -EINVAL;
- }
+
+ rc = qeth_l3_set_rx_csum(card, csum_type);
+ if (rc)
+ return rc;
return count;
}