This source file includes following definitions.
- islpci_get_state
- islpci_trigger
1
2
3
4
5
6
7
8
9 #ifndef _ISLPCI_DEV_H
10 #define _ISLPCI_DEV_H
11
12 #include <linux/irqreturn.h>
13 #include <linux/netdevice.h>
14 #include <linux/wireless.h>
15 #include <net/iw_handler.h>
16 #include <linux/list.h>
17 #include <linux/mutex.h>
18
19 #include "isl_38xx.h"
20 #include "isl_oid.h"
21 #include "islpci_mgt.h"
22
23
24
25 typedef enum {
26 PRV_STATE_OFF = 0,
27 PRV_STATE_PREBOOT,
28 PRV_STATE_BOOT,
29 PRV_STATE_POSTBOOT,
30 PRV_STATE_PREINIT,
31 PRV_STATE_INIT,
32 PRV_STATE_READY,
33 PRV_STATE_SLEEP
34 } islpci_state_t;
35
36
37 struct mac_entry {
38 struct list_head _list;
39 char addr[ETH_ALEN];
40 };
41
42 struct islpci_acl {
43 enum { MAC_POLICY_OPEN=0, MAC_POLICY_ACCEPT=1, MAC_POLICY_REJECT=2 } policy;
44 struct list_head mac_list;
45 int size;
46 struct mutex lock;
47 };
48
49 struct islpci_membuf {
50 int size;
51 void *mem;
52 dma_addr_t pci_addr;
53 };
54
55 #define MAX_BSS_WPA_IE_COUNT 64
56 #define MAX_WPA_IE_LEN 64
57 struct islpci_bss_wpa_ie {
58 struct list_head list;
59 unsigned long last_update;
60 u8 bssid[ETH_ALEN];
61 u8 wpa_ie[MAX_WPA_IE_LEN];
62 size_t wpa_ie_len;
63
64 };
65
66 typedef struct {
67 spinlock_t slock;
68
69 u32 priv_oid;
70
71
72 u32 iw_mode;
73 struct rw_semaphore mib_sem;
74 void **mib;
75 char nickname[IW_ESSID_MAX_SIZE+1];
76
77
78 struct work_struct stats_work;
79 struct mutex stats_lock;
80
81 unsigned long stats_timestamp;
82
83
84
85 struct iw_statistics local_iwstatistics;
86 struct iw_statistics iwstatistics;
87
88 struct iw_spy_data spy_data;
89
90 struct iw_public_data wireless_data;
91
92 int monitor_type;
93
94 struct islpci_acl acl;
95
96
97 struct pci_dev *pdev;
98 char firmware[33];
99
100 void __iomem *device_base;
101
102
103 void *driver_mem_address;
104 dma_addr_t device_host_address;
105 dma_addr_t device_psm_buffer;
106
107
108 struct net_device *ndev;
109
110
111 struct isl38xx_cb *control_block;
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 u32 index_mgmt_rx;
136 u32 index_mgmt_tx;
137 u32 free_data_rx;
138 u32 free_data_tx;
139 u32 data_low_tx_full;
140
141
142 struct islpci_membuf mgmt_tx[ISL38XX_CB_MGMT_QSIZE];
143 struct islpci_membuf mgmt_rx[ISL38XX_CB_MGMT_QSIZE];
144 struct sk_buff *data_low_tx[ISL38XX_CB_TX_QSIZE];
145 struct sk_buff *data_low_rx[ISL38XX_CB_RX_QSIZE];
146 dma_addr_t pci_map_tx_address[ISL38XX_CB_TX_QSIZE];
147 dma_addr_t pci_map_rx_address[ISL38XX_CB_RX_QSIZE];
148
149
150 wait_queue_head_t reset_done;
151
152
153 struct mutex mgmt_lock;
154 struct islpci_mgmtframe *mgmt_received;
155 wait_queue_head_t mgmt_wqueue;
156
157
158 islpci_state_t state;
159 int state_off;
160
161
162
163 int wpa;
164 struct list_head bss_wpa_list;
165 int num_bss_wpa;
166 struct mutex wpa_lock;
167 u8 wpa_ie[MAX_WPA_IE_LEN];
168 size_t wpa_ie_len;
169
170 struct work_struct reset_task;
171 int reset_task_pending;
172 } islpci_private;
173
174 static inline islpci_state_t
175 islpci_get_state(islpci_private *priv)
176 {
177
178 return priv->state;
179
180 }
181
182 islpci_state_t islpci_set_state(islpci_private *priv, islpci_state_t new_state);
183
184 #define ISLPCI_TX_TIMEOUT (2*HZ)
185
186 irqreturn_t islpci_interrupt(int, void *);
187
188 int prism54_post_setup(islpci_private *, int);
189 int islpci_reset(islpci_private *, int);
190
191 static inline void
192 islpci_trigger(islpci_private *priv)
193 {
194 isl38xx_trigger_device(islpci_get_state(priv) == PRV_STATE_SLEEP,
195 priv->device_base);
196 }
197
198 int islpci_free_memory(islpci_private *);
199 struct net_device *islpci_setup(struct pci_dev *);
200
201 #define DRV_NAME "prism54"
202 #define DRV_VERSION "1.2"
203
204 #endif