Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232613
b: refs/heads/master
c: 4032ec6
h: refs/heads/master
i:
  232611: 68cfe21
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jan 22, 2011
1 parent de2df25 commit f2fd3b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d062d44a8386c82c06e483f0c0d1124ba3cab2c8
refs/heads/master: 4032ec639af9b735fdd903fab09de567bd73eaa0
45 changes: 23 additions & 22 deletions trunk/drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,8 @@ static void wl_ops_stop(struct ieee80211_hw *hw)
struct wl_info *wl = hw->priv;
ASSERT(wl);
WL_LOCK(wl);
wl_down(wl);
ieee80211_stop_queues(hw);
WL_UNLOCK(wl);

return;
}

static int
Expand Down Expand Up @@ -246,7 +243,14 @@ wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
static void
wl_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
return;
struct wl_info *wl;

wl = HW_TO_WL(hw);

/* put driver in down state */
WL_LOCK(wl);
wl_down(wl);
WL_UNLOCK(wl);
}

static int
Expand Down Expand Up @@ -779,7 +783,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
wl_found++;
return wl;

fail:
fail:
wl_free(wl);
fail1:
return NULL;
Expand Down Expand Up @@ -1090,7 +1094,6 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0;
}

#ifdef LINUXSTA_PS
static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct wl_info *wl;
Expand All @@ -1105,11 +1108,12 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
return -ENODEV;
}

/* only need to flag hw is down for proper resume */
WL_LOCK(wl);
wl_down(wl);
wl->pub->hw_up = false;
WL_UNLOCK(wl);
pci_save_state(pdev, wl->pci_psstate);

pci_save_state(pdev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}
Expand All @@ -1133,7 +1137,7 @@ static int wl_resume(struct pci_dev *pdev)
if (err)
return err;

pci_restore_state(pdev, wl->pci_psstate);
pci_restore_state(pdev);

err = pci_enable_device(pdev);
if (err)
Expand All @@ -1145,13 +1149,12 @@ static int wl_resume(struct pci_dev *pdev)
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);

WL_LOCK(wl);
err = wl_up(wl);
WL_UNLOCK(wl);

/*
* done. driver will be put in up state
* in wl_ops_add_interface() call.
*/
return err;
}
#endif /* LINUXSTA_PS */

static void wl_remove(struct pci_dev *pdev)
{
Expand Down Expand Up @@ -1184,14 +1187,12 @@ static void wl_remove(struct pci_dev *pdev)
}

static struct pci_driver wl_pci_driver = {
.name = "brcm80211",
.probe = wl_pci_probe,
#ifdef LINUXSTA_PS
.suspend = wl_suspend,
.resume = wl_resume,
#endif /* LINUXSTA_PS */
.remove = __devexit_p(wl_remove),
.id_table = wl_id_table,
.name = "brcm80211",
.probe = wl_pci_probe,
.suspend = wl_suspend,
.resume = wl_resume,
.remove = __devexit_p(wl_remove),
.id_table = wl_id_table,
};

/**
Expand Down

0 comments on commit f2fd3b8

Please sign in to comment.