Skip to content

Commit

Permalink
ax25: Stop calling/abusing dev_rebuild_header
Browse files Browse the repository at this point in the history
- Rename ax25_rebuild_header to ax25_neigh_xmit and call it from
  ax25_neigh_output directly.  The rename is to make it clear
  that this is not a rebuild_header operation.

- Remove ax25_rebuild_header from ax25_header_ops.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-hams@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Mar 2, 2015
1 parent def6775 commit abb7b75
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions net/ax25/ax25_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
return -AX25_HEADER_LEN; /* Unfinished header */
}

static int ax25_rebuild_header(struct sk_buff *skb)
static int ax25_neigh_xmit(struct sk_buff *skb)
{
struct sk_buff *ourskb;
unsigned char *bp = skb->data;
Expand Down Expand Up @@ -224,7 +224,7 @@ static int ax25_neigh_output(struct neighbour *neigh, struct sk_buff *skb)

if (dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL,
skb->len) < 0 &&
dev_rebuild_header(skb))
ax25_neigh_xmit(skb));
return 0;

return dev_queue_xmit(skb);
Expand Down Expand Up @@ -255,11 +255,6 @@ static int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
return -AX25_HEADER_LEN;
}

static int ax25_rebuild_header(struct sk_buff *skb)
{
return 1;
}

int ax25_neigh_construct(struct neighbour *neigh)
{
return 0;
Expand All @@ -268,7 +263,6 @@ int ax25_neigh_construct(struct neighbour *neigh)

const struct header_ops ax25_header_ops = {
.create = ax25_hard_header,
.rebuild = ax25_rebuild_header,
};

EXPORT_SYMBOL(ax25_header_ops);
Expand Down

0 comments on commit abb7b75

Please sign in to comment.