diff options
| author | Olof Johansson <olof@lixom.net> | 2012-03-08 09:27:07 -0800 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-03-08 09:27:07 -0800 |
| commit | a58f67e70a6cad021ceebd1c8919b898dd5d5de3 (patch) | |
| tree | 78cb630cb31a8cbec17463f9acc0f766707c232f /include/linux/skbuff.h | |
| parent | 4c6c826b22da9f6408b6bc6939a92aa0be838488 (diff) | |
| parent | 46e446db4fb2cdb2f1bc69d3981fa23738a42835 (diff) | |
Merge branch 'dt' of git://github.com/hzhuang1/linux into next/dt
* 'dt' of git://github.com/hzhuang1/linux: (6 commits)
Document: devicetree: add OF documents for arch-mmp
ARM: dts: append DTS file of pxa168
ARM: mmp: append OF support on pxa168
ARM: mmp: enable rtc clk in pxa168
i2c: pxa: add OF support
serial: pxa: add OF support
(plus update to v3.3-rc6)
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 50db9b04a55..ae86adee374 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1465,6 +1465,16 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) } #endif /* NET_SKBUFF_DATA_USES_OFFSET */ +static inline void skb_mac_header_rebuild(struct sk_buff *skb) +{ + if (skb_mac_header_was_set(skb)) { + const unsigned char *old_mac = skb_mac_header(skb); + + skb_set_mac_header(skb, -skb->mac_len); + memmove(skb_mac_header(skb), old_mac, skb->mac_len); + } +} + static inline int skb_checksum_start_offset(const struct sk_buff *skb) { return skb->csum_start - skb_headroom(skb); |
