18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * IPWireless 3G PCMCIA Network Driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Original code
68c2ecf20Sopenharmony_ci *   by Stephen Blackheath <stephen@blacksapphire.com>,
78c2ecf20Sopenharmony_ci *      Ben Martel <benm@symmetric.co.nz>
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * Copyrighted as follows:
108c2ecf20Sopenharmony_ci *   Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * Various driver changes and rewrites, port to new kernels
138c2ecf20Sopenharmony_ci *   Copyright (C) 2006-2007 Jiri Kosina
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * Misc code cleanups and updates
168c2ecf20Sopenharmony_ci *   Copyright (C) 2007 David Sterba
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#ifndef _IPWIRELESS_CS_HARDWARE_H_
208c2ecf20Sopenharmony_ci#define _IPWIRELESS_CS_HARDWARE_H_
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#include <linux/types.h>
238c2ecf20Sopenharmony_ci#include <linux/sched.h>
248c2ecf20Sopenharmony_ci#include <linux/interrupt.h>
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_CTS 0x0001
278c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_DCD 0x0002
288c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_DSR 0x0004
298c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_RI  0x0008
308c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_DTR 0x0010
318c2ecf20Sopenharmony_ci#define IPW_CONTROL_LINE_RTS 0x0020
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistruct ipw_hardware;
348c2ecf20Sopenharmony_cistruct ipw_network;
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cistruct ipw_hardware *ipwireless_hardware_create(void);
378c2ecf20Sopenharmony_civoid ipwireless_hardware_free(struct ipw_hardware *hw);
388c2ecf20Sopenharmony_ciirqreturn_t ipwireless_interrupt(int irq, void *dev_id);
398c2ecf20Sopenharmony_ciint ipwireless_set_DTR(struct ipw_hardware *hw, unsigned int channel_idx,
408c2ecf20Sopenharmony_ci		int state);
418c2ecf20Sopenharmony_ciint ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx,
428c2ecf20Sopenharmony_ci		int state);
438c2ecf20Sopenharmony_ciint ipwireless_send_packet(struct ipw_hardware *hw,
448c2ecf20Sopenharmony_ci			    unsigned int channel_idx,
458c2ecf20Sopenharmony_ci			    const unsigned char *data,
468c2ecf20Sopenharmony_ci			    unsigned int length,
478c2ecf20Sopenharmony_ci			    void (*packet_sent_callback) (void *cb,
488c2ecf20Sopenharmony_ci							  unsigned int length),
498c2ecf20Sopenharmony_ci			    void *sent_cb_data);
508c2ecf20Sopenharmony_civoid ipwireless_associate_network(struct ipw_hardware *hw,
518c2ecf20Sopenharmony_ci		struct ipw_network *net);
528c2ecf20Sopenharmony_civoid ipwireless_stop_interrupts(struct ipw_hardware *hw);
538c2ecf20Sopenharmony_civoid ipwireless_init_hardware_v1(struct ipw_hardware *hw,
548c2ecf20Sopenharmony_ci				 unsigned int base_port,
558c2ecf20Sopenharmony_ci				 void __iomem *attr_memory,
568c2ecf20Sopenharmony_ci				 void __iomem *common_memory,
578c2ecf20Sopenharmony_ci				 int is_v2_card,
588c2ecf20Sopenharmony_ci				 void (*reboot_cb) (void *data),
598c2ecf20Sopenharmony_ci				 void *reboot_cb_data);
608c2ecf20Sopenharmony_civoid ipwireless_init_hardware_v2_v3(struct ipw_hardware *hw);
618c2ecf20Sopenharmony_civoid ipwireless_sleep(unsigned int tenths);
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci#endif
64