irport.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*********************************************************************
  2. *
  3. * Filename: irport.h
  4. * Version: 0.1
  5. * Description: Serial driver for IrDA
  6. * Status: Experimental.
  7. * Author: Dag Brattli <dagb@cs.uit.no>
  8. * Created at: Sun Aug 3 13:49:59 1997
  9. * Modified at: Fri Jan 14 10:21:10 2000
  10. * Modified by: Dag Brattli <dagb@cs.uit.no>
  11. *
  12. * Copyright (c) 1997, 1998-2000 Dag Brattli <dagb@cs.uit.no>
  13. * All Rights Reserved.
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License as
  17. * published by the Free Software Foundation; either version 2 of
  18. * the License, or (at your option) any later version.
  19. *
  20. * Neither Dag Brattli nor University of Tromsø admit liability nor
  21. * provide warranty for any of this software. This material is
  22. * provided "AS-IS" and at no charge.
  23. *
  24. ********************************************************************/
  25. #ifndef IRPORT_H
  26. #define IRPORT_H
  27. #include <linux/netdevice.h>
  28. #include <linux/skbuff.h>
  29. #include <linux/types.h>
  30. #include <linux/spinlock.h>
  31. #include <net/irda/irda_device.h>
  32. #define SPEED_DEFAULT 9600
  33. #define SPEED_MAX 115200
  34. /*
  35. * These are the supported serial types.
  36. */
  37. #define PORT_UNKNOWN 0
  38. #define PORT_8250 1
  39. #define PORT_16450 2
  40. #define PORT_16550 3
  41. #define PORT_16550A 4
  42. #define PORT_CIRRUS 5
  43. #define PORT_16650 6
  44. #define PORT_MAX 6
  45. #define FRAME_MAX_SIZE 2048
  46. struct irport_cb {
  47. struct net_device *netdev; /* Yes! we are some kind of netdevice */
  48. struct net_device_stats stats;
  49. struct irlap_cb *irlap; /* The link layer we are attached to */
  50. chipio_t io; /* IrDA controller information */
  51. iobuff_t tx_buff; /* Transmit buffer */
  52. iobuff_t rx_buff; /* Receive buffer */
  53. struct qos_info qos; /* QoS capabilities for this device */
  54. dongle_t *dongle; /* Dongle driver */
  55. __u32 flags; /* Interface flags */
  56. __u32 new_speed;
  57. int mode;
  58. int index; /* Instance index */
  59. int transmitting; /* Are we transmitting ? */
  60. spinlock_t lock; /* For serializing operations */
  61. /* For piggyback drivers */
  62. void *priv;
  63. void (*change_speed)(void *priv, __u32 speed);
  64. int (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
  65. };
  66. #endif /* IRPORT_H */