mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[SK_BUFF]: Introduce skb_set_network_header
For the cases where the network header is being set to a offset from skb->data. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
878c814500
commit
c14d2450cb
5 changed files with 15 additions and 7 deletions
|
|
@ -148,7 +148,8 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
|
|||
|
||||
if (ka9qfrag == 1) {
|
||||
skb_reserve(skbn, frontlen + 2);
|
||||
skbn->nh.raw = skbn->data + skb_network_offset(skb);
|
||||
skb_set_network_header(skbn,
|
||||
skb_network_offset(skb));
|
||||
memcpy(skb_put(skbn, len), skb->data, len);
|
||||
p = skb_push(skbn, 2);
|
||||
|
||||
|
|
@ -161,7 +162,8 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
|
|||
}
|
||||
} else {
|
||||
skb_reserve(skbn, frontlen + 1);
|
||||
skbn->nh.raw = skbn->data + skb_network_offset(skb);
|
||||
skb_set_network_header(skbn,
|
||||
skb_network_offset(skb));
|
||||
memcpy(skb_put(skbn, len), skb->data, len);
|
||||
p = skb_push(skbn, 1);
|
||||
*p = AX25_P_TEXT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue