Lines Matching refs:wandev
129 static int cycx_wan_update(struct wan_device *wandev),
130 cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,
132 cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev);
198 static struct net_device *cycx_x25_get_dev_by_lcn(struct wan_device *wandev,
201 cycx_x25_get_dev_by_dte_addr(struct wan_device *wandev, char *dte);
209 static void cycx_x25_dump_devs(struct wan_device *wandev);
214 #define cycx_x25_dump_devs(wandev)
265 card->wandev.mtu = 512;
267 card->wandev.mtu = 256;
269 card->wandev.mtu = 128;
271 card->wandev.mtu = 64;
273 cfg.pktlen = cycx_log2(card->wandev.mtu);
329 card->wandev.bps = conf->bps;
330 card->wandev.interface = conf->interface;
331 card->wandev.clocking = conf->clocking;
332 card->wandev.station = conf->station;
335 card->wandev.update = cycx_wan_update;
336 card->wandev.new_if = cycx_wan_new_if;
337 card->wandev.del_if = cycx_wan_del_if;
338 card->wandev.state = WAN_DISCONNECTED;
345 static int cycx_wan_update(struct wan_device *wandev)
348 if (!wandev || !wandev->private)
351 if (wandev->state == WAN_UNCONFIGURED)
354 cycx_x25_get_stats(wandev->private);
369 static int cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,
372 struct cycx_device *card = wandev->private;
402 wandev->name, chan->name);
434 wandev->name, lcn, chan->name);
440 wandev->name, chan->name);
453 static int cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev)
504 struct wan_device *wandev = &card->wandev;
510 dev->irq = wandev->irq;
511 dev->dma = wandev->dma;
512 dev->base_addr = wandev->ioport;
513 dev->mem_start = (unsigned long)wandev->maddr;
514 dev->mem_end = (unsigned long)(wandev->maddr +
515 wandev->msize - 1);
606 if (card->wandev.state != WAN_CONNECTED)
633 ++card->wandev.stats.tx_dropped;
738 struct wan_device *wandev = &card->wandev;
744 dev = cycx_x25_get_dev_by_lcn(wandev, lcn);
769 struct wan_device *wandev = &card->wandev;
780 dev = cycx_x25_get_dev_by_lcn(wandev, lcn);
854 struct wan_device *wandev = &card->wandev;
880 dev = cycx_x25_get_dev_by_dte_addr(wandev, rem);
898 struct wan_device *wandev = &card->wandev;
908 dev = cycx_x25_get_dev_by_lcn(wandev, -key);
927 struct wan_device *wandev = &card->wandev;
934 dev = cycx_x25_get_dev_by_lcn(wandev, lcn);
949 struct wan_device *wandev = &card->wandev;
956 dev = cycx_x25_get_dev_by_lcn(wandev, lcn);
1122 card->wandev.stats.rx_packets = card->u.x.stats.n2_rx_frames;
1123 card->wandev.stats.rx_over_errors = card->u.x.stats.rx_over_errors;
1124 card->wandev.stats.rx_crc_errors = card->u.x.stats.rx_crc_errors;
1125 card->wandev.stats.rx_length_errors = 0; /* not available from fw */
1126 card->wandev.stats.rx_frame_errors = 0; /* not available from fw */
1127 card->wandev.stats.rx_missed_errors = card->u.x.stats.rx_aborts;
1128 card->wandev.stats.rx_dropped = 0; /* not available from fw */
1129 card->wandev.stats.rx_errors = 0; /* not available from fw */
1130 card->wandev.stats.tx_packets = card->u.x.stats.n2_tx_frames;
1131 card->wandev.stats.tx_aborted_errors = card->u.x.stats.tx_aborts;
1132 card->wandev.stats.tx_dropped = 0; /* not available from fw */
1133 card->wandev.stats.collisions = 0; /* not available from fw */
1134 card->wandev.stats.tx_errors = 0; /* not available from fw */
1136 cycx_x25_dump_devs(&card->wandev);
1294 static struct net_device *cycx_x25_get_dev_by_lcn(struct wan_device *wandev,
1297 struct net_device *dev = wandev->dev;
1312 cycx_x25_get_dev_by_dte_addr(struct wan_device *wandev, char *dte)
1314 struct net_device *dev = wandev->dev;
1459 if (skb->len > card->wandev.mtu) {
1460 len = card->wandev.mtu;
1591 static void cycx_x25_dump_devs(struct wan_device *wandev)
1593 struct net_device *dev = wandev->dev;