Merge Official Source

This commit is contained in:
CN_SZTL 2020-09-13 11:01:29 +08:00
commit bb12c25f93
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
15 changed files with 265 additions and 44 deletions

View File

@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-4.19 = .138
LINUX_VERSION-5.4 = .64
LINUX_VERSION-5.4 = .65
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
LINUX_KERNEL_HASH-5.4.64 = b9d3c2938466f388a70fd190fd6691baa8b757393b267e9f7b06c4730d85d5ef
LINUX_KERNEL_HASH-5.4.65 = f514834417d09de1667836e443e085bf37952603f23572b69ef0fcfda16cac69
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2020-09-08
PKG_SOURCE_VERSION:=d7b614a86b815da711b5fecb10687297a70d859e
PKG_MIRROR_HASH:=266bab9e9fecb3ad86b4cea3303765c35d8b4db00274565368f69de0fa6c05df
PKG_SOURCE_DATE:=2020-09-12
PKG_SOURCE_VERSION:=55a7b6b7f2f773c06a79cb7359ffdab54ba32450
PKG_MIRROR_HASH:=48625fe7a195053f1eb766eebc055faaf9b0b3e5eb1467080308e758c4ab7419
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0

View File

@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_tl-wdr4300.dtsi"
/ {
model = "Mercury MW4530R v1";
compatible = "mercury,mw4530r-v1", "qca,ar9344";
};

View File

@ -0,0 +1,146 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "qca956x.dtsi"
/ {
compatible = "tplink,eap225-wall-v2", "qca,qca9561";
model = "TP-Link EAP225-Wall v2";
aliases {
label-mac-device = &eth1;
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
keys {
compatible = "gpio-keys";
reset {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
led {
label = "LED button";
linux,code = <KEY_LIGHTS_TOGGLE>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_status: status {
label = "tp-link:white:status";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
default-state = "on";
};
};
gpio-export {
compatible = "gpio-export";
poe_passthrough {
gpio-export,name = "tp-link:poe-passthrough:enable";
gpio-export,output = <0>;
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
};
};
};
&uart {
status = "okay";
};
&pcie {
status = "okay";
};
&spi {
status = "okay";
num-cs = <1>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x020000>;
read-only;
};
partition@20000 {
label = "partition-table";
reg = <0x020000 0x010000>;
read-only;
};
info: partition@30000 {
label = "info";
reg = <0x030000 0x010000>;
read-only;
};
partition@40000 {
compatible = "openwrt,elf";
label = "firmware";
reg = <0x040000 0xd80000>;
};
partition@dc0000 {
label = "config";
reg = <0xdc0000 0x030000>;
read-only;
};
/* df0000-f30000 undefined in vendor firmware */
partition@f30000 {
label = "mutil-log";
reg = <0xf30000 0x080000>;
read-only;
};
partition@fb0000 {
label = "oops";
reg = <0xfb0000 0x040000>;
read-only;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&eth1 {
status = "okay";
mtd-mac-address = <&info 0x8>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&info 0x8>;
};

View File

@ -223,6 +223,19 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"
;;
mercury,mw4530r-v1|\
tplink,archer-a7-v5|\
tplink,archer-c6-v2|\
tplink,archer-c6-v2-us|\
tplink,archer-c7-v4|\
tplink,archer-c7-v5|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
;;
nec,wg1200cr|\
ubnt,nanostation-ac|\
yuncore,a782|\
@ -273,18 +286,6 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
;;
tplink,archer-a7-v5|\
tplink,archer-c6-v2|\
tplink,archer-c6-v2-us|\
tplink,archer-c7-v4|\
tplink,archer-c7-v5|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
;;
tplink,archer-c5-v1|\
tplink,archer-c7-v1|\
tplink,archer-c7-v2|\
@ -301,6 +302,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
;;
tplink,eap225-wall-v2)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
tplink,eap245-v3)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "5:lan:2"
@ -502,6 +507,13 @@ ath79_setup_macs()
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
mercury,mw4530r-v1|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il)
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
nec,wg800hp)
lan_mac=$(mtd_get_mac_text board_data 0x280)
wan_mac=$(mtd_get_mac_text board_data 0x480)
@ -536,12 +548,6 @@ ath79_setup_macs()
base_mac=$(mtd_get_mac_binary info 0x8)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il)
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
trendnet,tew-823dru)
lan_mac=$(mtd_get_mac_text mac 0x4)
wan_mac=$(mtd_get_mac_text mac 0x18)

View File

@ -90,6 +90,7 @@ case "$FIRMWARE" in
caldata_extract "calibrate" 0x5000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0)
;;
mercury,mw4530r-v1|\
ocedo,raccoon|\
tplink,tl-wdr3500-v1|\
tplink,tl-wdr3600-v1|\

View File

@ -206,6 +206,12 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
tplink,eap225-wall-v2)
caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
tplink,eap245-v3)
caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)

View File

@ -21,6 +21,14 @@ engenius,epg5000)
glinet,gl-mifi)
migrate_leds ":net=:3g4g"
;;
mercury,mw4530r-v1|\
tplink,archer-c7-v2|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
migrate_leds ":blue:=:green:"
;;
tplink,archer-c25-v1|\
tplink,archer-c58-v1|\
tplink,archer-c59-v1|\
@ -32,13 +40,6 @@ tplink,archer-c7-v5|\
tplink,tl-wr902ac-v1)
migrate_leds "^$boardonly:=tp-link:"
;;
tplink,archer-c7-v2|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
migrate_leds ":blue:=:green:"
;;
tplink,re355-v1)
migrate_leds "re355:=tp-link:"
;;

