aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index f0da18c331db..769117916fb3 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -406,13 +406,15 @@ static int lbs_dev_open(struct net_device *dev)
406 406
407 priv->open = 1; 407 priv->open = 1;
408 408
409 if (adapter->connect_status == LBS_CONNECTED) { 409 if (adapter->connect_status == LBS_CONNECTED)
410 netif_carrier_on(priv->dev); 410 netif_carrier_on(priv->dev);
411 if (priv->mesh_dev) 411 else
412 netif_carrier_on(priv->mesh_dev);
413 } else {
414 netif_carrier_off(priv->dev); 412 netif_carrier_off(priv->dev);
415 if (priv->mesh_dev) 413
414 if (priv->mesh_dev) {
415 if (adapter->mesh_connect_status == LBS_CONNECTED)
416 netif_carrier_on(priv->mesh_dev);
417 else
416 netif_carrier_off(priv->mesh_dev); 418 netif_carrier_off(priv->mesh_dev);
417 } 419 }
418 420
@@ -433,6 +435,11 @@ static int lbs_mesh_open(struct net_device *dev)
433 return -1; 435 return -1;
434 priv->mesh_open = 1 ; 436 priv->mesh_open = 1 ;
435 netif_wake_queue(priv->mesh_dev); 437 netif_wake_queue(priv->mesh_dev);
438
439 priv->adapter->mesh_connect_status = LBS_CONNECTED;
440
441 netif_carrier_on(priv->mesh_dev);
442 netif_wake_queue(priv->mesh_dev);
436 if (priv->infra_open == 0) 443 if (priv->infra_open == 0)
437 return lbs_dev_open(priv->dev) ; 444 return lbs_dev_open(priv->dev) ;
438 return 0; 445 return 0;
@@ -548,7 +555,7 @@ static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
548 555
549 SET_MESH_FRAME(skb); 556 SET_MESH_FRAME(skb);
550 557
551 ret = lbs_hard_start_xmit(skb, priv->dev); 558 ret = lbs_hard_start_xmit(skb, priv->mesh_dev);
552 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); 559 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
553 return ret; 560 return ret;
554} 561}
@@ -595,9 +602,12 @@ static void lbs_tx_timeout(struct net_device *dev)
595 lbs_send_tx_feedback(priv); 602 lbs_send_tx_feedback(priv);
596 } else 603 } else
597 wake_up_interruptible(&priv->waitq); 604 wake_up_interruptible(&priv->waitq);
598 } else if (priv->adapter->connect_status == LBS_CONNECTED) { 605 } else if (dev == priv->dev) {
599 netif_wake_queue(priv->dev); 606 if (priv->adapter->connect_status == LBS_CONNECTED)
600 if (priv->mesh_dev) 607 netif_wake_queue(priv->dev);
608
609 } else if (dev == priv->mesh_dev) {
610 if (priv->adapter->mesh_connect_status == LBS_CONNECTED)
601 netif_wake_queue(priv->mesh_dev); 611 netif_wake_queue(priv->mesh_dev);
602 } 612 }
603 613
@@ -1054,6 +1064,7 @@ static int lbs_init_adapter(lbs_private *priv)
1054 memset(adapter->current_addr, 0xff, ETH_ALEN); 1064 memset(adapter->current_addr, 0xff, ETH_ALEN);
1055 1065
1056 adapter->connect_status = LBS_DISCONNECTED; 1066 adapter->connect_status = LBS_DISCONNECTED;
1067 adapter->mesh_connect_status = LBS_DISCONNECTED;
1057 adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; 1068 adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
1058 adapter->mode = IW_MODE_INFRA; 1069 adapter->mode = IW_MODE_INFRA;
1059 adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; 1070 adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;