diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 1309bb9c97be197c90b2b2f454487cb592d2d3a2..d0705f260178972b08d20084a27652083fe52026 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1886,7 +1886,7 @@ ieee80211_offchan_tx_done(struct ieee80211_work *wk, struct sk_buff *skb) * so in that case userspace will have to deal with it. */ - if (wk->offchan_tx.wait && wk->offchan_tx.frame) + if (wk->offchan_tx.wait && !wk->offchan_tx.status) cfg80211_mgmt_tx_status(wk->sdata->dev, (unsigned long) wk->offchan_tx.frame, wk->ie, wk->ie_len, false, GFP_KERNEL); diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 9fa5f8a674bc00ec1b40fe4e58942ef6386912d5..810d7b6a5567f7d63a8a7bfc22e9cf5138b89c5f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -346,6 +346,7 @@ struct ieee80211_work { struct { struct sk_buff *frame; u32 wait; + bool status; } offchan_tx; }; diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 864a9c3bcf4688b08cb25993b9f5f808080cc040..f3d710705e763d0bce555335af886dca5cf43ecd 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -429,7 +429,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) continue; if (wk->offchan_tx.frame != skb) continue; - wk->offchan_tx.frame = NULL; + wk->offchan_tx.status = true; break; } rcu_read_unlock(); diff --git a/net/mac80211/work.c b/net/mac80211/work.c index af374fab1a12b247ccd40dea0c2a8994dd2dc732..94472eb34d76452acfddfb624eba7e44f46e3445 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c @@ -577,7 +577,7 @@ ieee80211_offchannel_tx(struct ieee80211_work *wk) /* * After this, offchan_tx.frame remains but now is no * longer a valid pointer -- we still need it as the - * cookie for canceling this work. + * cookie for canceling this work/status matching. */ ieee80211_tx_skb(wk->sdata, wk->offchan_tx.frame);