static ssize_t qeth_dev_card_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct qeth_card *card = dev_get_drvdata(dev); if (!card) return -EINVAL; return sprintf(buf, "%s\n", qeth_get_cardname_short(card)); }
static int qeth_procfile_seq_show(struct seq_file *s, void *it) { struct device *device; struct qeth_card *card; char tmp[12]; /* for qeth_get_prioq_str */ if (it == SEQ_START_TOKEN){ seq_printf(s, "devices CHPID interface " "cardtype port chksum prio-q'ing rtr4 " "rtr6 fsz cnt\n"); seq_printf(s, "-------------------------- ----- ---------- " "-------------- ---- ------ ---------- ---- " "---- ----- -----\n"); } else { device = (struct device *) it; card = device->driver_data; seq_printf(s, "%s/%s/%s x%02X %-10s %-14s %-4i ", CARD_RDEV_ID(card), CARD_WDEV_ID(card), CARD_DDEV_ID(card), card->info.chpid, QETH_CARD_IFNAME(card), qeth_get_cardname_short(card), card->info.portno); if (card->lan_online) seq_printf(s, "%-6s %-10s %-4s %-4s %-5s %-5i\n", qeth_get_checksum_str(card), qeth_get_prioq_str(card, tmp), qeth_get_router_str(card, 4), qeth_get_router_str(card, 6), qeth_get_bufsize_str(card), card->qdio.in_buf_pool.buf_count); else seq_printf(s, " +++ LAN OFFLINE +++\n"); put_device(device); } return 0; }