aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-26 10:13:06 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 04:33:40 -0400
commit50febf6a1a9270b3558671864a27b23f671598ab (patch)
treeba700ee435487e31857d165f836ea084983d10cb /net/mac80211/offchannel.c
parent8a2fbedcdc9bec1d613961f97cb87d6b71a66076 (diff)
mac80211: use a counter for remain-on-channel cookie
Instead of using the pointer which can be re-used fairly quickly due to allocator patterns and then makes debugging difficult, maintain a counter and use its value. Since it's a 64-bit value it can't really wrap, but catch that case anyway since it most likely points to a bug somewhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r--net/mac80211/offchannel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index c349f3aaf59e..0cd42d52880c 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -204,7 +204,7 @@ void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc)
204 roc->frame = NULL; 204 roc->frame = NULL;
205 } 205 }
206 } else { 206 } else {
207 cfg80211_ready_on_channel(&roc->sdata->wdev, (unsigned long)roc, 207 cfg80211_ready_on_channel(&roc->sdata->wdev, roc->cookie,
208 roc->chan, roc->chan_type, 208 roc->chan, roc->chan_type,
209 roc->req_duration, GFP_KERNEL); 209 roc->req_duration, GFP_KERNEL);
210 } 210 }
@@ -320,9 +320,8 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
320 320
321 if (!roc->mgmt_tx_cookie) 321 if (!roc->mgmt_tx_cookie)
322 cfg80211_remain_on_channel_expired(&roc->sdata->wdev, 322 cfg80211_remain_on_channel_expired(&roc->sdata->wdev,
323 (unsigned long)roc, 323 roc->cookie, roc->chan,
324 roc->chan, roc->chan_type, 324 roc->chan_type, GFP_KERNEL);
325 GFP_KERNEL);
326 325
327 list_for_each_entry_safe(dep, tmp, &roc->dependents, list) 326 list_for_each_entry_safe(dep, tmp, &roc->dependents, list)
328 ieee80211_roc_notify_destroy(dep); 327 ieee80211_roc_notify_destroy(dep);