hardware.h 1.9 KB

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