[AX25] Introduce ax25_type_trans
Replacing the open coded equivalents and making ax25 look more like a linux network protocol, i.e. more similar to inet. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3b2d59d1fc
commit
56cb515628
@@ -601,12 +601,10 @@ static void do_rxpacket(struct net_device *dev)
|
||||
bc->stats.rx_dropped++;
|
||||
return;
|
||||
}
|
||||
skb->dev = dev;
|
||||
cp = skb_put(skb, pktlen);
|
||||
*cp++ = 0; /* KISS kludge */
|
||||
memcpy(cp, bc->hdlcrx.buf, pktlen - 1);
|
||||
skb->protocol = htons(ETH_P_AX25);
|
||||
skb->mac.raw = skb->data;
|
||||
skb->protocol = ax25_type_trans(skb, dev);
|
||||
netif_rx(skb);
|
||||
dev->last_rx = jiffies;
|
||||
bc->stats.rx_packets++;
|
||||
|
||||
Reference in New Issue
Block a user