Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * IPWireless 3G PCMCIA Network Driver
0004  *
0005  * Original code
0006  *   by Stephen Blackheath <stephen@blacksapphire.com>,
0007  *      Ben Martel <benm@symmetric.co.nz>
0008  *
0009  * Copyrighted as follows:
0010  *   Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
0011  *
0012  * Various driver changes and rewrites, port to new kernels
0013  *   Copyright (C) 2006-2007 Jiri Kosina
0014  *
0015  * Misc code cleanups and updates
0016  *   Copyright (C) 2007 David Sterba
0017  */
0018 
0019 #ifndef _IPWIRELESS_CS_HARDWARE_H_
0020 #define _IPWIRELESS_CS_HARDWARE_H_
0021 
0022 #include <linux/types.h>
0023 #include <linux/sched.h>
0024 #include <linux/interrupt.h>
0025 
0026 #define IPW_CONTROL_LINE_CTS 0x0001
0027 #define IPW_CONTROL_LINE_DCD 0x0002
0028 #define IPW_CONTROL_LINE_DSR 0x0004
0029 #define IPW_CONTROL_LINE_RI  0x0008
0030 #define IPW_CONTROL_LINE_DTR 0x0010
0031 #define IPW_CONTROL_LINE_RTS 0x0020
0032 
0033 struct ipw_hardware;
0034 struct ipw_network;
0035 
0036 struct ipw_hardware *ipwireless_hardware_create(void);
0037 void ipwireless_hardware_free(struct ipw_hardware *hw);
0038 irqreturn_t ipwireless_interrupt(int irq, void *dev_id);
0039 int ipwireless_set_DTR(struct ipw_hardware *hw, unsigned int channel_idx,
0040         int state);
0041 int ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx,
0042         int state);
0043 int ipwireless_send_packet(struct ipw_hardware *hw,
0044                 unsigned int channel_idx,
0045                 const unsigned char *data,
0046                 unsigned int length,
0047                 void (*packet_sent_callback) (void *cb,
0048                               unsigned int length),
0049                 void *sent_cb_data);
0050 void ipwireless_associate_network(struct ipw_hardware *hw,
0051         struct ipw_network *net);
0052 void ipwireless_stop_interrupts(struct ipw_hardware *hw);
0053 void ipwireless_init_hardware_v1(struct ipw_hardware *hw,
0054                  unsigned int base_port,
0055                  void __iomem *attr_memory,
0056                  void __iomem *common_memory,
0057                  int is_v2_card,
0058                  void (*reboot_cb) (void *data),
0059                  void *reboot_cb_data);
0060 void ipwireless_init_hardware_v2_v3(struct ipw_hardware *hw);
0061 void ipwireless_sleep(unsigned int tenths);
0062 
0063 #endif