summaryrefslogtreecommitdiff
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-26 14:13:06 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 08:33:40 (GMT)
commit50febf6a1a9270b3558671864a27b23f671598ab (patch)
treeba700ee435487e31857d165f836ea084983d10cb /net/mac80211/offchannel.c
parent8a2fbedcdc9bec1d613961f97cb87d6b71a66076 (diff)
downloadlinux-50febf6a1a9270b3558671864a27b23f671598ab.tar.xz
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 c349f3a..0cd42d5 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)
roc->frame = NULL;
}
} else {
- cfg80211_ready_on_channel(&roc->sdata->wdev, (unsigned long)roc,
+ cfg80211_ready_on_channel(&roc->sdata->wdev, roc->cookie,
roc->chan, roc->chan_type,
roc->req_duration, GFP_KERNEL);
}
@@ -320,9 +320,8 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
if (!roc->mgmt_tx_cookie)
cfg80211_remain_on_channel_expired(&roc->sdata->wdev,
- (unsigned long)roc,
- roc->chan, roc->chan_type,
- GFP_KERNEL);
+ roc->cookie, roc->chan,
+ roc->chan_type, GFP_KERNEL);
list_for_each_entry_safe(dep, tmp, &roc->dependents, list)
ieee80211_roc_notify_destroy(dep);