Lines Matching refs:ch
63 struct comx_channel *ch=dev->priv; in syncppp_status_timerfun() local
64 struct syncppp_data *spch=ch->LINE_privdata; in syncppp_status_timerfun()
67 if(!(ch->line_status & PROTO_UP) && in syncppp_status_timerfun()
69 comx_status(dev, ch->line_status | PROTO_UP); in syncppp_status_timerfun()
71 if((ch->line_status & PROTO_UP) && in syncppp_status_timerfun()
73 comx_status(dev, ch->line_status & ~PROTO_UP); in syncppp_status_timerfun()
80 struct comx_channel *ch=dev->priv; in syncppp_tx() local
82 if(ch->line_status & LINE_UP) { in syncppp_tx()
104 struct comx_channel *ch = dev->priv; in syncppp_open() local
105 struct syncppp_data *spch = ch->LINE_privdata; in syncppp_open()
107 if (!(ch->init_status & HW_OPEN)) return -ENODEV; in syncppp_open()
109 ch->init_status |= LINE_OPEN; in syncppp_open()
110 ch->line_status &= ~(PROTO_UP | PROTO_LOOP); in syncppp_open()
112 if(ch->line_status & LINE_UP) { in syncppp_open()
127 struct comx_channel *ch = dev->priv; in syncppp_close() local
128 struct syncppp_data *spch = ch->LINE_privdata; in syncppp_close()
130 if (!(ch->init_status & HW_OPEN)) return -ENODEV; in syncppp_close()
135 ch->init_status &= ~LINE_OPEN; in syncppp_close()
136 ch->line_status &= ~(PROTO_UP | PROTO_LOOP); in syncppp_close()
143 struct comx_channel *ch = dev->priv; in syncppp_xmit() local
146 switch(ch->HW_send_packet(dev, skb)) { in syncppp_xmit()
173 struct comx_channel *ch = dev->priv; in syncppp_exit() local
181 ch->LINE_rx = NULL; in syncppp_exit()
182 ch->LINE_tx = NULL; in syncppp_exit()
183 ch->LINE_status = NULL; in syncppp_exit()
184 ch->LINE_open = NULL; in syncppp_exit()
185 ch->LINE_close = NULL; in syncppp_exit()
186 ch->LINE_xmit = NULL; in syncppp_exit()
187 ch->LINE_header = NULL; in syncppp_exit()
188 ch->LINE_rebuild_header = NULL; in syncppp_exit()
189 ch->LINE_statistics = NULL; in syncppp_exit()
191 kfree(ch->LINE_privdata); in syncppp_exit()
192 ch->LINE_privdata = NULL; in syncppp_exit()
200 struct comx_channel *ch = dev->priv; in syncppp_init() local
201 struct ppp_device *pppdev = (struct ppp_device *)ch->if_ptr; in syncppp_init()
203 ch->LINE_privdata = kmalloc(sizeof(struct syncppp_data), GFP_KERNEL); in syncppp_init()
204 if (!ch->LINE_privdata) in syncppp_init()
210 if(ch->protocol == &hdlc_protocol) { in syncppp_init()
218 ch->LINE_rx = sppp_input; in syncppp_init()
219 ch->LINE_tx = syncppp_tx; in syncppp_init()
220 ch->LINE_status = syncppp_status; in syncppp_init()
221 ch->LINE_open = syncppp_open; in syncppp_init()
222 ch->LINE_close = syncppp_close; in syncppp_init()
223 ch->LINE_xmit = syncppp_xmit; in syncppp_init()
224 ch->LINE_header = NULL; in syncppp_init()
225 ch->LINE_statistics = syncppp_statistics; in syncppp_init()