* [PATCH 16/24] rt2x00: Call all configure handlers during resume
@ 2007-07-31 18:37 Ivo van Doorn
0 siblings, 0 replies; only message in thread
From: Ivo van Doorn @ 2007-07-31 18:37 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
>From 4800d5b02a237838913df950e557cf17f2f70dde Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sun, 29 Jul 2007 14:19:31 +0200
Subject: [PATCH 16/24] rt2x00: Call all configure handlers during resume
All configure handlers should be called during
resume operation to bring the device back into
the correct state to make the device work again.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00dev.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 0220107..4989cdb 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -1078,6 +1078,9 @@ EXPORT_SYMBOL_GPL(rt2x00lib_suspend);
int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev)
{
+ const struct rt2x00lib_ops *lib = rt2x00dev->ops->lib;
+ struct ieee80211_conf *conf = &rt2x00dev->hw->conf;
+ struct interface *intf = &rt2x00dev->interface;
int retval;
NOTICE(rt2x00dev, "Waking up.\n");
@@ -1095,10 +1098,27 @@ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Configure the device to the original state.
+ */
+ lib->config_type(rt2x00dev, intf->type);
+ lib->config_promisc(rt2x00dev, test_bit(INTERFACE_ENABLED_PROMISC,
+ &rt2x00dev->flags));
+ lib->config_bssid(rt2x00dev, intf->bssid);
+ lib->config_phymode(rt2x00dev, conf->phymode);
+ lib->config_channel(rt2x00dev, conf->channel_val,
+ conf->channel, conf->power_level);
+ lib->config_antenna(rt2x00dev, conf->antenna_sel_tx,
+ conf->antenna_sel_rx);
+ lib->config_duration(rt2x00dev,
+ (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME),
+ conf->beacon_int);
+ lib->reset_tuner(rt2x00dev);
+
+ /*
* We only need to continue when in Master or Ad-hoc mode.
*/
- if (rt2x00dev->interface.type != IEEE80211_IF_TYPE_AP &&
- rt2x00dev->interface.type != IEEE80211_IF_TYPE_IBSS)
+ if (intf->type != IEEE80211_IF_TYPE_AP &&
+ intf->type != IEEE80211_IF_TYPE_IBSS)
return 0;
/*
--
1.5.2.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-31 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31 18:37 [PATCH 16/24] rt2x00: Call all configure handlers during resume Ivo van Doorn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).