diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index fa095851f214..7eaf992775ae 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -1033,7 +1033,9 @@ void lbs_remove_card(struct lbs_private *priv) | |||
1033 | lbs_deb_enter(LBS_DEB_MAIN); | 1033 | lbs_deb_enter(LBS_DEB_MAIN); |
1034 | 1034 | ||
1035 | lbs_remove_mesh(priv); | 1035 | lbs_remove_mesh(priv); |
1036 | lbs_scan_deinit(priv); | 1036 | |
1037 | if (priv->wiphy_registered) | ||
1038 | lbs_scan_deinit(priv); | ||
1037 | 1039 | ||
1038 | /* worker thread destruction blocks on the in-flight command which | 1040 | /* worker thread destruction blocks on the in-flight command which |
1039 | * should have been cleared already in lbs_stop_card(). | 1041 | * should have been cleared already in lbs_stop_card(). |
@@ -1128,6 +1130,11 @@ void lbs_stop_card(struct lbs_private *priv) | |||
1128 | goto out; | 1130 | goto out; |
1129 | dev = priv->dev; | 1131 | dev = priv->dev; |
1130 | 1132 | ||
1133 | /* If the netdev isn't registered, it means that lbs_start_card() was | ||
1134 | * never called so we have nothing to do here. */ | ||
1135 | if (dev->reg_state != NETREG_REGISTERED) | ||
1136 | goto out; | ||
1137 | |||
1131 | netif_stop_queue(dev); | 1138 | netif_stop_queue(dev); |
1132 | netif_carrier_off(dev); | 1139 | netif_carrier_off(dev); |
1133 | 1140 | ||