aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2x00/ipw2100.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-02-11 13:26:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:43 -0500
commitc3d72b968129ad4aec86c5fc8d2380f01ebebc53 (patch)
treebb1d4054bba06cab388b6ecfee6d2dddef4e7108 /drivers/net/wireless/ipw2x00/ipw2100.c
parentbc8263f1d86946ffe97eb249fc1d6660da1e1055 (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/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 52b1cf5160f7..3a6d810a7608 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -1692,7 +1692,13 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1692 u32 lock; 1692 u32 lock;
1693 u32 ord_len = sizeof(lock); 1693 u32 ord_len = sizeof(lock);
1694 1694
1695 /* Quite if manually disabled. */ 1695 /* Age scan list entries found before suspend */
1696 if (priv->suspend_time) {
1697 ieee80211_networks_age(priv->ieee, priv->suspend_time);
1698 priv->suspend_time = 0;
1699 }
1700
1701 /* Quiet if manually disabled. */
1696 if (priv->status & STATUS_RF_KILL_SW) { 1702 if (priv->status & STATUS_RF_KILL_SW) {
1697 IPW_DEBUG_INFO("%s: Radio is disabled by Manual Disable " 1703 IPW_DEBUG_INFO("%s: Radio is disabled by Manual Disable "
1698 "switch\n", priv->net_dev->name); 1704 "switch\n", priv->net_dev->name);
@@ -6415,6 +6421,8 @@ static int ipw2100_suspend(struct pci_dev *pci_dev, pm_message_t state)
6415 pci_disable_device(pci_dev); 6421 pci_disable_device(pci_dev);
6416 pci_set_power_state(pci_dev, PCI_D3hot); 6422 pci_set_power_state(pci_dev, PCI_D3hot);
6417 6423
6424 priv->suspend_at = get_seconds();
6425
6418 mutex_unlock(&priv->action_mutex); 6426 mutex_unlock(&priv->action_mutex);
6419 6427
6420 return 0; 6428 return 0;
@@ -6458,6 +6466,8 @@ static int ipw2100_resume(struct pci_dev *pci_dev)
6458 * the queue of needed */ 6466 * the queue of needed */
6459 netif_device_attach(dev); 6467 netif_device_attach(dev);
6460 6468
6469 priv->suspend_time = get_seconds() - priv->suspend_at;
6470
6461 /* Bring the device back up */ 6471 /* Bring the device back up */
6462 if (!(priv->status & STATUS_RF_KILL_SW)) 6472 if (!(priv->status & STATUS_RF_KILL_SW))
6463 ipw2100_up(priv, 0); 6473 ipw2100_up(priv, 0);