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