Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ax25: Stop calling/abusing dev_rebuild_header

- 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>

authored by

Eric W. Biederman and committed by
David S. Miller
abb7b755 def67753

+2 -8
+2 -8
net/ax25/ax25_ip.c
··· 100 100 return -AX25_HEADER_LEN; /* Unfinished header */ 101 101 } 102 102 103 - static int ax25_rebuild_header(struct sk_buff *skb) 103 + static int ax25_neigh_xmit(struct sk_buff *skb) 104 104 { 105 105 struct sk_buff *ourskb; 106 106 unsigned char *bp = skb->data; ··· 224 224 225 225 if (dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL, 226 226 skb->len) < 0 && 227 - dev_rebuild_header(skb)) 227 + ax25_neigh_xmit(skb)); 228 228 return 0; 229 229 230 230 return dev_queue_xmit(skb); ··· 255 255 return -AX25_HEADER_LEN; 256 256 } 257 257 258 - static int ax25_rebuild_header(struct sk_buff *skb) 259 - { 260 - return 1; 261 - } 262 - 263 258 int ax25_neigh_construct(struct neighbour *neigh) 264 259 { 265 260 return 0; ··· 263 268 264 269 const struct header_ops ax25_header_ops = { 265 270 .create = ax25_hard_header, 266 - .rebuild = ax25_rebuild_header, 267 271 }; 268 272 269 273 EXPORT_SYMBOL(ax25_header_ops);