Staging: netwave: delete the driver
[linux/fpc-iii.git] / drivers / net / wireless / libertas / assoc.h
blob40621b789fc50badee7356591147a36f07393e7b
1 /* Copyright (C) 2006, Red Hat, Inc. */
3 #ifndef _LBS_ASSOC_H_
4 #define _LBS_ASSOC_H_
7 #include "defs.h"
8 #include "host.h"
11 struct lbs_private;
14 * In theory, the IE is limited to the IE length, 255,
15 * but in practice 64 bytes are enough.
17 #define MAX_WPA_IE_LEN 64
21 struct lbs_802_11_security {
22 u8 WPAenabled;
23 u8 WPA2enabled;
24 u8 wep_enabled;
25 u8 auth_mode;
26 u32 key_mgmt;
29 /** Current Basic Service Set State Structure */
30 struct current_bss_params {
31 /** bssid */
32 u8 bssid[ETH_ALEN];
33 /** ssid */
34 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
35 u8 ssid_len;
37 /** band */
38 u8 band;
39 /** channel is directly in priv->channel */
40 /** zero-terminated array of supported data rates */
41 u8 rates[MAX_RATES + 1];
44 /**
45 * @brief Structure used to store information for each beacon/probe response
47 struct bss_descriptor {
48 u8 bssid[ETH_ALEN];
50 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
51 u8 ssid_len;
53 u16 capability;
54 u32 rssi;
55 u32 channel;
56 u16 beaconperiod;
57 __le16 atimwindow;
59 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
60 u8 mode;
62 /* zero-terminated array of supported data rates */
63 u8 rates[MAX_RATES + 1];
65 unsigned long last_scanned;
67 union ieee_phy_param_set phy;
68 union ieee_ss_param_set ss;
70 u8 wpa_ie[MAX_WPA_IE_LEN];
71 size_t wpa_ie_len;
72 u8 rsn_ie[MAX_WPA_IE_LEN];
73 size_t rsn_ie_len;
75 u8 mesh;
77 struct list_head list;
80 /** Association request
82 * Encapsulates all the options that describe a specific assocation request
83 * or configuration of the wireless card's radio, mode, and security settings.
85 struct assoc_request {
86 #define ASSOC_FLAG_SSID 1
87 #define ASSOC_FLAG_CHANNEL 2
88 #define ASSOC_FLAG_BAND 3
89 #define ASSOC_FLAG_MODE 4
90 #define ASSOC_FLAG_BSSID 5
91 #define ASSOC_FLAG_WEP_KEYS 6
92 #define ASSOC_FLAG_WEP_TX_KEYIDX 7
93 #define ASSOC_FLAG_WPA_MCAST_KEY 8
94 #define ASSOC_FLAG_WPA_UCAST_KEY 9
95 #define ASSOC_FLAG_SECINFO 10
96 #define ASSOC_FLAG_WPA_IE 11
97 unsigned long flags;
99 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
100 u8 ssid_len;
101 u8 channel;
102 u8 band;
103 u8 mode;
104 u8 bssid[ETH_ALEN] __attribute__ ((aligned (2)));
106 /** WEP keys */
107 struct enc_key wep_keys[4];
108 u16 wep_tx_keyidx;
110 /** WPA keys */
111 struct enc_key wpa_mcast_key;
112 struct enc_key wpa_unicast_key;
114 struct lbs_802_11_security secinfo;
116 /** WPA Information Elements*/
117 u8 wpa_ie[MAX_WPA_IE_LEN];
118 u8 wpa_ie_len;
120 /* BSS to associate with for infrastructure of Ad-Hoc join */
121 struct bss_descriptor bss;
125 extern u8 lbs_bg_rates[MAX_RATES];
127 void lbs_association_worker(struct work_struct *work);
128 struct assoc_request *lbs_get_association_request(struct lbs_private *priv);
130 int lbs_adhoc_stop(struct lbs_private *priv);
132 int lbs_cmd_80211_deauthenticate(struct lbs_private *priv,
133 u8 bssid[ETH_ALEN], u16 reason);
135 int lbs_cmd_802_11_rssi(struct lbs_private *priv,
136 struct cmd_ds_command *cmd);
137 int lbs_ret_802_11_rssi(struct lbs_private *priv,
138 struct cmd_ds_command *resp);
140 int lbs_cmd_bcn_ctrl(struct lbs_private *priv,
141 struct cmd_ds_command *cmd,
142 u16 cmd_action);
143 int lbs_ret_802_11_bcn_ctrl(struct lbs_private *priv,
144 struct cmd_ds_command *resp);
146 int lbs_cmd_802_11_set_wep(struct lbs_private *priv, uint16_t cmd_action,
147 struct assoc_request *assoc);
149 int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, uint16_t cmd_action,
150 uint16_t *enable);
152 int lbs_cmd_802_11_key_material(struct lbs_private *priv, uint16_t cmd_action,
153 struct assoc_request *assoc);
155 #endif /* _LBS_ASSOC_H */