Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159280
b: refs/heads/master
c: a7bc376
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 29, 2009
1 parent c4e1607 commit 1e81b04
Show file tree
Hide file tree
Showing 3 changed files with 19 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: f9d6b402603a63b5e5b56bd7a79fa72a818be55b
refs/heads/master: a7bc376c858e0e724b8cb2db09b6874562d377ca
5 changes: 5 additions & 0 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,11 @@ void ieee80211_tx_pending(unsigned long data)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_sub_if_data *sdata;

if (WARN_ON(!info->control.vif)) {
kfree_skb(skb);
continue;
}

sdata = vif_to_sdata(info->control.vif);
dev_hold(sdata->dev);
spin_unlock_irqrestore(&local->queue_stop_reason_lock,
Expand Down
13 changes: 13 additions & 0 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ void ieee80211_add_pending_skb(struct ieee80211_local *local,
struct ieee80211_hw *hw = &local->hw;
unsigned long flags;
int queue = skb_get_queue_mapping(skb);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

if (WARN_ON(!info->control.vif)) {
kfree(skb);
return;
}

spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
__ieee80211_stop_queue(hw, queue, IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
Expand All @@ -358,6 +364,13 @@ int ieee80211_add_pending_skbs(struct ieee80211_local *local,
IEEE80211_QUEUE_STOP_REASON_SKB_ADD);

while ((skb = skb_dequeue(skbs))) {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

if (WARN_ON(!info->control.vif)) {
kfree(skb);
continue;
}

ret++;
queue = skb_get_queue_mapping(skb);
__skb_queue_tail(&local->pending[queue], skb);
Expand Down

0 comments on commit 1e81b04

Please sign in to comment.