hardware.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * IPWireless 3G PCMCIA Network Driver
  3. *
  4. * Original code
  5. * by Stephen Blackheath <stephen@blacksapphire.com>,
  6. * Ben Martel <benm@symmetric.co.nz>
  7. *
  8. * Copyrighted as follows:
  9. * Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
  10. *
  11. * Various driver changes and rewrites, port to new kernels
  12. * Copyright (C) 2006-2007 Jiri Kosina
  13. *
  14. * Misc code cleanups and updates
  15. * Copyright (C) 2007 David Sterba
  16. */
  17. #ifndef _IPWIRELESS_CS_HARDWARE_H_
  18. #define _IPWIRELESS_CS_HARDWARE_H_
  19. #include <linux/types.h>
  20. #include <linux/sched.h>
  21. #include <linux/interrupt.h>
  22. #define IPW_CONTROL_LINE_CTS 0x0001
  23. #define IPW_CONTROL_LINE_DCD 0x0002
  24. #define IPW_CONTROL_LINE_DSR 0x0004
  25. #define IPW_CONTROL_LINE_RI 0x0008
  26. #define IPW_CONTROL_LINE_DTR 0x0010
  27. #define IPW_CONTROL_LINE_RTS 0x0020
  28. struct ipw_hardware;
  29. struct ipw_network;
  30. struct ipw_hardware *ipwireless_hardware_create(void);
  31. void ipwireless_hardware_free(struct ipw_hardware *hw);
  32. irqreturn_t ipwireless_interrupt(int irq, void *dev_id);
  33. int ipwireless_set_DTR(struct ipw_hardware *hw, unsigned int channel_idx,
  34. int state);
  35. int ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx,
  36. int state);
  37. int ipwireless_send_packet(struct ipw_hardware *hw,
  38. unsigned int channel_idx,
  39. const unsigned char *data,
  40. unsigned int length,
  41. void (*packet_sent_callback) (void *cb,
  42. unsigned int length),
  43. void *sent_cb_data);
  44. void ipwireless_associate_network(struct ipw_hardware *hw,
  45. struct ipw_network *net);
  46. void ipwireless_stop_interrupts(struct ipw_hardware *hw);
  47. void ipwireless_init_hardware_v1(struct ipw_hardware *hw,
  48. unsigned int base_port,
  49. void __iomem *attr_memory,
  50. void __iomem *common_memory,
  51. int is_v2_card,
  52. void (*reboot_cb) (void *data),
  53. void *reboot_cb_data);
  54. void ipwireless_init_hardware_v2_v3(struct ipw_hardware *hw);
  55. void ipwireless_sleep(unsigned int tenths);
  56. #endif