[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
@@ -220,6 +220,14 @@ static __inline__ void ax25_cb_put(ax25_cb *ax25)
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned short ax25_type_trans(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
skb->dev = dev;
|
||||
skb->pkt_type = PACKET_HOST;
|
||||
skb->mac.raw = skb->data;
|
||||
return htons(ETH_P_AX25);
|
||||
}
|
||||
|
||||
/* af_ax25.c */
|
||||
extern struct hlist_head ax25_list;
|
||||
extern spinlock_t ax25_list_lock;
|
||||
|
Reference in New Issue
Block a user