mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 17:15:08 +00:00
patches-siflower-18.x: update siflower SDK to 6a62b16
This commit is contained in:
parent
ac51933e8b
commit
d475ecde47
@ -2,7 +2,7 @@ repo: https://github.com/Siflower/1806_SDK.git
|
|||||||
branch: release
|
branch: release
|
||||||
git_clone_dir: openwrt-18.06/siflower
|
git_clone_dir: openwrt-18.06/siflower
|
||||||
openwrt_root_dir: openwrt-18.06/siflower/openwrt-18.06
|
openwrt_root_dir: openwrt-18.06/siflower/openwrt-18.06
|
||||||
revision: 3279b2bb4b4d9cb6a5f1755103d724d6bd5ba8f9
|
revision: 6a62b16b49008c51092386d058f843b005a62b7f
|
||||||
|
|
||||||
patch_folders:
|
patch_folders:
|
||||||
- patches-siflower-18.x/
|
- patches-siflower-18.x/
|
||||||
|
|||||||
@ -1,28 +1,17 @@
|
|||||||
From 362fe4ea55bcbabca707a103c1a2ecb3a559dccf Mon Sep 17 00:00:00 2001
|
From 97778894bc310687d1dfd4ccdb46bb3cbe77143c Mon Sep 17 00:00:00 2001
|
||||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||||
Date: Mon, 23 Aug 2021 17:26:41 +0800
|
Date: Mon, 15 Nov 2021 10:08:38 +0800
|
||||||
Subject: [PATCH] fix: disable hwnat on vpn or tethering
|
Subject: [PATCH] fix: disable hwnat on vpn or tethering
|
||||||
|
|
||||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
|
||||||
---
|
---
|
||||||
.../linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c | 14 ++++++++++++++
|
.../linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c | 14 ++++++++++++++
|
||||||
1 file changed, 14 insertions(+)
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
diff --git a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||||
index e2a7fce..eab348e 100644
|
index be92545..fced9a3 100644
|
||||||
--- a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
--- a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||||
+++ b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
+++ b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||||
@@ -203,6 +203,9 @@ xt_flowoffload_skip(struct sk_buff *skb, int family)
|
@@ -531,6 +531,14 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (family == NFPROTO_IPV6)
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -528,6 +531,11 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
|
||||||
if (xt_flowoffload_skip(skb, xt_family(par)))
|
if (xt_flowoffload_skip(skb, xt_family(par)))
|
||||||
return XT_CONTINUE;
|
return XT_CONTINUE;
|
||||||
|
|
||||||
@ -30,11 +19,14 @@ index e2a7fce..eab348e 100644
|
|||||||
+ return XT_CONTINUE;
|
+ return XT_CONTINUE;
|
||||||
+
|
+
|
||||||
+ if ((xt_in(par)->type == ARPHRD_NONE) || (xt_out(par)->type == ARPHRD_NONE))
|
+ if ((xt_in(par)->type == ARPHRD_NONE) || (xt_out(par)->type == ARPHRD_NONE))
|
||||||
|
+ return XT_CONTINUE;
|
||||||
|
+
|
||||||
|
+ if (!strcmp(xt_in(par)->name,"3g-modem_1_1") || !strcmp(xt_out(par)->name,"3g-modem_1_1"))
|
||||||
+ return XT_CONTINUE;
|
+ return XT_CONTINUE;
|
||||||
|
|
||||||
ct = nf_ct_get(skb, &ctinfo);
|
ct = nf_ct_get(skb, &ctinfo);
|
||||||
if (ct == NULL)
|
if (ct == NULL)
|
||||||
@@ -599,6 +607,12 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
@@ -602,6 +610,12 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||||
if (flow_offload_add(&nf_flowtable, flow) < 0)
|
if (flow_offload_add(&nf_flowtable, flow) < 0)
|
||||||
goto err_flow_add;
|
goto err_flow_add;
|
||||||
|
|
||||||
|
|||||||
66
patches-siflower-18.x/0304-fix-EC20-dongle-panic.patch
Normal file
66
patches-siflower-18.x/0304-fix-EC20-dongle-panic.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
From 034d2febe7b5bb49a47f144cabb40ad5a68cac11 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||||
|
Date: Thu, 18 Nov 2021 11:35:20 +0800
|
||||||
|
Subject: [PATCH] fix: EC20 dongle panic
|
||||||
|
|
||||||
|
---
|
||||||
|
.../linux-4.14.90/drivers/usb/dwc2/hcd_intr.c | 20 ++++++++++++++++----
|
||||||
|
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd_intr.c b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd_intr.c
|
||||||
|
index 17905ba..60f9915 100644
|
||||||
|
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd_intr.c
|
||||||
|
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd_intr.c
|
||||||
|
@@ -487,7 +487,7 @@ static int dwc2_update_urb_state(struct dwc2_hsotg *hsotg,
|
||||||
|
&short_read);
|
||||||
|
|
||||||
|
if (urb->actual_length + xfer_length > urb->length) {
|
||||||
|
- dev_warn(hsotg->dev, "%s(): trimming xfer length\n", __func__);
|
||||||
|
+ dev_dbg(hsotg->dev, "%s(): trimming xfer length\n", __func__);
|
||||||
|
xfer_length = urb->length - urb->actual_length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1160,7 +1160,7 @@ static void dwc2_update_urb_state_abn(struct dwc2_hsotg *hsotg,
|
||||||
|
u32 hctsiz;
|
||||||
|
|
||||||
|
if (urb->actual_length + xfer_length > urb->length) {
|
||||||
|
- dev_warn(hsotg->dev, "%s(): trimming xfer length\n", __func__);
|
||||||
|
+ dev_dbg(hsotg->dev, "%s(): trimming xfer length\n", __func__);
|
||||||
|
xfer_length = urb->length - urb->actual_length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1919,10 +1919,10 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg,
|
||||||
|
dwc2_halt_channel(hsotg, chan, qtd,
|
||||||
|
DWC2_HC_XFER_PERIODIC_INCOMPLETE);
|
||||||
|
} else {
|
||||||
|
- dev_err(hsotg->dev,
|
||||||
|
+ dev_dbg(hsotg->dev,
|
||||||
|
"%s: Channel %d - ChHltd set, but reason is unknown\n",
|
||||||
|
__func__, chnum);
|
||||||
|
- dev_err(hsotg->dev,
|
||||||
|
+ dev_dbg(hsotg->dev,
|
||||||
|
"hcint 0x%08x, intsts 0x%08x\n",
|
||||||
|
chan->hcint,
|
||||||
|
dwc2_readl(hsotg->regs + GINTSTS));
|
||||||
|
@@ -1938,6 +1938,18 @@ error:
|
||||||
|
qtd->error_count++;
|
||||||
|
dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
|
||||||
|
qtd, DWC2_HC_XFER_XACT_ERR);
|
||||||
|
+ /*
|
||||||
|
+ * We can get here after a completed transaction
|
||||||
|
+ * (urb->actual_length >= urb->length) which was not reported
|
||||||
|
+ * as completed. If that is the case, and we do not abort
|
||||||
|
+ * the transfer, a transfer of size 0 will be enqueued
|
||||||
|
+ * subsequently. If urb->actual_length is not DMA-aligned,
|
||||||
|
+ * the buffer will then point to an unaligned address, and
|
||||||
|
+ * the resulting behavior is undefined. Bail out in that
|
||||||
|
+ * situation.
|
||||||
|
+ */
|
||||||
|
+ if (qtd->urb->actual_length >= qtd->urb->length)
|
||||||
|
+ qtd->error_count = 3;
|
||||||
|
dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
|
||||||
|
dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_XACT_ERR);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
From 9593f4b59592c41f5bed35ca1a1abd828d1b69ef Mon Sep 17 00:00:00 2001
|
|
||||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
|
||||||
Date: Thu, 14 Oct 2021 14:57:57 +0800
|
|
||||||
Subject: [PATCH] fix: modified the min_free_kbytes from 16384 to 4096
|
|
||||||
|
|
||||||
---
|
|
||||||
.../package/base-files/files/etc/init.d/sysctl | 20 +++++++++++---------
|
|
||||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/openwrt-18.06/package/base-files/files/etc/init.d/sysctl b/openwrt-18.06/package/base-files/files/etc/init.d/sysctl
|
|
||||||
index 4db5644..9295f30 100755
|
|
||||||
--- a/openwrt-18.06/package/base-files/files/etc/init.d/sysctl
|
|
||||||
+++ b/openwrt-18.06/package/base-files/files/etc/init.d/sysctl
|
|
||||||
@@ -7,15 +7,17 @@ apply_defaults() {
|
|
||||||
local mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)"
|
|
||||||
local min_free frag_low_thresh frag_high_thresh
|
|
||||||
|
|
||||||
- if [ "$mem" -gt 65536 ]; then # 128M
|
|
||||||
- min_free=16384
|
|
||||||
- elif [ "$mem" -gt 32768 ]; then # 64M
|
|
||||||
- min_free=8192
|
|
||||||
- else
|
|
||||||
- min_free=1024
|
|
||||||
- frag_low_thresh=393216
|
|
||||||
- frag_high_thresh=524288
|
|
||||||
- fi
|
|
||||||
+ #Fixed SF oom bug
|
|
||||||
+ min_free=4096
|
|
||||||
+ #if [ "$mem" -gt 65536 ]; then # 128M
|
|
||||||
+ # min_free=16384
|
|
||||||
+ #elif [ "$mem" -gt 32768 ]; then # 64M
|
|
||||||
+ # min_free=8192
|
|
||||||
+ #else
|
|
||||||
+ # min_free=1024
|
|
||||||
+ # frag_low_thresh=393216
|
|
||||||
+ # frag_high_thresh=524288
|
|
||||||
+ #fi
|
|
||||||
|
|
||||||
sysctl -qw vm.min_free_kbytes="$min_free"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
38
patches-siflower-18.x/0307-feat-add-UE-country-code.patch
Normal file
38
patches-siflower-18.x/0307-feat-add-UE-country-code.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From d3df9ccd2678a148a3a4a5fa43f9ec313ea316b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||||
|
Date: Thu, 18 Nov 2021 12:17:40 +0800
|
||||||
|
Subject: [PATCH] feat: add UE country code
|
||||||
|
|
||||||
|
---
|
||||||
|
.../wireless-regdb/patches/501-add-UE-code.patch | 19 +++++++++++++++++++
|
||||||
|
1 file changed, 19 insertions(+)
|
||||||
|
create mode 100644 openwrt-18.06/package/firmware/wireless-regdb/patches/501-add-UE-code.patch
|
||||||
|
|
||||||
|
diff --git a/openwrt-18.06/package/firmware/wireless-regdb/patches/501-add-UE-code.patch b/openwrt-18.06/package/firmware/wireless-regdb/patches/501-add-UE-code.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..a37f7c4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/openwrt-18.06/package/firmware/wireless-regdb/patches/501-add-UE-code.patch
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+Index: wireless-regdb-2017-10-20-4343d359/db.txt
|
||||||
|
+===================================================================
|
||||||
|
+--- wireless-regdb-2017-10-20-4343d359.orig/db.txt
|
||||||
|
++++ wireless-regdb-2017-10-20-4343d359/db.txt
|
||||||
|
+@@ -360,6 +360,14 @@ country CZ: DFS-ETSI
|
||||||
|
+ # Bereich 57 GHz - 66 GHz für Funkanwendungen für weitbandige
|
||||||
|
+ # Datenübertragungssysteme; „Multiple Gigabit WAS/RLAN Systems (MGWS)“).
|
||||||
|
+ # https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2011_08_MGWS_pdf.pdf
|
||||||
|
++country UE: DFS-ETSI
|
||||||
|
++ (2400 - 2483.5 @ 40), (100 mW)
|
||||||
|
++ (5150 - 5250 @ 80), (100 mW), NO-OUTDOOR, AUTO-BW
|
||||||
|
++ (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW
|
||||||
|
++ (5470 - 5725 @ 160), (500 mW), DFS
|
||||||
|
++ # short range devices (ETSI EN 300 440-1)
|
||||||
|
++ # 60 GHz band channels 1-4 (ETSI EN 302 567)
|
||||||
|
++ (57000 - 66000 @ 2160), (40)
|
||||||
|
+
|
||||||
|
+ country DE: DFS-ETSI
|
||||||
|
+ (2400 - 2483.5 @ 40), (100 mW)
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
From 69d874827de04468e1418d8783bd8036a6f8a7aa Mon Sep 17 00:00:00 2001
|
||||||
|
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||||
|
Date: Wed, 24 Nov 2021 14:20:08 +0800
|
||||||
|
Subject: [PATCH] fix: DMA alignment to start at allocated boundary
|
||||||
|
|
||||||
|
---
|
||||||
|
linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||||
|
index 3c4658b..2d9cb5f 100644
|
||||||
|
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||||
|
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||||
|
@@ -2675,8 +2675,10 @@ static void dwc2_free_dma_aligned_buffer(struct urb *urb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Restore urb->transfer_buffer from the end of the allocated area */
|
||||||
|
- memcpy(&stored_xfer_buffer, urb->transfer_buffer +
|
||||||
|
- urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
|
||||||
|
+ memcpy(&stored_xfer_buffer,
|
||||||
|
+ PTR_ALIGN(urb->transfer_buffer + urb->transfer_buffer_length,
|
||||||
|
+ dma_get_cache_alignment()),
|
||||||
|
+ sizeof(urb->transfer_buffer));
|
||||||
|
|
||||||
|
if (usb_urb_dir_in(urb)) {
|
||||||
|
if (usb_pipeisoc(urb->pipe))
|
||||||
|
@@ -2708,6 +2710,7 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
|
||||||
|
* DMA
|
||||||
|
*/
|
||||||
|
kmalloc_size = urb->transfer_buffer_length +
|
||||||
|
+ (dma_get_cache_alignment() - 1) +
|
||||||
|
sizeof(urb->transfer_buffer);
|
||||||
|
|
||||||
|
kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
|
||||||
|
@@ -2718,7 +2721,8 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
|
||||||
|
* Position value of original urb->transfer_buffer pointer to the end
|
||||||
|
* of allocation for later referencing
|
||||||
|
*/
|
||||||
|
- memcpy(kmalloc_ptr + urb->transfer_buffer_length,
|
||||||
|
+ memcpy(PTR_ALIGN(kmalloc_ptr + urb->transfer_buffer_length,
|
||||||
|
+ dma_get_cache_alignment()),
|
||||||
|
&urb->transfer_buffer, sizeof(urb->transfer_buffer));
|
||||||
|
|
||||||
|
if (usb_urb_dir_out(urb))
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user