View File

@ -364,7 +364,6 @@ TARGET_DEVICES += tplink_cpe610-v2
define Device/tplink-eap2x5
$(Device/tplink-safeloader)
SOC := qca9563
LOADER_TYPE := elf
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel
KERNEL_INITRAMFS := $$(KERNEL)
@ -372,8 +371,20 @@ define Device/tplink-eap2x5
pad-extra 128
endef
define Device/tplink_eap225-wall-v2
$(Device/tplink-eap2x5)
SOC := qca9561
IMAGE_SIZE := 13824k
DEVICE_MODEL := EAP225-Wall
DEVICE_VARIANT := v2
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
TPLINK_BOARD_ID := EAP225-WALL-V2
endef
TARGET_DEVICES += tplink_eap225-wall-v2
define Device/tplink_eap245-v3
$(Device/tplink-eap2x5)
SOC := qca9563
IMAGE_SIZE := 14592k
DEVICE_MODEL := EAP245
DEVICE_VARIANT := v3

View File

@ -1090,6 +1090,18 @@ define Device/meraki_mr16
endef
TARGET_DEVICES += meraki_mr16
define Device/mercury_mw4530r-v1
$(Device/tplink-8mlzma)
SOC := ar9344
DEVICE_VENDOR := Mercury
DEVICE_MODEL := MW4530R
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
TPLINK_HWID := 0x45300001
SUPPORTED_DEVICES += tl-wdr4300
endef
TARGET_DEVICES += mercury_mw4530r-v1
define Device/nec_wg1200cr
SOC := qca9563
DEVICE_VENDOR := NEC

View File

@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2847,11 +2847,13 @@ static const struct seq_operations fib_r
@@ -2848,11 +2848,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net)
{
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL))
goto out2;
@@ -2862,17 +2864,21 @@ int __net_init fib_proc_init(struct net
@@ -2863,17 +2865,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3:

View File

@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2595,6 +2595,7 @@ static const char *const rtn_type_names[
@@ -2596,6 +2596,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW",
[RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE",

View File

@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netif_elide_gro(skb->dev))
goto normal;
@@ -7262,6 +7265,48 @@ static void __netdev_adjacent_dev_unlink
@@ -7263,6 +7266,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
@@ -7312,6 +7357,7 @@ static int __netdev_upper_dev_link(struc
@@ -7313,6 +7358,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
@@ -7405,6 +7451,7 @@ void netdev_upper_dev_unlink(struct net_
@@ -7406,6 +7452,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
@@ -8135,6 +8182,7 @@ int dev_set_mac_address(struct net_devic
@@ -8136,6 +8183,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;

View File

@ -196,15 +196,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int weight)
{
@@ -6238,6 +6327,7 @@ void netif_napi_add(struct net_device *d
@@ -6237,6 +6326,7 @@ void netif_napi_add(struct net_device *d
#ifdef CONFIG_NETPOLL
napi->poll_owner = -1;
#endif
+ INIT_WORK(&napi->work, napi_workfn);
set_bit(NAPI_STATE_SCHED, &napi->state);
napi_hash_add(napi);
}
@@ -6276,6 +6366,7 @@ static void flush_gro_hash(struct napi_s
set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list);
@@ -6277,6 +6367,7 @@ static void flush_gro_hash(struct napi_s
void netif_napi_del(struct napi_struct *napi)
{
might_sleep();
@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (napi_hash_del(napi))
synchronize_net();
list_del_init(&napi->dev_list);
@@ -6288,50 +6379,18 @@ EXPORT_SYMBOL(netif_napi_del);
@@ -6289,50 +6380,18 @@ EXPORT_SYMBOL(netif_napi_del);
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{
@ -267,7 +267,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Some drivers may have called napi_schedule
* prior to exhausting their budget.
@@ -10264,6 +10323,10 @@ static int __init net_dev_init(void)
@@ -10265,6 +10324,10 @@ static int __init net_dev_init(void)
sd->backlog.weight = weight_p;
}

View File

@ -1298,6 +1298,35 @@ static struct device_info boards[] = {
.last_sysupgrade_partition = "file-system"
},
/** Firmware layout for the EAP225-Wall v2 */
{
.id = "EAP225-WALL-V2",
.support_list =
"SupportList:\r\n"
"EAP225-Wall(TP-Link|UN|AC1200-D):2.0\r\n",
.support_trail = '\xff',
.soft_ver = NULL,
.soft_ver_compat_level = 1,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
{"partition-table", 0x20000, 0x02000},
{"default-mac", 0x30000, 0x01000},
{"support-list", 0x31000, 0x00100},
{"product-info", 0x31100, 0x00400},
{"soft-version", 0x32000, 0x00100},
{"firmware", 0x40000, 0xd80000},
{"user-config", 0xdc0000, 0x30000},
{"mutil-log", 0xf30000, 0x80000},
{"oops", 0xfb0000, 0x40000},
{"radio", 0xff0000, 0x10000},
{NULL, 0, 0}
},
.first_sysupgrade_partition = "os-image",
.last_sysupgrade_partition = "file-system"
},
/** Firmware layout for the EAP245 v3 */
{
.id = "EAP245-V3",