From 2c2f7d967dd504fb9aa2d3cb38b963f046243a44 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 20 Jun 2012 20:11:33 +0200 Subject: [PATCH] --- yaml --- r: 314832 b: refs/heads/master c: 0f6b3f597daab2254614e2773e322e73fb1b6f4b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/mac80211/cfg.c | 3 ++- trunk/net/mac80211/offchannel.c | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index eecc6b536995..a0c686af2261 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3bfda62c50b0a4b118dcfce36686508ca2892292 +refs/heads/master: 0f6b3f597daab2254614e2773e322e73fb1b6f4b diff --git a/trunk/net/mac80211/cfg.c b/trunk/net/mac80211/cfg.c index a6abcd473434..03aff23c70fd 100644 --- a/trunk/net/mac80211/cfg.c +++ b/trunk/net/mac80211/cfg.c @@ -2362,7 +2362,8 @@ static int ieee80211_cancel_roc(struct ieee80211_local *local, list_del(&found->list); - ieee80211_start_next_roc(local); + if (found->started) + ieee80211_start_next_roc(local); mutex_unlock(&local->mtx); ieee80211_roc_notify_destroy(found); diff --git a/trunk/net/mac80211/offchannel.c b/trunk/net/mac80211/offchannel.c index febce7fb7bb1..7f93626ddc61 100644 --- a/trunk/net/mac80211/offchannel.c +++ b/trunk/net/mac80211/offchannel.c @@ -262,6 +262,9 @@ void ieee80211_start_next_roc(struct ieee80211_local *local) roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, list); + if (WARN_ON_ONCE(roc->started)) + return; + if (local->ops->remain_on_channel) { int ret, duration = roc->duration; @@ -377,7 +380,8 @@ void ieee80211_sw_roc_work(struct work_struct *work) ieee80211_recalc_idle(local); - ieee80211_start_next_roc(local); + if (roc->started) + ieee80211_start_next_roc(local); } out_unlock: