Lines Matching refs:ch
85 struct comx_channel *ch = dev->priv; in fr_keepalive_send() local
86 struct fr_data *fr = ch->LINE_privdata; in fr_keepalive_send()
121 struct comx_channel *ch = dev->priv; in fr_keepalive_timerfun() local
122 struct fr_data *fr = ch->LINE_privdata; in fr_keepalive_timerfun()
123 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_keepalive_timerfun()
128 if (ch->init_status & LINE_OPEN) { in fr_keepalive_timerfun()
130 comx_status(dev, ch->line_status & ~PROTO_UP); in fr_keepalive_timerfun()
159 struct comx_channel *ch = dev->priv; in fr_rx_lmi() local
160 struct fr_data *fr = ch->LINE_privdata; in fr_rx_lmi()
161 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_rx_lmi()
173 if ((ch->line_status & LINE_UP) && in fr_rx_lmi()
174 !(ch->line_status & PROTO_UP)) { in fr_rx_lmi()
175 comx_status(dev, ch->line_status |= PROTO_UP); in fr_rx_lmi()
198 struct comx_channel *ch = dev->priv; in fr_set_keepalive() local
199 struct fr_data *fr = ch->LINE_privdata; in fr_set_keepalive()
203 if (ch->line_status & LINE_UP) { in fr_set_keepalive()
204 comx_status(dev, ch->line_status | PROTO_UP); in fr_set_keepalive()
212 if(fr->keepa_freq && (ch->line_status & LINE_UP)) { in fr_set_keepalive()
220 ch->line_status &= ~(PROTO_UP | PROTO_LOOP); in fr_set_keepalive()
222 comx_status(dev, ch->line_status); in fr_set_keepalive()
223 if(ch->line_status & LINE_UP) { in fr_set_keepalive()
231 struct comx_channel *ch = dev->priv; in fr_rx() local
232 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_rx()
252 if (ch->debug_flags & DEBUG_COMX_DLCI) { in fr_rx()
267 if (ch->debug_flags & DEBUG_COMX_DLCI) { in fr_rx()
293 struct comx_channel *ch = dev->priv; in fr_tx() local
294 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_tx()
326 struct comx_channel *ch = dev->priv; in fr_status() local
327 struct fr_data *fr = ch->LINE_privdata; in fr_status()
328 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_status()
376 struct comx_channel *ch = dev->priv; in fr_open() local
377 struct fr_data *fr = ch->LINE_privdata; in fr_open()
378 struct proc_dir_entry *comxdir = ch->procdir; in fr_open()
381 if (!(ch->init_status & HW_OPEN)) { in fr_open()
385 if ((ch->hardware == &fr_dlci && ch->protocol != &fr_slave_protocol) || in fr_open()
386 (ch->protocol == &fr_slave_protocol && ch->hardware != &fr_dlci)) { in fr_open()
402 ch->init_status |= LINE_OPEN; in fr_open()
403 ch->line_status &= ~(PROTO_UP | PROTO_LOOP); in fr_open()
412 if (ch->line_status & LINE_UP) { in fr_open()
413 ch->line_status |= PROTO_UP; in fr_open()
418 ch->line_status = mch->line_status; in fr_open()
437 struct comx_channel *ch = dev->priv; in fr_close() local
438 struct fr_data *fr = ch->LINE_privdata; in fr_close()
439 struct proc_dir_entry *comxdir = ch->procdir; in fr_close()
442 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_close()
447 if (!(ch->init_status & HW_OPEN)) { in fr_close()
469 ch->init_status &= ~LINE_OPEN; in fr_close()
470 ch->line_status &= ~(PROTO_UP | PROTO_LOOP); in fr_close()
486 struct comx_channel *ch = dev->priv; in fr_xmit() local
488 struct fr_data *fr = ch->LINE_privdata; in fr_xmit()
491 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_xmit()
501 if (ch->debug_flags & DEBUG_COMX_DLCI) { in fr_xmit()
511 ch->stats.tx_bytes += skb->len; in fr_xmit()
512 ch->stats.tx_packets++; in fr_xmit()
546 struct comx_channel *ch = dev->priv; in fr_header() local
547 struct fr_data *fr = ch->LINE_privdata; in fr_header()
561 struct comx_channel *ch = dev->priv; in fr_statistics() local
562 struct fr_data *fr = ch->LINE_privdata; in fr_statistics()
566 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_statistics()
590 ch->line_status & PROTO_LOOP ? "LOOP" : in fr_statistics()
591 ch->line_status & PROTO_UP ? "UP" : "DOWN", in fr_statistics()
610 struct comx_channel *ch = dev->priv; in fr_read_proc() local
614 if (ch) { in fr_read_proc()
615 fr = ch->LINE_privdata; in fr_read_proc()
646 struct comx_channel *ch = dev->priv; in fr_write_proc() local
650 if (ch) { in fr_write_proc()
651 fr = ch->LINE_privdata; in fr_write_proc()
682 ch->line_status = sch->line_status; in fr_write_proc()
716 struct comx_channel *ch = dev->priv; in fr_exit() local
717 struct fr_data *fr = ch->LINE_privdata; in fr_exit()
721 struct proc_dir_entry *dir = ch->procdir->parent->subdir; in fr_exit()
742 ch->LINE_rx = NULL; in fr_exit()
743 ch->LINE_tx = NULL; in fr_exit()
744 ch->LINE_status = NULL; in fr_exit()
745 ch->LINE_open = NULL; in fr_exit()
746 ch->LINE_close = NULL; in fr_exit()
747 ch->LINE_xmit = NULL; in fr_exit()
748 ch->LINE_header = NULL; in fr_exit()
749 ch->LINE_rebuild_header = NULL; in fr_exit()
750 ch->LINE_statistics = NULL; in fr_exit()
752 ch->LINE_status = 0; in fr_exit()
757 remove_proc_entry(FILENAME_DLCI, ch->procdir); in fr_exit()
758 remove_proc_entry(FILENAME_MASTER, ch->procdir); in fr_exit()
763 remove_proc_entry(FILENAME_KEEPALIVE, ch->procdir); in fr_exit()
764 remove_proc_entry(FILENAME_DLCI, ch->procdir); in fr_exit()
768 ch->LINE_privdata = NULL; in fr_exit()
776 struct comx_channel *ch = dev->priv; in fr_master_init() local
780 if ((fr = ch->LINE_privdata = kmalloc(sizeof(struct fr_data), in fr_master_init()
794 ch->LINE_rx = fr_rx; in fr_master_init()
795 ch->LINE_tx = fr_tx; in fr_master_init()
796 ch->LINE_status = fr_status; in fr_master_init()
797 ch->LINE_open = fr_open; in fr_master_init()
798 ch->LINE_close = fr_close; in fr_master_init()
799 ch->LINE_xmit = fr_xmit; in fr_master_init()
800 ch->LINE_header = fr_header; in fr_master_init()
801 ch->LINE_rebuild_header = NULL; in fr_master_init()
802 ch->LINE_statistics = fr_statistics; in fr_master_init()
805 ch->procdir)) == NULL) { in fr_master_init()
815 ch->procdir)) == NULL) { in fr_master_init()
829 remove_proc_entry(FILENAME_DLCI, ch->procdir); in fr_master_init()
837 struct comx_channel *ch = dev->priv; in fr_slave_init() local
841 if ((fr = ch->LINE_privdata = kmalloc(sizeof(struct fr_data), in fr_slave_init()
853 ch->LINE_rx = fr_rx; in fr_slave_init()
854 ch->LINE_tx = fr_tx; in fr_slave_init()
855 ch->LINE_status = fr_status; in fr_slave_init()
856 ch->LINE_open = fr_open; in fr_slave_init()
857 ch->LINE_close = fr_close; in fr_slave_init()
858 ch->LINE_xmit = fr_xmit; in fr_slave_init()
859 ch->LINE_header = fr_header; in fr_slave_init()
860 ch->LINE_rebuild_header = NULL; in fr_slave_init()
861 ch->LINE_statistics = fr_statistics; in fr_slave_init()
864 ch->procdir)) == NULL) { in fr_slave_init()
875 ch->procdir)) == NULL) { in fr_slave_init()
886 remove_proc_entry(FILENAME_DLCI, ch->procdir); in fr_slave_init()
894 struct comx_channel *ch = dev->priv; in dlci_open() local
896 ch->init_status |= HW_OPEN; in dlci_open()
904 struct comx_channel *ch = dev->priv; in dlci_close() local
906 ch->init_status &= ~HW_OPEN; in dlci_close()
914 struct comx_channel *ch = dev->priv; in dlci_txe() local
915 struct fr_data *fr = ch->LINE_privdata; in dlci_txe()
921 ch = fr->master->priv; in dlci_txe()
922 fr = ch->LINE_privdata; in dlci_txe()
923 return ch->HW_txe(fr->master); in dlci_txe()
933 struct comx_channel *ch = dev->priv; in dlci_init() local
935 ch->HW_open = dlci_open; in dlci_init()
936 ch->HW_close = dlci_close; in dlci_init()
937 ch->HW_txe = dlci_txe; in dlci_init()
938 ch->HW_statistics = dlci_statistics; in dlci_init()
948 struct comx_channel *ch = dev->priv; in dlci_exit() local
950 ch->HW_open = NULL; in dlci_exit()
951 ch->HW_close = NULL; in dlci_exit()
952 ch->HW_txe = NULL; in dlci_exit()
953 ch->HW_statistics = NULL; in dlci_exit()