Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / mac80211 / mesh_pathtbl.c
index 7fde32159fdcd1bc077bb9a071575b3920626a9c..f97d17cb073c0f0388e390cf6f8d4ffcbed06a5b 100644 (file)
@@ -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);