Lines Matching refs:flp
186 struct frad_local *flp;
188 flp = dev->priv;
189 switch(flp->type)
193 flp->state = SDLA_HALT;
198 flp->state = SDLA_S502E_ENABLE;
201 flp->state &= ~SDLA_CPUEN;
202 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
205 flp->state &= ~SDLA_CPUEN;
206 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
213 struct frad_local *flp;
215 flp = dev->priv;
216 switch(flp->type)
221 flp->state = SDLA_S502A_START;
226 flp->state = 0;
229 flp->state |= SDLA_CPUEN;
230 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
233 flp->state |= SDLA_CPUEN;
234 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
428 struct frad_local *flp;
435 flp = dev->priv;
436 window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF;
509 struct frad_local *flp;
512 flp = slave->priv;
515 if (flp->master[i] == master)
521 flp->dlci[i] = abs(flp->dlci[i]);
523 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE))
524 sdla_cmd(slave, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL);
531 struct frad_local *flp;
534 flp = slave->priv;
537 if (flp->master[i] == master)
543 flp->dlci[i] = -abs(flp->dlci[i]);
545 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE))
546 sdla_cmd(slave, SDLA_DEACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL);
553 struct frad_local *flp;
559 flp = slave->priv;
563 if (!flp->master[i])
565 if (abs(flp->dlci[i]) == *(short *)(master->dev_addr))
573 flp->master[i] = master;
574 flp->dlci[i] = -*(short *)(master->dev_addr);
578 if (flp->config.station == FRAD_STATION_CPE)
589 struct frad_local *flp;
592 flp = slave->priv;
595 if (flp->master[i] == master)
601 flp->master[i] = NULL;
602 flp->dlci[i] = 0;
606 if (flp->config.station == FRAD_STATION_CPE)
617 struct frad_local *flp;
622 flp = slave->priv;
625 if (flp->master[i] == master)
637 ret = sdla_cmd(slave, SDLA_READ_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0,
640 ret = sdla_cmd(slave, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0,
656 struct frad_local *flp;
662 flp = dev->priv;
692 switch (flp->type)
717 flp->stats.tx_packets++;
724 flp->stats.tx_dropped++;
729 flp->stats.tx_errors++;
737 if(flp->master[i]!=NULL)
738 netif_wake_queue(flp->master[i]);
746 struct frad_local *flp;
758 flp = dev->priv;
770 switch (flp->type)
787 pbuf = (void *) (dev->mem_start + ((pbufi->rse_base + flp->buffer * sizeof(struct buf_entry)) & SDLA_ADDR_MASK));
804 if (flp->dlci[i] == dlci)
810 flp->stats.rx_errors++;
817 master = flp->master[i];
822 flp->stats.rx_dropped++;
830 switch (flp->type)
855 flp->buffer = (flp->buffer + 1) % pbufi->rse_num;
862 flp->stats.rx_packets++;
873 struct frad_local *flp;
878 flp = netdev_priv(dev);
880 if (!flp->initialized)
886 byte = sdla_byte(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE);
907 if (flp->type == SDLA_S502E)
909 flp->state &= ~SDLA_S502E_INTACK;
910 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
911 flp->state |= SDLA_S502E_INTACK;
912 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
917 sdla_write(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE, &byte, sizeof(byte));
924 struct frad_local *flp;
927 flp = dev->priv;
932 flp->timer.expires = 1;
933 add_timer(&flp->timer);
938 struct frad_local *flp;
943 flp = dev->priv;
947 if (flp->dlci[i])
948 dlcis[len++] = abs(flp->dlci[i]);
951 if (flp->config.station == FRAD_STATION_NODE)
954 if (flp->dlci[i] > 0)
956 sdla_cmd(dev, SDLA_DELETE_DLCI, 0, 0, &flp->dlci[i], sizeof(flp->dlci[i]), NULL, NULL);
961 switch(flp->type)
964 del_timer(&flp->timer);
969 flp->state &= ~SDLA_S502E_INTACK;
970 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
978 flp->state &= ~SDLA_S508_INTEN;
979 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
997 struct frad_local *flp;
1004 flp = dev->priv;
1006 if (!flp->initialized)
1009 if (!flp->configured)
1015 if (flp->dlci[i])
1016 data.dlci[len++] = abs(flp->dlci[i]);
1019 memcpy(&data.config, &flp->config, sizeof(struct frad_conf));
1025 if (flp->type == SDLA_S508)
1026 flp->buffer = 0;
1032 switch(flp->type)
1035 flp->timer.expires = 1;
1036 add_timer(&flp->timer);
1040 flp->state |= SDLA_S502E_ENABLE;
1041 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
1042 flp->state |= SDLA_S502E_INTACK;
1043 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
1054 flp->state |= SDLA_S508_INTEN;
1055 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL);
1064 if (flp->config.station == FRAD_STATION_CPE)
1073 if (flp->dlci[i] > 0)
1074 sdla_cmd(dev, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], 2*sizeof(flp->dlci[i]), NULL, NULL);
1079 if (flp->dlci[i])
1081 dlp = flp->master[i]->priv;
1083 sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, &dlp->config, sizeof(struct dlci_conf), NULL, NULL);
1093 struct frad_local *flp;
1101 flp = dev->priv;
1118 ((data.config.kbaud > 128) && (flp->type != SDLA_S508)))
1142 memcpy(&flp->config, &data.config, sizeof(struct frad_conf));
1143 flp->config.flags |= SDLA_DIRECT_RECV;
1145 if (flp->type == SDLA_S508)
1146 flp->config.flags |= SDLA_TX70_RX30;
1148 if (dev->mtu != flp->config.mtu)
1151 dev->mtu = flp->config.mtu;
1153 if (flp->master[i])
1154 flp->master[i]->mtu = flp->config.mtu;
1157 flp->config.mtu += sizeof(struct frhdr);
1160 if (!flp->configured)
1163 flp->configured = 1;
1175 if (flp->configured)
1176 memcpy(&data.config, &flp->config, sizeof(struct frad_conf));
1180 memcpy(&flp->config, &data.config, sizeof(struct frad_conf));
1229 struct frad_local *flp;
1233 flp = dev->priv;
1237 if (flp->dlci[i])
1238 data.dlci[len++] = flp->dlci[i];
1241 memcpy(&data, &flp->config, sizeof(struct frad_conf));
1253 struct frad_local *flp;
1258 flp = dev->priv;
1260 if (!flp->initialized)
1270 ifr->ifr_flags = flp->type;
1283 if (flp->configured)
1322 struct frad_local *flp;
1324 flp = dev->priv;
1335 struct frad_local *flp;
1341 flp = dev->priv;
1343 if (flp->initialized)
1361 flp->type = SDLA_UNKNOWN;
1362 flp->state = 0;
1374 flp->type = SDLA_S502E;
1390 flp->type = SDLA_S507;
1401 flp->type = SDLA_S508;
1413 flp->type = SDLA_S502A;
1429 if (flp->type != SDLA_S508 && flp->type != SDLA_S507)
1435 if (flp->type != SDLA_S502E)
1444 if (flp->type != SDLA_S508 && flp->type != SDLA_S507)
1450 if (flp->type == SDLA_S502A)
1462 if (flp->type == SDLA_S507) {
1465 flp->state = SDLA_S507_IRQ3;
1468 flp->state = SDLA_S507_IRQ4;
1471 flp->state = SDLA_S507_IRQ5;
1474 flp->state = SDLA_S507_IRQ7;
1477 flp->state = SDLA_S507_IRQ10;
1480 flp->state = SDLA_S507_IRQ11;
1483 flp->state = SDLA_S507_IRQ12;
1486 flp->state = SDLA_S507_IRQ15;
1499 if (flp->type == SDLA_S502A && (map->mem_start & 0xF000) >> 12 == 0x0E)
1502 if (flp->type != SDLA_S507 && map->mem_start >> 16 == 0x0B)
1505 if (flp->type == SDLA_S507 && map->mem_start >> 16 == 0x0D)
1508 byte = flp->type != SDLA_S508 ? SDLA_8K_WINDOW : 0;
1509 byte |= (map->mem_start & 0xF000) >> (12 + (flp->type == SDLA_S508 ? 1 : 0));
1510 switch(flp->type) {
1565 switch(flp->type)
1568 flp->state = SDLA_S502E_ENABLE;
1571 flp->state |= SDLA_MEMEN;
1574 flp->state = SDLA_MEMEN;
1577 outb(flp->state, base + SDLA_REG_CONTROL);
1583 flp->initialized = 1;
1595 struct frad_local *flp;
1596 flp = dev->priv;
1598 return(&flp->stats);
1603 struct frad_local *flp = dev->priv;
1622 flp->activate = sdla_activate;
1623 flp->deactivate = sdla_deactivate;
1624 flp->assoc = sdla_assoc;
1625 flp->deassoc = sdla_deassoc;
1626 flp->dlci_conf = sdla_dlci_conf;
1628 init_timer(&flp->timer);
1629 flp->timer.expires = 1;
1630 flp->timer.data = (unsigned long) dev;
1631 flp->timer.function = sdla_poll;
1655 struct frad_local *flp = sdla->priv;
1658 if (flp->initialized) {
1662 del_timer_sync(&flp->timer);