patch-2.1.15 linux/net/ax25/ax25_out.c

Next file: linux/net/ax25/ax25_subr.c
Previous file: linux/net/ax25/ax25_in.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.14/linux/net/ax25/ax25_out.c linux/net/ax25/ax25_out.c
@@ -99,19 +99,14 @@
 			if ((skbn = alloc_skb(mtu + 2 + frontlen, GFP_ATOMIC)) == NULL) {
 				restore_flags(flags);
 				printk(KERN_DEBUG "ax25_output: alloc_skb returned NULL\n");
-				if (skb_device_locked(skb))
-					skb_device_unlock(skb);
 				return;
 			}
 
-			skbn->sk   = skb->sk;
-			
 			if (skbn->sk)
-				atomic_add(skbn->truesize, &skbn->sk->wmem_alloc);
+				skb_set_owner_w(skbn, skb->sk);
 			
 			restore_flags(flags);
 			
-			skbn->free = 1;
 			skbn->arp  = 1;
 
 			len = (mtu > skb->len) ? skb->len : mtu;
@@ -140,7 +135,6 @@
 			skb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */
 		}
 		
-		skb->free = 1;
 		kfree_skb(skb, FREE_WRITE);
 	} else {
 		skb_queue_tail(&ax25->write_queue, skb);	  /* Throw it on the queue */
@@ -269,7 +263,6 @@
 
 	if (skb_headroom(skb) < size_ax25_addr(ax25->digipeat)) {
 		printk(KERN_CRIT "ax25_transmit_buffer: not enough room for digi-peaters\n");
-		skb->free = 1;
 		kfree_skb(skb, FREE_WRITE);
 		return;
 	}
@@ -278,8 +271,9 @@
 	build_ax25_addr(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus);
 
 	skb->arp = 1;
-
-	ax25_queue_xmit(skb, ax25->device, SOPRI_NORMAL);
+	skb->dev=ax25->device;
+	skb->priority=SOPRI_NORMAL;
+	ax25_queue_xmit(skb);
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov