1 /********************************************************************* 2 * 3 * Filename: irtty.h 4 * Version: 1.0 5 * Description: 6 * Status: Experimental. 7 * Author: Dag Brattli <dagb@cs.uit.no> 8 * Created at: Tue Dec 9 21:13:12 1997 9 * Modified at: Tue Jan 25 09:10:18 2000 10 * Modified by: Dag Brattli <dagb@cs.uit.no> 11 * 12 * Copyright (c) 1997, 1999-2000 Dag Brattli, All Rights Reserved. 13 * 14 * This program is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU General Public License as 16 * published by the Free Software Foundation; either version 2 of 17 * the License, or (at your option) any later version. 18 * 19 * Neither Dag Brattli nor University of Troms� admit liability nor 20 * provide warranty for any of this software. This material is 21 * provided "AS-IS" and at no charge. 22 * 23 ********************************************************************/ 24 25 #ifndef IRTTY_H 26 #define IRTTY_H 27 28 #include <linux/if.h> 29 #include <linux/skbuff.h> 30 #include <linux/termios.h> 31 #include <linux/netdevice.h> 32 33 #include <net/irda/irda.h> 34 #include <net/irda/irqueue.h> 35 #include <net/irda/irda_device.h> 36 37 /* Used by ioctl */ 38 struct irtty_info { 39 char name[6]; 40 }; 41 42 #define IRTTY_IOC_MAGIC 'e' 43 #define IRTTY_IOCTDONGLE _IO(IRTTY_IOC_MAGIC, 1) 44 #define IRTTY_IOCGET _IOR(IRTTY_IOC_MAGIC, 2, struct irtty_info) 45 #define IRTTY_IOC_MAXNR 2 46 47 struct irtty_cb { 48 irda_queue_t q; /* Must be first */ 49 magic_t magic; 50 51 struct net_device *netdev; /* Yes! we are some kind of netdevice */ 52 struct irda_task *task; 53 struct net_device_stats stats; 54 55 struct tty_struct *tty; 56 struct irlap_cb *irlap; /* The link layer we are binded to */ 57 58 chipio_t io; /* IrDA controller information */ 59 iobuff_t tx_buff; /* Transmit buffer */ 60 iobuff_t rx_buff; /* Receive buffer */ 61 62 struct qos_info qos; /* QoS capabilities for this device */ 63 dongle_t *dongle; /* Dongle driver */ 64 65 __u32 new_speed; 66 __u32 flags; /* Interface flags */ 67 68 INFRARED_MODE mode; 69 }; 70 71 int irtty_register_dongle(struct dongle_reg *dongle); 72 void irtty_unregister_dongle(struct dongle_reg *dongle); 73 74 #endif 75 76 77 78 79 80