summaryrefslogtreecommitdiff
path: root/include/net/checksum.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/checksum.h')
-rw-r--r--include/net/checksum.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h
index 5b96d5bd6e54..5218041e5c8f 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -180,4 +180,8 @@ static inline void remcsum_unadjust(__sum16 *psum, __wsum delta)
*psum = csum_fold(csum_sub(delta, (__force __wsum)*psum));
}
+static inline __wsum wsum_negate(__wsum val)
+{
+ return (__force __wsum)-((__force u32)val);
+}
#endif