diff options
Diffstat (limited to 'drivers/s390/net/qeth_l3_sys.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 19 |
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, | |||
293 | struct device_attribute *attr, const char *buf, size_t count) | 293 | struct device_attribute *attr, const char *buf, size_t count) |
294 | { | 294 | { |
295 | struct qeth_card *card = dev_get_drvdata(dev); | 295 | struct qeth_card *card = dev_get_drvdata(dev); |
296 | enum qeth_checksum_types csum_type; | ||
296 | char *tmp; | 297 | char *tmp; |
298 | int rc; | ||
297 | 299 | ||
298 | if (!card) | 300 | if (!card) |
299 | return -EINVAL; | 301 | return -EINVAL; |
300 | 302 | ||
301 | if ((card->state != CARD_STATE_DOWN) && | ||
302 | (card->state != CARD_STATE_RECOVER)) | ||
303 | return -EPERM; | ||
304 | |||
305 | tmp = strsep((char **) &buf, "\n"); | 303 | tmp = strsep((char **) &buf, "\n"); |
306 | if (!strcmp(tmp, "sw_checksumming")) | 304 | if (!strcmp(tmp, "sw_checksumming")) |
307 | card->options.checksum_type = SW_CHECKSUMMING; | 305 | csum_type = SW_CHECKSUMMING; |
308 | else if (!strcmp(tmp, "hw_checksumming")) | 306 | else if (!strcmp(tmp, "hw_checksumming")) |
309 | card->options.checksum_type = HW_CHECKSUMMING; | 307 | csum_type = HW_CHECKSUMMING; |
310 | else if (!strcmp(tmp, "no_checksumming")) | 308 | else if (!strcmp(tmp, "no_checksumming")) |
311 | card->options.checksum_type = NO_CHECKSUMMING; | 309 | csum_type = NO_CHECKSUMMING; |
312 | else { | 310 | else |
313 | return -EINVAL; | 311 | return -EINVAL; |
314 | } | 312 | |
313 | rc = qeth_l3_set_rx_csum(card, csum_type); | ||
314 | if (rc) | ||
315 | return rc; | ||
315 | return count; | 316 | return count; |
316 | } | 317 | } |
317 | 318 | ||