diff options
Diffstat (limited to 'drivers/s390/net/ctcm_sysfs.c')
-rw-r--r-- | drivers/s390/net/ctcm_sysfs.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c index 2b24550e865e..8305319b2a84 100644 --- a/drivers/s390/net/ctcm_sysfs.c +++ b/drivers/s390/net/ctcm_sysfs.c | |||
@@ -38,8 +38,8 @@ static ssize_t ctcm_buffer_write(struct device *dev, | |||
38 | int bs1; | 38 | int bs1; |
39 | struct ctcm_priv *priv = dev_get_drvdata(dev); | 39 | struct ctcm_priv *priv = dev_get_drvdata(dev); |
40 | 40 | ||
41 | if (!(priv && priv->channel[READ] && | 41 | ndev = priv->channel[CTCM_READ]->netdev; |
42 | (ndev = priv->channel[READ]->netdev))) { | 42 | if (!(priv && priv->channel[CTCM_READ] && ndev)) { |
43 | CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev"); | 43 | CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev"); |
44 | return -ENODEV; | 44 | return -ENODEV; |
45 | } | 45 | } |
@@ -55,12 +55,12 @@ static ssize_t ctcm_buffer_write(struct device *dev, | |||
55 | (bs1 < (ndev->mtu + LL_HEADER_LENGTH + 2))) | 55 | (bs1 < (ndev->mtu + LL_HEADER_LENGTH + 2))) |
56 | goto einval; | 56 | goto einval; |
57 | 57 | ||
58 | priv->channel[READ]->max_bufsize = bs1; | 58 | priv->channel[CTCM_READ]->max_bufsize = bs1; |
59 | priv->channel[WRITE]->max_bufsize = bs1; | 59 | priv->channel[CTCM_WRITE]->max_bufsize = bs1; |
60 | if (!(ndev->flags & IFF_RUNNING)) | 60 | if (!(ndev->flags & IFF_RUNNING)) |
61 | ndev->mtu = bs1 - LL_HEADER_LENGTH - 2; | 61 | ndev->mtu = bs1 - LL_HEADER_LENGTH - 2; |
62 | priv->channel[READ]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; | 62 | priv->channel[CTCM_READ]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; |
63 | priv->channel[WRITE]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; | 63 | priv->channel[CTCM_WRITE]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; |
64 | 64 | ||
65 | CTCM_DBF_DEV(SETUP, ndev, buf); | 65 | CTCM_DBF_DEV(SETUP, ndev, buf); |
66 | return count; | 66 | return count; |
@@ -85,9 +85,9 @@ static void ctcm_print_statistics(struct ctcm_priv *priv) | |||
85 | p += sprintf(p, " Device FSM state: %s\n", | 85 | p += sprintf(p, " Device FSM state: %s\n", |
86 | fsm_getstate_str(priv->fsm)); | 86 | fsm_getstate_str(priv->fsm)); |
87 | p += sprintf(p, " RX channel FSM state: %s\n", | 87 | p += sprintf(p, " RX channel FSM state: %s\n", |
88 | fsm_getstate_str(priv->channel[READ]->fsm)); | 88 | fsm_getstate_str(priv->channel[CTCM_READ]->fsm)); |
89 | p += sprintf(p, " TX channel FSM state: %s\n", | 89 | p += sprintf(p, " TX channel FSM state: %s\n", |
90 | fsm_getstate_str(priv->channel[WRITE]->fsm)); | 90 | fsm_getstate_str(priv->channel[CTCM_WRITE]->fsm)); |
91 | p += sprintf(p, " Max. TX buffer used: %ld\n", | 91 | p += sprintf(p, " Max. TX buffer used: %ld\n", |
92 | priv->channel[WRITE]->prof.maxmulti); | 92 | priv->channel[WRITE]->prof.maxmulti); |
93 | p += sprintf(p, " Max. chained SKBs: %ld\n", | 93 | p += sprintf(p, " Max. chained SKBs: %ld\n", |
@@ -102,7 +102,7 @@ static void ctcm_print_statistics(struct ctcm_priv *priv) | |||
102 | priv->channel[WRITE]->prof.tx_time); | 102 | priv->channel[WRITE]->prof.tx_time); |
103 | 103 | ||
104 | printk(KERN_INFO "Statistics for %s:\n%s", | 104 | printk(KERN_INFO "Statistics for %s:\n%s", |
105 | priv->channel[WRITE]->netdev->name, sbuf); | 105 | priv->channel[CTCM_WRITE]->netdev->name, sbuf); |
106 | kfree(sbuf); | 106 | kfree(sbuf); |
107 | return; | 107 | return; |
108 | } | 108 | } |
@@ -125,7 +125,7 @@ static ssize_t stats_write(struct device *dev, struct device_attribute *attr, | |||
125 | return -ENODEV; | 125 | return -ENODEV; |
126 | /* Reset statistics */ | 126 | /* Reset statistics */ |
127 | memset(&priv->channel[WRITE]->prof, 0, | 127 | memset(&priv->channel[WRITE]->prof, 0, |
128 | sizeof(priv->channel[WRITE]->prof)); | 128 | sizeof(priv->channel[CTCM_WRITE]->prof)); |
129 | return count; | 129 | return count; |
130 | } | 130 | } |
131 | 131 | ||