Skip to content

Commit

Permalink
mac80211: refactor skb copy to failq in mesh_path_move_to_queue
Browse files Browse the repository at this point in the history
This seems a bit less awkward...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Aug 29, 2011
1 parent b38de31 commit 817a53d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/mac80211/mesh_pathtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath,

while (num_skbs--) {
skb = __skb_dequeue(&failq);
if (copy)
if (copy) {
cp_skb = skb_copy(skb, GFP_ATOMIC);
if (cp_skb)
__skb_queue_tail(&failq, cp_skb);
}

prepare_for_gate(skb, gate_mpath->dst, gate_mpath);
__skb_queue_tail(&gateq, skb);

if (copy && cp_skb)
__skb_queue_tail(&failq, cp_skb);
}

spin_lock_irqsave(&gate_mpath->frame_queue.lock, flags);
Expand Down

0 comments on commit 817a53d

Please sign in to comment.