netif_carrier_on(priv->dev);
        netif_wake_queue(priv->dev);
 
-       netif_carrier_on(priv->mesh_dev);
-       netif_wake_queue(priv->mesh_dev);
+       if (priv->mesh_dev) {
+               netif_carrier_on(priv->mesh_dev);
+               netif_wake_queue(priv->mesh_dev);
+       }
 
        lbs_deb_join("ASSOC_RESP: Associated \n");
 
        netif_carrier_on(priv->dev);
        netif_wake_queue(priv->dev);
 
-       netif_carrier_on(priv->mesh_dev);
-       netif_wake_queue(priv->mesh_dev);
+       if (priv->mesh_dev) {
+               netif_carrier_on(priv->mesh_dev);
+               netif_wake_queue(priv->mesh_dev);
+       }
 
        memset(&wrqu, 0, sizeof(wrqu));
        memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN);
 
 
        if (adapter->connect_status == LIBERTAS_CONNECTED) {
                netif_carrier_on(priv->dev);
-               netif_carrier_on(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_carrier_on(priv->mesh_dev);
        } else {
                netif_carrier_off(priv->dev);
-               netif_carrier_off(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_carrier_off(priv->mesh_dev);
        }
 
        lbs_deb_leave(LBS_DEB_NET);
        }
 
        netif_stop_queue(priv->dev);
-       netif_stop_queue(priv->mesh_dev);
+       if (priv->mesh_dev)
+               netif_stop_queue(priv->mesh_dev);
 
        if (libertas_process_tx(priv, skb) == 0)
                dev->trans_start = jiffies;
                        wake_up_interruptible(&priv->waitq);
        } else if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
                netif_wake_queue(priv->dev);
-               netif_wake_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_wake_queue(priv->mesh_dev);
        }
 
        lbs_deb_leave(LBS_DEB_TX);
        ret = 0;
        goto done;
 
-
 err_unregister:
        unregister_netdev(mesh_dev);
 
        if (priv->adapter->psstate == PS_STATE_SLEEP) {
                priv->adapter->psstate = PS_STATE_AWAKE;
                netif_wake_queue(dev);
-               netif_wake_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_wake_queue(priv->mesh_dev);
        }
 
        wake_up_interruptible(&priv->waitq);
 
        if (!scancurrentchanonly) {
                netif_stop_queue(priv->dev);
                netif_carrier_off(priv->dev);
-               netif_stop_queue(priv->mesh_dev);
-               netif_carrier_off(priv->mesh_dev);
+               if (priv->mesh_dev) {
+                       netif_stop_queue(priv->mesh_dev);
+                       netif_carrier_off(priv->mesh_dev);
+               }
        }
 
        ret = wlan_scan_channel_list(priv,
        if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
                netif_carrier_on(priv->dev);
                netif_wake_queue(priv->dev);
-               netif_carrier_on(priv->mesh_dev);
-               netif_wake_queue(priv->mesh_dev);
+               if (priv->mesh_dev) {
+                       netif_carrier_on(priv->mesh_dev);
+                       netif_wake_queue(priv->mesh_dev);
+               }
        }
 
 out:
 
                skb_orphan(skb);
                /* stop processing outgoing pkts */
                netif_stop_queue(priv->dev);
-               netif_stop_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_stop_queue(priv->mesh_dev);
                /* freeze any packets already in our queues */
                priv->adapter->TxLockFlag = 1;
        } else {
        adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb;
        if (adapter->tx_queue_idx == NR_TX_QUEUE) {
                netif_stop_queue(priv->dev);
-               netif_stop_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_stop_queue(priv->mesh_dev);
        } else {
                netif_start_queue(priv->dev);
-               netif_start_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_start_queue(priv->mesh_dev);
        }
 
        spin_unlock(&adapter->txqueue_lock);
        priv->adapter->TxLockFlag = 0;
        if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
                netif_wake_queue(priv->dev);
-               netif_wake_queue(priv->mesh_dev);
+               if (priv->mesh_dev)
+                       netif_wake_queue(priv->mesh_dev);
        }
 }
 EXPORT_SYMBOL_GPL(libertas_send_tx_feedback);