From 806339a4cce25b29262cc8a02321eeea1783c386 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 2 Dec 2019 20:42:46 +0100 Subject: [PATCH 01/11] curl: bump to 7.67.0 For changes in 7.67.0; see https://curl.haxx.se/changes.html#7_67_0 Signed-off-by: Hans Dedecker --- package/network/utils/curl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index d4fcf1814a..830d5a7192 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl -PKG_VERSION:=7.66.0 +PKG_VERSION:=7.67.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \ https://curl.mirror.anstey.ca/ \ https://curl.askapache.com/download/ \ https://curl.haxx.se/download/ -PKG_HASH:=dbb48088193016d079b97c5c3efde8efa56ada2ebf336e8a97d04eb8e2ed98c1 +PKG_HASH:=f5d2e7320379338c3952dcc7566a140abb49edb575f9f99272455785c40e536c PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING From 416d2cc71e8631dae0ef590c139d5c46daec4929 Mon Sep 17 00:00:00 2001 From: Alin Nastac Date: Tue, 12 Nov 2019 15:11:00 +0100 Subject: [PATCH 02/11] gre: add ipv6 parameter to gre interfaces IPv6 protocol is enabled on all gre interfaces, but gre(v6)tap interfaces are usually added to a bridge interface, in which case IPv6 should be enabled only on the bridge interface. Signed-off-by: Alin Nastac Signed-off-by: Hans Dedecker [PKG_RELEASE increase] --- package/network/config/gre/Makefile | 2 +- package/network/config/gre/files/gre.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile index e3a79e11e4..ca19f5d47c 100644 --- a/package/network/config/gre/Makefile +++ b/package/network/config/gre/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gre PKG_VERSION:=1 -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index 3414ed3047..eb3df5b48c 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -13,8 +13,8 @@ gre_generic_setup() { local local="$3" local remote="$4" local link="$5" - local mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast - json_get_vars mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast + local mtu ipv6 ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast + json_get_vars mtu ipv6 ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast [ -z "$multicast" ] && multicast=1 @@ -23,6 +23,7 @@ gre_generic_setup() { proto_add_tunnel json_add_string mode "$mode" json_add_int mtu "${mtu:-1280}" + json_add_boolean ipv6 "${ipv6:-1}" [ -n "$df" ] && json_add_boolean df "$df" [ -n "$ttl" ] && json_add_int ttl "$ttl" [ -n "$tos" ] && json_add_string tos "$tos" @@ -248,6 +249,7 @@ gre_generic_init_config() { available=1 proto_config_add_int "mtu" + proto_config_add_boolean "ipv6" proto_config_add_int "ttl" proto_config_add_string "tos" proto_config_add_string "tunlink" From f6385f30bd2ef202e526d964c5eebcf2b04d0675 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 19 Nov 2019 15:24:58 +0100 Subject: [PATCH 03/11] ath79: fix source of label MAC address for Ubiquiti XM devices In d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") the source of the label MAC address was changed for devices just reading it from phy0. To get rid of the dependency from phy startup, addresses were read directly from the flash locations that are used to initialize the phy MAC addresses. Unfortunately, it turned out that Ubiquiti XM devices seem to have different flash locations than expected, and also seem to have specific locations for different devices (all in art/EEPROM): 0xe012 AR9280 Nanostation M2 - 0x120c 0xe035 AR9280 Nanostation M3 - 0x120c 0xe1b2 AR9280 Rocket M2 - 0x120c 0xe1c3 AR9280 Rocket M3 - 0x120c 0xe1b5 AR9280 Rocket M5 - 0x120c 0xe2d5 AR9280 Bullet M2 Titanium - 0x120c 0xe2b5 AR9280 Nanobridge M5 - 0x120c 0xe202 AR9280 Bullet M2 - 0x120c 0xe232 AR9287 Nanobridge M2 - 0x110c 0xe4a2 AR9285 AirRouter - 0xa0bf Picostation M2 - 0x120c and 0xa0bf Nanostation Loco M2 - not in 0x120c, other locations not checked An additional problem of the Ubiquiti device support in OpenWrt is that we provide images that match several subvariants of the devices, which might have different MAC address locations. Given that reading the address from phy0 in 02_network _is_ working for the ath79 target in general, it does not seem reasonable to rebuild a complex MAC address retrieval mechanism which is already present in the ath9k driver. So, this patch reverts the label MAC address source for Ubiquiti XM devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress. This doesn't affect XW and Unifi AC devices, where the label MAC address source is defined via device tree. For alfa-network,ap121f the location 0x1002 is kept, as this has been verified during device support preparation in PR #2199. Fixes: d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") Signed-off-by: Adrian Schmutzler --- .../generic/base-files/etc/board.d/02_network | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index e811f85f0e..05ee1aa016 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -287,12 +287,7 @@ ath79_setup_macs() lan_mac=$(mtd_get_mac_binary "Board data" 2) label_mac=$lan_mac ;; - alfa-network,ap121f|\ - ubnt,airrouter|\ - ubnt,bullet-m|\ - ubnt,nanostation-m|\ - ubnt,rocket-m|\ - ubnt,unifi) + alfa-network,ap121f) label_mac=$(mtd_get_mac_binary art 0x1002) ;; avm,fritz300e) @@ -397,6 +392,13 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_text mac 0x18) label_mac=$wan_mac ;; + ubnt,airrouter|\ + ubnt,bullet-m|\ + ubnt,nanostation-m|\ + ubnt,rocket-m|\ + ubnt,unifi) + label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + ;; ubnt,routerstation|\ ubnt,routerstation-pro) wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa) From 1d608a10a0d663d10c883c7527d1844abb92d89b Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Tue, 26 Nov 2019 08:45:38 +0000 Subject: [PATCH 04/11] kernel: act_ctinfo: update backport Since the original backports from kernel 5.3 a few things have been tweaked by kernel bumps & other upstream changes. Update the backport to reflect upstream as closely as possible and remove the bitrot. Functions remain the same, error reporting improved. Signed-off-by: Kevin Darbyshire-Bryant --- ...et-sched-Introduce-act_ctinfo-action.patch | 142 ++++++++++++++---- ...et-sched-Introduce-act_ctinfo-action.patch | 140 ++++++++++++----- 2 files changed, 210 insertions(+), 72 deletions(-) diff --git a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch index d2cb0532c9..1053742e6e 100644 --- a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch +++ b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch @@ -1,47 +1,110 @@ -From e3777dd42dc6f1b9cb099836707a3e7971dcf4df Mon Sep 17 00:00:00 2001 +From a06ece503d941eefa92ba48dc981ccaa4093330b Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 13 Mar 2019 20:54:49 +0000 -Subject: [PATCH] net: sched: Introduce act_ctinfo action +Subject: [PATCH] net: sched: Backport Introduce act_ctinfo action +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -ctinfo is a new tc filter action module. It is designed to restore DSCPs -stored in conntrack marks +ctinfo is a new tc filter action module. It is designed to restore +information contained in firewall conntrack marks to other packet fields +and is typically used on packet ingress paths. At present it has two +independent sub-functions or operating modes, DSCP restoration mode & +skb mark restoration mode. -The feature is intended for use and has been found useful for restoring -ingress classifications based on egress classifications across links -that bleach or otherwise change DSCP, typically home ISP Internet links. -Restoring DSCP on ingress on the WAN link allows qdiscs such as CAKE to -shape inbound packets according to policies that are easier to implement -on egress. +The DSCP restore mode: + +This mode copies DSCP values that have been placed in the firewall +conntrack mark back into the IPv4/v6 diffserv fields of relevant +packets. + +The DSCP restoration is intended for use and has been found useful for +restoring ingress classifications based on egress classifications across +links that bleach or otherwise change DSCP, typically home ISP Internet +links. Restoring DSCP on ingress on the WAN link allows qdiscs such as +but by no means limited to CAKE to shape inbound packets according to +policies that are easier to set & mark on egress. Ingress classification is traditionally a challenging task since iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT lookups, hence are unable to see internal IPv4 addresses as used on the -typical home masquerading gateway. +typical home masquerading gateway. Thus marking the connection in some +manner on egress for later restoration of classification on ingress is +easier to implement. -ctinfo understands the following parameters: +Parameters related to DSCP restore mode: -dscp mask[/statemask] - -mask - a 32 bit mask of at least 6 contiguous bits where conndscp will -place the DSCP in conntrack mark. The DSCP is left-shifted by the -number of unset lower bits of the mask before storing into the mark -field. +dscpmask - a 32 bit mask of 6 contiguous bits and indicate bits of the +conntrack mark field contain the DSCP value to be restored. statemask - a 32 bit mask of (usually) 1 bit length, outside the area -specified by mask. This represents a conditional operation flag the -DSCP is only restored if the flag is set. This is useful to implement a -'one shot' iptables based classification where the 'complicated' -iptables rules are only run once to classify the connection on initial -(egress) packet and subsequent packets are all marked/restored with the -same DSCP. A mask of zero disables the conditional behaviour. +specified by dscpmask. This represents a conditional operation flag +whereby the DSCP is only restored if the flag is set. This is useful to +implement a 'one shot' iptables based classification where the +'complicated' iptables rules are only run once to classify the +connection on initial (egress) packet and subsequent packets are all +marked/restored with the same DSCP. A mask of zero disables the +conditional behaviour ie. the conntrack mark DSCP bits are always +restored to the ip diffserv field (assuming the conntrack entry is found +& the skb is an ipv4/ipv6 type) -optional parameters: +e.g. dscpmask 0xfc000000 statemask 0x01000000 + +|----0xFC----conntrack mark----000000---| +| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| +| DSCP | unused | flag |unused | +|-----------------------0x01---000000---| + | | + | | + ---| Conditional flag + v only restore if set +|-ip diffserv-| +| 6 bits | +|-------------| + +The skb mark restore mode (cpmark): + +This mode copies the firewall conntrack mark to the skb's mark field. +It is completely the functional equivalent of the existing act_connmark +action with the additional feature of being able to apply a mask to the +restored value. + +Parameters related to skb mark restore mode: + +mask - a 32 bit mask applied to the firewall conntrack mark to mask out +bits unwanted for restoration. This can be useful where the conntrack +mark is being used for different purposes by different applications. If +not specified and by default the whole mark field is copied (i.e. +default mask of 0xffffffff) + +e.g. mask 0x00ffffff to mask out the top 8 bits being used by the +aforementioned DSCP restore mode. + +|----0x00----conntrack mark----ffffff---| +| Bits 31-24 | | +| DSCP & flag| some value here | +|---------------------------------------| + | + | + v +|------------skb mark-------------------| +| | | +| zeroed | | +|---------------------------------------| + +Overall parameters: zone - conntrack zone control - action related control (reclassify | pipe | drop | continue | -ok | goto chain +ok | goto chain ) +Signed-off-by: Kevin Darbyshire-Bryant +Reviewed-by: Toke Høiland-Jørgensen +Acked-by: Cong Wang +Signed-off-by: David S. Miller + +Backport Signed-off-by: Kevin Darbyshire-Bryant --- include/net/tc_act/tc_ctinfo.h | 33 +++ @@ -49,8 +112,8 @@ Signed-off-by: Kevin Darbyshire-Bryant include/uapi/linux/tc_act/tc_ctinfo.h | 29 ++ net/sched/Kconfig | 13 + net/sched/Makefile | 1 + - net/sched/act_ctinfo.c | 394 ++++++++++++++++++++++++++ - 6 files changed, 472 insertions(+), 1 deletion(-) + net/sched/act_ctinfo.c | 407 ++++++++++++++++++++++++++ + 6 files changed, 485 insertions(+), 1 deletion(-) create mode 100644 include/net/tc_act/tc_ctinfo.h create mode 100644 include/uapi/linux/tc_act/tc_ctinfo.h create mode 100644 net/sched/act_ctinfo.c @@ -169,7 +232,7 @@ Signed-off-by: Kevin Darbyshire-Bryant obj-$(CONFIG_NET_IFE_SKBMARK) += act_meta_mark.o --- /dev/null +++ b/net/sched/act_ctinfo.c -@@ -0,0 +1,394 @@ +@@ -0,0 +1,407 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* net/sched/act_ctinfo.c netfilter ctinfo connmark actions + * @@ -337,15 +400,20 @@ Signed-off-by: Kevin Darbyshire-Bryant + u8 dscpmaskshift; + int ret = 0, err; + -+ if (!nla) ++ if (!nla) { ++ NL_SET_ERR_MSG_MOD(extack, "ctinfo requires attributes to be passed"); + return -EINVAL; ++ } + + err = nla_parse_nested(tb, TCA_CTINFO_MAX, nla, ctinfo_policy, NULL); + if (err < 0) + return err; + -+ if (!tb[TCA_CTINFO_ACT]) ++ if (!tb[TCA_CTINFO_ACT]) { ++ NL_SET_ERR_MSG_MOD(extack, ++ "Missing required TCA_CTINFO_ACT attribute"); + return -EINVAL; ++ } + actparm = nla_data(tb[TCA_CTINFO_ACT]); + + /* do some basic validation here before dynamically allocating things */ @@ -354,13 +422,21 @@ Signed-off-by: Kevin Darbyshire-Bryant + dscpmask = nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_MASK]); + /* need contiguous 6 bit mask */ + dscpmaskshift = dscpmask ? __ffs(dscpmask) : 0; -+ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) ++ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) { ++ NL_SET_ERR_MSG_ATTR(extack, ++ tb[TCA_CTINFO_PARMS_DSCP_MASK], ++ "dscp mask must be 6 contiguous bits"); + return -EINVAL; ++ } + dscpstatemask = tb[TCA_CTINFO_PARMS_DSCP_STATEMASK] ? + nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) : 0; + /* mask & statemask must not overlap */ -+ if (dscpmask & dscpstatemask) ++ if (dscpmask & dscpstatemask) { ++ NL_SET_ERR_MSG_ATTR(extack, ++ tb[TCA_CTINFO_PARMS_DSCP_STATEMASK], ++ "dscp statemask must not overlap dscp mask"); + return -EINVAL; ++ } + } + /* done the validation:now to the actual action allocation */ + err = tcf_idr_check(tn, actparm->index, a, bind); diff --git a/target/linux/generic/backport-4.19/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch b/target/linux/generic/backport-4.19/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch index 909c68e1b5..8e04dce309 100644 --- a/target/linux/generic/backport-4.19/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch +++ b/target/linux/generic/backport-4.19/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch @@ -1,29 +1,41 @@ -From c17877e414155b9b97d10416ff62b102d25019a1 Mon Sep 17 00:00:00 2001 +From 6d8071bbbdcd9d3a2fbb49e55b51617906e3b816 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 13 Mar 2019 20:54:49 +0000 -Subject: [PATCH] net: sched: Introduce act_ctinfo action +Subject: [PATCH] net: sched: Backport Introduce act_ctinfo action +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -ctinfo is a new tc filter action module. It is designed to restore DSCPs -stored in conntrack marks into the ipv4/v6 diffserv field. +ctinfo is a new tc filter action module. It is designed to restore +information contained in firewall conntrack marks to other packet fields +and is typically used on packet ingress paths. At present it has two +independent sub-functions or operating modes, DSCP restoration mode & +skb mark restoration mode. -The feature is intended for use and has been found useful for restoring -ingress classifications based on egress classifications across links -that bleach or otherwise change DSCP, typically home ISP Internet links. -Restoring DSCP on ingress on the WAN link allows qdiscs such as CAKE to -shape inbound packets according to policies that are easier to indicate -on egress. +The DSCP restore mode: + +This mode copies DSCP values that have been placed in the firewall +conntrack mark back into the IPv4/v6 diffserv fields of relevant +packets. + +The DSCP restoration is intended for use and has been found useful for +restoring ingress classifications based on egress classifications across +links that bleach or otherwise change DSCP, typically home ISP Internet +links. Restoring DSCP on ingress on the WAN link allows qdiscs such as +but by no means limited to CAKE to shape inbound packets according to +policies that are easier to set & mark on egress. Ingress classification is traditionally a challenging task since iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT lookups, hence are unable to see internal IPv4 addresses as used on the -typical home masquerading gateway. +typical home masquerading gateway. Thus marking the connection in some +manner on egress for later restoration of classification on ingress is +easier to implement. -ctinfo understands the following parameters: +Parameters related to DSCP restore mode: -dscp dscpmask[/statemask] - -dscpmask - a 32 bit mask of at least 6 contiguous bits and indicates -where ctinfo will find the DSCP bits stored in the conntrack mark. +dscpmask - a 32 bit mask of 6 contiguous bits and indicate bits of the +conntrack mark field contain the DSCP value to be restored. statemask - a 32 bit mask of (usually) 1 bit length, outside the area specified by dscpmask. This represents a conditional operation flag @@ -36,14 +48,7 @@ conditional behaviour ie. the conntrack mark DSCP bits are always restored to the ip diffserv field (assuming the conntrack entry is found & the skb is an ipv4/ipv6 type) -optional parameters: - -zone - conntrack zone - -control - action related control (reclassify | pipe | drop | continue | -ok | goto chain ) - -e.g. dscp 0xfc000000/0x01000000 +e.g. dscpmask 0xfc000000 statemask 0x01000000 |----0xFC----conntrack mark----000000---| | Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| @@ -57,6 +62,49 @@ e.g. dscp 0xfc000000/0x01000000 | 6 bits | |-------------| +The skb mark restore mode (cpmark): + +This mode copies the firewall conntrack mark to the skb's mark field. +It is completely the functional equivalent of the existing act_connmark +action with the additional feature of being able to apply a mask to the +restored value. + +Parameters related to skb mark restore mode: + +mask - a 32 bit mask applied to the firewall conntrack mark to mask out +bits unwanted for restoration. This can be useful where the conntrack +mark is being used for different purposes by different applications. If +not specified and by default the whole mark field is copied (i.e. +default mask of 0xffffffff) + +e.g. mask 0x00ffffff to mask out the top 8 bits being used by the +aforementioned DSCP restore mode. + +|----0x00----conntrack mark----ffffff---| +| Bits 31-24 | | +| DSCP & flag| some value here | +|---------------------------------------| + | + | + v +|------------skb mark-------------------| +| | | +| zeroed | | +|---------------------------------------| + +Overall parameters: + +zone - conntrack zone + +control - action related control (reclassify | pipe | drop | continue | +ok | goto chain ) + +Signed-off-by: Kevin Darbyshire-Bryant +Reviewed-by: Toke Høiland-Jørgensen +Acked-by: Cong Wang +Signed-off-by: David S. Miller + +Backport Signed-off-by: Kevin Darbyshire-Bryant --- include/net/tc_act/tc_ctinfo.h | 33 ++ @@ -64,9 +112,9 @@ Signed-off-by: Kevin Darbyshire-Bryant include/uapi/linux/tc_act/tc_ctinfo.h | 29 ++ net/sched/Kconfig | 17 + net/sched/Makefile | 1 + - net/sched/act_ctinfo.c | 395 ++++++++++++++++++++++ + net/sched/act_ctinfo.c | 409 ++++++++++++++++++++++ tools/testing/selftests/tc-testing/config | 1 + - 7 files changed, 478 insertions(+), 1 deletion(-) + 7 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 include/net/tc_act/tc_ctinfo.h create mode 100644 include/uapi/linux/tc_act/tc_ctinfo.h create mode 100644 net/sched/act_ctinfo.c @@ -189,7 +237,7 @@ Signed-off-by: Kevin Darbyshire-Bryant obj-$(CONFIG_NET_IFE_SKBMARK) += act_meta_mark.o --- /dev/null +++ b/net/sched/act_ctinfo.c -@@ -0,0 +1,395 @@ +@@ -0,0 +1,409 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* net/sched/act_ctinfo.c netfilter ctinfo connmark actions + * @@ -347,24 +395,29 @@ Signed-off-by: Kevin Darbyshire-Bryant + struct netlink_ext_ack *extack) +{ + struct tc_action_net *tn = net_generic(net, ctinfo_net_id); ++ u32 dscpmask = 0, dscpstatemask, index; + struct nlattr *tb[TCA_CTINFO_MAX + 1]; + struct tcf_ctinfo_params *cp_new; +/* struct tcf_chain *goto_ch = NULL; */ -+ u32 dscpmask = 0, dscpstatemask; + struct tc_ctinfo *actparm; + struct tcf_ctinfo *ci; + u8 dscpmaskshift; + int ret = 0, err; + -+ if (!nla) ++ if (!nla) { ++ NL_SET_ERR_MSG_MOD(extack, "ctinfo requires attributes to be passed"); + return -EINVAL; ++ } + -+ err = nla_parse_nested(tb, TCA_CTINFO_MAX, nla, ctinfo_policy, NULL); ++ err = nla_parse_nested(tb, TCA_CTINFO_MAX, nla, ctinfo_policy, extack); + if (err < 0) + return err; + -+ if (!tb[TCA_CTINFO_ACT]) ++ if (!tb[TCA_CTINFO_ACT]) { ++ NL_SET_ERR_MSG_MOD(extack, ++ "Missing required TCA_CTINFO_ACT attribute"); + return -EINVAL; ++ } + actparm = nla_data(tb[TCA_CTINFO_ACT]); + + /* do some basic validation here before dynamically allocating things */ @@ -373,22 +426,31 @@ Signed-off-by: Kevin Darbyshire-Bryant + dscpmask = nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_MASK]); + /* need contiguous 6 bit mask */ + dscpmaskshift = dscpmask ? __ffs(dscpmask) : 0; -+ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) ++ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) { ++ NL_SET_ERR_MSG_ATTR(extack, ++ tb[TCA_CTINFO_PARMS_DSCP_MASK], ++ "dscp mask must be 6 contiguous bits"); + return -EINVAL; ++ } + dscpstatemask = tb[TCA_CTINFO_PARMS_DSCP_STATEMASK] ? + nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) : 0; + /* mask & statemask must not overlap */ -+ if (dscpmask & dscpstatemask) ++ if (dscpmask & dscpstatemask) { ++ NL_SET_ERR_MSG_ATTR(extack, ++ tb[TCA_CTINFO_PARMS_DSCP_STATEMASK], ++ "dscp statemask must not overlap dscp mask"); + return -EINVAL; ++ } + } + + /* done the validation:now to the actual action allocation */ -+ err = tcf_idr_check_alloc(tn, &actparm->index, a, bind); ++ index = actparm->index; ++ err = tcf_idr_check_alloc(tn, &index, a, bind); + if (!err) { -+ ret = tcf_idr_create(tn, actparm->index, est, a, ++ ret = tcf_idr_create(tn, index, est, a, + &act_ctinfo_ops, bind, false); + if (ret) { -+ tcf_idr_cleanup(tn, actparm->index); ++ tcf_idr_cleanup(tn, index); + return ret; + } + ret = ACT_P_CREATED; @@ -587,11 +649,11 @@ Signed-off-by: Kevin Darbyshire-Bryant +MODULE_LICENSE("GPL"); --- a/tools/testing/selftests/tc-testing/config +++ b/tools/testing/selftests/tc-testing/config -@@ -37,6 +37,7 @@ CONFIG_NET_ACT_SKBEDIT=m - CONFIG_NET_ACT_CSUM=m +@@ -38,6 +38,7 @@ CONFIG_NET_ACT_CSUM=m CONFIG_NET_ACT_VLAN=m CONFIG_NET_ACT_BPF=m -+CONFIG_NET_ACT_CONNDSCP=m CONFIG_NET_ACT_CONNMARK=m ++CONFIG_NET_ACT_CONNCTINFO=m CONFIG_NET_ACT_SKBMOD=m CONFIG_NET_ACT_IFE=m + CONFIG_NET_ACT_TUNNEL_KEY=m From 89b8dd62ce44e994aa1bccbc006945b1c124ab09 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 4 Dec 2019 12:06:26 +0000 Subject: [PATCH 05/11] kernel: act_ctinfo: fix updated backport on 4.14 It turns out my 4.14 testing had a rather large flaw in it and the 'extack' mechanism isn't quite ready. Remove the extack stuff from this backport. Signed-off-by: Kevin Darbyshire-Bryant --- ...et-sched-Introduce-act_ctinfo-action.patch | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch index 1053742e6e..64f6620b2a 100644 --- a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch +++ b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch @@ -1,4 +1,4 @@ -From a06ece503d941eefa92ba48dc981ccaa4093330b Mon Sep 17 00:00:00 2001 +From 147b0d133b53635db0cc572294840652c9c7b662 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 13 Mar 2019 20:54:49 +0000 Subject: [PATCH] net: sched: Backport Introduce act_ctinfo action @@ -112,8 +112,8 @@ Signed-off-by: Kevin Darbyshire-Bryant include/uapi/linux/tc_act/tc_ctinfo.h | 29 ++ net/sched/Kconfig | 13 + net/sched/Makefile | 1 + - net/sched/act_ctinfo.c | 407 ++++++++++++++++++++++++++ - 6 files changed, 485 insertions(+), 1 deletion(-) + net/sched/act_ctinfo.c | 394 ++++++++++++++++++++++++++ + 6 files changed, 472 insertions(+), 1 deletion(-) create mode 100644 include/net/tc_act/tc_ctinfo.h create mode 100644 include/uapi/linux/tc_act/tc_ctinfo.h create mode 100644 net/sched/act_ctinfo.c @@ -232,7 +232,7 @@ Signed-off-by: Kevin Darbyshire-Bryant obj-$(CONFIG_NET_IFE_SKBMARK) += act_meta_mark.o --- /dev/null +++ b/net/sched/act_ctinfo.c -@@ -0,0 +1,407 @@ +@@ -0,0 +1,394 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* net/sched/act_ctinfo.c netfilter ctinfo connmark actions + * @@ -400,20 +400,15 @@ Signed-off-by: Kevin Darbyshire-Bryant + u8 dscpmaskshift; + int ret = 0, err; + -+ if (!nla) { -+ NL_SET_ERR_MSG_MOD(extack, "ctinfo requires attributes to be passed"); ++ if (!nla) + return -EINVAL; -+ } + + err = nla_parse_nested(tb, TCA_CTINFO_MAX, nla, ctinfo_policy, NULL); + if (err < 0) + return err; + -+ if (!tb[TCA_CTINFO_ACT]) { -+ NL_SET_ERR_MSG_MOD(extack, -+ "Missing required TCA_CTINFO_ACT attribute"); ++ if (!tb[TCA_CTINFO_ACT]) + return -EINVAL; -+ } + actparm = nla_data(tb[TCA_CTINFO_ACT]); + + /* do some basic validation here before dynamically allocating things */ @@ -422,21 +417,13 @@ Signed-off-by: Kevin Darbyshire-Bryant + dscpmask = nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_MASK]); + /* need contiguous 6 bit mask */ + dscpmaskshift = dscpmask ? __ffs(dscpmask) : 0; -+ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) { -+ NL_SET_ERR_MSG_ATTR(extack, -+ tb[TCA_CTINFO_PARMS_DSCP_MASK], -+ "dscp mask must be 6 contiguous bits"); ++ if ((~0 & (dscpmask >> dscpmaskshift)) != 0x3f) + return -EINVAL; -+ } + dscpstatemask = tb[TCA_CTINFO_PARMS_DSCP_STATEMASK] ? + nla_get_u32(tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) : 0; + /* mask & statemask must not overlap */ -+ if (dscpmask & dscpstatemask) { -+ NL_SET_ERR_MSG_ATTR(extack, -+ tb[TCA_CTINFO_PARMS_DSCP_STATEMASK], -+ "dscp statemask must not overlap dscp mask"); ++ if (dscpmask & dscpstatemask) + return -EINVAL; -+ } + } + /* done the validation:now to the actual action allocation */ + err = tcf_idr_check(tn, actparm->index, a, bind); From db26f53bb353b8ddf3ad1ef3057eb59648a077e8 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 3 Dec 2019 13:57:20 +0200 Subject: [PATCH 06/11] ath79: drop IMAGE/factory.bin from ubnt-wa devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sysupgrade image contains OpenWrt specific metadata. Having this metadata in the factory images makes no sense. Drop IMAGE/factory.bin from Device/ubnt-wa and use the default from Device/ubnt instead. Signed-off-by: Stijn Tintel Acked-by: Petr Štetiar Acked-by: Adrian Schmutzler --- target/linux/ath79/image/generic-ubnt.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 19dbe2eb8b..9f55a89d27 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -124,7 +124,6 @@ define Device/ubnt_lap-120 DEVICE_MODEL := LiteAP ac DEVICE_VARIANT := LAP-120 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef TARGET_DEVICES += ubnt_lap-120 @@ -132,7 +131,6 @@ define Device/ubnt_nanobeam-ac $(Device/ubnt-wa) DEVICE_MODEL := NanoBeam AC DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds - IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef TARGET_DEVICES += ubnt_nanobeam-ac @@ -140,7 +138,6 @@ define Device/ubnt_nanostation-ac $(Device/ubnt-wa) DEVICE_MODEL := Nanostation AC DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds - IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef TARGET_DEVICES += ubnt_nanostation-ac @@ -148,7 +145,6 @@ define Device/ubnt_nanostation-ac-loco $(Device/ubnt-wa) DEVICE_MODEL := Nanostation AC loco DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef TARGET_DEVICES += ubnt_nanostation-ac-loco From 157e17e985ea494f7f0a870df0afa0a837eccb8c Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 12 Apr 2019 20:21:58 +0300 Subject: [PATCH 07/11] ath79: add support for Ubiquiti LiteBeam AC Gen2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hardware: * SoC: Atheros AR9342-BL1A * RAM: 64MB DDR2 (Winbond W9751G6KB-25) * Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G) * Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support * Wifi 2.4GHz: Atheros AR9340 v2 * WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2) * LEDs: 1x Power, 1x Ethernet * Buttons: 1x Reset * UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port The LEDs do not seem to be connected to any GPIO, so there is currently no way to control them. Installation via U-Boot, TFTP and serial console: * Configure your TFTP server with IP 192.168.1.254 * Connect serial console and power up the device * Hit any key to stop autoboot * tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin * bootm 0x81000000 * copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin to /tmp * sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin Signed-off-by: Stijn Tintel Acked-by: Petr Štetiar Acked-by: Adrian Schmutzler --- .../dts/ar9342_ubnt_litebeam-ac-gen2.dts | 39 +++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 4 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ath79/image/generic-ubnt.mk | 8 ++++ 4 files changed, 52 insertions(+) create mode 100644 target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts new file mode 100644 index 0000000000..d7eacf44d0 --- /dev/null +++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include + +#include "ar9342_ubnt_wa.dtsi" + +/ { + compatible = "ubnt,litebeam-ac-gen2", "ubnt,wa", "qca,ar9342"; + model = "Ubiquiti LiteBeam AC Gen2"; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <4>; + phy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +ð0 { + status = "okay"; + + /* default for ar934x, except for 1000M and 10M */ + pll-data = <0x02000000 0x00000101 0x00001313>; + + mtd-mac-address = <&art 0x0>; + + phy-mode = "rgmii-id"; + phy-handle = <&phy4>; + + gmac-config { + device = <&gmac>; + rxd-delay = <3>; + rxdv-delay = <3>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 05ee1aa016..938213eadc 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -40,6 +40,7 @@ ath79_setup_interfaces() ubnt,bullet-m|\ ubnt,bullet-m-xw|\ ubnt,lap-120|\ + ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ ubnt,nanostation-ac-loco|\ ubnt,rocket-m|\ @@ -399,6 +400,9 @@ ath79_setup_macs() ubnt,unifi) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; + ubnt,litebeam-ac-gen2) + label_mac=$(mtd_get_mac_binary art 0x5006) + ;; ubnt,routerstation|\ ubnt,routerstation-pro) wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 062caf6ad5..55c6b74e74 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -17,6 +17,7 @@ case "$FIRMWARE" in ubnt,unifiac-mesh|\ ubnt,unifiac-mesh-pro|\ ubnt,lap-120|\ + ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ ubnt,nanostation-ac|\ ubnt,nanostation-ac-loco|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 9f55a89d27..e75b9ea770 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -127,6 +127,14 @@ define Device/ubnt_lap-120 endef TARGET_DEVICES += ubnt_lap-120 +define Device/ubnt_litebeam-ac-gen2 + $(Device/ubnt-wa) + DEVICE_MODEL := LiteBeam AC + DEVICE_VARIANT := Gen2 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct +endef +TARGET_DEVICES += ubnt_litebeam-ac-gen2 + define Device/ubnt_nanobeam-ac $(Device/ubnt-wa) DEVICE_MODEL := NanoBeam AC From 82a8f91c895b2463814eaa22902c755578f94637 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 5 Dec 2019 11:59:41 +0100 Subject: [PATCH 08/11] wireguard: bump to 0.0.20191205 * wg-quick: linux: suppress error when finding unused table This fixes a spurious warning messages seen with recent versions of iproute2 and kernels. * wg-quick: linux: ensure postdown hooks execute * wg-quick: linux: have remove_iptables return true * wg-quick: linux: iptables-* -w is not widely supported Adding in iptables had some hiccups. For the record, I'm very unhappy about having to put any firewalling code into wg-quick(8). We'll of course need to support nftables too at some point if this continues. I'm investigating with upstream the possibility of adding a sysctl to patch the issue that iptables is handling now, so hopefully at somepoint down the line we'll be able to shed this dependency once again. * send: use kfree_skb_list * device: prepare skb_list_walk_safe for upstreaming * send: avoid touching skb->{next,prev} directly Suggestions from LKML. * ipc: make sure userspace communication frees wgdevice Free things properly on error paths. Signed-off-by: Jason A. Donenfeld --- package/network/services/wireguard/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile index ea34b7550b..7aac5566da 100644 --- a/package/network/services/wireguard/Makefile +++ b/package/network/services/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=0.0.20191127 +PKG_VERSION:=0.0.20191205 PKG_RELEASE:=1 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_HASH:=7d4e80a6f84564d4826dd05da2b59e8d17645072c0345d0fc0d197be176c3d06 +PKG_HASH:=4de4c0efa35f8eb170c27a0bc8977e5c0634b8e19c03915d03218cc88bb0adbe PKG_LICENSE:=GPL-2.0 Apache-2.0 PKG_LICENSE_FILES:=COPYING From a512123a4bef7a83cc2d9dd64f7f8cfb1c3a7bf5 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 5 Dec 2019 10:22:56 +0100 Subject: [PATCH 09/11] mediatek: fix pcie bringup issue Signed-off-by: John Crispin --- .../0101-pci-mediatek-backport-fix-pcie.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch b/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch index 009eedb583..9afcedaa77 100644 --- a/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch +++ b/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch @@ -362,6 +362,15 @@ return err; } +@@ -1122,8 +1122,6 @@ + return err; + + err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start); +- if (err) +- return err; + + return 0; + } @@ -1127,34 +1128,6 @@ static int mtk_pcie_request_resources(st return 0; } From 39d9010c20a08ac1ac48f1bec4332bfd92d8b1a6 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 5 Dec 2019 22:46:50 +0100 Subject: [PATCH 10/11] iproute2: update to 5.4.0 Update iproute2 to latest stable version, see https://lwn.net/Articles/805654/ for the changes in 5.4.0 Signed-off-by: Hans Dedecker --- package/network/utils/iproute2/Makefile | 4 ++-- .../utils/iproute2/patches/115-add-config-xtlibdir.patch | 2 +- .../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 638016e5bc..d9aca960d6 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.3.0 +PKG_VERSION:=5.4.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=cb1c1e45993a3bd2438543fd4332d70f1726a6e6ff97dc613a8258c993117b3f +PKG_HASH:=fe97aa60a0d4c5ac830be18937e18dc3400ca713a33a89ad896ff1e3d46086ae PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch index 8b3fad6e51..720a7ac1e9 100644 --- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch +++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -123,6 +123,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR +@@ -124,6 +124,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR ifneq ($(IPT_LIB_DIR),) CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" endif diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch index d3f6a262d6..0385bd737b 100644 --- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -110,7 +110,7 @@ LDLIBS += -L. -lm +@@ -111,7 +111,7 @@ LDLIBS += -L. -lm ifeq ($(SHARED_LIBS),y) LDLIBS += -ldl @@ -9,7 +9,7 @@ endif TCLIB := tc_core.o -@@ -140,7 +140,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc +@@ -141,7 +141,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc all: tc $(TCSO) tc: $(TCOBJ) $(LIBNETLINK) libtc.a @@ -18,7 +18,7 @@ libtc.a: $(TCLIB) $(QUIET_AR)$(AR) rcs $@ $^ -@@ -162,6 +162,7 @@ install: all +@@ -163,6 +163,7 @@ install: all clean: rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \ rm -f emp_ematch.yacc.* @@ -26,7 +26,7 @@ q_atm.so: q_atm.c $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm -@@ -201,4 +202,15 @@ static-syms.h: $(wildcard *.c) +@@ -202,4 +203,15 @@ static-syms.h: $(wildcard *.c) sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ done > $@ From a4286066462253aaa270ba902e52c167f5fac1c0 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 15 Aug 2018 17:53:48 +0200 Subject: [PATCH 11/11] ath79: fix WNDR3700/WNDR3800 wifi reg size "[...] the size component shall be zero." (See "PCI Bus Binding to: IEEE Std 1275-1994 Rev 2.1" section "4.1.1 Open Firmware-defined Properties for Child Nodes") Signed-off-by: Christian Lamparter --- target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi index 7d842af060..08b3c77b39 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi @@ -156,7 +156,7 @@ ath9k0: wifi@0,11 { compatible = "pci168c,0029"; - reg = <0x8800 0 0 0 0x10000>; + reg = <0x8800 0 0 0 0>; mtd-mac-address = <&art 0x0>; qca,no-eeprom; #gpio-cells = <2>; @@ -165,7 +165,7 @@ ath9k1: wifi@0,12 { compatible = "pci168c,0029"; - reg = <0x9000 0 0 0 0x10000>; + reg = <0x9000 0 0 0 0>; mtd-mac-address = <&art 0xc>; qca,no-eeprom; #gpio-cells = <2>;