1 /* Copyright (C) 2006, Red Hat, Inc. */
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
{
29 /** Current Basic Service Set State Structure */
30 struct current_bss_params
{
34 u8 ssid
[IEEE80211_MAX_SSID_LEN
+ 1];
39 /** channel is directly in priv->channel */
40 /** zero-terminated array of supported data rates */
41 u8 rates
[MAX_RATES
+ 1];
45 * @brief Structure used to store information for each beacon/probe response
47 struct bss_descriptor
{
50 u8 ssid
[IEEE80211_MAX_SSID_LEN
+ 1];
59 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
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
];
72 u8 rsn_ie
[MAX_WPA_IE_LEN
];
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
99 u8 ssid
[IEEE80211_MAX_SSID_LEN
+ 1];
104 u8 bssid
[ETH_ALEN
] __attribute__ ((aligned (2)));
107 struct enc_key wep_keys
[4];
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
];
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
,
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
,
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 */