Lines Matching refs:buf

17 			struct qeth_routing_info *route, char *buf)  in qeth_l3_dev_route_show()  argument
21 return sprintf(buf, "%s\n", "primary router"); in qeth_l3_dev_route_show()
23 return sprintf(buf, "%s\n", "secondary router"); in qeth_l3_dev_route_show()
26 return sprintf(buf, "%s\n", "multicast router+"); in qeth_l3_dev_route_show()
28 return sprintf(buf, "%s\n", "multicast router"); in qeth_l3_dev_route_show()
31 return sprintf(buf, "%s\n", "primary connector+"); in qeth_l3_dev_route_show()
33 return sprintf(buf, "%s\n", "primary connector"); in qeth_l3_dev_route_show()
36 return sprintf(buf, "%s\n", "secondary connector+"); in qeth_l3_dev_route_show()
38 return sprintf(buf, "%s\n", "secondary connector"); in qeth_l3_dev_route_show()
40 return sprintf(buf, "%s\n", "no"); in qeth_l3_dev_route_show()
45 struct device_attribute *attr, char *buf) in qeth_l3_dev_route4_show() argument
52 return qeth_l3_dev_route_show(card, &card->options.route4, buf); in qeth_l3_dev_route4_show()
57 const char *buf, size_t count) in qeth_l3_dev_route_store() argument
63 if (sysfs_streq(buf, "no_router")) { in qeth_l3_dev_route_store()
65 } else if (sysfs_streq(buf, "primary_connector")) { in qeth_l3_dev_route_store()
67 } else if (sysfs_streq(buf, "secondary_connector")) { in qeth_l3_dev_route_store()
69 } else if (sysfs_streq(buf, "primary_router")) { in qeth_l3_dev_route_store()
71 } else if (sysfs_streq(buf, "secondary_router")) { in qeth_l3_dev_route_store()
73 } else if (sysfs_streq(buf, "multicast_router")) { in qeth_l3_dev_route_store()
94 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_route4_store() argument
102 QETH_PROT_IPV4, buf, count); in qeth_l3_dev_route4_store()
109 struct device_attribute *attr, char *buf) in qeth_l3_dev_route6_show() argument
116 return qeth_l3_dev_route_show(card, &card->options.route6, buf); in qeth_l3_dev_route6_show()
120 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_route6_store() argument
128 QETH_PROT_IPV6, buf, count); in qeth_l3_dev_route6_store()
135 struct device_attribute *attr, char *buf) in qeth_l3_dev_fake_broadcast_show() argument
142 return sprintf(buf, "%i\n", card->options.fake_broadcast? 1:0); in qeth_l3_dev_fake_broadcast_show()
146 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_fake_broadcast_store() argument
162 i = simple_strtoul(buf, &tmp, 16); in qeth_l3_dev_fake_broadcast_store()
176 struct device_attribute *attr, char *buf) in qeth_l3_dev_sniffer_show() argument
183 return sprintf(buf, "%i\n", card->options.sniffer ? 1 : 0); in qeth_l3_dev_sniffer_show()
187 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_sniffer_store() argument
208 rc = kstrtoul(buf, 16, &i); in qeth_l3_dev_sniffer_store()
241 struct device_attribute *attr, char *buf) in qeth_l3_dev_hsuid_show() argument
257 return sprintf(buf, "%s\n", tmp_hsuid); in qeth_l3_dev_hsuid_show()
261 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_hsuid_store() argument
281 tmp = strsep((char **)&buf, "\n"); in qeth_l3_dev_hsuid_store()
356 struct device_attribute *attr, char *buf) in qeth_l3_dev_ipato_enable_show() argument
363 return sprintf(buf, "%i\n", card->ipato.enabled? 1:0); in qeth_l3_dev_ipato_enable_show()
367 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_enable_store() argument
383 if (sysfs_streq(buf, "toggle")) { in qeth_l3_dev_ipato_enable_store()
385 } else if (sysfs_streq(buf, "1")) { in qeth_l3_dev_ipato_enable_store()
394 } else if (sysfs_streq(buf, "0")) { in qeth_l3_dev_ipato_enable_store()
414 struct device_attribute *attr, char *buf) in qeth_l3_dev_ipato_invert4_show() argument
421 return sprintf(buf, "%i\n", card->ipato.invert4? 1:0); in qeth_l3_dev_ipato_invert4_show()
426 const char *buf, size_t count) in qeth_l3_dev_ipato_invert4_store() argument
435 if (sysfs_streq(buf, "toggle")) in qeth_l3_dev_ipato_invert4_store()
437 else if (sysfs_streq(buf, "1")) in qeth_l3_dev_ipato_invert4_store()
439 else if (sysfs_streq(buf, "0")) in qeth_l3_dev_ipato_invert4_store()
451 static ssize_t qeth_l3_dev_ipato_add_show(char *buf, struct qeth_card *card, in qeth_l3_dev_ipato_add_show() argument
473 i += snprintf(buf + i, PAGE_SIZE - i, in qeth_l3_dev_ipato_add_show()
477 i += snprintf(buf + i, PAGE_SIZE - i, "\n"); in qeth_l3_dev_ipato_add_show()
483 struct device_attribute *attr, char *buf) in qeth_l3_dev_ipato_add4_show() argument
490 return qeth_l3_dev_ipato_add_show(buf, card, QETH_PROT_IPV4); in qeth_l3_dev_ipato_add4_show()
493 static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto, in qeth_l3_parse_ipatoe() argument
500 start = buf; in qeth_l3_parse_ipatoe()
520 static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count, in qeth_l3_dev_ipato_add_store() argument
529 rc = qeth_l3_parse_ipatoe(buf, proto, addr, &mask_bits); in qeth_l3_dev_ipato_add_store()
551 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_add4_store() argument
558 return qeth_l3_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_ipato_add4_store()
565 static ssize_t qeth_l3_dev_ipato_del_store(const char *buf, size_t count, in qeth_l3_dev_ipato_del_store() argument
573 rc = qeth_l3_parse_ipatoe(buf, proto, addr, &mask_bits); in qeth_l3_dev_ipato_del_store()
581 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_del4_store() argument
588 return qeth_l3_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_ipato_del4_store()
595 struct device_attribute *attr, char *buf) in qeth_l3_dev_ipato_invert6_show() argument
602 return sprintf(buf, "%i\n", card->ipato.invert6? 1:0); in qeth_l3_dev_ipato_invert6_show()
606 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_invert6_store() argument
615 if (sysfs_streq(buf, "toggle")) in qeth_l3_dev_ipato_invert6_store()
617 else if (sysfs_streq(buf, "1")) in qeth_l3_dev_ipato_invert6_store()
619 else if (sysfs_streq(buf, "0")) in qeth_l3_dev_ipato_invert6_store()
633 struct device_attribute *attr, char *buf) in qeth_l3_dev_ipato_add6_show() argument
640 return qeth_l3_dev_ipato_add_show(buf, card, QETH_PROT_IPV6); in qeth_l3_dev_ipato_add6_show()
644 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_add6_store() argument
651 return qeth_l3_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_ipato_add6_store()
659 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_ipato_del6_store() argument
666 return qeth_l3_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_ipato_del6_store()
688 static ssize_t qeth_l3_dev_vipa_add_show(char *buf, struct qeth_card *card, in qeth_l3_dev_vipa_add_show() argument
712 i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str); in qeth_l3_dev_vipa_add_show()
715 i += snprintf(buf + i, PAGE_SIZE - i, "\n"); in qeth_l3_dev_vipa_add_show()
721 struct device_attribute *attr, char *buf) in qeth_l3_dev_vipa_add4_show() argument
728 return qeth_l3_dev_vipa_add_show(buf, card, QETH_PROT_IPV4); in qeth_l3_dev_vipa_add4_show()
731 static int qeth_l3_parse_vipae(const char *buf, enum qeth_prot_versions proto, in qeth_l3_parse_vipae() argument
734 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { in qeth_l3_parse_vipae()
740 static ssize_t qeth_l3_dev_vipa_add_store(const char *buf, size_t count, in qeth_l3_dev_vipa_add_store() argument
747 rc = qeth_l3_parse_vipae(buf, proto, addr); in qeth_l3_dev_vipa_add_store()
755 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_vipa_add4_store() argument
762 return qeth_l3_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_vipa_add4_store()
769 static ssize_t qeth_l3_dev_vipa_del_store(const char *buf, size_t count, in qeth_l3_dev_vipa_del_store() argument
776 rc = qeth_l3_parse_vipae(buf, proto, addr); in qeth_l3_dev_vipa_del_store()
784 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_vipa_del4_store() argument
791 return qeth_l3_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_vipa_del4_store()
798 struct device_attribute *attr, char *buf) in qeth_l3_dev_vipa_add6_show() argument
805 return qeth_l3_dev_vipa_add_show(buf, card, QETH_PROT_IPV6); in qeth_l3_dev_vipa_add6_show()
809 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_vipa_add6_store() argument
816 return qeth_l3_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_vipa_add6_store()
824 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_vipa_del6_store() argument
831 return qeth_l3_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_vipa_del6_store()
850 static ssize_t qeth_l3_dev_rxip_add_show(char *buf, struct qeth_card *card, in qeth_l3_dev_rxip_add_show() argument
874 i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str); in qeth_l3_dev_rxip_add_show()
877 i += snprintf(buf + i, PAGE_SIZE - i, "\n"); in qeth_l3_dev_rxip_add_show()
883 struct device_attribute *attr, char *buf) in qeth_l3_dev_rxip_add4_show() argument
890 return qeth_l3_dev_rxip_add_show(buf, card, QETH_PROT_IPV4); in qeth_l3_dev_rxip_add4_show()
893 static int qeth_l3_parse_rxipe(const char *buf, enum qeth_prot_versions proto, in qeth_l3_parse_rxipe() argument
896 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { in qeth_l3_parse_rxipe()
902 static ssize_t qeth_l3_dev_rxip_add_store(const char *buf, size_t count, in qeth_l3_dev_rxip_add_store() argument
909 rc = qeth_l3_parse_rxipe(buf, proto, addr); in qeth_l3_dev_rxip_add_store()
917 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_rxip_add4_store() argument
924 return qeth_l3_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_rxip_add4_store()
931 static ssize_t qeth_l3_dev_rxip_del_store(const char *buf, size_t count, in qeth_l3_dev_rxip_del_store() argument
938 rc = qeth_l3_parse_rxipe(buf, proto, addr); in qeth_l3_dev_rxip_del_store()
946 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_rxip_del4_store() argument
953 return qeth_l3_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV4); in qeth_l3_dev_rxip_del4_store()
960 struct device_attribute *attr, char *buf) in qeth_l3_dev_rxip_add6_show() argument
967 return qeth_l3_dev_rxip_add_show(buf, card, QETH_PROT_IPV6); in qeth_l3_dev_rxip_add6_show()
971 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_rxip_add6_store() argument
978 return qeth_l3_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_rxip_add6_store()
986 struct device_attribute *attr, const char *buf, size_t count) in qeth_l3_dev_rxip_del6_store() argument
993 return qeth_l3_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV6); in qeth_l3_dev_rxip_del6_store()