提交 7f9f78ab 编写于 作者: N Nicolas Cavallari 提交者: Johannes Berg

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: NNicolas Cavallari <cavallar@lri.fr>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 4290cb4b
......@@ -2493,6 +2493,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
skb->dev = sdata->dev;
if (!need_offchan) {
*cookie = (unsigned long) skb;
ieee80211_tx_skb(sdata, skb);
ret = 0;
goto out_unlock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册