linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: htl10@users.sourceforge.net,
	Alan Stern <stern@rowland.harvard.edu>,
	Bob Copeland <me@bobcopeland.com>,
	linux-wireless@vger.kernel.org,
	linux-pm@lists.linux-foundation.org,
	USB list <linux-usb@vger.kernel.org>,
	Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Subject: Re: [linux-pm] rtl8187 usb wifi adaptor causes suspend hang
Date: Wed, 31 Dec 2008 17:00:05 -0600	[thread overview]
Message-ID: <495BF975.7030603@lwfinger.net> (raw)
In-Reply-To: <495BC8F9.4040203@lwfinger.net>

Here is a second try at a suspend/resume patch for rtl8187. This one
also seems a bit too easy; however, it did work for me, at least for
STD. I now realize that my machine didn't power off in my previous
test. This time I manually turned it off before restarting. My
computer still doesn't STR, thus that was not tested.

Larry

=============





Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1464,6 +1464,28 @@ static int __devinit rtl8187_probe(struc
 	return err;
 }

+#ifdef CONFIG_PM
+
+static int rtl8187_suspend(struct usb_interface *intf, pm_message_t
state)
+{
+	struct ieee80211_hw *dev = usb_get_intfdata(intf);
+
+	rtl8187_stop(dev);
+
+	return 0;
+}
+
+static int rtl8187_resume(struct usb_interface *intf)
+{
+	struct ieee80211_hw *dev = usb_get_intfdata(intf);
+
+	rtl8187_start(dev);
+
+	return 0;
+}
+
+#endif /* CONFIG_PM */
+
 static void __devexit rtl8187_disconnect(struct usb_interface *intf)
 {
 	struct ieee80211_hw *dev = usb_get_intfdata(intf);
@@ -1484,6 +1506,10 @@ static struct usb_driver rtl8187_driver
 	.id_table	= rtl8187_table,
 	.probe		= rtl8187_probe,
 	.disconnect	= __devexit_p(rtl8187_disconnect),
+#ifdef CONFIG_PM
+	.suspend	= rtl8187_suspend,
+	.resume		= rtl8187_resume,
+#endif /* CONFIG_PM */
 };

 static int __init rtl8187_init(void)


  reply	other threads:[~2008-12-31 23:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 10:51 rtl8187 usb wifi adaptor causes suspend hang Alan Jenkins
2008-12-30 13:10 ` Alan Jenkins
2008-12-30 15:45   ` [linux-pm] " Alan Stern
2008-12-30 16:45     ` Bob Copeland
2008-12-30 16:48       ` Alan Jenkins
2008-12-30 17:25       ` Alan Stern
2008-12-30 17:31         ` Alan Jenkins
2008-12-30 17:52           ` Larry Finger
2008-12-30 18:05             ` Hin-Tak Leung
2008-12-30 18:05             ` Oliver Neukum
2008-12-30 18:09               ` Larry Finger
2008-12-31  0:59             ` Hin-Tak Leung
2008-12-31 14:33               ` Alan Jenkins
2008-12-31 15:57                 ` Bob Copeland
2008-12-31 17:10                   ` Alan Jenkins
2008-12-31 17:16                 ` Oliver Neukum
2008-12-31 19:33                 ` Larry Finger
2008-12-31 23:00                   ` Larry Finger [this message]
2008-12-31 23:26                     ` Bob Copeland
2009-01-01  0:16                     ` Alan Stern
2009-01-01  6:06                   ` Hin-Tak Leung
2009-01-01 22:25                     ` Alan Stern
2009-01-01 23:42                       ` Hin-Tak Leung
2009-01-02  2:24                         ` Alan Stern
2009-01-01  6:18                 ` Hin-Tak Leung
2009-01-01 13:07                   ` Alan Jenkins
2009-01-01 13:40                     ` Stefanik Gábor
2009-01-01 14:39                       ` Hin-Tak Leung
2009-01-01 16:38                         ` Larry Finger

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=495BF975.7030603@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=alan-jenkins@tuffmail.co.uk \
    --cc=herton@mandriva.com.br \
    --cc=htl10@users.sourceforge.net \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.com \
    --cc=stern@rowland.harvard.edu \
    /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).