aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-01-16 09:14:57 +0800
committerAlex Shi <alex.shi@linaro.org>2014-01-16 09:14:57 +0800
commitc8e95ac690b37fd1a469c685d716e24abae26992 (patch)
tree62593c6b574ff9cf08cabbcb7d4fc943b5377718 /include/linux
parent3dad43721441f1cf8ed1a3a975bc939007686589 (diff)
parent1071ea6e68ead40df739b223e9013d99c23c19ab (diff)
Merge remote-tracking branch 'stable/linux-3.10.y' 3.10.27 into linux-linaro-lsk
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/net.h2
-rw-r--r--include/linux/netdevice.h9
-rw-r--r--include/linux/skbuff.h5
3 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 0c4ae5d94de..65545ac6fb9 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -180,7 +180,7 @@ struct proto_ops {
int offset, size_t size, int flags);
ssize_t (*splice_read)(struct socket *sock, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len, unsigned int flags);
- void (*set_peek_off)(struct sock *sk, int val);
+ int (*set_peek_off)(struct sock *sk, int val);
};
#define DECLARE_SOCKADDR(type, dst, src) \
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 96e4c21e15e..abf7756eaf9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1772,6 +1772,15 @@ static inline int dev_parse_header(const struct sk_buff *skb,
return dev->header_ops->parse(skb, haddr);
}
+static inline int dev_rebuild_header(struct sk_buff *skb)
+{
+ const struct net_device *dev = skb->dev;
+
+ if (!dev->header_ops || !dev->header_ops->rebuild)
+ return 0;
+ return dev->header_ops->rebuild(skb);
+}
+
typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
static inline int unregister_gifconf(unsigned int family)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 74db47ec09e..ded45ec6b22 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1741,6 +1741,11 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
}
#endif /* NET_SKBUFF_DATA_USES_OFFSET */
+static inline void skb_pop_mac_header(struct sk_buff *skb)
+{
+ skb->mac_header = skb->network_header;
+}
+
static inline void skb_probe_transport_header(struct sk_buff *skb,
const int offset_hint)
{