From b993a00b82b1bdd682199e44eb81a70dee78e5c9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 17 Jul 2023 14:32:21 +0200 Subject: [PATCH 1/6] base-files: fix duplicate wifi radio sections when using phy renaming The duplicate sections are caused by a race condition at boot, when board.json is not available. In that case, the final phy name cannot be resolved, and extra sections referring to the path are created. Fix this by making sure that wifi config is not being run before board.json is created. Signed-off-by: Felix Fietkau --- package/base-files/files/etc/init.d/boot | 3 +++ package/base-files/files/sbin/wifi | 1 + 2 files changed, 4 insertions(+) diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 749d9e97114..d17754d0879 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -39,6 +39,7 @@ boot() { grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe + touch /tmp/.config_pending /sbin/kmodloader [ ! -f /etc/config/wireless ] && { @@ -47,6 +48,8 @@ boot() { } /bin/config_generate + rm -f /tmp/.config_pending + /sbin/wifi config uci_apply_defaults sync diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index a3d3206ee73..5231063a2b7 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -175,6 +175,7 @@ wifi_detect_notice() { } wifi_config() { + [ -e /tmp/.config_pending ] && return [ ! -f /etc/config/wireless ] && touch /etc/config/wireless for driver in $DRIVERS; do ( From be7f9ad4ddb6a4cd22b128f8e8d424f445e299a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 18 Jul 2023 11:26:37 +0200 Subject: [PATCH 2/6] ramips: fix Ubiquiti EdgeRouter X's MAC address for gmac1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: [ 0.586649] OF: /ethernet@1e100000/mac@1: #nvmem-cell-cells = 1 found 0 Fixes: 28b6224104cc ("ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X") Signed-off-by: Rafał Miłecki --- target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts index 2b5993db44f..4665f04f023 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -10,7 +10,7 @@ label = "eth0"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_22>; + nvmem-cells = <&macaddr_factory_22 0>; nvmem-cell-names = "mac-address"; }; From e57a752217113d066cdea2073f35e8c7c1fafaa6 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 12 Jul 2023 23:38:51 +0200 Subject: [PATCH 3/6] libnftnl: update to 1.2.6 Release Notes: https://lists.netfilter.org/pipermail/netfilter-announce/2023/000250.html Signed-off-by: Nick Hainke --- package/libs/libnftnl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index 05437d020b9..b512d4d58fe 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnftnl PKG_CPE_ID:=cpe:/a:netfilter:libnftnl -PKG_VERSION:=1.2.5 -PKG_RELEASE:=2 +PKG_VERSION:=1.2.6 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files -PKG_HASH:=966de0a8120c8a53db859889749368bfb2cba0c4f0b4c1a30d264eccc45f1226 +PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0-or-later From 58c498247b3d06c0ff1967d2f48ba84084a6cf25 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 14 Jul 2023 15:26:06 +0200 Subject: [PATCH 4/6] nftables: update to 1.0.8 ChangeLog: https://www.netfilter.org/projects/nftables/files/changes-nftables-1.0.8.txt Signed-off-by: Nick Hainke --- package/network/utils/nftables/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile index 55a6a4bcf69..3078f5605ff 100644 --- a/package/network/utils/nftables/Makefile +++ b/package/network/utils/nftables/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nftables -PKG_VERSION:=1.0.7 +PKG_VERSION:=1.0.8 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files -PKG_HASH:=c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412 +PKG_HASH:=9373740de41a82dbc98818e0a46a073faeb8a8d0689fa4fa1a74399c32bf3d50 PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0 From 1d5e7b85ccc58f3d010a54e82ccea81fc102262b Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sun, 16 Jul 2023 18:22:59 -0700 Subject: [PATCH 5/6] libbpf: Update to v1.2.2 Update to the latest upstream release to include recent bugfixes: Link: https://github.com/libbpf/libbpf/compare/v1.2.0...v1.2.2 Signed-off-by: Tony Ambardar --- package/libs/libbpf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile index ee7666f734d..316a5662743 100644 --- a/package/libs/libbpf/Makefile +++ b/package/libs/libbpf/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libbpf -PKG_VERSION:=1.2.0 +PKG_VERSION:=1.2.2 PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf +PKG_MIRROR_HASH:=d20f5a226e5729c87c367f3fba61c44d5e13176ef12637d0e0b30629fa3ab0d6 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=fbd60dbff51c870f5e80a17c4f2fd639eb80af90 -PKG_MIRROR_HASH:=80a80dfba71576e017b596fb28068e2a92de629e426f063e4b37314c8d576336 +PKG_SOURCE_VERSION:=1728e3e4bef0e138ea95ffe62163eb9a6ac6fa32 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION))) PKG_MAINTAINER:=Tony Ambardar From 9e86a96af5ecea6e73fa463d6cfa4408e2b49d35 Mon Sep 17 00:00:00 2001 From: Felix Baumann Date: Tue, 4 Jul 2023 01:35:43 +0200 Subject: [PATCH 6/6] ath79: move ubnt-xm 64M RAM boards back to generic return ubnt_rocket-m and ubnt_powerbridge-m back to ath79-generic They have enough RAM-ressources to not be considered as tiny. This reverts the commit f4415f7635164ec07ddc22f56df93555804b5767 partially Signed-off-by: Felix Baumann --- .../generic/base-files/etc/board.d/01_leds | 4 +++- .../generic/base-files/etc/board.d/02_network | 4 ++++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 4 ++++ target/linux/ath79/image/generic-ubnt.mk | 18 ++++++++++++++++++ target/linux/ath79/image/tiny-ubnt.mk | 18 ------------------ .../ath79/tiny/base-files/etc/board.d/01_leds | 4 +--- .../tiny/base-files/etc/board.d/02_network | 8 ++------ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 4 +--- 8 files changed, 33 insertions(+), 31 deletions(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 00bcad2bc50..4ee347c1415 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -497,7 +497,9 @@ ubnt,bullet-m-xw|\ ubnt,nanostation-loco-m-xw|\ ubnt,nanostation-m-xw|\ ubnt,powerbeam-m2-xw|\ -ubnt,powerbeam-m5-xw) +ubnt,powerbeam-m5-xw|\ +ubnt,powerbridge-m|\ +ubnt,rocket-m) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "red:link1" "wlan0" "1" "100" ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "orange:link2" "wlan0" "26" "100" 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 ddcb69f68c9..1b19d90a05e 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -111,7 +111,9 @@ ath79_setup_interfaces() ubnt,powerbeam-5ac-gen2|\ ubnt,powerbeam-m2-xw|\ ubnt,powerbeam-m5-xw|\ + ubnt,powerbridge-m|\ ubnt,rocket-5ac-lite|\ + ubnt,rocket-m|\ ubnt,unifiac-lite|\ ubnt,unifiac-lr|\ ubnt,unifiac-mesh|\ @@ -804,6 +806,8 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_text mac 0x18) label_mac=$wan_mac ;; + ubnt,powerbridge-m|\ + ubnt,rocket-m|\ ubnt,unifi) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 3b089885b31..e5f4870e6fd 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -113,6 +113,10 @@ case "$FIRMWARE" in tplink,tl-wr842n-v1) caldata_extract "art" 0x1000 0x3e0 ;; + ubnt,powerbridge-m|\ + ubnt,rocket-m) + caldata_extract "art" 0x1000 0x1000 + ;; wd,mynet-n600|\ wd,mynet-n750) caldata_extract "art" 0x5000 0x440 diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 0f70649d031..fa4daa3aaaf 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -158,6 +158,15 @@ define Device/ubnt_powerbeam-m5-xw endef TARGET_DEVICES += ubnt_powerbeam-m5-xw +define Device/ubnt_powerbridge-m + $(Device/ubnt-xm) + SOC := ar7241 + DEVICE_MODEL := PowerBridge M + DEVICE_PACKAGES += rssileds + SUPPORTED_DEVICES += bullet-m +endef +TARGET_DEVICES += ubnt_powerbridge-m + define Device/ubnt_rocket-5ac-lite $(Device/ubnt-xc) SOC := qca9558 @@ -167,6 +176,15 @@ define Device/ubnt_rocket-5ac-lite endef TARGET_DEVICES += ubnt_rocket-5ac-lite +define Device/ubnt_rocket-m + $(Device/ubnt-xm) + SOC := ar7241 + DEVICE_MODEL := Rocket M + DEVICE_PACKAGES += rssileds + SUPPORTED_DEVICES += rocket-m +endef +TARGET_DEVICES += ubnt_rocket-m + define Device/ubnt_routerstation_common DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-mbedtls -uboot-envtools kmod-usb-ohci \ kmod-usb2 fconfig diff --git a/target/linux/ath79/image/tiny-ubnt.mk b/target/linux/ath79/image/tiny-ubnt.mk index 07333714418..77940ed875a 100644 --- a/target/linux/ath79/image/tiny-ubnt.mk +++ b/target/linux/ath79/image/tiny-ubnt.mk @@ -70,21 +70,3 @@ define Device/ubnt_nanostation-loco-m DEFAULT := n endef TARGET_DEVICES += ubnt_nanostation-loco-m - -define Device/ubnt_powerbridge-m - $(Device/ubnt-xm) - SOC := ar7241 - DEVICE_MODEL := PowerBridge M - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += bullet-m -endef -TARGET_DEVICES += ubnt_powerbridge-m - -define Device/ubnt_rocket-m - $(Device/ubnt-xm) - SOC := ar7241 - DEVICE_MODEL := Rocket M - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += rocket-m -endef -TARGET_DEVICES += ubnt_rocket-m diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index 92c4499580f..07e48ec49f3 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -116,9 +116,7 @@ ubnt,bullet-m-ar7241|\ ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ -ubnt,picostation-m|\ -ubnt,powerbridge-m|\ -ubnt,rocket-m) +ubnt,picostation-m) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "red:link1" "wlan0" "1" "100" ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "orange:link2" "wlan0" "26" "100" diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index 4f6e2918a45..836d119867f 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -54,9 +54,7 @@ ath79_setup_interfaces() ubnt,bullet-m-ar7241|\ ubnt,nanobridge-m|\ ubnt,picostation-m|\ - ubnt,nanostation-loco-m|\ - ubnt,powerbridge-m|\ - ubnt,rocket-m) + ubnt,nanostation-loco-m) ucidef_set_interface_lan "eth0" ;; engenius,enh202-v1) @@ -135,9 +133,7 @@ ath79_setup_macs() ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ - ubnt,picostation-m|\ - ubnt,powerbridge-m|\ - ubnt,rocket-m) + ubnt,picostation-m) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; tplink,tl-wr941-v2|\ diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 792c503ab7d..d424b9fe2ca 100644 --- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -43,9 +43,7 @@ case "$FIRMWARE" in ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ - ubnt,picostation-m|\ - ubnt,powerbridge-m|\ - ubnt,rocket-m) + ubnt,picostation-m) caldata_extract "art" 0x1000 0x1000 ;; pqi,air-pen)