diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-11-15 18:05:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:46 -0500 |
commit | 1007832103d016d1563fab71d4cf2b057a0bcceb (patch) | |
tree | 3b5080b01bee6e1f98cc9489382c534e963ac748 /drivers/net/wireless/libertas/assoc.c | |
parent | 9a62f73b1a3bbd35a6f84fcd6636e672b09981ec (diff) |
libertas: move to uniform lbs_/LBS_ namespace
This patch unifies the namespace of variables, functions defines
and structures. It does:
- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
defined in libertas-local *.h files, e.g. not defines
from net/ieee80211.h)
While passing, I fixed some checkpatch.pl errors too.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r-- | drivers/net/wireless/libertas/assoc.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index b61b176e9d07..e52b1eead288 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -38,10 +38,10 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req | |||
38 | } | 38 | } |
39 | 39 | ||
40 | 40 | ||
41 | static int assoc_helper_essid(wlan_private *priv, | 41 | static int assoc_helper_essid(lbs_private *priv, |
42 | struct assoc_request * assoc_req) | 42 | struct assoc_request * assoc_req) |
43 | { | 43 | { |
44 | wlan_adapter *adapter = priv->adapter; | 44 | lbs_adapter *adapter = priv->adapter; |
45 | int ret = 0; | 45 | int ret = 0; |
46 | struct bss_descriptor * bss; | 46 | struct bss_descriptor * bss; |
47 | int channel = -1; | 47 | int channel = -1; |
@@ -58,15 +58,15 @@ static int assoc_helper_essid(wlan_private *priv, | |||
58 | lbs_deb_assoc("New SSID requested: '%s'\n", | 58 | lbs_deb_assoc("New SSID requested: '%s'\n", |
59 | escape_essid(assoc_req->ssid, assoc_req->ssid_len)); | 59 | escape_essid(assoc_req->ssid, assoc_req->ssid_len)); |
60 | if (assoc_req->mode == IW_MODE_INFRA) { | 60 | if (assoc_req->mode == IW_MODE_INFRA) { |
61 | libertas_send_specific_ssid_scan(priv, assoc_req->ssid, | 61 | lbs_send_specific_ssid_scan(priv, assoc_req->ssid, |
62 | assoc_req->ssid_len, 0); | 62 | assoc_req->ssid_len, 0); |
63 | 63 | ||
64 | bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid, | 64 | bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid, |
65 | assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel); | 65 | assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel); |
66 | if (bss != NULL) { | 66 | if (bss != NULL) { |
67 | lbs_deb_assoc("SSID found in scan list, associating\n"); | 67 | lbs_deb_assoc("SSID found in scan list, associating\n"); |
68 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); | 68 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); |
69 | ret = wlan_associate(priv, assoc_req); | 69 | ret = lbs_associate(priv, assoc_req); |
70 | } else { | 70 | } else { |
71 | lbs_deb_assoc("SSID not found; cannot associate\n"); | 71 | lbs_deb_assoc("SSID not found; cannot associate\n"); |
72 | } | 72 | } |
@@ -74,23 +74,23 @@ static int assoc_helper_essid(wlan_private *priv, | |||
74 | /* Scan for the network, do not save previous results. Stale | 74 | /* Scan for the network, do not save previous results. Stale |
75 | * scan data will cause us to join a non-existant adhoc network | 75 | * scan data will cause us to join a non-existant adhoc network |
76 | */ | 76 | */ |
77 | libertas_send_specific_ssid_scan(priv, assoc_req->ssid, | 77 | lbs_send_specific_ssid_scan(priv, assoc_req->ssid, |
78 | assoc_req->ssid_len, 1); | 78 | assoc_req->ssid_len, 1); |
79 | 79 | ||
80 | /* Search for the requested SSID in the scan table */ | 80 | /* Search for the requested SSID in the scan table */ |
81 | bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid, | 81 | bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid, |
82 | assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel); | 82 | assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel); |
83 | if (bss != NULL) { | 83 | if (bss != NULL) { |
84 | lbs_deb_assoc("SSID found, will join\n"); | 84 | lbs_deb_assoc("SSID found, will join\n"); |
85 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); | 85 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); |
86 | libertas_join_adhoc_network(priv, assoc_req); | 86 | lbs_join_adhoc_network(priv, assoc_req); |
87 | } else { | 87 | } else { |
88 | /* else send START command */ | 88 | /* else send START command */ |
89 | lbs_deb_assoc("SSID not found, creating adhoc network\n"); | 89 | lbs_deb_assoc("SSID not found, creating adhoc network\n"); |
90 | memcpy(&assoc_req->bss.ssid, &assoc_req->ssid, | 90 | memcpy(&assoc_req->bss.ssid, &assoc_req->ssid, |
91 | IW_ESSID_MAX_SIZE); | 91 | IW_ESSID_MAX_SIZE); |
92 | assoc_req->bss.ssid_len = assoc_req->ssid_len; | 92 | assoc_req->bss.ssid_len = assoc_req->ssid_len; |
93 | libertas_start_adhoc_network(priv, assoc_req); | 93 | lbs_start_adhoc_network(priv, assoc_req); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
@@ -99,10 +99,10 @@ static int assoc_helper_essid(wlan_private *priv, | |||
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | static int assoc_helper_bssid(wlan_private *priv, | 102 | static int assoc_helper_bssid(lbs_private *priv, |
103 | struct assoc_request * assoc_req) | 103 | struct assoc_request * assoc_req) |
104 | { | 104 | { |
105 | wlan_adapter *adapter = priv->adapter; | 105 | lbs_adapter *adapter = priv->adapter; |
106 | int ret = 0; | 106 | int ret = 0; |
107 | struct bss_descriptor * bss; | 107 | struct bss_descriptor * bss; |
108 | DECLARE_MAC_BUF(mac); | 108 | DECLARE_MAC_BUF(mac); |
@@ -111,7 +111,7 @@ static int assoc_helper_bssid(wlan_private *priv, | |||
111 | print_mac(mac, assoc_req->bssid)); | 111 | print_mac(mac, assoc_req->bssid)); |
112 | 112 | ||
113 | /* Search for index position in list for requested MAC */ | 113 | /* Search for index position in list for requested MAC */ |
114 | bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid, | 114 | bss = lbs_find_bssid_in_list(adapter, assoc_req->bssid, |
115 | assoc_req->mode); | 115 | assoc_req->mode); |
116 | if (bss == NULL) { | 116 | if (bss == NULL) { |
117 | lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, " | 117 | lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, " |
@@ -121,10 +121,10 @@ static int assoc_helper_bssid(wlan_private *priv, | |||
121 | 121 | ||
122 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); | 122 | memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); |
123 | if (assoc_req->mode == IW_MODE_INFRA) { | 123 | if (assoc_req->mode == IW_MODE_INFRA) { |
124 | ret = wlan_associate(priv, assoc_req); | 124 | ret = lbs_associate(priv, assoc_req); |
125 | lbs_deb_assoc("ASSOC: wlan_associate(bssid) returned %d\n", ret); | 125 | lbs_deb_assoc("ASSOC: lbs_associate(bssid) returned %d\n", ret); |
126 | } else if (assoc_req->mode == IW_MODE_ADHOC) { | 126 | } else if (assoc_req->mode == IW_MODE_ADHOC) { |
127 | libertas_join_adhoc_network(priv, assoc_req); | 127 | lbs_join_adhoc_network(priv, assoc_req); |
128 | } | 128 | } |
129 | 129 | ||
130 | out: | 130 | out: |
@@ -133,7 +133,7 @@ out: | |||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | static int assoc_helper_associate(wlan_private *priv, | 136 | static int assoc_helper_associate(lbs_private *priv, |
137 | struct assoc_request * assoc_req) | 137 | struct assoc_request * assoc_req) |
138 | { | 138 | { |
139 | int ret = 0, done = 0; | 139 | int ret = 0, done = 0; |
@@ -162,10 +162,10 @@ static int assoc_helper_associate(wlan_private *priv, | |||
162 | } | 162 | } |
163 | 163 | ||
164 | 164 | ||
165 | static int assoc_helper_mode(wlan_private *priv, | 165 | static int assoc_helper_mode(lbs_private *priv, |
166 | struct assoc_request * assoc_req) | 166 | struct assoc_request * assoc_req) |
167 | { | 167 | { |
168 | wlan_adapter *adapter = priv->adapter; | 168 | lbs_adapter *adapter = priv->adapter; |
169 | int ret = 0; | 169 | int ret = 0; |
170 | 170 | ||
171 | lbs_deb_enter(LBS_DEB_ASSOC); | 171 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -175,12 +175,12 @@ static int assoc_helper_mode(wlan_private *priv, | |||
175 | 175 | ||
176 | if (assoc_req->mode == IW_MODE_INFRA) { | 176 | if (assoc_req->mode == IW_MODE_INFRA) { |
177 | if (adapter->psstate != PS_STATE_FULL_POWER) | 177 | if (adapter->psstate != PS_STATE_FULL_POWER) |
178 | libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); | 178 | lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); |
179 | adapter->psmode = WLAN802_11POWERMODECAM; | 179 | adapter->psmode = LBS802_11POWERMODECAM; |
180 | } | 180 | } |
181 | 181 | ||
182 | adapter->mode = assoc_req->mode; | 182 | adapter->mode = assoc_req->mode; |
183 | ret = libertas_prepare_and_send_command(priv, | 183 | ret = lbs_prepare_and_send_command(priv, |
184 | CMD_802_11_SNMP_MIB, | 184 | CMD_802_11_SNMP_MIB, |
185 | 0, CMD_OPTION_WAITFORRSP, | 185 | 0, CMD_OPTION_WAITFORRSP, |
186 | OID_802_11_INFRASTRUCTURE_MODE, | 186 | OID_802_11_INFRASTRUCTURE_MODE, |
@@ -192,26 +192,26 @@ done: | |||
192 | } | 192 | } |
193 | 193 | ||
194 | 194 | ||
195 | static int update_channel(wlan_private * priv) | 195 | static int update_channel(lbs_private * priv) |
196 | { | 196 | { |
197 | /* the channel in f/w could be out of sync, get the current channel */ | 197 | /* the channel in f/w could be out of sync, get the current channel */ |
198 | return libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, | 198 | return lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, |
199 | CMD_OPT_802_11_RF_CHANNEL_GET, | 199 | CMD_OPT_802_11_RF_CHANNEL_GET, |
200 | CMD_OPTION_WAITFORRSP, 0, NULL); | 200 | CMD_OPTION_WAITFORRSP, 0, NULL); |
201 | } | 201 | } |
202 | 202 | ||
203 | void libertas_sync_channel(struct work_struct *work) | 203 | void lbs_sync_channel(struct work_struct *work) |
204 | { | 204 | { |
205 | wlan_private *priv = container_of(work, wlan_private, sync_channel); | 205 | lbs_private *priv = container_of(work, lbs_private, sync_channel); |
206 | 206 | ||
207 | if (update_channel(priv) != 0) | 207 | if (update_channel(priv) != 0) |
208 | lbs_pr_info("Channel synchronization failed."); | 208 | lbs_pr_info("Channel synchronization failed."); |
209 | } | 209 | } |
210 | 210 | ||
211 | static int assoc_helper_channel(wlan_private *priv, | 211 | static int assoc_helper_channel(lbs_private *priv, |
212 | struct assoc_request * assoc_req) | 212 | struct assoc_request * assoc_req) |
213 | { | 213 | { |
214 | wlan_adapter *adapter = priv->adapter; | 214 | lbs_adapter *adapter = priv->adapter; |
215 | int ret = 0; | 215 | int ret = 0; |
216 | 216 | ||
217 | lbs_deb_enter(LBS_DEB_ASSOC); | 217 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -227,7 +227,7 @@ static int assoc_helper_channel(wlan_private *priv, | |||
227 | lbs_deb_assoc("ASSOC: channel: %d -> %d\n", | 227 | lbs_deb_assoc("ASSOC: channel: %d -> %d\n", |
228 | adapter->curbssparams.channel, assoc_req->channel); | 228 | adapter->curbssparams.channel, assoc_req->channel); |
229 | 229 | ||
230 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, | 230 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, |
231 | CMD_OPT_802_11_RF_CHANNEL_SET, | 231 | CMD_OPT_802_11_RF_CHANNEL_SET, |
232 | CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel); | 232 | CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel); |
233 | if (ret < 0) { | 233 | if (ret < 0) { |
@@ -263,10 +263,10 @@ done: | |||
263 | } | 263 | } |
264 | 264 | ||
265 | 265 | ||
266 | static int assoc_helper_wep_keys(wlan_private *priv, | 266 | static int assoc_helper_wep_keys(lbs_private *priv, |
267 | struct assoc_request * assoc_req) | 267 | struct assoc_request * assoc_req) |
268 | { | 268 | { |
269 | wlan_adapter *adapter = priv->adapter; | 269 | lbs_adapter *adapter = priv->adapter; |
270 | int i; | 270 | int i; |
271 | int ret = 0; | 271 | int ret = 0; |
272 | 272 | ||
@@ -277,13 +277,13 @@ static int assoc_helper_wep_keys(wlan_private *priv, | |||
277 | || assoc_req->wep_keys[1].len | 277 | || assoc_req->wep_keys[1].len |
278 | || assoc_req->wep_keys[2].len | 278 | || assoc_req->wep_keys[2].len |
279 | || assoc_req->wep_keys[3].len) { | 279 | || assoc_req->wep_keys[3].len) { |
280 | ret = libertas_prepare_and_send_command(priv, | 280 | ret = lbs_prepare_and_send_command(priv, |
281 | CMD_802_11_SET_WEP, | 281 | CMD_802_11_SET_WEP, |
282 | CMD_ACT_ADD, | 282 | CMD_ACT_ADD, |
283 | CMD_OPTION_WAITFORRSP, | 283 | CMD_OPTION_WAITFORRSP, |
284 | 0, assoc_req); | 284 | 0, assoc_req); |
285 | } else { | 285 | } else { |
286 | ret = libertas_prepare_and_send_command(priv, | 286 | ret = lbs_prepare_and_send_command(priv, |
287 | CMD_802_11_SET_WEP, | 287 | CMD_802_11_SET_WEP, |
288 | CMD_ACT_REMOVE, | 288 | CMD_ACT_REMOVE, |
289 | CMD_OPTION_WAITFORRSP, | 289 | CMD_OPTION_WAITFORRSP, |
@@ -298,7 +298,7 @@ static int assoc_helper_wep_keys(wlan_private *priv, | |||
298 | adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE; | 298 | adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE; |
299 | else | 299 | else |
300 | adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE; | 300 | adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE; |
301 | ret = libertas_set_mac_packet_filter(priv); | 301 | ret = lbs_set_mac_packet_filter(priv); |
302 | if (ret) | 302 | if (ret) |
303 | goto out; | 303 | goto out; |
304 | 304 | ||
@@ -318,10 +318,10 @@ out: | |||
318 | return ret; | 318 | return ret; |
319 | } | 319 | } |
320 | 320 | ||
321 | static int assoc_helper_secinfo(wlan_private *priv, | 321 | static int assoc_helper_secinfo(lbs_private *priv, |
322 | struct assoc_request * assoc_req) | 322 | struct assoc_request * assoc_req) |
323 | { | 323 | { |
324 | wlan_adapter *adapter = priv->adapter; | 324 | lbs_adapter *adapter = priv->adapter; |
325 | int ret = 0; | 325 | int ret = 0; |
326 | u32 do_wpa; | 326 | u32 do_wpa; |
327 | u32 rsn = 0; | 327 | u32 rsn = 0; |
@@ -329,9 +329,9 @@ static int assoc_helper_secinfo(wlan_private *priv, | |||
329 | lbs_deb_enter(LBS_DEB_ASSOC); | 329 | lbs_deb_enter(LBS_DEB_ASSOC); |
330 | 330 | ||
331 | memcpy(&adapter->secinfo, &assoc_req->secinfo, | 331 | memcpy(&adapter->secinfo, &assoc_req->secinfo, |
332 | sizeof(struct wlan_802_11_security)); | 332 | sizeof(struct lbs_802_11_security)); |
333 | 333 | ||
334 | ret = libertas_set_mac_packet_filter(priv); | 334 | ret = lbs_set_mac_packet_filter(priv); |
335 | if (ret) | 335 | if (ret) |
336 | goto out; | 336 | goto out; |
337 | 337 | ||
@@ -341,7 +341,7 @@ static int assoc_helper_secinfo(wlan_private *priv, | |||
341 | */ | 341 | */ |
342 | 342 | ||
343 | /* Get RSN enabled/disabled */ | 343 | /* Get RSN enabled/disabled */ |
344 | ret = libertas_prepare_and_send_command(priv, | 344 | ret = lbs_prepare_and_send_command(priv, |
345 | CMD_802_11_ENABLE_RSN, | 345 | CMD_802_11_ENABLE_RSN, |
346 | CMD_ACT_GET, | 346 | CMD_ACT_GET, |
347 | CMD_OPTION_WAITFORRSP, | 347 | CMD_OPTION_WAITFORRSP, |
@@ -358,7 +358,7 @@ static int assoc_helper_secinfo(wlan_private *priv, | |||
358 | 358 | ||
359 | /* Set RSN enabled/disabled */ | 359 | /* Set RSN enabled/disabled */ |
360 | rsn = do_wpa; | 360 | rsn = do_wpa; |
361 | ret = libertas_prepare_and_send_command(priv, | 361 | ret = lbs_prepare_and_send_command(priv, |
362 | CMD_802_11_ENABLE_RSN, | 362 | CMD_802_11_ENABLE_RSN, |
363 | CMD_ACT_SET, | 363 | CMD_ACT_SET, |
364 | CMD_OPTION_WAITFORRSP, | 364 | CMD_OPTION_WAITFORRSP, |
@@ -370,7 +370,7 @@ out: | |||
370 | } | 370 | } |
371 | 371 | ||
372 | 372 | ||
373 | static int assoc_helper_wpa_keys(wlan_private *priv, | 373 | static int assoc_helper_wpa_keys(lbs_private *priv, |
374 | struct assoc_request * assoc_req) | 374 | struct assoc_request * assoc_req) |
375 | { | 375 | { |
376 | int ret = 0; | 376 | int ret = 0; |
@@ -385,7 +385,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv, | |||
385 | 385 | ||
386 | if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { | 386 | if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { |
387 | clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags); | 387 | clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags); |
388 | ret = libertas_prepare_and_send_command(priv, | 388 | ret = lbs_prepare_and_send_command(priv, |
389 | CMD_802_11_KEY_MATERIAL, | 389 | CMD_802_11_KEY_MATERIAL, |
390 | CMD_ACT_SET, | 390 | CMD_ACT_SET, |
391 | CMD_OPTION_WAITFORRSP, | 391 | CMD_OPTION_WAITFORRSP, |
@@ -399,7 +399,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv, | |||
399 | if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) { | 399 | if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) { |
400 | clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); | 400 | clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); |
401 | 401 | ||
402 | ret = libertas_prepare_and_send_command(priv, | 402 | ret = lbs_prepare_and_send_command(priv, |
403 | CMD_802_11_KEY_MATERIAL, | 403 | CMD_802_11_KEY_MATERIAL, |
404 | CMD_ACT_SET, | 404 | CMD_ACT_SET, |
405 | CMD_OPTION_WAITFORRSP, | 405 | CMD_OPTION_WAITFORRSP, |
@@ -413,10 +413,10 @@ out: | |||
413 | } | 413 | } |
414 | 414 | ||
415 | 415 | ||
416 | static int assoc_helper_wpa_ie(wlan_private *priv, | 416 | static int assoc_helper_wpa_ie(lbs_private *priv, |
417 | struct assoc_request * assoc_req) | 417 | struct assoc_request * assoc_req) |
418 | { | 418 | { |
419 | wlan_adapter *adapter = priv->adapter; | 419 | lbs_adapter *adapter = priv->adapter; |
420 | int ret = 0; | 420 | int ret = 0; |
421 | 421 | ||
422 | lbs_deb_enter(LBS_DEB_ASSOC); | 422 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -434,10 +434,10 @@ static int assoc_helper_wpa_ie(wlan_private *priv, | |||
434 | } | 434 | } |
435 | 435 | ||
436 | 436 | ||
437 | static int should_deauth_infrastructure(wlan_adapter *adapter, | 437 | static int should_deauth_infrastructure(lbs_adapter *adapter, |
438 | struct assoc_request * assoc_req) | 438 | struct assoc_request * assoc_req) |
439 | { | 439 | { |
440 | if (adapter->connect_status != LIBERTAS_CONNECTED) | 440 | if (adapter->connect_status != LBS_CONNECTED) |
441 | return 0; | 441 | return 0; |
442 | 442 | ||
443 | if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { | 443 | if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { |
@@ -475,13 +475,13 @@ static int should_deauth_infrastructure(wlan_adapter *adapter, | |||
475 | } | 475 | } |
476 | 476 | ||
477 | 477 | ||
478 | static int should_stop_adhoc(wlan_adapter *adapter, | 478 | static int should_stop_adhoc(lbs_adapter *adapter, |
479 | struct assoc_request * assoc_req) | 479 | struct assoc_request * assoc_req) |
480 | { | 480 | { |
481 | if (adapter->connect_status != LIBERTAS_CONNECTED) | 481 | if (adapter->connect_status != LBS_CONNECTED) |
482 | return 0; | 482 | return 0; |
483 | 483 | ||
484 | if (libertas_ssid_cmp(adapter->curbssparams.ssid, | 484 | if (lbs_ssid_cmp(adapter->curbssparams.ssid, |
485 | adapter->curbssparams.ssid_len, | 485 | adapter->curbssparams.ssid_len, |
486 | assoc_req->ssid, assoc_req->ssid_len) != 0) | 486 | assoc_req->ssid, assoc_req->ssid_len) != 0) |
487 | return 1; | 487 | return 1; |
@@ -501,10 +501,10 @@ static int should_stop_adhoc(wlan_adapter *adapter, | |||
501 | } | 501 | } |
502 | 502 | ||
503 | 503 | ||
504 | void libertas_association_worker(struct work_struct *work) | 504 | void lbs_association_worker(struct work_struct *work) |
505 | { | 505 | { |
506 | wlan_private *priv = container_of(work, wlan_private, assoc_work.work); | 506 | lbs_private *priv = container_of(work, lbs_private, assoc_work.work); |
507 | wlan_adapter *adapter = priv->adapter; | 507 | lbs_adapter *adapter = priv->adapter; |
508 | struct assoc_request * assoc_req = NULL; | 508 | struct assoc_request * assoc_req = NULL; |
509 | int ret = 0; | 509 | int ret = 0; |
510 | int find_any_ssid = 0; | 510 | int find_any_ssid = 0; |
@@ -538,7 +538,7 @@ void libertas_association_worker(struct work_struct *work) | |||
538 | if (find_any_ssid) { | 538 | if (find_any_ssid) { |
539 | u8 new_mode; | 539 | u8 new_mode; |
540 | 540 | ||
541 | ret = libertas_find_best_network_ssid(priv, assoc_req->ssid, | 541 | ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, |
542 | &assoc_req->ssid_len, assoc_req->mode, &new_mode); | 542 | &assoc_req->ssid_len, assoc_req->mode, &new_mode); |
543 | if (ret) { | 543 | if (ret) { |
544 | lbs_deb_assoc("Could not find best network\n"); | 544 | lbs_deb_assoc("Could not find best network\n"); |
@@ -559,7 +559,7 @@ void libertas_association_worker(struct work_struct *work) | |||
559 | */ | 559 | */ |
560 | if (adapter->mode == IW_MODE_INFRA) { | 560 | if (adapter->mode == IW_MODE_INFRA) { |
561 | if (should_deauth_infrastructure(adapter, assoc_req)) { | 561 | if (should_deauth_infrastructure(adapter, assoc_req)) { |
562 | ret = libertas_send_deauthentication(priv); | 562 | ret = lbs_send_deauthentication(priv); |
563 | if (ret) { | 563 | if (ret) { |
564 | lbs_deb_assoc("Deauthentication due to new " | 564 | lbs_deb_assoc("Deauthentication due to new " |
565 | "configuration request failed: %d\n", | 565 | "configuration request failed: %d\n", |
@@ -568,7 +568,7 @@ void libertas_association_worker(struct work_struct *work) | |||
568 | } | 568 | } |
569 | } else if (adapter->mode == IW_MODE_ADHOC) { | 569 | } else if (adapter->mode == IW_MODE_ADHOC) { |
570 | if (should_stop_adhoc(adapter, assoc_req)) { | 570 | if (should_stop_adhoc(adapter, assoc_req)) { |
571 | ret = libertas_stop_adhoc_network(priv); | 571 | ret = lbs_stop_adhoc_network(priv); |
572 | if (ret) { | 572 | if (ret) { |
573 | lbs_deb_assoc("Teardown of AdHoc network due to " | 573 | lbs_deb_assoc("Teardown of AdHoc network due to " |
574 | "new configuration request failed: %d\n", | 574 | "new configuration request failed: %d\n", |
@@ -649,7 +649,7 @@ void libertas_association_worker(struct work_struct *work) | |||
649 | success = 0; | 649 | success = 0; |
650 | } | 650 | } |
651 | 651 | ||
652 | if (adapter->connect_status != LIBERTAS_CONNECTED) { | 652 | if (adapter->connect_status != LBS_CONNECTED) { |
653 | lbs_deb_assoc("ASSOC: association attempt unsuccessful, " | 653 | lbs_deb_assoc("ASSOC: association attempt unsuccessful, " |
654 | "not connected.\n"); | 654 | "not connected.\n"); |
655 | success = 0; | 655 | success = 0; |
@@ -661,11 +661,11 @@ void libertas_association_worker(struct work_struct *work) | |||
661 | escape_essid(adapter->curbssparams.ssid, | 661 | escape_essid(adapter->curbssparams.ssid, |
662 | adapter->curbssparams.ssid_len), | 662 | adapter->curbssparams.ssid_len), |
663 | print_mac(mac, adapter->curbssparams.bssid)); | 663 | print_mac(mac, adapter->curbssparams.bssid)); |
664 | libertas_prepare_and_send_command(priv, | 664 | lbs_prepare_and_send_command(priv, |
665 | CMD_802_11_RSSI, | 665 | CMD_802_11_RSSI, |
666 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 666 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
667 | 667 | ||
668 | libertas_prepare_and_send_command(priv, | 668 | lbs_prepare_and_send_command(priv, |
669 | CMD_802_11_GET_LOG, | 669 | CMD_802_11_GET_LOG, |
670 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 670 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
671 | } else { | 671 | } else { |
@@ -692,7 +692,7 @@ done: | |||
692 | /* | 692 | /* |
693 | * Caller MUST hold any necessary locks | 693 | * Caller MUST hold any necessary locks |
694 | */ | 694 | */ |
695 | struct assoc_request * wlan_get_association_request(wlan_adapter *adapter) | 695 | struct assoc_request *lbs_get_association_request(lbs_adapter *adapter) |
696 | { | 696 | { |
697 | struct assoc_request * assoc_req; | 697 | struct assoc_request * assoc_req; |
698 | 698 | ||
@@ -753,7 +753,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter) | |||
753 | 753 | ||
754 | if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { | 754 | if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { |
755 | memcpy(&assoc_req->secinfo, &adapter->secinfo, | 755 | memcpy(&assoc_req->secinfo, &adapter->secinfo, |
756 | sizeof(struct wlan_802_11_security)); | 756 | sizeof(struct lbs_802_11_security)); |
757 | } | 757 | } |
758 | 758 | ||
759 | if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) { | 759 | if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) { |