diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-23 22:01:47 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-23 22:01:47 (GMT) |
commit | b5b5150977cdfb7173f4468ccd30f9b4a981b902 (patch) | |
tree | 27d477910d630a027c0b447a58ae61b1c57dbca5 /net/mac80211/util.c | |
parent | dcfcb256cc23c4436691b0fe677275306699d6a1 (diff) | |
parent | 45ba564d765d6165330e9bb14a197bdd348c114d (diff) | |
download | linux-fsl-qoriq-b5b5150977cdfb7173f4468ccd30f9b4a981b902.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index aeb65b3..e6c08da 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -520,9 +520,9 @@ EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); */ static bool ieee80211_can_queue_work(struct ieee80211_local *local) { - if (WARN(local->suspended, "queueing ieee80211 work while " - "going to suspend\n")) - return false; + if (WARN(local->suspended && !local->resuming, + "queueing ieee80211 work while going to suspend\n")) + return false; return true; } @@ -1025,13 +1025,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) struct sta_info *sta; unsigned long flags; int res; - bool from_suspend = local->suspended; - /* - * We're going to start the hardware, at that point - * we are no longer suspended and can RX frames. - */ - local->suspended = false; + if (local->suspended) + local->resuming = true; /* restart hardware */ if (local->open_count) { @@ -1129,11 +1125,14 @@ int ieee80211_reconfig(struct ieee80211_local *local) * If this is for hw restart things are still running. * We may want to change that later, however. */ - if (!from_suspend) + if (!local->suspended) return 0; #ifdef CONFIG_PM + /* first set suspended false, then resuming */ local->suspended = false; + mb(); + local->resuming = false; list_for_each_entry(sdata, &local->interfaces, list) { switch(sdata->vif.type) { |