/** * lbs_eth_stop - close the ethX interface * * @dev: A pointer to &net_device structure * returns: 0 */ static int lbs_eth_stop(struct net_device *dev) { struct lbs_private *priv = dev->ml_priv; lbs_deb_enter(LBS_DEB_NET); if (priv->connect_status == LBS_CONNECTED) lbs_disconnect(priv, WLAN_REASON_DEAUTH_LEAVING); spin_lock_irq(&priv->driver_lock); netif_stop_queue(dev); spin_unlock_irq(&priv->driver_lock); lbs_update_mcast(priv); cancel_delayed_work_sync(&priv->scan_work); if (priv->scan_req) { cfg80211_scan_done(priv->scan_req, false); priv->scan_req = NULL; } netif_carrier_off(priv->dev); if (!lbs_iface_active(priv)) lbs_stop_iface(priv); lbs_deb_leave(LBS_DEB_NET); return 0; }
/** * lbs_mesh_stop - close the mshX interface * * @dev: A pointer to &net_device structure * returns: 0 */ static int lbs_mesh_stop(struct net_device *dev) { struct lbs_private *priv = dev->ml_priv; lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_STOP, lbs_mesh_get_channel(priv)); spin_lock_irq(&priv->driver_lock); netif_stop_queue(dev); netif_carrier_off(dev); spin_unlock_irq(&priv->driver_lock); lbs_update_mcast(priv); if (!lbs_iface_active(priv)) lbs_stop_iface(priv); return 0; }
static void lbs_set_mcast_worker(struct work_struct *work) { struct lbs_private *priv = container_of(work, struct lbs_private, mcast_work); lbs_update_mcast(priv); }