From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 16/24] rt2x00: Call all configure handlers during resume
Date: Tue, 31 Jul 2007 20:37:29 +0200 [thread overview]
Message-ID: <200707312037.29645.IvDoorn@gmail.com> (raw)
>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
reply other threads:[~2007-07-31 18:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707312037.29645.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rt2400-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).