diff options
author | Hauke Mehrtens | 2011-08-02 16:14:19 -0500 |
---|---|---|
committer | Luis R. Rodriguez | 2011-08-02 16:26:41 -0500 |
commit | bc0a7c4993401d38905130c11017669c71a9ec82 (patch) | |
tree | e5463046b175302566d918f1b5841322eab610a2 | |
parent | 468b47d64ce2d71e30f2029d54336a87d25c9ee6 (diff) | |
download | compat-bc0a7c4993401d38905130c11017669c71a9ec82.tar.gz compat-bc0a7c4993401d38905130c11017669c71a9ec82.tar.xz compat-bc0a7c4993401d38905130c11017669c71a9ec82.zip |
compat: add skb_walk_frags() and skb_has_frag_list()
These functions are needed for ./net/bluetooth/l2cap_core.c and ./net/bluetooth/af_bluetooth.c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | include/linux/compat-2.6.31.h | 3 | ||||
-rw-r--r-- | include/linux/compat-2.6.37.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/compat-2.6.31.h b/include/linux/compat-2.6.31.h index d2e0f01..ce944bb 100644 --- a/include/linux/compat-2.6.31.h +++ b/include/linux/compat-2.6.31.h | |||
@@ -199,6 +199,9 @@ void compat_synchronize_threaded_irq(struct compat_threaded_irq *comp) | |||
199 | #define list_entry_rcu(ptr, type, member) \ | 199 | #define list_entry_rcu(ptr, type, member) \ |
200 | container_of(rcu_dereference(ptr), type, member) | 200 | container_of(rcu_dereference(ptr), type, member) |
201 | 201 | ||
202 | #define skb_walk_frags(skb, iter) \ | ||
203 | for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) | ||
204 | |||
202 | #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */ | 205 | #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */ |
203 | 206 | ||
204 | #endif /* LINUX_26_31_COMPAT_H */ | 207 | #endif /* LINUX_26_31_COMPAT_H */ |
diff --git a/include/linux/compat-2.6.37.h b/include/linux/compat-2.6.37.h index e0dd6b4..d375746 100644 --- a/include/linux/compat-2.6.37.h +++ b/include/linux/compat-2.6.37.h | |||
@@ -124,6 +124,11 @@ extern void *vzalloc(unsigned long size); | |||
124 | #define RCU_INIT_POINTER(p, v) \ | 124 | #define RCU_INIT_POINTER(p, v) \ |
125 | p = (typeof(*v) __force __rcu *)(v) | 125 | p = (typeof(*v) __force __rcu *)(v) |
126 | 126 | ||
127 | static inline bool skb_has_frag_list(const struct sk_buff *skb) | ||
128 | { | ||
129 | return skb_shinfo(skb)->frag_list != NULL; | ||
130 | } | ||
131 | |||
127 | #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */ | 132 | #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */ |
128 | 133 | ||
129 | #endif /* LINUX_26_37_COMPAT_H */ | 134 | #endif /* LINUX_26_37_COMPAT_H */ |