void lbs_stop_card(struct lbs_private *priv) { struct net_device *dev; lbs_deb_enter(LBS_DEB_MAIN); if (!priv) goto out; dev = priv->dev; /* If the netdev isn't registered, it means that lbs_start_card() was * never called so we have nothing to do here. */ if (dev->reg_state != NETREG_REGISTERED) goto out; netif_stop_queue(dev); netif_carrier_off(dev); lbs_debugfs_remove_one(priv); lbs_deinit_mesh(priv); unregister_netdev(dev); out: lbs_deb_leave(LBS_DEB_MAIN); }
void lbs_stop_card(struct lbs_private *priv) { struct net_device *dev; lbs_deb_enter(LBS_DEB_MAIN); if (!priv) goto out; dev = priv->dev; netif_stop_queue(dev); netif_carrier_off(dev); lbs_debugfs_remove_one(priv); lbs_deinit_mesh(priv); unregister_netdev(dev); out: lbs_deb_leave(LBS_DEB_MAIN); }