diff options
author | Dan Williams <dcbw@redhat.com> | 2009-02-11 13:26:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:43 -0500 |
commit | c3d72b968129ad4aec86c5fc8d2380f01ebebc53 (patch) | |
tree | bb1d4054bba06cab388b6ecfee6d2dddef4e7108 /drivers/net/wireless/ipw2x00/ipw2200.c | |
parent | bc8263f1d86946ffe97eb249fc1d6660da1e1055 (diff) |
ipw2x00: age scan results on resume
Scanned BSS entries are timestamped with jiffies, which doesn't
increment across suspend and hibernate. On resume, every BSS in the
scan list looks like it was scanned within the last 10 seconds,
irregardless of how long the machine was actually asleep. Age scan
results on resume with the time spent during sleep so userspace has a
clue how old they really are.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 01c4ede90662..a7fb08aecf3f 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -11238,6 +11238,12 @@ static int ipw_up(struct ipw_priv *priv) | |||
11238 | { | 11238 | { |
11239 | int rc, i, j; | 11239 | int rc, i, j; |
11240 | 11240 | ||
11241 | /* Age scan list entries found before suspend */ | ||
11242 | if (priv->suspend_time) { | ||
11243 | ieee80211_networks_age(priv->ieee, priv->suspend_time); | ||
11244 | priv->suspend_time = 0; | ||
11245 | } | ||
11246 | |||
11241 | if (priv->status & STATUS_EXIT_PENDING) | 11247 | if (priv->status & STATUS_EXIT_PENDING) |
11242 | return -EIO; | 11248 | return -EIO; |
11243 | 11249 | ||
@@ -11838,6 +11844,8 @@ static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
11838 | pci_disable_device(pdev); | 11844 | pci_disable_device(pdev); |
11839 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 11845 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
11840 | 11846 | ||
11847 | priv->suspend_at = get_seconds(); | ||
11848 | |||
11841 | return 0; | 11849 | return 0; |
11842 | } | 11850 | } |
11843 | 11851 | ||
@@ -11873,6 +11881,8 @@ static int ipw_pci_resume(struct pci_dev *pdev) | |||
11873 | * the queue of needed */ | 11881 | * the queue of needed */ |
11874 | netif_device_attach(dev); | 11882 | netif_device_attach(dev); |
11875 | 11883 | ||
11884 | priv->suspend_time = get_seconds() - priv->suspend_at; | ||
11885 | |||
11876 | /* Bring the device back up */ | 11886 | /* Bring the device back up */ |
11877 | queue_work(priv->workqueue, &priv->up); | 11887 | queue_work(priv->workqueue, &priv->up); |
11878 | 11888 | ||