summaryrefslogtreecommitdiff
path: root/target/linux/ramips/patches/116-hwnat-info-pos.patch
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-14 23:42:26 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-14 23:42:26 +0200
commitb395e3b40e026a437b7179b78f1beddf2d02a7bc (patch)
treef3118474a7af11fffb228915dcffd7f2580d26ee /target/linux/ramips/patches/116-hwnat-info-pos.patch
parente266de11dcd0b2d71c445b943bef2f50258fa314 (diff)
downloadmtk-20170518-b395e3b40e026a437b7179b78f1beddf2d02a7bc.zip
mtk-20170518-b395e3b40e026a437b7179b78f1beddf2d02a7bc.tar.gz
mtk-20170518-b395e3b40e026a437b7179b78f1beddf2d02a7bc.tar.bz2
target/linux/ramips: add all patches
Diffstat (limited to 'target/linux/ramips/patches/116-hwnat-info-pos.patch')
-rwxr-xr-xtarget/linux/ramips/patches/116-hwnat-info-pos.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/ramips/patches/116-hwnat-info-pos.patch b/target/linux/ramips/patches/116-hwnat-info-pos.patch
new file mode 100755
index 0000000..2cd6f27
--- /dev/null
+++ b/target/linux/ramips/patches/116-hwnat-info-pos.patch
@@ -0,0 +1,32 @@
+Index: linux-3.10.14/net/nat/hw_nat/ra_nat.h
+===================================================================
+--- linux-3.10.14.orig/net/nat/hw_nat/ra_nat.h
++++ linux-3.10.14/net/nat/hw_nat/ra_nat.h
+@@ -223,18 +223,12 @@ typedef struct {
+ #define FOE_MAGIC_PPE 0x7276
+
+ /* choose one of them to keep HNAT related information in somewhere. */
+-#if defined (CONFIG_SUPPORT_OPENWRT)
+-//#define HNAT_USE_HEADROOM
+-//#define HNAT_USE_TAILROOM
+-#define HNAT_USE_SKB_CB
+-#else
+ //#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) && defined (CONFIG_MT7621_ASIC)
+ //#define HNAT_USE_TAILROOM
+ //#else
+ #define HNAT_USE_HEADROOM
+ //#endif
+ //#define HNAT_USE_SKB_CB
+-#endif
+
+ #if defined (HNAT_USE_HEADROOM)
+ #define IS_SPACE_AVAILABLED(skb) ((skb_headroom(skb) >= FOE_INFO_LEN) ? 1 : 0)
+@@ -287,7 +281,7 @@ typedef struct {
+
+ #elif defined (HNAT_USE_SKB_CB)
+ //change the position of skb_CB if necessary
+-#define CB_OFFSET 32
++#define CB_OFFSET 42
+ #define IS_SPACE_AVAILABLED(skb) 1
+ #define FOE_INFO_START_ADDR(skb) (skb->cb + CB_OFFSET)
+