aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/main.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 2797149649ca..3d9de7a1bfc6 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -367,34 +367,6 @@ static struct attribute_group lbs_mesh_attr_group = {
367}; 367};
368 368
369/** 369/**
370 * @brief Check if the device can be open and wait if necessary.
371 *
372 * @param dev A pointer to net_device structure
373 * @return 0
374 *
375 * For USB adapter, on some systems the device open handler will be
376 * called before FW ready. Use the following flag check and wait
377 * function to work around the issue.
378 *
379 */
380static int pre_open_check(struct net_device *dev)
381{
382 struct lbs_private *priv = (struct lbs_private *) dev->priv;
383 int i = 0;
384
385 while (!priv->fw_ready && i < 20) {
386 i++;
387 msleep_interruptible(100);
388 }
389 if (!priv->fw_ready) {
390 lbs_pr_err("firmware not ready\n");
391 return -1;
392 }
393
394 return 0;
395}
396
397/**
398 * @brief This function opens the device 370 * @brief This function opens the device
399 * 371 *
400 * @param dev A pointer to net_device structure 372 * @param dev A pointer to net_device structure
@@ -433,8 +405,6 @@ static int lbs_mesh_open(struct net_device *dev)
433{ 405{
434 struct lbs_private *priv = (struct lbs_private *) dev->priv ; 406 struct lbs_private *priv = (struct lbs_private *) dev->priv ;
435 407
436 if (pre_open_check(dev) == -1)
437 return -1;
438 priv->mesh_open = 1 ; 408 priv->mesh_open = 1 ;
439 netif_wake_queue(priv->mesh_dev); 409 netif_wake_queue(priv->mesh_dev);
440 410
@@ -457,8 +427,6 @@ static int lbs_open(struct net_device *dev)
457{ 427{
458 struct lbs_private *priv = (struct lbs_private *) dev->priv ; 428 struct lbs_private *priv = (struct lbs_private *) dev->priv ;
459 429
460 if(pre_open_check(dev) == -1)
461 return -1;
462 priv->infra_open = 1 ; 430 priv->infra_open = 1 ;
463 netif_wake_queue(priv->dev); 431 netif_wake_queue(priv->dev);
464 if (priv->open == 0) 432 if (priv->open == 0)