aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco.h')
-rw-r--r--drivers/net/wireless/orinoco.h61
1 files changed, 55 insertions, 6 deletions
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
index c6b1858abde8..981570bd3b9d 100644
--- a/drivers/net/wireless/orinoco.h
+++ b/drivers/net/wireless/orinoco.h
@@ -9,6 +9,7 @@
9 9
10#define DRIVER_VERSION "0.15" 10#define DRIVER_VERSION "0.15"
11 11
12#include <linux/interrupt.h>
12#include <linux/netdevice.h> 13#include <linux/netdevice.h>
13#include <linux/wireless.h> 14#include <linux/wireless.h>
14#include <net/iw_handler.h> 15#include <net/iw_handler.h>
@@ -30,27 +31,57 @@ struct orinoco_key {
30 char data[ORINOCO_MAX_KEY_SIZE]; 31 char data[ORINOCO_MAX_KEY_SIZE];
31} __attribute__ ((packed)); 32} __attribute__ ((packed));
32 33
34#define TKIP_KEYLEN 16
35#define MIC_KEYLEN 8
36
37struct orinoco_tkip_key {
38 u8 tkip[TKIP_KEYLEN];
39 u8 tx_mic[MIC_KEYLEN];
40 u8 rx_mic[MIC_KEYLEN];
41};
42
33typedef enum { 43typedef enum {
34 FIRMWARE_TYPE_AGERE, 44 FIRMWARE_TYPE_AGERE,
35 FIRMWARE_TYPE_INTERSIL, 45 FIRMWARE_TYPE_INTERSIL,
36 FIRMWARE_TYPE_SYMBOL 46 FIRMWARE_TYPE_SYMBOL
37} fwtype_t; 47} fwtype_t;
38 48
39typedef struct { 49struct bss_element {
40 union hermes_scan_info bss; 50 union hermes_scan_info bss;
41 unsigned long last_scanned; 51 unsigned long last_scanned;
42 struct list_head list; 52 struct list_head list;
43} bss_element; 53};
54
55struct xbss_element {
56 struct agere_ext_scan_info bss;
57 unsigned long last_scanned;
58 struct list_head list;
59};
60
61struct hermes_rx_descriptor;
62
63struct orinoco_rx_data {
64 struct hermes_rx_descriptor *desc;
65 struct sk_buff *skb;
66 struct list_head list;
67};
44 68
45struct orinoco_private { 69struct orinoco_private {
46 void *card; /* Pointer to card dependent structure */ 70 void *card; /* Pointer to card dependent structure */
71 struct device *dev;
47 int (*hard_reset)(struct orinoco_private *); 72 int (*hard_reset)(struct orinoco_private *);
73 int (*stop_fw)(struct orinoco_private *, int);
48 74
49 /* Synchronisation stuff */ 75 /* Synchronisation stuff */
50 spinlock_t lock; 76 spinlock_t lock;
51 int hw_unavailable; 77 int hw_unavailable;
52 struct work_struct reset_work; 78 struct work_struct reset_work;
53 79
80 /* Interrupt tasklets */
81 struct tasklet_struct rx_tasklet;
82 struct list_head rx_list;
83 struct orinoco_rx_data *rx_data;
84
54 /* driver state */ 85 /* driver state */
55 int open; 86 int open;
56 u16 last_linkstatus; 87 u16 last_linkstatus;
@@ -83,13 +114,17 @@ struct orinoco_private {
83 unsigned int has_preamble:1; 114 unsigned int has_preamble:1;
84 unsigned int has_sensitivity:1; 115 unsigned int has_sensitivity:1;
85 unsigned int has_hostscan:1; 116 unsigned int has_hostscan:1;
117 unsigned int has_alt_txcntl:1;
118 unsigned int has_ext_scan:1;
119 unsigned int has_wpa:1;
120 unsigned int do_fw_download:1;
86 unsigned int broken_disableport:1; 121 unsigned int broken_disableport:1;
87 unsigned int broken_monitor:1; 122 unsigned int broken_monitor:1;
88 123
89 /* Configuration paramaters */ 124 /* Configuration paramaters */
90 u32 iw_mode; 125 u32 iw_mode;
91 int prefer_port3; 126 int prefer_port3;
92 u16 wep_on, wep_restrict, tx_key; 127 u16 encode_alg, wep_restrict, tx_key;
93 struct orinoco_key keys[ORINOCO_MAX_KEYS]; 128 struct orinoco_key keys[ORINOCO_MAX_KEYS];
94 int bitratemode; 129 int bitratemode;
95 char nick[IW_ESSID_MAX_SIZE+1]; 130 char nick[IW_ESSID_MAX_SIZE+1];
@@ -113,10 +148,22 @@ struct orinoco_private {
113 /* Scanning support */ 148 /* Scanning support */
114 struct list_head bss_list; 149 struct list_head bss_list;
115 struct list_head bss_free_list; 150 struct list_head bss_free_list;
116 bss_element *bss_data; 151 void *bss_xbss_data;
117 152
118 int scan_inprogress; /* Scan pending... */ 153 int scan_inprogress; /* Scan pending... */
119 u32 scan_mode; /* Type of scan done */ 154 u32 scan_mode; /* Type of scan done */
155
156 /* WPA support */
157 u8 *wpa_ie;
158 int wpa_ie_len;
159
160 struct orinoco_tkip_key tkip_key[ORINOCO_MAX_KEYS];
161 struct crypto_hash *rx_tfm_mic;
162 struct crypto_hash *tx_tfm_mic;
163
164 unsigned int wpa_enabled:1;
165 unsigned int tkip_cm_active:1;
166 unsigned int key_mgmt:3;
120}; 167};
121 168
122#ifdef ORINOCO_DEBUG 169#ifdef ORINOCO_DEBUG
@@ -130,8 +177,10 @@ extern int orinoco_debug;
130/* Exported prototypes */ 177/* Exported prototypes */
131/********************************************************************/ 178/********************************************************************/
132 179
133extern struct net_device *alloc_orinocodev(int sizeof_card, 180extern struct net_device *alloc_orinocodev(
134 int (*hard_reset)(struct orinoco_private *)); 181 int sizeof_card, struct device *device,
182 int (*hard_reset)(struct orinoco_private *),
183 int (*stop_fw)(struct orinoco_private *, int));
135extern void free_orinocodev(struct net_device *dev); 184extern void free_orinocodev(struct net_device *dev);
136extern int __orinoco_up(struct net_device *dev); 185extern int __orinoco_up(struct net_device *dev);
137extern int __orinoco_down(struct net_device *dev); 186extern int __orinoco_down(struct net_device *dev);