Lines Matching refs:flp
183 struct frad_local *flp; in sdla_stop() local
185 flp = netdev_priv(dev); in sdla_stop()
186 switch(flp->type) in sdla_stop()
190 flp->state = SDLA_HALT; in sdla_stop()
195 flp->state = SDLA_S502E_ENABLE; in sdla_stop()
198 flp->state &= ~SDLA_CPUEN; in sdla_stop()
199 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_stop()
202 flp->state &= ~SDLA_CPUEN; in sdla_stop()
203 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_stop()
210 struct frad_local *flp; in sdla_start() local
212 flp = netdev_priv(dev); in sdla_start()
213 switch(flp->type) in sdla_start()
218 flp->state = SDLA_S502A_START; in sdla_start()
223 flp->state = 0; in sdla_start()
226 flp->state |= SDLA_CPUEN; in sdla_start()
227 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_start()
230 flp->state |= SDLA_CPUEN; in sdla_start()
231 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_start()
430 struct frad_local *flp; in sdla_cmd() local
437 flp = netdev_priv(dev); in sdla_cmd()
438 window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF; in sdla_cmd()
511 struct frad_local *flp; in sdla_activate() local
514 flp = netdev_priv(slave); in sdla_activate()
517 if (flp->master[i] == master) in sdla_activate()
523 flp->dlci[i] = abs(flp->dlci[i]); in sdla_activate()
525 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) in sdla_activate()
526 sdla_cmd(slave, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); in sdla_activate()
533 struct frad_local *flp; in sdla_deactivate() local
536 flp = netdev_priv(slave); in sdla_deactivate()
539 if (flp->master[i] == master) in sdla_deactivate()
545 flp->dlci[i] = -abs(flp->dlci[i]); in sdla_deactivate()
547 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) in sdla_deactivate()
548 sdla_cmd(slave, SDLA_DEACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); in sdla_deactivate()
555 struct frad_local *flp; in sdla_assoc() local
561 flp = netdev_priv(slave); in sdla_assoc()
565 if (!flp->master[i]) in sdla_assoc()
567 if (abs(flp->dlci[i]) == *(short *)(master->dev_addr)) in sdla_assoc()
575 flp->master[i] = master; in sdla_assoc()
576 flp->dlci[i] = -*(short *)(master->dev_addr); in sdla_assoc()
580 if (flp->config.station == FRAD_STATION_CPE) in sdla_assoc()
591 struct frad_local *flp; in sdla_deassoc() local
594 flp = netdev_priv(slave); in sdla_deassoc()
597 if (flp->master[i] == master) in sdla_deassoc()
603 flp->master[i] = NULL; in sdla_deassoc()
604 flp->dlci[i] = 0; in sdla_deassoc()
608 if (flp->config.station == FRAD_STATION_CPE) in sdla_deassoc()
619 struct frad_local *flp; in sdla_dlci_conf() local
624 flp = netdev_priv(slave); in sdla_dlci_conf()
627 if (flp->master[i] == master) in sdla_dlci_conf()
639 ret = sdla_cmd(slave, SDLA_READ_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, in sdla_dlci_conf()
642 ret = sdla_cmd(slave, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, in sdla_dlci_conf()
659 struct frad_local *flp; in sdla_transmit() local
665 flp = netdev_priv(dev); in sdla_transmit()
697 switch (flp->type) in sdla_transmit()
740 if(flp->master[i]!=NULL) in sdla_transmit()
741 netif_wake_queue(flp->master[i]); in sdla_transmit()
751 struct frad_local *flp; in sdla_receive() local
763 flp = netdev_priv(dev); in sdla_receive()
775 switch (flp->type) in sdla_receive()
792 …pbuf = (void *) (dev->mem_start + ((pbufi->rse_base + flp->buffer * sizeof(struct buf_entry)) & SD… in sdla_receive()
809 if (flp->dlci[i] == dlci) in sdla_receive()
823 master = flp->master[i]; in sdla_receive()
836 switch (flp->type) in sdla_receive()
861 flp->buffer = (flp->buffer + 1) % pbufi->rse_num; in sdla_receive()
879 struct frad_local *flp; in sdla_isr() local
884 flp = netdev_priv(dev); in sdla_isr()
886 if (!flp->initialized) in sdla_isr()
892 byte = sdla_byte(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE); in sdla_isr()
913 if (flp->type == SDLA_S502E) in sdla_isr()
915 flp->state &= ~SDLA_S502E_INTACK; in sdla_isr()
916 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_isr()
917 flp->state |= SDLA_S502E_INTACK; in sdla_isr()
918 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_isr()
923 …sdla_write(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE, &byte, s… in sdla_isr()
929 struct frad_local *flp = from_timer(flp, t, timer); in sdla_poll() local
930 struct net_device *dev = flp->dev; in sdla_poll()
935 flp->timer.expires = 1; in sdla_poll()
936 add_timer(&flp->timer); in sdla_poll()
941 struct frad_local *flp; in sdla_close() local
946 flp = netdev_priv(dev); in sdla_close()
950 if (flp->dlci[i]) in sdla_close()
951 dlcis[len++] = abs(flp->dlci[i]); in sdla_close()
954 if (flp->config.station == FRAD_STATION_NODE) in sdla_close()
957 if (flp->dlci[i] > 0) in sdla_close()
959 sdla_cmd(dev, SDLA_DELETE_DLCI, 0, 0, &flp->dlci[i], sizeof(flp->dlci[i]), NULL, NULL); in sdla_close()
964 switch(flp->type) in sdla_close()
967 del_timer(&flp->timer); in sdla_close()
972 flp->state &= ~SDLA_S502E_INTACK; in sdla_close()
973 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_close()
981 flp->state &= ~SDLA_S508_INTEN; in sdla_close()
982 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_close()
1000 struct frad_local *flp; in sdla_open() local
1007 flp = netdev_priv(dev); in sdla_open()
1009 if (!flp->initialized) in sdla_open()
1012 if (!flp->configured) in sdla_open()
1018 if (flp->dlci[i]) in sdla_open()
1019 data.dlci[len++] = abs(flp->dlci[i]); in sdla_open()
1022 memcpy(&data.config, &flp->config, sizeof(struct frad_conf)); in sdla_open()
1028 if (flp->type == SDLA_S508) in sdla_open()
1029 flp->buffer = 0; in sdla_open()
1035 switch(flp->type) in sdla_open()
1038 flp->timer.expires = 1; in sdla_open()
1039 add_timer(&flp->timer); in sdla_open()
1043 flp->state |= SDLA_S502E_ENABLE; in sdla_open()
1044 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_open()
1045 flp->state |= SDLA_S502E_INTACK; in sdla_open()
1046 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_open()
1057 flp->state |= SDLA_S508_INTEN; in sdla_open()
1058 outb(flp->state, dev->base_addr + SDLA_REG_CONTROL); in sdla_open()
1067 if (flp->config.station == FRAD_STATION_CPE) in sdla_open()
1076 if (flp->dlci[i] > 0) in sdla_open()
1077 sdla_cmd(dev, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], 2*sizeof(flp->dlci[i]), NULL, NULL); in sdla_open()
1082 if (flp->dlci[i]) in sdla_open()
1084 dlp = netdev_priv(flp->master[i]); in sdla_open()
1086 …sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, &dlp->config, sizeof(struct dlci_… in sdla_open()
1096 struct frad_local *flp; in sdla_config() local
1104 flp = netdev_priv(dev); in sdla_config()
1121 ((data.config.kbaud > 128) && (flp->type != SDLA_S508))) in sdla_config()
1145 memcpy(&flp->config, &data.config, sizeof(struct frad_conf)); in sdla_config()
1146 flp->config.flags |= SDLA_DIRECT_RECV; in sdla_config()
1148 if (flp->type == SDLA_S508) in sdla_config()
1149 flp->config.flags |= SDLA_TX70_RX30; in sdla_config()
1151 if (dev->mtu != flp->config.mtu) in sdla_config()
1154 dev->mtu = flp->config.mtu; in sdla_config()
1156 if (flp->master[i]) in sdla_config()
1157 flp->master[i]->mtu = flp->config.mtu; in sdla_config()
1160 flp->config.mtu += sizeof(struct frhdr); in sdla_config()
1163 if (!flp->configured) in sdla_config()
1166 flp->configured = 1; in sdla_config()
1178 if (flp->configured) in sdla_config()
1179 memcpy(&data.config, &flp->config, sizeof(struct frad_conf)); in sdla_config()
1183 memcpy(&flp->config, &data.config, sizeof(struct frad_conf)); in sdla_config()
1226 struct frad_local *flp; in sdla_reconfig() local
1230 flp = netdev_priv(dev); in sdla_reconfig()
1234 if (flp->dlci[i]) in sdla_reconfig()
1235 data.dlci[len++] = flp->dlci[i]; in sdla_reconfig()
1238 memcpy(&data, &flp->config, sizeof(struct frad_conf)); in sdla_reconfig()
1250 struct frad_local *flp; in sdla_ioctl() local
1255 flp = netdev_priv(dev); in sdla_ioctl()
1257 if (!flp->initialized) in sdla_ioctl()
1267 ifr->ifr_flags = flp->type; in sdla_ioctl()
1280 if (flp->configured) in sdla_ioctl()
1328 struct frad_local *flp; in sdla_set_config() local
1334 flp = netdev_priv(dev); in sdla_set_config()
1336 if (flp->initialized) in sdla_set_config()
1354 flp->type = SDLA_UNKNOWN; in sdla_set_config()
1355 flp->state = 0; in sdla_set_config()
1367 flp->type = SDLA_S502E; in sdla_set_config()
1383 flp->type = SDLA_S507; in sdla_set_config()
1394 flp->type = SDLA_S508; in sdla_set_config()
1406 flp->type = SDLA_S502A; in sdla_set_config()
1422 if (flp->type != SDLA_S508 && flp->type != SDLA_S507) in sdla_set_config()
1428 if (flp->type != SDLA_S502E) in sdla_set_config()
1437 if (flp->type != SDLA_S508 && flp->type != SDLA_S507) in sdla_set_config()
1443 if (flp->type == SDLA_S502A) in sdla_set_config()
1455 if (flp->type == SDLA_S507) { in sdla_set_config()
1458 flp->state = SDLA_S507_IRQ3; in sdla_set_config()
1461 flp->state = SDLA_S507_IRQ4; in sdla_set_config()
1464 flp->state = SDLA_S507_IRQ5; in sdla_set_config()
1467 flp->state = SDLA_S507_IRQ7; in sdla_set_config()
1470 flp->state = SDLA_S507_IRQ10; in sdla_set_config()
1473 flp->state = SDLA_S507_IRQ11; in sdla_set_config()
1476 flp->state = SDLA_S507_IRQ12; in sdla_set_config()
1479 flp->state = SDLA_S507_IRQ15; in sdla_set_config()
1492 if (flp->type == SDLA_S502A && (map->mem_start & 0xF000) >> 12 == 0x0E) in sdla_set_config()
1495 if (flp->type != SDLA_S507 && map->mem_start >> 16 == 0x0B) in sdla_set_config()
1498 if (flp->type == SDLA_S507 && map->mem_start >> 16 == 0x0D) in sdla_set_config()
1501 byte = flp->type != SDLA_S508 ? SDLA_8K_WINDOW : 0; in sdla_set_config()
1502 byte |= (map->mem_start & 0xF000) >> (12 + (flp->type == SDLA_S508 ? 1 : 0)); in sdla_set_config()
1503 switch(flp->type) { in sdla_set_config()
1558 switch(flp->type) in sdla_set_config()
1561 flp->state = SDLA_S502E_ENABLE; in sdla_set_config()
1564 flp->state |= SDLA_MEMEN; in sdla_set_config()
1567 flp->state = SDLA_MEMEN; in sdla_set_config()
1570 outb(flp->state, base + SDLA_REG_CONTROL); in sdla_set_config()
1576 flp->initialized = 1; in sdla_set_config()
1597 struct frad_local *flp = netdev_priv(dev); in setup_sdla() local
1608 flp->activate = sdla_activate; in setup_sdla()
1609 flp->deactivate = sdla_deactivate; in setup_sdla()
1610 flp->assoc = sdla_assoc; in setup_sdla()
1611 flp->deassoc = sdla_deassoc; in setup_sdla()
1612 flp->dlci_conf = sdla_dlci_conf; in setup_sdla()
1613 flp->dev = dev; in setup_sdla()
1615 timer_setup(&flp->timer, sdla_poll, 0); in setup_sdla()
1616 flp->timer.expires = 1; in setup_sdla()
1641 struct frad_local *flp = netdev_priv(sdla); in exit_sdla() local
1644 if (flp->initialized) { in exit_sdla()
1648 del_timer_sync(&flp->timer); in exit_sdla()