Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310728
b: refs/heads/master
c: 71ecfa1
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 4, 2012
1 parent 35b8102 commit e7bd1b8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ae2fc25a1289a84ca726541e3356ba5bcb7f7fe
refs/heads/master: 71ecfa1893034eeb1c93e02e22ee2ad26d080858
12 changes: 12 additions & 0 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,18 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
ieee80211_configure_filter(local);
break;
default:
mutex_lock(&local->mtx);
if (local->hw_roc_dev == sdata->dev &&
local->hw_roc_channel) {
/* ignore return value since this is racy */
drv_cancel_remain_on_channel(local);
ieee80211_queue_work(&local->hw, &local->hw_roc_done);
}
mutex_unlock(&local->mtx);

flush_work(&local->hw_roc_start);
flush_work(&local->hw_roc_done);

flush_work(&sdata->work);
/*
* When we get here, the interface is marked down.
Expand Down
16 changes: 16 additions & 0 deletions trunk/net/mac80211/offchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,22 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
return;
}

/* was never transmitted */
if (local->hw_roc_skb) {
u64 cookie;

cookie = local->hw_roc_cookie ^ 2;

cfg80211_mgmt_tx_status(local->hw_roc_dev, cookie,
local->hw_roc_skb->data,
local->hw_roc_skb->len, false,
GFP_KERNEL);

kfree_skb(local->hw_roc_skb);
local->hw_roc_skb = NULL;
local->hw_roc_skb_for_status = NULL;
}

if (!local->hw_roc_for_tx)
cfg80211_remain_on_channel_expired(local->hw_roc_dev,
local->hw_roc_cookie,
Expand Down

0 comments on commit e7bd1b8

Please sign in to comment.