aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/join.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/join.c')
-rw-r--r--drivers/net/wireless/libertas/join.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index 5a466eced979..2292c14a1531 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -87,7 +87,7 @@ int libertas_send_deauth(wlan_private * priv)
87 wlan_adapter *adapter = priv->adapter; 87 wlan_adapter *adapter = priv->adapter;
88 int ret = 0; 88 int ret = 0;
89 89
90 if (adapter->inframode == wlan802_11infrastructure && 90 if (adapter->mode == IW_MODE_INFRA &&
91 adapter->connect_status == libertas_connected) 91 adapter->connect_status == libertas_connected)
92 ret = libertas_send_deauthentication(priv); 92 ret = libertas_send_deauthentication(priv);
93 else 93 else
@@ -101,7 +101,7 @@ int libertas_do_adhocstop_ioctl(wlan_private * priv)
101 wlan_adapter *adapter = priv->adapter; 101 wlan_adapter *adapter = priv->adapter;
102 int ret = 0; 102 int ret = 0;
103 103
104 if (adapter->inframode == wlan802_11ibss && 104 if (adapter->mode == IW_MODE_ADHOC &&
105 adapter->connect_status == libertas_connected) 105 adapter->connect_status == libertas_connected)
106 ret = libertas_stop_adhoc_network(priv); 106 ret = libertas_stop_adhoc_network(priv);
107 else 107 else
@@ -209,8 +209,7 @@ int libertas_join_adhoc_network(wlan_private * priv, struct bss_descriptor * pbs
209 /* check if the requested SSID is already joined */ 209 /* check if the requested SSID is already joined */
210 if (adapter->curbssparams.ssid.ssidlength 210 if (adapter->curbssparams.ssid.ssidlength
211 && !libertas_SSID_cmp(&pbssdesc->ssid, &adapter->curbssparams.ssid) 211 && !libertas_SSID_cmp(&pbssdesc->ssid, &adapter->curbssparams.ssid)
212 && (adapter->curbssparams.bssdescriptor.inframode == 212 && (adapter->mode == IW_MODE_ADHOC)) {
213 wlan802_11ibss)) {
214 213
215 lbs_pr_debug(1, 214 lbs_pr_debug(1,
216 "ADHOC_J_CMD: New ad-hoc SSID is the same as current, " 215 "ADHOC_J_CMD: New ad-hoc SSID is the same as current, "
@@ -278,7 +277,7 @@ int libertas_idle_off(wlan_private * priv)
278 ENTER(); 277 ENTER();
279 278
280 if (adapter->connect_status == libertas_disconnected) { 279 if (adapter->connect_status == libertas_disconnected) {
281 if (adapter->inframode == wlan802_11infrastructure) { 280 if (adapter->mode == IW_MODE_INFRA) {
282 if (memcmp(adapter->previousbssid, zeromac, 281 if (memcmp(adapter->previousbssid, zeromac,
283 sizeof(zeromac)) != 0) { 282 sizeof(zeromac)) != 0) {
284 283
@@ -296,7 +295,7 @@ int libertas_idle_off(wlan_private * priv)
296 i = libertas_find_SSID_in_list(adapter, 295 i = libertas_find_SSID_in_list(adapter,
297 &adapter->previousssid, 296 &adapter->previousssid,
298 adapter->previousbssid, 297 adapter->previousbssid,
299 adapter->inframode); 298 adapter->mode);
300 299
301 if (i < 0) { 300 if (i < 0) {
302 libertas_send_specific_BSSID_scan(priv, 301 libertas_send_specific_BSSID_scan(priv,
@@ -308,8 +307,7 @@ int libertas_idle_off(wlan_private * priv)
308 previousssid, 307 previousssid,
309 adapter-> 308 adapter->
310 previousbssid, 309 previousbssid,
311 adapter-> 310 adapter->mode);
312 inframode);
313 } 311 }
314 312
315 if (i < 0) { 313 if (i < 0) {
@@ -317,8 +315,7 @@ int libertas_idle_off(wlan_private * priv)
317 i = libertas_find_SSID_in_list(adapter, 315 i = libertas_find_SSID_in_list(adapter,
318 &adapter-> 316 &adapter->
319 previousssid, NULL, 317 previousssid, NULL,
320 adapter-> 318 adapter->mode);
321 inframode);
322 } 319 }
323 320
324 if (i < 0) { 321 if (i < 0) {
@@ -329,8 +326,7 @@ int libertas_idle_off(wlan_private * priv)
329 i = libertas_find_SSID_in_list(adapter, 326 i = libertas_find_SSID_in_list(adapter,
330 &adapter-> 327 &adapter->
331 previousssid, NULL, 328 previousssid, NULL,
332 adapter-> 329 adapter->mode);
333 inframode);
334 } 330 }
335 331
336 if (i >= 0) { 332 if (i >= 0) {
@@ -340,7 +336,7 @@ int libertas_idle_off(wlan_private * priv)
340 scantable[i]); 336 scantable[i]);
341 } 337 }
342 } 338 }
343 } else if (adapter->inframode == wlan802_11ibss) { 339 } else if (adapter->mode == IW_MODE_ADHOC) {
344 ret = libertas_prepare_and_send_command(priv, 340 ret = libertas_prepare_and_send_command(priv,
345 cmd_802_11_ad_hoc_start, 341 cmd_802_11_ad_hoc_start,
346 0, 342 0,
@@ -367,7 +363,7 @@ int libertas_idle_on(wlan_private * priv)
367 int ret = 0; 363 int ret = 0;
368 364
369 if (adapter->connect_status == libertas_connected) { 365 if (adapter->connect_status == libertas_connected) {
370 if (adapter->inframode == wlan802_11infrastructure) { 366 if (adapter->mode == IW_MODE_INFRA) {
371 lbs_pr_debug(1, "Previous SSID = %s\n", 367 lbs_pr_debug(1, "Previous SSID = %s\n",
372 adapter->previousssid.ssid); 368 adapter->previousssid.ssid);
373 memmove(&adapter->previousssid, 369 memmove(&adapter->previousssid,
@@ -375,7 +371,7 @@ int libertas_idle_on(wlan_private * priv)
375 sizeof(struct WLAN_802_11_SSID)); 371 sizeof(struct WLAN_802_11_SSID));
376 libertas_send_deauth(priv); 372 libertas_send_deauth(priv);
377 373
378 } else if (adapter->inframode == wlan802_11ibss) { 374 } else if (adapter->mode == IW_MODE_ADHOC) {
379 ret = libertas_stop_adhoc_network(priv); 375 ret = libertas_stop_adhoc_network(priv);
380 } 376 }
381 377
@@ -569,7 +565,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
569 lbs_pr_debug(1, "ASSOC_CMD: rates->header.len = %d\n", rates->header.len); 565 lbs_pr_debug(1, "ASSOC_CMD: rates->header.len = %d\n", rates->header.len);
570 566
571 /* set IBSS field */ 567 /* set IBSS field */
572 if (pbssdesc->inframode == wlan802_11infrastructure) { 568 if (pbssdesc->mode == IW_MODE_INFRA) {
573#define CAPINFO_ESS_MODE 1 569#define CAPINFO_ESS_MODE 1
574 passo->capinfo.ess = CAPINFO_ESS_MODE; 570 passo->capinfo.ess = CAPINFO_ESS_MODE;
575 } 571 }
@@ -643,7 +639,7 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
643 639
644 /* set the BSS type */ 640 /* set the BSS type */
645 adhs->bsstype = cmd_bss_type_ibss; 641 adhs->bsstype = cmd_bss_type_ibss;
646 pbssdesc->inframode = wlan802_11ibss; 642 pbssdesc->mode = IW_MODE_ADHOC;
647 adhs->beaconperiod = adapter->beaconperiod; 643 adhs->beaconperiod = adapter->beaconperiod;
648 644
649 /* set Physical param set */ 645 /* set Physical param set */