From: Stanislaw Gruszka <sgruszka@redhat.com>
To: ilw@linux.intel.com
Cc: linux-wireless@vger.kernel.org
Subject: [RFC 2/5] Revert "mac80211: cleanup suspend/resume on ibss mode"
Date: Fri, 13 Sep 2013 12:36:05 +0200 [thread overview]
Message-ID: <1379068568-27552-3-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1379068568-27552-1-git-send-email-sgruszka@redhat.com>
This reverts commit a61829437e68c8b2036cf5005ed0e875451c9120.
---
net/mac80211/ibss.c | 29 ++++++++++++++++++++++++++++-
net/mac80211/ieee80211_i.h | 4 ++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index a12afe7..91d1b29 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1155,9 +1155,36 @@ static void ieee80211_ibss_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct ieee80211_local *local = sdata->local;
- ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+ if (local->quiescing) {
+ ifibss->timer_running = true;
+ return;
+ }
+
+ ieee80211_queue_work(&local->hw, &sdata->work);
+}
+
+#ifdef CONFIG_PM
+void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+
+ if (del_timer_sync(&ifibss->timer))
+ ifibss->timer_running = true;
+}
+
+void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+
+ if (ifibss->timer_running) {
+ add_timer(&ifibss->timer);
+ ifibss->timer_running = false;
+ }
}
+#endif
void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
{
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4b7ef89..96ac8f8 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -492,6 +492,8 @@ struct ieee80211_if_ibss {
u32 basic_rates;
+ bool timer_running;
+
bool fixed_bssid;
bool fixed_channel;
bool privacy;
@@ -1329,6 +1331,8 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
struct cfg80211_ibss_params *params);
int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata);
void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata);
void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
--
1.8.3.1
next prev parent reply other threads:[~2013-09-13 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 10:36 [RFC 0/5] mac80211/iwlwifi: quiesce before restart hw Stanislaw Gruszka
2013-09-13 10:36 ` [RFC 1/5] Revert "mac80211: cleanup suspend/resume on mesh mode" Stanislaw Gruszka
2013-09-13 10:36 ` Stanislaw Gruszka [this message]
2013-09-13 10:36 ` [RFC 3/5] Revert "mac80211: cleanup suspend/resume on managed mode" Stanislaw Gruszka
2013-09-13 10:36 ` [RFC 4/5] mac80211: add generic quiesce procedure Stanislaw Gruszka
2013-09-13 11:13 ` Johannes Berg
2013-09-13 11:26 ` Stanislaw Gruszka
2013-09-13 10:36 ` [RFC 5/5] iwlwifi: quiesce mac80211 before fw restart Stanislaw Gruszka
2013-09-15 8:31 ` [Ilw] [RFC 0/5] mac80211/iwlwifi: quiesce before restart hw Grumbach, Emmanuel
2013-09-16 14:10 ` Stanislaw Gruszka
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=1379068568-27552-3-git-send-email-sgruszka@redhat.com \
--to=sgruszka@redhat.com \
--cc=ilw@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
/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).