summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-04-22 03:46:56 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-04-22 03:46:56 +0400
commit29c4be51e3fd52205d848248d38924941f22ca0e (patch)
tree3164d78c43159c242b632ce15882c47e69d28c73
parent208a6dfbd651f3a16c635678a731b419d3d9646f (diff)
downloadlinux-29c4be51e3fd52205d848248d38924941f22ca0e.tar.xz
[AX25]: make ax25_queue_xmit a net_device parameter
I.e. not using skb->dev as a way to pass the parameter used to fill... skb->dev :-) Also to get the _type_trans open coded sequence grouped, next changesets will introduce ax25_type_trans. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/ax25.h2
-rw-r--r--net/ax25/af_ax25.c4
-rw-r--r--net/ax25/ax25_ip.c4
-rw-r--r--net/ax25/ax25_out.c8
-rw-r--r--net/ax25/ax25_subr.c4
5 files changed, 7 insertions, 15 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index fb95ecb6fe03..875edbba396d 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -305,7 +305,7 @@ extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_addr
extern void ax25_output(ax25_cb *, int, struct sk_buff *);
extern void ax25_kick(ax25_cb *);
extern void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int);
-extern void ax25_queue_xmit(struct sk_buff *);
+extern void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev);
extern int ax25_check_iframes_acked(ax25_cb *, unsigned short);
/* ax25_route.c */
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 33b1a3763027..707097deac3d 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1587,9 +1587,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
*asmptr = AX25_UI;
/* Datagram frames go straight out of the door as UI */
- skb->dev = ax25->ax25_dev->dev;
-
- ax25_queue_xmit(skb);
+ ax25_queue_xmit(skb, ax25->ax25_dev->dev);
err = len;
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 04d711344d55..bba0173e2d65 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -199,9 +199,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
skb = ourskb;
}
- skb->dev = dev;
-
- ax25_queue_xmit(skb);
+ ax25_queue_xmit(skb, dev);
put:
ax25_put_route(route);
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 3475a3ac9343..94557b1a1fa2 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -340,21 +340,19 @@ void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25_addr_build(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus);
- skb->dev = ax25->ax25_dev->dev;
-
- ax25_queue_xmit(skb);
+ ax25_queue_xmit(skb, ax25->ax25_dev->dev);
}
/*
* A small shim to dev_queue_xmit to add the KISS control byte, and do
* any packet forwarding in operation.
*/
-void ax25_queue_xmit(struct sk_buff *skb)
+void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned char *ptr;
skb->protocol = htons(ETH_P_AX25);
- skb->dev = ax25_fwd_dev(skb->dev);
+ skb->dev = ax25_fwd_dev(dev);
ptr = skb_push(skb, 1);
*ptr = 0x00; /* KISS */
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index 8cf72707af8b..99694b57f6f5 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -220,9 +220,7 @@ void ax25_return_dm(struct net_device *dev, ax25_address *src, ax25_address *des
dptr = skb_push(skb, ax25_addr_size(digi));
dptr += ax25_addr_build(dptr, dest, src, &retdigi, AX25_RESPONSE, AX25_MODULUS);
- skb->dev = dev;
-
- ax25_queue_xmit(skb);
+ ax25_queue_xmit(skb, dev);
}
/*