aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/qeth.h')
-rw-r--r--drivers/s390/net/qeth.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 4df0fcd7b10b..619f4a0c7160 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -376,7 +376,7 @@ struct qeth_hdr_osn {
376 __u8 reserved3[18]; 376 __u8 reserved3[18];
377 __u32 ccid; 377 __u32 ccid;
378} __attribute__ ((packed)); 378} __attribute__ ((packed));
379 379
380struct qeth_hdr { 380struct qeth_hdr {
381 union { 381 union {
382 struct qeth_hdr_layer2 l2; 382 struct qeth_hdr_layer2 l2;
@@ -825,7 +825,7 @@ struct qeth_card {
825 int use_hard_stop; 825 int use_hard_stop;
826 int (*orig_hard_header)(struct sk_buff *,struct net_device *, 826 int (*orig_hard_header)(struct sk_buff *,struct net_device *,
827 unsigned short,void *,void *,unsigned); 827 unsigned short,void *,void *,unsigned);
828 struct qeth_osn_info osn_info; 828 struct qeth_osn_info osn_info;
829}; 829};
830 830
831struct qeth_card_list_struct { 831struct qeth_card_list_struct {
@@ -944,7 +944,7 @@ qeth_get_netdev_flags(struct qeth_card *card)
944 return 0; 944 return 0;
945 switch (card->info.type) { 945 switch (card->info.type) {
946 case QETH_CARD_TYPE_IQD: 946 case QETH_CARD_TYPE_IQD:
947 case QETH_CARD_TYPE_OSN: 947 case QETH_CARD_TYPE_OSN:
948 return IFF_NOARP; 948 return IFF_NOARP;
949#ifdef CONFIG_QETH_IPV6 949#ifdef CONFIG_QETH_IPV6
950 default: 950 default:
@@ -981,7 +981,7 @@ static inline int
981qeth_get_max_mtu_for_card(int cardtype) 981qeth_get_max_mtu_for_card(int cardtype)
982{ 982{
983 switch (cardtype) { 983 switch (cardtype) {
984 984
985 case QETH_CARD_TYPE_UNKNOWN: 985 case QETH_CARD_TYPE_UNKNOWN:
986 case QETH_CARD_TYPE_OSAE: 986 case QETH_CARD_TYPE_OSAE:
987 case QETH_CARD_TYPE_OSN: 987 case QETH_CARD_TYPE_OSN:
@@ -1097,9 +1097,9 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
1097 int count = 0, rc = 0; 1097 int count = 0, rc = 0;
1098 int in[4]; 1098 int in[4];
1099 1099
1100 rc = sscanf(buf, "%d.%d.%d.%d%n", 1100 rc = sscanf(buf, "%d.%d.%d.%d%n",
1101 &in[0], &in[1], &in[2], &in[3], &count); 1101 &in[0], &in[1], &in[2], &in[3], &count);
1102 if (rc != 4 || count) 1102 if (rc != 4 || count<=0)
1103 return -EINVAL; 1103 return -EINVAL;
1104 for (count = 0; count < 4; count++) { 1104 for (count = 0; count < 4; count++) {
1105 if (in[count] > 255) 1105 if (in[count] > 255)
@@ -1131,7 +1131,7 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1131 1131
1132 cnt = out = found = save_cnt = num2 = 0; 1132 cnt = out = found = save_cnt = num2 = 0;
1133 end = start = (char *) buf; 1133 end = start = (char *) buf;
1134 in = (__u16 *) addr; 1134 in = (__u16 *) addr;
1135 memset(in, 0, 16); 1135 memset(in, 0, 16);
1136 while (end) { 1136 while (end) {
1137 end = strchr(end,':'); 1137 end = strchr(end,':');
@@ -1139,7 +1139,7 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1139 end = (char *)buf + (strlen(buf)); 1139 end = (char *)buf + (strlen(buf));
1140 out = 1; 1140 out = 1;
1141 } 1141 }
1142 if ((end - start)) { 1142 if ((end - start)) {
1143 memset(num, 0, 5); 1143 memset(num, 0, 5);
1144 memcpy(num, start, end - start); 1144 memcpy(num, start, end - start);
1145 if (!qeth_isxdigit(num)) 1145 if (!qeth_isxdigit(num))
@@ -1241,5 +1241,5 @@ qeth_osn_register(unsigned char *read_dev_no,
1241 1241
1242extern void 1242extern void
1243qeth_osn_deregister(struct net_device *); 1243qeth_osn_deregister(struct net_device *);
1244 1244
1245#endif /* __QETH_H__ */ 1245#endif /* __QETH_H__ */