/****************************************************************************** Network Interface Control & Statistical functions ******************************************************************************/ static int islpci_open(struct net_device *ndev) { u32 rc; islpci_private *priv = netdev_priv(ndev); /* reset data structures, upload firmware and reset device */ rc = islpci_reset(priv,1); if (rc) { prism54_bring_down(priv); return rc; /* Returns informative message */ } netif_start_queue(ndev); /* Turn off carrier if in STA or Ad-hoc mode. It will be turned on * once the firmware receives a trap of being associated * (GEN_OID_LINKSTATE). In other modes (AP or WDS or monitor) we * should just leave the carrier on as its expected the firmware * won't send us a trigger. */ if (priv->iw_mode == IW_MODE_INFRA || priv->iw_mode == IW_MODE_ADHOC) netif_carrier_off(ndev); else netif_carrier_on(ndev); return 0; }
static int prism54_resume(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; int err; BUG_ON(!priv); printk(KERN_NOTICE "%s: got resume request\n", ndev->name); err = pci_enable_device(pdev); if (err) { printk(KERN_ERR "%s: pci_enable_device failed on resume\n", ndev->name); return err; } pci_restore_state(pdev); /* alright let's go into the PREBOOT state */ islpci_reset(priv, 1); netif_device_attach(ndev); netif_start_queue(ndev); return 0; }
void islpci_do_reset_and_wake(struct work_struct *work) { islpci_private *priv = container_of(work, islpci_private, reset_task); islpci_reset(priv, 1); priv->reset_task_pending = 0; smp_wmb(); netif_wake_queue(priv->ndev); }
/****************************************************************************** Network Interface Control & Statistical functions ******************************************************************************/ static int islpci_open(struct net_device *ndev) { u32 rc; islpci_private *priv = netdev_priv(ndev); /* reset data structures, upload firmware and reset device */ rc = islpci_reset(priv,1); if (rc) { prism54_bring_down(priv); return rc; /* Returns informative message */ } netif_start_queue(ndev); /* netif_mark_up( ndev ); */ return 0; }