Lines Matching refs:ch

66 	struct comx_channel *ch;  in comxlapb_status()  local
68 if (!dev || !(ch = dev->priv)) { in comxlapb_status()
79 struct comx_channel *ch = dev->priv; in comxlapb_open() local
82 if (!(ch->init_status & HW_OPEN)) { in comxlapb_open()
86 err = lapb_connect_request(ch); in comxlapb_open()
88 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_open()
94 ch->init_status |= LINE_OPEN; in comxlapb_open()
102 struct comx_channel *ch = dev->priv; in comxlapb_close() local
104 if (!(ch->init_status & HW_OPEN)) { in comxlapb_close()
108 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_close()
112 lapb_disconnect_request(ch); in comxlapb_close()
114 ch->init_status &= ~LINE_OPEN; in comxlapb_close()
115 ch->line_status &= ~PROTO_UP; in comxlapb_close()
122 struct comx_channel *ch = dev->priv; in comxlapb_xmit() local
125 if (!dev || !(ch = dev->priv) || !(dev->flags & (IFF_UP | IFF_RUNNING))) { in comxlapb_xmit()
134 lapb_connect_request(ch); in comxlapb_xmit()
138 lapb_disconnect_request(ch); in comxlapb_xmit()
149 lapb_data_request(ch, skb2); in comxlapb_xmit()
290 struct comx_channel *ch = token; in comxlapb_connected() local
291 struct proc_dir_entry *comxdir = ch->procdir->subdir; in comxlapb_connected()
293 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_connected()
294 comx_debug(ch->dev, "%s: lapb connected, reason: %d\n", in comxlapb_connected()
295 ch->dev->name, reason); in comxlapb_connected()
298 if (ch->dev->type == ARPHRD_X25) { in comxlapb_connected()
308 skb->dev = ch->dev; in comxlapb_connected()
314 ch->dev->last_rx = jiffies; in comxlapb_connected()
324 ch->line_status |= PROTO_UP; in comxlapb_connected()
325 comx_status(ch->dev, ch->line_status); in comxlapb_connected()
330 struct comx_channel *ch = token; in comxlapb_disconnected() local
331 struct proc_dir_entry *comxdir = ch->procdir->subdir; in comxlapb_disconnected()
333 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_disconnected()
334 comx_debug(ch->dev, "%s: lapb disconnected, reason: %d\n", in comxlapb_disconnected()
335 ch->dev->name, reason); in comxlapb_disconnected()
338 if (ch->dev->type == ARPHRD_X25) { in comxlapb_disconnected()
348 skb->dev = ch->dev; in comxlapb_disconnected()
354 ch->dev->last_rx = jiffies; in comxlapb_disconnected()
363 ch->line_status &= ~PROTO_UP; in comxlapb_disconnected()
364 comx_status(ch->dev, ch->line_status); in comxlapb_disconnected()
369 struct comx_channel *ch = token; in comxlapb_data_indication() local
371 if (ch->dev->type == ARPHRD_X25) { in comxlapb_data_indication()
379 skb->dev = ch->dev; in comxlapb_data_indication()
381 return comx_rx(ch->dev, skb); in comxlapb_data_indication()
386 struct comx_channel *ch = token; in comxlapb_data_transmit() local
388 if (ch->HW_send_packet) { in comxlapb_data_transmit()
389 ch->HW_send_packet(ch->dev, skb); in comxlapb_data_transmit()
395 struct comx_channel *ch = dev->priv; in comxlapb_exit() local
402 ch->LINE_rx = NULL; in comxlapb_exit()
403 ch->LINE_tx = NULL; in comxlapb_exit()
404 ch->LINE_status = NULL; in comxlapb_exit()
405 ch->LINE_open = NULL; in comxlapb_exit()
406 ch->LINE_close = NULL; in comxlapb_exit()
407 ch->LINE_xmit = NULL; in comxlapb_exit()
408 ch->LINE_header = NULL; in comxlapb_exit()
409 ch->LINE_statistics = NULL; in comxlapb_exit()
411 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_exit()
416 remove_proc_entry(FILENAME_T1, ch->procdir); in comxlapb_exit()
417 remove_proc_entry(FILENAME_T2, ch->procdir); in comxlapb_exit()
418 remove_proc_entry(FILENAME_N2, ch->procdir); in comxlapb_exit()
419 remove_proc_entry(FILENAME_MODE, ch->procdir); in comxlapb_exit()
420 remove_proc_entry(FILENAME_WINDOW, ch->procdir); in comxlapb_exit()
428 struct comx_channel *ch = dev->priv; in comxlapb_init() local
435 ch->LINE_rx = comxlapb_rx; in comxlapb_init()
436 ch->LINE_tx = comxlapb_tx; in comxlapb_init()
437 ch->LINE_status = comxlapb_status; in comxlapb_init()
438 ch->LINE_open = comxlapb_open; in comxlapb_init()
439 ch->LINE_close = comxlapb_close; in comxlapb_init()
440 ch->LINE_xmit = comxlapb_xmit; in comxlapb_init()
441 ch->LINE_header = comxlapb_header; in comxlapb_init()
442 ch->LINE_statistics = comxlapb_statistics; in comxlapb_init()
453 if (ch->debug_flags & DEBUG_COMX_LAPB) { in comxlapb_init()
457 if (!create_comxlapb_proc_entry(FILENAME_T1, 0644, 8, ch->procdir)) { in comxlapb_init()
460 if (!create_comxlapb_proc_entry(FILENAME_T2, 0644, 8, ch->procdir)) { in comxlapb_init()
463 if (!create_comxlapb_proc_entry(FILENAME_N2, 0644, 8, ch->procdir)) { in comxlapb_init()
466 if (!create_comxlapb_proc_entry(FILENAME_MODE, 0644, 14, ch->procdir)) { in comxlapb_init()
469 if (!create_comxlapb_proc_entry(FILENAME_WINDOW, 0644, 0, ch->procdir)) { in comxlapb_init()