aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorNicolas Cavallari <Nicolas.Cavallari@lri.fr>2012-07-16 12:36:52 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-17 05:22:42 -0400
commit7f9f78ab96ebdb3533acd791efe485b25995947e (patch)
tree82d4c54d095ba8107e3841036e50e325254dd39d /net/mac80211/cfg.c
parent4290cb4bf212112e3d6f860e25f000ca8a1ca6a4 (diff)
mac80211: fix tx-mgmt cookie value being left uninitialized
commit "mac80211: unify SW/offload remain-on-channel" moved the cookie assignment from ieee80211_mgmt_tx() to ieee80211_start_roc_work(). But the latter is only called where offchannel is needed. If offchannel isn't needed/used, a uninitialized cookie value would be returned to userspace. This patch sets the cookie value when offchannel isn't used. Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 10dd9631e4da..efbbdc8a2be0 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2493,6 +2493,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
2493 skb->dev = sdata->dev; 2493 skb->dev = sdata->dev;
2494 2494
2495 if (!need_offchan) { 2495 if (!need_offchan) {
2496 *cookie = (unsigned long) skb;
2496 ieee80211_tx_skb(sdata, skb); 2497 ieee80211_tx_skb(sdata, skb);
2497 ret = 0; 2498 ret = 0;
2498 goto out_unlock; 2499 goto out_unlock;