[PATCH v4] treewide: move devices from ar71xx to ath79

Adrian Schmutzler freifunk at adrianschmutzler.de
Fr Apr 17 20:07:36 CEST 2020


This patch removes device support for ar71xx devices that are supported
in ath79. Building them with ath79 will be the new default.

The only devices remaining in ar71xx will be the following, as backporting
them to openwrt-19.07 is too complicated:
- cpe210-v1
- cpe510-v1

Accordingly, no tiny devices are left in ar71xx and we can drop the relevant
patches. The remaining bsp/config for ar71xx is moved to generic again.

For the tl-wr741nd-v2, in ath79 the tplink_tl-wr741-v1 image is used.

This requires some adjustments on the way:
- The board names and image names on ath79 contain the vendor name,
  where the former have it separated by a comma (tplink,cpe210-v2)
  and the latter use an underscore (tplink_cpe210-v2). It is
  guaranteed that this is the only difference between board and
  image names.
  Consequently, the ath79 devices will use their full board name also
  in our firmware. A lot of renames in fff-boardname can be dropped.
  The rename for fff-sysupgrade is already present in fff-upgrade.sh
  While at it, fix that for the WDR4900 v1 as well.
- Due to a different switch driver, the startup of ethernet devices
  is altered, which leads to eth0 and eth1 being swapped for some ath79
  devices compared to ar71xx. This has been adjusted for SWITCHDEV/WANDEV
  and MAC address setup.
- Since we have direct support for the AC Mesh now, use the proper
  name instead of the AC Lite image. For Ubiquiti, different device
  variants are now available as separate images.
- MAC address patches for Archer C60 are moved to ath79 as well.
- To support some devices, patches from OpenWrt have to be included. All
  of these are already added to the stable openwrt-19.07 branch, so they
  can be removed again when 19.07.3 is available.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>

---

Still not tested at all.

Changes in v4:
- Add even more devices (all expect cpe210/cpe510, requires OpenWrt patches)
- use comma in file names
- make ar71xx remnant generic (as there is no tiny stuff left)

Changes in v3:
- Migrate all available devices
- Make separate patch for board name rewrite
- Update OpenWrt patches for C60
---
 bsp/ar71xx-generic.bsp                        |   5 +
 bsp/ar71xx-generic/.config                    |  34 ++
 bsp/ar71xx-tiny.bsp                           |  41 --
 bsp/ar71xx-tiny/.config                       | 114 -----
 bsp/ath79-generic.bsp                         |  28 +
 bsp/ath79-generic/.config                     |  89 ++++
 bsp/ath79-tiny.bsp                            |  16 +
 bsp/ath79-tiny/.config                        |  56 ++
 ...-OpenWrt-config-migration-mechanisms.patch |   6 +-
 .../openwrt/0002-set-root-password.patch      |  12 +-
 .../openwrt/0003-ntpd-host-as-string.patch    |  12 +-
 ...5-allow-building-all-devives-as-tiny.patch |  43 --
 ...ed-LAN-WAN-MAC-address-for-Archer-C6.patch |  61 ---
 ...d-LAN-WAN-MAC-address-for-Archer-C60.patch |  38 ++
 ...ong-MAC-address-adjustment-for-Arche.patch |  28 -
 ...9-add-support-for-TP-Link-WDR3500-v1.patch | 481 ++++++++++++++++++
 ...dd-support-for-TP-Link-TL-WA850RE-v1.patch | 250 +++++++++
 ...dd-support-for-TP-Link-TL-WA860RE-v1.patch | 151 ++++++
 ...dd-support-for-TP-Link-TL-WDR4310-v1.patch |  86 ++++
 ...TED_DEVICES-for-TP-Link-TL-WA901ND-v.patch |  22 +
 src/packages/fff/fff-boardname/Makefile       |   2 +-
 .../files/etc/uci-defaults/15-fff-boardname   |  69 ---
 src/packages/fff/fff-network/Makefile         |   2 +-
 .../fff-network/ar71xx/network.archer-c25-v1  |  10 -
 .../fff-network/ar71xx/network.tl-wr741nd-v2  |   9 -
 .../fff-network/ar71xx/network.tl-wr841-v8    |  10 -
 .../fff-network/ar71xx/network.tl-wr842n-v2   |   8 -
 .../network.glinet,gl-ar150}                  |   4 +-
 .../fff/fff-network/ath79/network.mode        |  30 ++
 .../network.tplink,archer-c25-v1}             |   5 +-
 .../ath79/network.tplink,archer-c60-v1        |   9 +
 .../ath79/network.tplink,archer-c60-v2        |   9 +
 .../network.tplink,archer-c7-v2}              |   0
 .../network.tplink,archer-c7-v5}              |   0
 .../network.tplink,cpe210-v2}                 |   0
 .../network.tplink,cpe210-v3}                 |   0
 .../network.tplink,tl-mr3020-v1}              |   0
 .../network.tplink,tl-wa850re-v1}             |   0
 .../network.tplink,tl-wa860re-v1}             |   0
 .../network.tplink,tl-wa901nd-v2}             |   0
 .../network.tplink,tl-wdr3500-v1}             |   0
 .../network.tplink,tl-wdr3600-v1}             |   0
 .../network.tplink,tl-wdr4300-v1}             |   0
 .../network.tplink,tl-wdr4310-v1}             |   0
 .../network.tplink,tl-wr1043n-v5}             |   2 +-
 .../network.tplink,tl-wr1043nd-v1}            |   0
 .../network.tplink,tl-wr1043nd-v2}            |   0
 .../network.tplink,tl-wr1043nd-v3}            |   0
 .../network.tplink,tl-wr1043nd-v4}            |   2 +-
 .../network.tplink,tl-wr740n-v4}              |   1 -
 .../network.tplink,tl-wr741-v1}               |   5 +-
 .../network.tplink,tl-wr741nd-v4}             |   1 -
 .../network.tplink,tl-wr841-v10}              |   0
 .../network.tplink,tl-wr841-v11}              |   0
 .../network.tplink,tl-wr841-v12}              |   0
 .../network.tplink,tl-wr841-v7}               |   0
 .../ath79/network.tplink,tl-wr841-v8          |  10 +
 .../network.tplink,tl-wr841-v9}               |   0
 .../ath79/network.tplink,tl-wr842n-v2         |   8 +
 .../network.ubnt,bullet-m}                    |   0
 .../network.ubnt,nanostation-loco-m}          |   0
 .../network.ubnt,nanostation-loco-m-xw}       |   0
 .../network.ubnt,nanostation-m}               |   0
 .../network.ubnt,picostation-m}               |   0
 .../network.ubnt,unifi}                       |   0
 .../network.ubnt,unifiac-mesh}                |   0
 ...dr4900-v1 => network.tplink,tl-wdr4900-v1} |   0
 src/packages/fff/fff-wireless/Makefile        |   2 +-
 .../etc/uci-defaults/24b-config-wireless      |  16 +-
 69 files changed, 1346 insertions(+), 441 deletions(-)
 create mode 100644 bsp/ar71xx-generic.bsp
 create mode 100644 bsp/ar71xx-generic/.config
 delete mode 100644 bsp/ar71xx-tiny.bsp
 delete mode 100644 bsp/ar71xx-tiny/.config
 create mode 100644 bsp/ath79-generic.bsp
 create mode 100644 bsp/ath79-generic/.config
 create mode 100644 bsp/ath79-tiny.bsp
 create mode 100644 bsp/ath79-tiny/.config
 delete mode 100644 build_patches/openwrt/0005-allow-building-all-devives-as-tiny.patch
 delete mode 100644 build_patches/openwrt/0021-ar71xx-fix-swapped-LAN-WAN-MAC-address-for-Archer-C6.patch
 create mode 100644 build_patches/openwrt/0021-ath79-fix-swapped-LAN-WAN-MAC-address-for-Archer-C60.patch
 delete mode 100644 build_patches/openwrt/0022-ar71xx-remove-wrong-MAC-address-adjustment-for-Arche.patch
 create mode 100644 build_patches/openwrt/0031-ath79-add-support-for-TP-Link-WDR3500-v1.patch
 create mode 100644 build_patches/openwrt/0032-ath79-add-support-for-TP-Link-TL-WA850RE-v1.patch
 create mode 100644 build_patches/openwrt/0033-ath79-add-support-for-TP-Link-TL-WA860RE-v1.patch
 create mode 100644 build_patches/openwrt/0034-ath79-add-support-for-TP-Link-TL-WDR4310-v1.patch
 create mode 100644 build_patches/openwrt/0041-ath79-add-SUPPORTED_DEVICES-for-TP-Link-TL-WA901ND-v.patch
 delete mode 100644 src/packages/fff/fff-network/ar71xx/network.archer-c25-v1
 delete mode 100644 src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v2
 delete mode 100644 src/packages/fff/fff-network/ar71xx/network.tl-wr841-v8
 delete mode 100644 src/packages/fff/fff-network/ar71xx/network.tl-wr842n-v2
 rename src/packages/fff/fff-network/{ar71xx/network.gl-ar150 => ath79/network.glinet,gl-ar150} (88%)
 create mode 100644 src/packages/fff/fff-network/ath79/network.mode
 rename src/packages/fff/fff-network/{ar71xx/network.archer-c60-v1 => ath79/network.tplink,archer-c25-v1} (79%)
 create mode 100644 src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v1
 create mode 100644 src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v2
 rename src/packages/fff/fff-network/{ar71xx/network.archer-c7-v2 => ath79/network.tplink,archer-c7-v2} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.archer-c7-v5 => ath79/network.tplink,archer-c7-v5} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.cpe210-v2 => ath79/network.tplink,cpe210-v2} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.cpe210-v3 => ath79/network.tplink,cpe210-v3} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-mr3020-v1 => ath79/network.tplink,tl-mr3020-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wa850re-v1 => ath79/network.tplink,tl-wa850re-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wa860re-v1 => ath79/network.tplink,tl-wa860re-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wa901nd-v2 => ath79/network.tplink,tl-wa901nd-v2} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wdr3500-v1 => ath79/network.tplink,tl-wdr3500-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wdr3600-v1 => ath79/network.tplink,tl-wdr3600-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wdr4300-v1 => ath79/network.tplink,tl-wdr4300-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wdr4310-v1 => ath79/network.tplink,tl-wdr4310-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr1043nd-v4 => ath79/network.tplink,tl-wr1043n-v5} (83%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr1043nd-v1 => ath79/network.tplink,tl-wr1043nd-v1} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr1043nd-v2 => ath79/network.tplink,tl-wr1043nd-v2} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr1043nd-v3 => ath79/network.tplink,tl-wr1043nd-v3} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr1043n-v5 => ath79/network.tplink,tl-wr1043nd-v4} (83%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr740n-v4 => ath79/network.tplink,tl-wr740n-v4} (92%)
 rename src/packages/fff/fff-network/{ar71xx/network.archer-c60-v2 => ath79/network.tplink,tl-wr741-v1} (64%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr741nd-v4 => ath79/network.tplink,tl-wr741nd-v4} (92%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr841-v10 => ath79/network.tplink,tl-wr841-v10} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr841-v11 => ath79/network.tplink,tl-wr841-v11} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr841-v12 => ath79/network.tplink,tl-wr841-v12} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr841-v7 => ath79/network.tplink,tl-wr841-v7} (100%)
 create mode 100644 src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v8
 rename src/packages/fff/fff-network/{ar71xx/network.tl-wr841-v9 => ath79/network.tplink,tl-wr841-v9} (100%)
 create mode 100644 src/packages/fff/fff-network/ath79/network.tplink,tl-wr842n-v2
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-bullet-m => ath79/network.ubnt,bullet-m} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-loco-m => ath79/network.ubnt,nanostation-loco-m} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-loco-m-xw => ath79/network.ubnt,nanostation-loco-m-xw} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-nano-m => ath79/network.ubnt,nanostation-m} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-pico-m => ath79/network.ubnt,picostation-m} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-unifi => ath79/network.ubnt,unifi} (100%)
 rename src/packages/fff/fff-network/{ar71xx/network.ubnt-unifiac-lite => ath79/network.ubnt,unifiac-mesh} (100%)
 rename src/packages/fff/fff-network/mpc85xx/{network.tl-wdr4900-v1 => network.tplink,tl-wdr4900-v1} (100%)

diff --git a/bsp/ar71xx-generic.bsp b/bsp/ar71xx-generic.bsp
new file mode 100644
index 00000000..89fca1df
--- /dev/null
+++ b/bsp/ar71xx-generic.bsp
@@ -0,0 +1,5 @@
+chipset=ar71xx
+subtarget=generic
+images=("openwrt-${chipset}-${subtarget}-cpe210-220-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-cpe510-520-v1-squashfs-*"
+        )
diff --git a/bsp/ar71xx-generic/.config b/bsp/ar71xx-generic/.config
new file mode 100644
index 00000000..f505d866
--- /dev/null
+++ b/bsp/ar71xx-generic/.config
@@ -0,0 +1,34 @@
+# Generated using "./buildscript config openwrt".
+# Do no edit manually
+#
+CONFIG_TARGET_ar71xx=y
+CONFIG_TARGET_ar71xx_generic=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe210-220-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_cpe210-220-v1="-rssileds"
+CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe510-520-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_cpe510-520-v1="-rssileds"
+CONFIG_BUSYBOX_CUSTOM=y
+CONFIG_TARGET_PER_DEVICE_ROOTFS=y
+# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
+# CONFIG_BUSYBOX_CONFIG_CROND is not set
+# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
+CONFIG_CLEAN_IPKG=y
+# CONFIG_DROPBEAR_CURVE25519 is not set
+# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
+# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
+# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
+CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
+# CONFIG_PACKAGE_ALFRED_VIS is not set
+CONFIG_PACKAGE_hostapd-mini=y
+CONFIG_PACKAGE_iwinfo=m
+CONFIG_PACKAGE_libiwinfo=m
+CONFIG_PACKAGE_opkg=m
+CONFIG_PACKAGE_wpad-mini=m
+CONFIG_STRIP_KERNEL_EXPORTS=y
diff --git a/bsp/ar71xx-tiny.bsp b/bsp/ar71xx-tiny.bsp
deleted file mode 100644
index aa2c86e3..00000000
--- a/bsp/ar71xx-tiny.bsp
+++ /dev/null
@@ -1,41 +0,0 @@
-chipset=ar71xx
-subtarget=tiny
-images=("openwrt-${chipset}-${subtarget}-archer-c25-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-archer-c60-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-archer-c60-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-archer-c7-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-archer-c7-v5-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-cpe210-220-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-cpe210-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-cpe210-v3-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-cpe510-520-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-gl-ar150-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-mr3020-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wa850re-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wa860re-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wa901nd-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wdr3500-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wdr3600-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wdr4300-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wdr4310-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr1043nd-v1-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr1043nd-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr1043nd-v3-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr1043nd-v4-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr1043n-v5-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr740n-v4-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr741nd-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr741nd-v4-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v7-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v8-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v9-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v10-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v11-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr841-v12-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-tl-wr842n-v2-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-ubnt-bullet-m-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-ubnt-loco-m-xw-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-ubnt-nano-m-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-ubnt-unifi-squashfs-*"
-        "openwrt-${chipset}-${subtarget}-ubnt-unifiac-lite-squashfs-*"
-        )
diff --git a/bsp/ar71xx-tiny/.config b/bsp/ar71xx-tiny/.config
deleted file mode 100644
index 61aaa609..00000000
--- a/bsp/ar71xx-tiny/.config
+++ /dev/null
@@ -1,114 +0,0 @@
-# Generated using "./buildscript config openwrt".
-# Do no edit manually
-#
-CONFIG_TARGET_ar71xx=y
-CONFIG_TARGET_ar71xx_tiny=y
-CONFIG_TARGET_MULTI_PROFILE=y
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_archer-c25-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_archer-c25-v1="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_archer-c60-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_archer-c60-v1="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_archer-c60-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_archer-c60-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_archer-c7-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_archer-c7-v5=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_archer-c7-v5="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-220-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-220-v1="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-v2="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-v3=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-v3="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe510-520-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe510-520-v1="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_gl-ar150=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_gl-ar150=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-mr3020-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-mr3020-v1="-uboot-envtools -kmod-usb-core -kmod-usb2 -kmod-usb-ledtrig-usbport"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wa850re-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wa850re-v1="-uboot-envtools -rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wa860re-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wa860re-v1="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wa901nd-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wa901nd-v2="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wdr3500-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wdr3500-v1=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wdr3600-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wdr3600-v1=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wdr4300-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wdr4300-v1=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wdr4310-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wdr4310-v1=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr1043nd-v1=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr1043nd-v1=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr1043nd-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr1043nd-v2=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr1043nd-v3=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr1043nd-v3=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr1043nd-v4=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr1043nd-v4=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr1043n-v5=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr1043n-v5=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr740n-v4=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr740n-v4="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr741nd-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr741nd-v2="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr741nd-v4=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr741nd-v4="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v7=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v7="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v8=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v8="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v9=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v9="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v10=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v10="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v11=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v11="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr841-v12=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr841-v12="-uboot-envtools"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_tl-wr842n-v2=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_tl-wr842n-v2=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_ubnt-bullet-m=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_ubnt-bullet-m="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_ubnt-loco-m-xw=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_ubnt-loco-m-xw="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_ubnt-nano-m=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_ubnt-nano-m="-rssileds"
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_ubnt-unifi=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_ubnt-unifi=""
-CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_ubnt-unifiac-lite=y
-CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_ubnt-unifiac-lite="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
-CONFIG_BUSYBOX_CUSTOM=y
-CONFIG_TARGET_PER_DEVICE_ROOTFS=y
-# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
-# CONFIG_BUSYBOX_CONFIG_CROND is not set
-# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
-CONFIG_CLEAN_IPKG=y
-# CONFIG_DROPBEAR_CURVE25519 is not set
-# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
-# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
-# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
-# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
-# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
-# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
-# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
-CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
-# CONFIG_PACKAGE_ALFRED_VIS is not set
-CONFIG_PACKAGE_hostapd-mini=y
-CONFIG_PACKAGE_iwinfo=m
-CONFIG_PACKAGE_libiwinfo=m
-CONFIG_PACKAGE_opkg=m
-CONFIG_PACKAGE_wpad-mini=m
-CONFIG_PACKAGE_ath10k-firmware-qca9887=m
-CONFIG_PACKAGE_ath10k-firmware-qca9888=m
-CONFIG_PACKAGE_ath10k-firmware-qca988x=m
-CONFIG_PACKAGE_kmod-ath10k=m
-CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
-CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
-CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
-CONFIG_PACKAGE_kmod-ath10k-ct=m
-CONFIG_STRIP_KERNEL_EXPORTS=y
diff --git a/bsp/ath79-generic.bsp b/bsp/ath79-generic.bsp
new file mode 100644
index 00000000..752bfddc
--- /dev/null
+++ b/bsp/ath79-generic.bsp
@@ -0,0 +1,28 @@
+chipset=ath79
+subtarget=generic
+images=("openwrt-${chipset}-${subtarget}-glinet_gl-ar150-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_archer-c25-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_archer-c60-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_archer-c60-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_archer-c7-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_archer-c7-v5-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_cpe210-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_cpe210-v3-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wdr3500-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wdr3600-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wdr4300-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wdr4310-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v3-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v4-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr1043n-v5-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr842n-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_bullet-m-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_nanostation-loco-m-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_nanostation-loco-m-xw-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_nanostation-m-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_picostation-m-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_unifi-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-ubnt_unifiac-mesh-squashfs-*"
+        )
diff --git a/bsp/ath79-generic/.config b/bsp/ath79-generic/.config
new file mode 100644
index 00000000..1f25ae2f
--- /dev/null
+++ b/bsp/ath79-generic/.config
@@ -0,0 +1,89 @@
+# Generated using "./buildscript config openwrt".
+# Do no edit manually
+#
+CONFIG_TARGET_ath79=y
+CONFIG_TARGET_ath79_generic=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v5="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v2="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v3=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v3="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr842n-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr842n-v2=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_bullet-m="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-m=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-m="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_picostation-m=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_picostation-m="-rssileds"
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifi=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifi=""
+CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifiac-mesh=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifiac-mesh="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
+CONFIG_BUSYBOX_CUSTOM=y
+CONFIG_TARGET_PER_DEVICE_ROOTFS=y
+# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
+# CONFIG_BUSYBOX_CONFIG_CROND is not set
+# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
+CONFIG_CLEAN_IPKG=y
+# CONFIG_DROPBEAR_CURVE25519 is not set
+# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
+# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
+# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
+CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
+# CONFIG_PACKAGE_ALFRED_VIS is not set
+CONFIG_PACKAGE_hostapd-mini=y
+CONFIG_PACKAGE_iwinfo=m
+CONFIG_PACKAGE_libiwinfo=m
+CONFIG_PACKAGE_opkg=m
+CONFIG_PACKAGE_wpad-mini=m
+CONFIG_PACKAGE_ath10k-firmware-qca9887=m
+CONFIG_PACKAGE_ath10k-firmware-qca9888=m
+CONFIG_PACKAGE_ath10k-firmware-qca988x=m
+CONFIG_PACKAGE_kmod-ath10k=m
+CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
+CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
+CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
+CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=m
+CONFIG_PACKAGE_kmod-ath10k-ct=m
+CONFIG_STRIP_KERNEL_EXPORTS=y
diff --git a/bsp/ath79-tiny.bsp b/bsp/ath79-tiny.bsp
new file mode 100644
index 00000000..b5d864c8
--- /dev/null
+++ b/bsp/ath79-tiny.bsp
@@ -0,0 +1,16 @@
+chipset=ath79
+subtarget=tiny
+images=("openwrt-${chipset}-${subtarget}-tplink_tl-mr3020-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wa850re-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wa860re-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wa901nd-v2-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr740n-v4-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr741-v1-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr741nd-v4-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v7-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v8-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v9-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v10-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v11-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_tl-wr841-v12-squashfs-*"
+        )
diff --git a/bsp/ath79-tiny/.config b/bsp/ath79-tiny/.config
new file mode 100644
index 00000000..8a394e14
--- /dev/null
+++ b/bsp/ath79-tiny/.config
@@ -0,0 +1,56 @@
+# Generated using "./buildscript config openwrt".
+# Do no edit manually
+#
+CONFIG_TARGET_ath79=y
+CONFIG_TARGET_ath79_tiny=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-mr3020-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-mr3020-v1="-uboot-envtools -kmod-usb-core -kmod-usb-chipidea2 -kmod-usb-ledtrig-usbport"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wa850re-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wa850re-v1="-uboot-envtools -rssileds"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wa860re-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wa860re-v1="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wa901nd-v2=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wa901nd-v2="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr740n-v4=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr740n-v4="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr741-v1=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr741-v1="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr741nd-v4=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr741nd-v4="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v7=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v7="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v8=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v8="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v9=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v9="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v10=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v10="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v11=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v11="-uboot-envtools"
+CONFIG_TARGET_DEVICE_ath79_tiny_DEVICE_tplink_tl-wr841-v12=y
+CONFIG_TARGET_DEVICE_PACKAGES_ath79_tiny_DEVICE_tplink_tl-wr841-v12="-uboot-envtools"
+CONFIG_BUSYBOX_CUSTOM=y
+CONFIG_TARGET_PER_DEVICE_ROOTFS=y
+# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
+# CONFIG_BUSYBOX_CONFIG_CROND is not set
+# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
+CONFIG_CLEAN_IPKG=y
+# CONFIG_DROPBEAR_CURVE25519 is not set
+# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
+# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
+# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
+# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
+CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
+# CONFIG_PACKAGE_ALFRED_VIS is not set
+CONFIG_PACKAGE_hostapd-mini=y
+CONFIG_PACKAGE_iwinfo=m
+CONFIG_PACKAGE_libiwinfo=m
+CONFIG_PACKAGE_opkg=m
+CONFIG_PACKAGE_wpad-mini=m
+CONFIG_STRIP_KERNEL_EXPORTS=y
diff --git a/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch b/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch
index fe36ea99..7c5b37cc 100644
--- a/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch
+++ b/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch
@@ -1,4 +1,3 @@
-From 5bc010240769c167dcbe13fa6aa726fb71a84f17 Mon Sep 17 00:00:00 2001
 From: Tim Niemeyer <tim at tn-x.org>
 Date: Sat, 8 Jul 2017 10:46:59 +0200
 Subject: Disable OpenWrt config migration mechanisms
@@ -7,7 +6,7 @@ This disables all OpenWrt config migration mechanisms except for
 files listed in /etc/sysupgrade.conf
 
 diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
-index 6c518b780e..49d4514b98 100755
+index 6c518b780eddd973966537b50d8f7c82539bb1e1..49d4514b988e827098450d57da0ae50a37506d3a 100755
 --- a/package/base-files/files/sbin/sysupgrade
 +++ b/package/base-files/files/sbin/sysupgrade
 @@ -134,9 +134,9 @@ list_changed_conffiles() {
@@ -22,6 +21,3 @@ index 6c518b780e..49d4514b98 100755
  	return 0
  }
  
--- 
-2.25.1
-
diff --git a/build_patches/openwrt/0002-set-root-password.patch b/build_patches/openwrt/0002-set-root-password.patch
index 40362b2e..ce5e4a3f 100644
--- a/build_patches/openwrt/0002-set-root-password.patch
+++ b/build_patches/openwrt/0002-set-root-password.patch
@@ -1,14 +1,9 @@
-From d61fe229cf74badde02f617d66b2aab7d7ce96bc Mon Sep 17 00:00:00 2001
 From: Tim Niemeyer <tim at tn-x.org>
 Date: Sat, 8 Jul 2017 10:47:28 +0200
-Subject: [PATCH 2/4] set root password
-
----
- package/base-files/files/etc/shadow | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+Subject: set root password
 
 diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
-index 4b4154f21f..b8d180a956 100644
+index 4b4154f21f478cc025a350363b3e34319c6afacc..b8d180a95691ab09f9c4d759ffd97da34a022623 100644
 --- a/package/base-files/files/etc/shadow
 +++ b/package/base-files/files/etc/shadow
 @@ -1,4 +1,4 @@
@@ -17,6 +12,3 @@ index 4b4154f21f..b8d180a956 100644
  daemon:*:0:0:99999:7:::
  ftp:*:0:0:99999:7:::
  network:*:0:0:99999:7:::
--- 
-2.25.1
-
diff --git a/build_patches/openwrt/0003-ntpd-host-as-string.patch b/build_patches/openwrt/0003-ntpd-host-as-string.patch
index 3a655063..4762277b 100644
--- a/build_patches/openwrt/0003-ntpd-host-as-string.patch
+++ b/build_patches/openwrt/0003-ntpd-host-as-string.patch
@@ -1,14 +1,9 @@
-From bc184e5c95dd934ad8c9d41fb5449390b4e160d2 Mon Sep 17 00:00:00 2001
 From: Tim Niemeyer <tim at tn-x.org>
 Date: Sat, 8 Jul 2017 10:47:56 +0200
-Subject: [PATCH 3/4] ntpd host as string
-
----
- package/utils/busybox/files/sysntpd | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+Subject: ntpd host as string
 
 diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
-index 52866ba32a..b6b28cd025 100755
+index 52866ba32acd26a490f9c9024fc3e43e0f757496..b6b28cd02527b89c0a4cc2f9adef52bb4c8427b0 100755
 --- a/package/utils/busybox/files/sysntpd
 +++ b/package/utils/busybox/files/sysntpd
 @@ -30,7 +30,7 @@ get_dhcp_ntp_servers() {
@@ -20,6 +15,3 @@ index 52866ba32a..b6b28cd025 100755
  }
  
  start_ntpd_instance() {
--- 
-2.25.1
-
diff --git a/build_patches/openwrt/0005-allow-building-all-devives-as-tiny.patch b/build_patches/openwrt/0005-allow-building-all-devives-as-tiny.patch
deleted file mode 100644
index e31487cd..00000000
--- a/build_patches/openwrt/0005-allow-building-all-devives-as-tiny.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: Tim Niemeyer <tim at tn-x.org>
-Date: Mon, 6 Aug 2018 18:39:04 +0200
-Subject: [PATCH 4/4] allow building all devives as tiny
-
-diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index 804532b55c..6328d5cc29 100644
---- a/target/linux/ar71xx/image/Makefile
-+++ b/target/linux/ar71xx/image/Makefile
-@@ -23,6 +23,10 @@ include ./tiny.mk
- include ./tiny-tp-link.mk
- include ./tiny-legacy-devices.mk
- include ./tiny-senao.mk
-+include ./generic.mk
-+include ./generic-legacy-devices.mk
-+include ./generic-tp-link.mk
-+include ./generic-ubnt.mk
- endif
- ifeq ($(SUBTARGET),nand)
- include ./nand.mk
-diff --git a/target/linux/ar71xx/tiny/config-default b/target/linux/ar71xx/tiny/config-default
-index 1148d8c451..eccc01757e 100644
---- a/target/linux/ar71xx/tiny/config-default
-+++ b/target/linux/ar71xx/tiny/config-default
-@@ -74,3 +74,19 @@ CONFIG_SOC_AR933X=y
- CONFIG_SOC_AR934X=y
- CONFIG_SOC_QCA953X=y
- CONFIG_SOC_QCA956X=y
-+# FFF
-+CONFIG_ATH79_MACH_ARCHER_C25_V1=y
-+CONFIG_ATH79_MACH_ARCHER_C60_V1=y
-+CONFIG_ATH79_MACH_ARCHER_C60_V2=y
-+CONFIG_ATH79_MACH_ARCHER_C7=y
-+CONFIG_ATH79_MACH_CPE510=y
-+CONFIG_ATH79_MACH_GL_AR150=y
-+CONFIG_ATH79_MACH_TL_WDR3500=y
-+CONFIG_ATH79_MACH_TL_WDR4300=y
-+CONFIG_ATH79_MACH_TL_WR1043ND=y
-+CONFIG_ATH79_MACH_TL_WR1043ND_V2=y
-+CONFIG_ATH79_MACH_TL_WR1043ND_V4=y
-+CONFIG_ATH79_MACH_TL_WR1043N_V5=y
-+CONFIG_ATH79_MACH_UBNT=y
-+CONFIG_ATH79_MACH_UBNT_UNIFIAC=y
-+CONFIG_ATH79_MACH_UBNT_XM=y
diff --git a/build_patches/openwrt/0021-ar71xx-fix-swapped-LAN-WAN-MAC-address-for-Archer-C6.patch b/build_patches/openwrt/0021-ar71xx-fix-swapped-LAN-WAN-MAC-address-for-Archer-C6.patch
deleted file mode 100644
index dd013d3b..00000000
--- a/build_patches/openwrt/0021-ar71xx-fix-swapped-LAN-WAN-MAC-address-for-Archer-C6.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
-Date: Wed, 11 Mar 2020 15:46:00 +0100
-Subject: ar71xx: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
-
-The MAC addresses for lan/wan are swapped compared to the vendor
-firmware. This adjusts to vendor configuration, which is:
-
-lan   *:7b   label
-wan   *:7c   label+1
-2.4g  *:7b   label
-5g    *:7a   label-1
-
-Only one address is stored in <&mac 0x8>, corresponding to the label.
-
-This has been checked on revisions v1, v2 and v3.
-
-Since ar71xx calculates the ath10k MAC address based on the ethernet
-addresses, the number there is adjusted, too.
-
-Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
-(cherry picked from commit 14eb54938b525d4c2d2847a6fad7670ed944650c)
-
-diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
-index 718fd7555c73c247cb662c0a8638895e2da38b84..8fb5be643c9c1372195bf10e3e45927c2f6a2a55 100644
---- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
-+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
-@@ -182,7 +182,7 @@ case "$FIRMWARE" in
- 		ath10kcal_extract "art" 20480 12064
- 		ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
- 			/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
--		ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
-+		ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
- 		;;
- 	cf-e385ac)
- 		ath10kcal_extract "art" 20480 12064
-diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c60-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c60-v1.c
-index 88f4f081a34db9b289d393d9c7ad4693ddb9b01d..a0839e6bcadd39b826d657141c5ba94fc5b2a729 100644
---- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c60-v1.c
-+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c60-v1.c
-@@ -157,8 +157,8 @@ static void __init archer_c60_v1_setup(void)
- 	ath79_register_mdio(0, 0x0);
- 	ath79_register_mdio(1, 0x0);
- 
--	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
--	ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
-+	ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
-+	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
- 
- 	/* WAN port */
- 	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-@@ -199,8 +199,8 @@ static void __init archer_c60_v2_setup(void)
- 	ath79_register_mdio(0, 0x0);
- 	ath79_register_mdio(1, 0x0);
- 
--	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
--	ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
-+	ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
-+	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
- 
- 	/* WAN port */
- 	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
diff --git a/build_patches/openwrt/0021-ath79-fix-swapped-LAN-WAN-MAC-address-for-Archer-C60.patch b/build_patches/openwrt/0021-ath79-fix-swapped-LAN-WAN-MAC-address-for-Archer-C60.patch
new file mode 100644
index 00000000..a73a7955
--- /dev/null
+++ b/build_patches/openwrt/0021-ath79-fix-swapped-LAN-WAN-MAC-address-for-Archer-C60.patch
@@ -0,0 +1,38 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Wed, 11 Mar 2020 15:37:34 +0100
+Subject: ath79: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
+
+The MAC addresses for lan/wan are swapped compared to the vendor
+firmware. This adjusts to vendor configuration, which is:
+
+lan   *:7b   label
+wan   *:7c   label+1
+2.4g  *:7b   label
+5g    *:7a   label-1
+
+Only one address is stored in <&mac 0x8>, corresponding to the label.
+
+This has been checked on revisions v1, v2 and v3.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+(cherry picked from commit 88aead0a665dd349af4fb8afcfe1a16cf90515ae)
+
+diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
+index deee64a6a7547f1f8cdd40e24210a4af3d7840e0..23ef0cdcbf4ecd6fed0165edf3cdcb11fdcb03f0 100644
+--- a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
++++ b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
+@@ -91,13 +91,13 @@
+ 	phy-handle = <&swphy4>;
+ 
+ 	mtd-mac-address = <&mac 0x8>;
++	mtd-mac-address-increment = <1>;
+ };
+ 
+ &eth1 {
+ 	status = "okay";
+ 
+ 	mtd-mac-address = <&mac 0x8>;
+-	mtd-mac-address-increment = <1>;
+ };
+ 
+ &wmac {
diff --git a/build_patches/openwrt/0022-ar71xx-remove-wrong-MAC-address-adjustment-for-Arche.patch b/build_patches/openwrt/0022-ar71xx-remove-wrong-MAC-address-adjustment-for-Arche.patch
deleted file mode 100644
index a9b10b10..00000000
--- a/build_patches/openwrt/0022-ar71xx-remove-wrong-MAC-address-adjustment-for-Arche.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
-Date: Wed, 11 Mar 2020 15:52:41 +0100
-Subject: ar71xx: remove wrong MAC address adjustment for Archer C60 v2
-
-The adjustment of the MAC address for Archer C60 v2 in 10_fix_wifi_mac
-is broken since a "mac" partition is not set up for this device on
-ar71xx. Instead, the MAC address is already patched correctly in
-11-ath10k-caldata.
-
-Remove the useless adjustment.
-
-Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
-(cherry picked from commit cbdc91902466dd113b9680566abb2eb2f8022dd4)
-
-diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
-index b58cf9b591f47c394c4c4b4a21e114e16af2da21..d6fac80bc942bc2ddc7d08c1ab0c5ead160701c6 100644
---- a/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
-+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
-@@ -15,8 +15,7 @@ case "$board" in
- 	archer-c58-v1|\
- 	archer-c59-v1|\
- 	archer-c59-v2|\
--	archer-c60-v1|\
--	archer-c60-v2)
-+	archer-c60-v1)
- 		echo $(macaddr_add $(mtd_get_mac_binary mac 8)  $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
- 		;;
- 	*)
diff --git a/build_patches/openwrt/0031-ath79-add-support-for-TP-Link-WDR3500-v1.patch b/build_patches/openwrt/0031-ath79-add-support-for-TP-Link-WDR3500-v1.patch
new file mode 100644
index 00000000..84cc60df
--- /dev/null
+++ b/build_patches/openwrt/0031-ath79-add-support-for-TP-Link-WDR3500-v1.patch
@@ -0,0 +1,481 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Sun, 28 Jul 2019 12:20:26 +0200
+Subject: ath79: add support for TP-Link WDR3500 v1
+
+Hardware:
+SoC:      AR9344
+CPU:      560 MHz
+Flash:    8 MiB
+RAM:      128 MiB
+WiFi:     Atheros AR9340 2.4GHz 802.11bgn
+          Atheros AR9300 5GHz 802.11an
+Ethernet: AR934X built-in switch, WAN on separate physical interface
+USB:      1x 2.0
+
+Flash instruction (WebUI):
+Download *-factory.bin image and upload it via the firmwary upgrade
+function of the stock firmware WebUI.
+
+Flash instruction (TFTP):
+1. Set PC to fixed ip address 192.168.0.66
+2. Download *-factory.bin image and rename it to
+   wdr3500v1_tp_recovery.bin
+3. Start a tftp server with the image file in its root directory
+4. Turn off the router
+5. Press and hold Reset button
+6. Turn on router with the reset button pressed and wait ~15 seconds
+7. Release the reset button and after a short time
+the firmware should be transferred from the tftp server
+8. Wait ~30 second to complete recovery.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+[removed stray newline]
+Signed-off-by: David Bauer <mail at david-bauer.net>
+(backported from commit fbbb4eb8b41d59b38f41fe382c6e4108a36aa909)
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+
+diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
+index c985a823c48fba67fe701efd2ef47b4721bc6071..e35144f6cf4ecdf0f94c86829e9a0daff72a9c0e 100755
+--- a/target/linux/ath79/base-files/etc/board.d/02_network
++++ b/target/linux/ath79/base-files/etc/board.d/02_network
+@@ -76,6 +76,7 @@ ath79_setup_interfaces()
+ 	tplink,archer-c25-v1|\
+ 	tplink,tl-mr3220-v1|\
+ 	tplink,tl-mr3420-v1|\
++	tplink,tl-wdr3500-v1|\
+ 	tplink,tl-wr841-v7|\
+ 	tplink,tl-wr841-v9|\
+ 	tplink,tl-wr841-v10|\
+diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+index 1469765bd9f2701bb87cfa85afc7ccfd7e5825e2..e8de9538732c246f211d342a5e7ce7fe2104dce1 100644
+--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
++++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+@@ -152,6 +152,7 @@ case "$FIRMWARE" in
+ 		ath9k_patch_fw_mac $(macaddr_add $(mtd_get_mac_text "mac" 24) 1) 2
+ 		;;
+ 	ocedo,raccoon|\
++	tplink,tl-wdr3500-v1|\
+ 	tplink,tl-wdr3600-v1|\
+ 	tplink,tl-wdr4300-v1|\
+ 	tplink,tl-wdr4300-v1-il|\
+diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
+new file mode 100644
+index 0000000000000000000000000000000000000000..fbe10752e76abc27cd0e044b5dce03bc000d1b36
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
+@@ -0,0 +1,85 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/dts-v1/;
++
++#include "ar9344_tplink_tl-wdrxxxx.dtsi"
++
++/ {
++	model = "TP-Link TL-WDR3500 v1";
++	compatible = "tplink,tl-wdr3500-v1", "qca,ar9344";
++};
++
++&leds {
++	usb {
++		label = "tp-link:green:usb";
++		gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
++		linux,default-trigger = "usbport";
++		trigger-sources = <&hub_port>;
++	};
++};
++
++&gpio {
++	usb_power {
++		gpio-hog;
++		gpios = <12 GPIO_ACTIVE_HIGH>;
++		output-high;
++		line-name = "tp-link:power:usb";
++	};
++};
++
++&pinmux {
++	pmx_led_wan_lan: pinmux_led_wan_lan {
++		pinctrl-single,bits = <0x10 0x2c2d0000 0xffff0000>,
++			<0x14 0x292a2b 0xffffff>;
++	};
++};
++
++&builtin_switch {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pmx_led_wan_lan>;
++};
++
++&usb {
++	#address-cells = <1>;
++	#size-cells = <0>;
++	status = "okay";
++
++	hub_port: port at 1 {
++		reg = <1>;
++		#trigger-source-cells = <0>;
++	};
++};
++
++&usb_phy {
++	status = "okay";
++};
++
++&ath9k {
++	mtd-mac-address = <&uboot 0x1fc00>;
++	mtd-mac-address-increment = <1>;
++};
++
++&wmac {
++	mtd-mac-address = <&uboot 0x1fc00>;
++};
++
++&eth1 {
++	status = "okay";
++
++	mtd-mac-address = <&uboot 0x1fc00>;
++	mtd-mac-address-increment = <(-1)>;
++
++	gmac-config {
++		device = <&gmac>;
++		switch-phy-swap = <0>;
++		switch-only-mode = <1>;
++	};
++};
++
++&eth0 {
++	status = "okay";
++
++	phy-handle = <&swphy4>;
++
++	mtd-mac-address = <&uboot 0x1fc00>;
++	mtd-mac-address-increment = <2>;
++};
+diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
+index f6e4856ec5ef1739a363970dec0b2ea73f473c3d..51c4940bef6aeb5805c17b7024cdd999a01432e1 100644
+--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
++++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
+@@ -1,81 +1,8 @@
+ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+ 
+-#include <dt-bindings/gpio/gpio.h>
+-#include <dt-bindings/input/input.h>
+-
+-#include "ar9344.dtsi"
++#include "ar9344_tplink_tl-wdrxxxx.dtsi"
+ 
+ / {
+-	aliases {
+-		led-boot = &system;
+-		led-failsafe = &system;
+-		led-running = &system;
+-		led-upgrade = &system;
+-	};
+-
+-	leds {
+-		compatible = "gpio-leds";
+-
+-		usb1 {
+-			label = "tp-link:green:usb1";
+-			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+-			trigger-sources = <&hub_port1>;
+-			linux,default-trigger = "usbport";
+-		};
+-
+-		usb2 {
+-			label = "tp-link:green:usb2";
+-			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+-			trigger-sources = <&hub_port2>;
+-			linux,default-trigger = "usbport";
+-		};
+-
+-		wlan2g {
+-			label = "tp-link:green:wlan2g";
+-			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+-			linux,default-trigger = "phy0tpt";
+-		};
+-
+-		system: system {
+-			label = "tp-link:green:system";
+-			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+-			default-state = "on";
+-		};
+-
+-		qss {
+-			label = "tp-link:green:qss";
+-			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+-		};
+-	};
+-
+-	ath9k-leds {
+-		compatible = "gpio-leds";
+-
+-		wlan5g {
+-			label = "tp-link:green:wlan5g";
+-			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
+-			linux,default-trigger = "phy1tpt";
+-		};
+-	};
+-
+-	keys {
+-		compatible = "gpio-keys-polled";
+-		poll-interval = <20>;
+-
+-		reset {
+-			linux,code = <KEY_RESTART>;
+-			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+-			debounce-interval = <60>;
+-		};
+-
+-		wifi {
+-			linux,code = <KEY_RFKILL>;
+-			linux,input-type = <EV_SW>;
+-			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+-			debounce-interval = <60>;
+-		};
+-	};
+-
+ 	gpio-export {
+ 		compatible = "gpio-export";
+ 
+@@ -105,51 +32,19 @@
+ 	};
+ };
+ 
+-&ref {
+-	clock-frequency = <40000000>;
+-};
+-
+-&uart {
+-	status = "okay";
+-};
+-
+-&gpio {
+-	status = "okay";
+-};
+-
+-&spi {
+-	num-cs = <1>;
+-
+-	status = "okay";
++&leds {
++	usb1 {
++		label = "tp-link:green:usb1";
++		gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
++		trigger-sources = <&hub_port1>;
++		linux,default-trigger = "usbport";
++	};
+ 
+-	flash at 0 {
+-		compatible = "jedec,spi-nor";
+-		reg = <0>;
+-		spi-max-frequency = <25000000>;
+-
+-		partitions {
+-			compatible = "fixed-partitions";
+-			#address-cells = <1>;
+-			#size-cells = <1>;
+-
+-			uboot: partition at 0 {
+-				label = "u-boot";
+-				reg = <0x000000 0x020000>;
+-				read-only;
+-			};
+-
+-			partition at 20000 {
+-				compatible = "tplink,firmware";
+-				label = "firmware";
+-				reg = <0x020000 0x7d0000>;
+-			};
+-
+-			art: partition at 7f0000 {
+-				label = "art";
+-				reg = <0x7f0000 0x010000>;
+-				read-only;
+-			};
+-		};
++	usb2 {
++		label = "tp-link:green:usb2";
++		gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
++		trigger-sources = <&hub_port2>;
++		linux,default-trigger = "usbport";
+ 	};
+ };
+ 
+@@ -180,23 +75,11 @@
+ 	status = "okay";
+ };
+ 
+-&pcie {
+-	status = "okay";
+-
+-	ath9k: wifi at 0,0 {
+-		compatible = "pci168c,0033";
+-		reg = <0x0000 0 0 0 0>;
+-		mtd-mac-address = <&uboot 0x1fc00>;
+-		qca,no-eeprom;
+-		#gpio-cells = <2>;
+-		gpio-controller;
+-	};
++&ath9k {
++	mtd-mac-address = <&uboot 0x1fc00>;
+ };
+ 
+ &wmac {
+-	status = "okay";
+-
+-	mtd-cal-data = <&art 0x1000>;
+ 	mtd-mac-address = <&uboot 0x1fc00>;
+ 	mtd-mac-address-increment = <(-1)>;
+ };
+diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi
+new file mode 100644
+index 0000000000000000000000000000000000000000..67ff27de4dda060f0814464303fa02ca5e024a67
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi
+@@ -0,0 +1,126 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++
++#include "ar9344.dtsi"
++
++/ {
++	aliases {
++		led-boot = &system;
++		led-failsafe = &system;
++		led-running = &system;
++		led-upgrade = &system;
++	};
++
++	leds: leds {
++		compatible = "gpio-leds";
++
++		wlan2g {
++			label = "tp-link:green:wlan2g";
++			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "phy0tpt";
++		};
++
++		system: system {
++			label = "tp-link:green:system";
++			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
++			default-state = "on";
++		};
++
++		qss {
++			label = "tp-link:green:qss";
++			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
++		};
++	};
++
++	ath9k-leds {
++		compatible = "gpio-leds";
++
++		wlan5g {
++			label = "tp-link:green:wlan5g";
++			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "phy1tpt";
++		};
++	};
++
++	keys {
++		compatible = "gpio-keys-polled";
++		poll-interval = <20>;
++
++		reset {
++			linux,code = <KEY_RESTART>;
++			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++
++		wifi {
++			linux,code = <KEY_RFKILL>;
++			linux,input-type = <EV_SW>;
++			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++	};
++};
++
++&ref {
++	clock-frequency = <40000000>;
++};
++
++&uart {
++	status = "okay";
++};
++
++&spi {
++	num-cs = <1>;
++
++	status = "okay";
++
++	flash at 0 {
++		compatible = "jedec,spi-nor";
++		reg = <0>;
++		spi-max-frequency = <25000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			uboot: partition at 0 {
++				label = "u-boot";
++				reg = <0x000000 0x020000>;
++				read-only;
++			};
++
++			partition at 20000 {
++				compatible = "tplink,firmware";
++				label = "firmware";
++				reg = <0x020000 0x7d0000>;
++			};
++
++			art: partition at 7f0000 {
++				label = "art";
++				reg = <0x7f0000 0x010000>;
++				read-only;
++			};
++		};
++	};
++};
++
++&pcie {
++	status = "okay";
++
++	ath9k: wifi at 0,0 {
++		compatible = "pci168c,0033";
++		reg = <0x0000 0 0 0 0>;
++		qca,no-eeprom;
++		#gpio-cells = <2>;
++		gpio-controller;
++	};
++};
++
++&wmac {
++	status = "okay";
++
++	mtd-cal-data = <&art 0x1000>;
++};
+diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
+index 01d3c42acc1b8aa0aa8ed18e16b14883537dd966..351b3ea377ac5cf3f1c0991d1db83afab758c516 100644
+--- a/target/linux/ath79/image/generic-tp-link.mk
++++ b/target/linux/ath79/image/generic-tp-link.mk
+@@ -223,6 +223,16 @@ define Device/tplink_re450-v2
+ endef
+ TARGET_DEVICES += tplink_re450-v2
+ 
++define Device/tplink_tl-wdr3500-v1
++  $(Device/tplink-8mlzma)
++  ATH_SOC := ar9344
++  DEVICE_TITLE := TP-Link TL-WDR3500 v1
++  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
++  TPLINK_HWID := 0x35000001
++  SUPPORTED_DEVICES += tl-wdr3500
++endef
++TARGET_DEVICES += tplink_tl-wdr3500-v1
++
+ define Device/tplink_tl-wdr3600-v1
+   $(Device/tplink-8mlzma)
+   ATH_SOC := ar9344
diff --git a/build_patches/openwrt/0032-ath79-add-support-for-TP-Link-TL-WA850RE-v1.patch b/build_patches/openwrt/0032-ath79-add-support-for-TP-Link-TL-WA850RE-v1.patch
new file mode 100644
index 00000000..ab23f35b
--- /dev/null
+++ b/build_patches/openwrt/0032-ath79-add-support-for-TP-Link-TL-WA850RE-v1.patch
@@ -0,0 +1,250 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Mon, 9 Dec 2019 14:51:07 +0100
+Subject: ath79: add support for TP-Link TL-WA850RE v1
+
+This ports support for the TL-WA850RE v1 range extender from ar71xx
+to ath79.
+
+Specifications:
+  Board: AP123 / AR9341 rev. 3
+  Flash/RAM: 4/32 MiB
+  CPU: 535 MHz
+  WiFi: 2.4 GHz b/g/n
+  Ethernet: 1 port (100M)
+
+Flashing instructions:
+Upload the factory image via the vendor firmware upgrade option.
+
+Recovery:
+Note that this device does not provide TFTP via ethernet like many
+other TP-Link devices do. You will have to open the case if you
+require recovery beyond failsafe.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+(cherry picked from commit 6eaea3a8ba6154674058396c728494aa911ed7f1)
+
+diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds
+index dd483c0526bf1c451f0ce75d75fbb622a111557f..38203969a6abc30702ee3542b6532c69504f9fba 100755
+--- a/target/linux/ath79/base-files/etc/board.d/01_leds
++++ b/target/linux/ath79/base-files/etc/board.d/01_leds
+@@ -176,6 +176,15 @@ tplink,tl-mr3020-v1|\
+ tplink,tl-mr3040-v2)
+ 	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+ 	;;
++tplink,tl-wa850re-v1)
++	ucidef_set_led_netdev "lan" "LAN" "tp-link:blue:lan" "eth0"
++	ucidef_set_rssimon "wlan0" "200000" "1"
++	ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:blue:signal1" "wlan0" "1" "100"
++	ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:blue:signal2" "wlan0" "20" "100"
++	ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:blue:signal3" "wlan0" "40" "100"
++	ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:blue:signal4" "wlan0" "60" "100"
++	ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100"
++	;;
+ tplink,tl-wr740n-v1|\
+ tplink,tl-wr740n-v3|\
+ tplink,tl-wr741-v1|\
+diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
+index e35144f6cf4ecdf0f94c86829e9a0daff72a9c0e..b14db93c20f3744cf178a36a2327cef7c6fbd687 100755
+--- a/target/linux/ath79/base-files/etc/board.d/02_network
++++ b/target/linux/ath79/base-files/etc/board.d/02_network
+@@ -31,6 +31,7 @@ ath79_setup_interfaces()
+ 	tplink,tl-mr10u|\
+ 	tplink,tl-mr3020-v1|\
+ 	tplink,tl-mr3040-v2|\
++	tplink,tl-wa850re-v1|\
+ 	tplink,tl-wa901nd-v2|\
+ 	tplink,tl-wr703n|\
+ 	ubnt,bullet-m|\
+diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi
+new file mode 100644
+index 0000000000000000000000000000000000000000..ecf54cc182651ef6c541e1bba76782d5de07a20b
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi
+@@ -0,0 +1,81 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++
++#include "ar9341.dtsi"
++
++/ {
++	aliases {
++		serial0 = &uart;
++	};
++};
++
++&ref {
++	clock-frequency = <25000000>;
++};
++
++&spi {
++	status = "okay";
++
++	num-cs = <1>;
++
++	flash at 0 {
++		compatible = "jedec,spi-nor";
++		reg = <0>;
++		spi-max-frequency = <25000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			uboot: partition at 0 {
++				label = "u-boot";
++				reg = <0x000000 0x020000>;
++				read-only;
++			};
++
++			partition at 20000 {
++				compatible = "tplink,firmware";
++				label = "firmware";
++				reg = <0x020000 0x3d0000>;
++			};
++
++			art: partition at 3f0000 {
++				label = "art";
++				reg = <0x3f0000 0x010000>;
++				read-only;
++			};
++		};
++	};
++};
++
++&uart {
++	status = "okay";
++};
++
++&eth0 {
++	status = "okay";
++
++	phy-handle = <&swphy0>;
++
++	mtd-mac-address = <&uboot 0x1fc00>;
++
++	gmac-config {
++		device = <&gmac>;
++
++		switch-phy-swap = <1>;
++	};
++};
++
++&eth1 {
++	compatible = "syscon", "simple-mfd";
++};
++
++&wmac {
++	status = "okay";
++
++	mtd-cal-data = <&art 0x1000>;
++	mtd-mac-address = <&uboot 0x1fc00>;
++};
+diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts
+new file mode 100644
+index 0000000000000000000000000000000000000000..bb0b498b677cdae0d32da7e701cd502c645b6274
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts
+@@ -0,0 +1,79 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/dts-v1/;
++
++#include "ar9341_tplink_tl-wa.dtsi"
++
++/ {
++	model = "TP-Link TL-WA850RE v1";
++	compatible = "tplink,tl-wa850re-v1", "qca,ar9341";
++
++	aliases {
++		led-boot = &led_re;
++		led-failsafe = &led_re;
++		led-running = &led_re;
++		led-upgrade = &led_re;
++	};
++
++	keys {
++		compatible = "gpio-keys";
++
++		reset {
++			label = "Reset";
++			linux,code = <KEY_RESTART>;
++			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++
++		wps {
++			label = "WPS";
++			linux,code = <KEY_WPS_BUTTON>;
++			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		lan {
++			label = "tp-link:blue:lan";
++			gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
++		};
++
++		wlan {
++			label = "tp-link:blue:wlan";
++			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "phy0tpt";
++		};
++
++		led_re: re {
++			label = "tp-link:blue:re";
++			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
++		};
++
++		signal1 {
++			label = "tp-link:blue:signal1";
++			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
++		};
++
++		signal2 {
++			label = "tp-link:blue:signal2";
++			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
++		};
++
++		signal3 {
++			label = "tp-link:blue:signal3";
++			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
++		};
++
++		signal4 {
++			label = "tp-link:blue:signal4";
++			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
++		};
++
++		signal5 {
++			label = "tp-link:blue:signal5";
++			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
+diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk
+index 817f5d8ed611b6b4c64a6db335e2a9be447619c6..1ca8bf43a97bb05d52c1ae5630353a00335b9545 100644
+--- a/target/linux/ath79/image/tiny-tp-link.mk
++++ b/target/linux/ath79/image/tiny-tp-link.mk
+@@ -51,6 +51,16 @@ define Device/tplink_tl-mr3420-v1
+ endef
+ TARGET_DEVICES += tplink_tl-mr3420-v1
+ 
++define Device/tplink_tl-wa850re-v1
++  $(Device/tplink-4mlzma)
++  ATH_SOC := ar9341
++  DEVICE_TITLE := TP-Link TL-WA850RE v1
++  TPLINK_HWID := 0x08500001
++  DEVICE_PACKAGES := rssileds
++  SUPPORTED_DEVICES += tl-wa850re
++endef
++TARGET_DEVICES += tplink_tl-wa850re-v1
++
+ define Device/tplink_tl-wa901nd-v2
+   $(Device/tplink-4m)
+   ATH_SOC := ar9132
diff --git a/build_patches/openwrt/0033-ath79-add-support-for-TP-Link-TL-WA860RE-v1.patch b/build_patches/openwrt/0033-ath79-add-support-for-TP-Link-TL-WA860RE-v1.patch
new file mode 100644
index 00000000..6e5b08bd
--- /dev/null
+++ b/build_patches/openwrt/0033-ath79-add-support-for-TP-Link-TL-WA860RE-v1.patch
@@ -0,0 +1,151 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Mon, 9 Dec 2019 15:00:55 +0100
+Subject: ath79: add support for TP-Link TL-WA860RE v1
+
+This ports support for the TL-WA860RE v1 range extender from ar71xx
+to ath79.
+
+Specifications:
+  Board: AP123 / AR9341 rev. 3
+  Flash/RAM: 4/32 MiB
+  CPU: 535 MHz
+  WiFi: 2.4 GHz b/g/n
+  Ethernet: 1 port (100M)
+  Two external antennas
+
+Flashing instructions:
+  Upload the factory image via the vendor firmware upgrade option.
+
+Recovery:
+  Note that this device does not provide TFTP via ethernet like many
+  other TP-Link devices do. You will have to open the case if you
+  require recovery beyond failsafe.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Tested-by: Sebastian Knapp <sebastian4842 at outlook.com>
+(cherry picked from commit 385f4868bc58b04e465db2fbcfce848a75009a74)
+
+diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds
+index 38203969a6abc30702ee3542b6532c69504f9fba..4b3cd8a05f3a89e9e4810a221b27f0bd1073b066 100755
+--- a/target/linux/ath79/base-files/etc/board.d/01_leds
++++ b/target/linux/ath79/base-files/etc/board.d/01_leds
+@@ -173,7 +173,8 @@ tplink,re450-v2)
+ 	ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
+ 	;;
+ tplink,tl-mr3020-v1|\
+-tplink,tl-mr3040-v2)
++tplink,tl-mr3040-v2|\
++tplink,tl-wa860re-v1)
+ 	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+ 	;;
+ tplink,tl-wa850re-v1)
+diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
+index b14db93c20f3744cf178a36a2327cef7c6fbd687..fabdff752eae4bbc83edbac7467130b1632e0951 100755
+--- a/target/linux/ath79/base-files/etc/board.d/02_network
++++ b/target/linux/ath79/base-files/etc/board.d/02_network
+@@ -32,6 +32,7 @@ ath79_setup_interfaces()
+ 	tplink,tl-mr3020-v1|\
+ 	tplink,tl-mr3040-v2|\
+ 	tplink,tl-wa850re-v1|\
++	tplink,tl-wa860re-v1|\
+ 	tplink,tl-wa901nd-v2|\
+ 	tplink,tl-wr703n|\
+ 	ubnt,bullet-m|\
+diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts
+new file mode 100644
+index 0000000000000000000000000000000000000000..237a40d693c6586b15657b72923f0f4c98eb30bd
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts
+@@ -0,0 +1,72 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/dts-v1/;
++
++#include "ar9341_tplink_tl-wa.dtsi"
++
++/ {
++	model = "TP-Link TL-WA860RE v1";
++	compatible = "tplink,tl-wa860re-v1", "qca,ar9341";
++
++	aliases {
++		led-boot = &led_power_green;
++		led-failsafe = &led_power_orange;
++		led-running = &led_power_green;
++		led-upgrade = &led_power_orange;
++	};
++
++	keys {
++		compatible = "gpio-keys";
++
++		reset {
++			label = "Reset";
++			linux,code = <KEY_RESTART>;
++			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++
++		wps {
++			label = "WPS";
++			linux,code = <KEY_WPS_BUTTON>;
++			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++
++		onoff {
++			label = "ONOFF";
++			linux,code = <BTN_1>;
++			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
++			debounce-interval = <60>;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		lan {
++			label = "tp-link:green:lan";
++			gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
++		};
++
++		led_power_green: power_green {
++			label = "tp-link:green:power";
++			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
++			default-state = "on";
++		};
++
++		led_power_orange: power_orange {
++			label = "tp-link:orange:power";
++			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
++		};
++
++		wlan_green {
++			label = "tp-link:green:wlan";
++			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "phy0tpt";
++		};
++
++		wlan_orange {
++			label = "tp-link:orange:wlan";
++			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
+diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk
+index 1ca8bf43a97bb05d52c1ae5630353a00335b9545..c11f132b1d5af3ba59d602495dd47a15325e2222 100644
+--- a/target/linux/ath79/image/tiny-tp-link.mk
++++ b/target/linux/ath79/image/tiny-tp-link.mk
+@@ -61,6 +61,15 @@ define Device/tplink_tl-wa850re-v1
+ endef
+ TARGET_DEVICES += tplink_tl-wa850re-v1
+ 
++define Device/tplink_tl-wa860re-v1
++  $(Device/tplink-4mlzma)
++  ATH_SOC := ar9341
++  DEVICE_TITLE := TP-Link TL-WA860RE v1
++  TPLINK_HWID := 0x08600001
++  SUPPORTED_DEVICES += tl-wa860re
++endef
++TARGET_DEVICES += tplink_tl-wa860re-v1
++
+ define Device/tplink_tl-wa901nd-v2
+   $(Device/tplink-4m)
+   ATH_SOC := ar9132
diff --git a/build_patches/openwrt/0034-ath79-add-support-for-TP-Link-TL-WDR4310-v1.patch b/build_patches/openwrt/0034-ath79-add-support-for-TP-Link-TL-WDR4310-v1.patch
new file mode 100644
index 00000000..ff4cdbec
--- /dev/null
+++ b/build_patches/openwrt/0034-ath79-add-support-for-TP-Link-TL-WDR4310-v1.patch
@@ -0,0 +1,86 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Mon, 9 Dec 2019 13:44:03 +0100
+Subject: ath79: add support for TP-Link TL-WDR4310 v1
+
+This device seems to be identical to the TL-WDR4300, just with
+different release date/region and TPLINK_HWID.
+
+Support is added based on the ar71xx implementation.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+(cherry picked from commit 676ca94c3ca5421c7176d67a211fa29b1bb2e219)
+
+diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
+index fabdff752eae4bbc83edbac7467130b1632e0951..0737aff2e48f8187f5e8fe2a1dccaa919eb9fcdc 100755
+--- a/target/linux/ath79/base-files/etc/board.d/02_network
++++ b/target/linux/ath79/base-files/etc/board.d/02_network
+@@ -206,6 +206,7 @@ ath79_setup_interfaces()
+ 	tplink,tl-wdr3600-v1|\
+ 	tplink,tl-wdr4300-v1|\
+ 	tplink,tl-wdr4300-v1-il|\
++	tplink,tl-wdr4310-v1|\
+ 	tplink,tl-wr941n-v7-cn)
+ 		ucidef_add_switch "switch0" \
+ 			"0 at eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
+diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+index e8de9538732c246f211d342a5e7ce7fe2104dce1..d85e90f1068323fd43ed988eac93e30b3e9c487c 100644
+--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
++++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+@@ -156,6 +156,7 @@ case "$FIRMWARE" in
+ 	tplink,tl-wdr3600-v1|\
+ 	tplink,tl-wdr4300-v1|\
+ 	tplink,tl-wdr4300-v1-il|\
++	tplink,tl-wdr4310-v1|\
+ 	tplink,tl-wdr4900-v2|\
+ 	winchannel,wb2000)
+ 		ath9k_eeprom_extract "art" 20480 1088
+diff --git a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+index 2e1be7b0e344038e044447410c03e6278e3bcca0..9aa759c6a3f9fac2e60e807f0998503c9766cb18 100644
+--- a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
++++ b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+@@ -20,7 +20,8 @@ tplink,archer-c7-v5)
+ tplink,archer-c7-v2|\
+ tplink,tl-wdr3600-v1|\
+ tplink,tl-wdr4300-v1|\
+-tplink,tl-wdr4300-v1-il)
++tplink,tl-wdr4300-v1-il|\
++tplink,tl-wdr4310-v1)
+ 	migrate_leds ":blue:=:green:"
+ 	;;
+ wd,mynet-n750)
+diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4310-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4310-v1.dts
+new file mode 100644
+index 0000000000000000000000000000000000000000..3fa4af518ba1bc1a9dde4a680c61c7787c424f6c
+--- /dev/null
++++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4310-v1.dts
+@@ -0,0 +1,9 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/dts-v1/;
++
++#include "ar9344_tplink_tl-wdr4300.dtsi"
++
++/ {
++	model = "TP-Link TL-WDR4310 v1";
++	compatible = "tplink,tl-wdr4310-v1", "qca,ar9344";
++};
+diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
+index 351b3ea377ac5cf3f1c0991d1db83afab758c516..484032e3b6f629672eafbf2a339e97a7f59bd4ae 100644
+--- a/target/linux/ath79/image/generic-tp-link.mk
++++ b/target/linux/ath79/image/generic-tp-link.mk
+@@ -263,6 +263,16 @@ define Device/tplink_tl-wdr4300-v1-il
+ endef
+ TARGET_DEVICES += tplink_tl-wdr4300-v1-il
+ 
++define Device/tplink_tl-wdr4310-v1
++  $(Device/tplink-8mlzma)
++  ATH_SOC := ar9344
++  DEVICE_TITLE := TP-Link TL-WDR4310 v1
++  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
++  TPLINK_HWID := 0x43100001
++  SUPPORTED_DEVICES += tl-wdr4300
++endef
++TARGET_DEVICES += tplink_tl-wdr4310-v1
++
+ define Device/tplink_tl-wdr4900-v2
+   $(Device/tplink-8mlzma)
+   ATH_SOC := qca9558
diff --git a/build_patches/openwrt/0041-ath79-add-SUPPORTED_DEVICES-for-TP-Link-TL-WA901ND-v.patch b/build_patches/openwrt/0041-ath79-add-SUPPORTED_DEVICES-for-TP-Link-TL-WA901ND-v.patch
new file mode 100644
index 00000000..d06f5f9a
--- /dev/null
+++ b/build_patches/openwrt/0041-ath79-add-SUPPORTED_DEVICES-for-TP-Link-TL-WA901ND-v.patch
@@ -0,0 +1,22 @@
+From: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+Date: Wed, 15 Apr 2020 12:45:28 +0200
+Subject: ath79: add SUPPORTED_DEVICES for TP-Link TL-WA901ND v2
+
+This adds the board name from ar71xx to support upgrade without
+-F for the TP-Link TL-WA901ND v2.
+
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+(cherry picked from commit 508462a399c8a68fdcdf599a1aa17441bdaad20b)
+
+diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk
+index c11f132b1d5af3ba59d602495dd47a15325e2222..6b51a4d37089638469d6b2b1eb5a8b0a1e2b7697 100644
+--- a/target/linux/ath79/image/tiny-tp-link.mk
++++ b/target/linux/ath79/image/tiny-tp-link.mk
+@@ -75,6 +75,7 @@ define Device/tplink_tl-wa901nd-v2
+   ATH_SOC := ar9132
+   DEVICE_TITLE := TP-Link TL-WA901ND v2
+   TPLINK_HWID := 0x09010002
++  SUPPORTED_DEVICES += tl-wa901nd-v2
+ endef
+ TARGET_DEVICES += tplink_tl-wa901nd-v2
+ 
diff --git a/src/packages/fff/fff-boardname/Makefile b/src/packages/fff/fff-boardname/Makefile
index 01fcc0ae..8db6f811 100644
--- a/src/packages/fff/fff-boardname/Makefile
+++ b/src/packages/fff/fff-boardname/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-boardname
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-boardname/files/etc/uci-defaults/15-fff-boardname b/src/packages/fff/fff-boardname/files/etc/uci-defaults/15-fff-boardname
index a96c05a8..67c94c16 100644
--- a/src/packages/fff/fff-boardname/files/etc/uci-defaults/15-fff-boardname
+++ b/src/packages/fff/fff-boardname/files/etc/uci-defaults/15-fff-boardname
@@ -2,74 +2,5 @@
 
 BOARD=$(cat /var/sysinfo/board_name)
 
-case "$BOARD" in
-    tl-wr1043nd)
-        BOARD=tl-wr1043nd-v1
-        ;;
-    tl-wr1043nd-v2)
-        grep "v3" /var/sysinfo/model && BOARD=tl-wr1043nd-v3
-        ;;
-    tl-wr741nd)
-        grep "Atheros AR7240 rev 2" /proc/cpuinfo && BOARD=tl-wr741nd-v2 || BOARD=tl-wr741nd-v4
-        ;;
-    tl-wr741nd-v4)
-        grep 740 /var/sysinfo/model && BOARD=tl-wr740n-v4
-        ;;
-    tl-wr841n-v7)
-        BOARD=tl-wr841-v7
-        ;;
-    tl-wr841n-v8)
-        BOARD=tl-wr841-v8
-        ;;
-    tl-wr841n-v9)
-        BOARD=tl-wr841-v9
-        grep "v10" /var/sysinfo/model && BOARD=tl-wr841-v10
-        ;;
-    tl-wr841n-v11)
-        BOARD=tl-wr841-v11
-        grep "v12" /var/sysinfo/model && BOARD=tl-wr841-v12
-        ;;
-    nanostation-m)
-        BOARD=ubnt-nano-m
-        ;;
-    bullet-m)
-        BOARD=ubnt-bullet-m
-        grep -i "Pico" /var/sysinfo/model && BOARD=ubnt-pico-m
-        grep -i "Loco" /var/sysinfo/model && BOARD=ubnt-loco-m
-        ;;
-    unifi)
-        BOARD=ubnt-unifi
-        ;;
-    loco-m-xw)
-        BOARD=ubnt-loco-m-xw
-        ;;
-    unifiac-lite)
-        BOARD=ubnt-unifiac-lite
-        ;;
-    tl-wa850re)
-        BOARD=tl-wa850re-v1
-        ;;
-    tl-wa860re)
-        BOARD=tl-wa860re-v1
-        ;;
-    tl-wdr3500)
-        BOARD=tl-wdr3500-v1
-        ;;
-    tl-wdr4300)
-        grep "3600" /var/sysinfo/model && BOARD=tl-wdr3600-v1
-        grep "4300" /var/sysinfo/model && BOARD=tl-wdr4300-v1
-        grep "4310" /var/sysinfo/model && BOARD=tl-wdr4310-v1
-        ;;
-    tplink,tl-wdr4900-v1)
-        BOARD=tl-wdr4900-v1
-        ;;
-    tl-mr3020)
-        BOARD=tl-mr3020-v1
-        ;;
-    archer-c7)
-        BOARD=archer-c7-v2
-        ;;
-esac
-
 uci set board.model.name=$BOARD
 uci commit board
diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile
index 0c7e2bd5..88f3bb71 100644
--- a/src/packages/fff/fff-network/Makefile
+++ b/src/packages/fff/fff-network/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-network
-PKG_RELEASE:=18
+PKG_RELEASE:=19
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-network/ar71xx/network.archer-c25-v1 b/src/packages/fff/fff-network/ar71xx/network.archer-c25-v1
deleted file mode 100644
index b88b96b2..00000000
--- a/src/packages/fff/fff-network/ar71xx/network.archer-c25-v1
+++ /dev/null
@@ -1,10 +0,0 @@
-PORTORDER="4 3 2 1"
-
-WANDEV=eth0
-SWITCHDEV=eth1
-CLIENT_PORTS="1 2 0t"
-WAN_PORTS=""
-BATMAN_PORTS="3 4 0t"
-
-ETHMESHMAC=$(cat /sys/class/net/eth1/address)
-ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v2 b/src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v2
deleted file mode 100644
index c8ddd0f1..00000000
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v2
+++ /dev/null
@@ -1,9 +0,0 @@
-WANDEV=eth1
-# WANDEV=eth0
-SWITCHDEV=eth0
-CLIENT_PORTS="1 2 0t"
-WAN_PORTS=
-BATMAN_PORTS="3 4 0t"
-
-ETHMESHMAC=$(cat /sys/class/net/eth1/address)
-ROUTERMAC=$(cat /sys/class/ieee80211/phy0/macaddress)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v8 b/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v8
deleted file mode 100644
index ef6e2947..00000000
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v8
+++ /dev/null
@@ -1,10 +0,0 @@
-PORTORDER="2 3 4 1"
-
-WANDEV=eth0
-SWITCHDEV=eth1
-CLIENT_PORTS="1 4 0t"
-WAN_PORTS=
-BATMAN_PORTS="3 2 0t"
-
-ETHMESHMAC=$(cat /sys/class/net/eth0/address)
-ROUTERMAC=$(cat /sys/class/net/eth1/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr842n-v2 b/src/packages/fff/fff-network/ar71xx/network.tl-wr842n-v2
deleted file mode 100644
index 6e031316..00000000
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr842n-v2
+++ /dev/null
@@ -1,8 +0,0 @@
-WANDEV=eth0
-SWITCHDEV=eth1
-CLIENT_PORTS="1 4 0t"
-WAN_PORTS=
-BATMAN_PORTS="3 2 0t"
-
-ETHMESHMAC=$(cat /sys/class/net/eth0/address)
-ROUTERMAC=$(cat /sys/class/net/eth1/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.gl-ar150 b/src/packages/fff/fff-network/ath79/network.glinet,gl-ar150
similarity index 88%
rename from src/packages/fff/fff-network/ar71xx/network.gl-ar150
rename to src/packages/fff/fff-network/ath79/network.glinet,gl-ar150
index 64049dd2..49bffebe 100644
--- a/src/packages/fff/fff-network/ar71xx/network.gl-ar150
+++ b/src/packages/fff/fff-network/ath79/network.glinet,gl-ar150
@@ -2,8 +2,8 @@
 
 PORTORDER="1"
 
-WANDEV=eth0
-SWITCHDEV=eth1
+WANDEV=eth1
+SWITCHDEV=eth0
 WAN_PORTS=
 BATMAN_PORTS="0t"
 CLIENT_PORTS="0t"
diff --git a/src/packages/fff/fff-network/ath79/network.mode b/src/packages/fff/fff-network/ath79/network.mode
new file mode 100644
index 00000000..f3a27939
--- /dev/null
+++ b/src/packages/fff/fff-network/ath79/network.mode
@@ -0,0 +1,30 @@
+################
+## This file is used to configure the behavior of network interfaces
+## if the routers interfaces differ from the standard WAN+4LAN-Ports
+## +2Wireless APs.
+## If you want to change their behavior, you should edit the file
+## /etc/network.config
+## After that you have to reboot the router with following command.
+#reboot
+#
+### The canonical syntax of this file is:
+#SPECIFIER="MODE"
+### MODES
+## Generally there are 3 operating modes for network interfaces in fff.
+#BATMAN: The interface is used to mesh with other fff-nodes
+#WAN:    The interface is used to connect to supernodes via vpn and
+#         ordinary internet.
+#CLIENT: The interface is used to connect clients to the fff-net
+##
+### SPECIFIER
+## For devices only including one ethernet port the specifier is called
+## ETHMODE. The default mode for these devices is "BATMAN".
+## For example this is the case for: gl-ar150, tl-mr3020-v1, tl-wa850re-v1,
+## tl-wa860re-v1, tl-wa901nd-v2, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m,
+## ubnt-unifi
+ETHMODE="CLIENT"
+## Devices featuring 2 ethernet ports are configured by SPECIFIERs ressembling
+## the labels on the PORT itself. For the cpe210 these are called LAN0 and LAN1.
+## Therefore they are configured as follows:
+LAN0MODE="WAN"
+LAN1MODE="CLIENT"
diff --git a/src/packages/fff/fff-network/ar71xx/network.archer-c60-v1 b/src/packages/fff/fff-network/ath79/network.tplink,archer-c25-v1
similarity index 79%
rename from src/packages/fff/fff-network/ar71xx/network.archer-c60-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,archer-c25-v1
index d47c93ef..59149cf7 100644
--- a/src/packages/fff/fff-network/ar71xx/network.archer-c60-v1
+++ b/src/packages/fff/fff-network/ath79/network.tplink,archer-c25-v1
@@ -1,8 +1,9 @@
 PORTORDER="4 3 2 1"
 
-WANDEV=eth0
-SWITCHDEV=eth1
+WANDEV=eth1
+SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
+WAN_PORTS=""
 BATMAN_PORTS="3 4 0t"
 
 ETHMESHMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v1 b/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v1
new file mode 100644
index 00000000..6d2578f6
--- /dev/null
+++ b/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v1
@@ -0,0 +1,9 @@
+PORTORDER="4 3 2 1"
+
+WANDEV=eth1
+SWITCHDEV=eth0
+CLIENT_PORTS="1 2 0t"
+BATMAN_PORTS="3 4 0t"
+
+ETHMESHMAC=$(cat /sys/class/net/eth1/address)
+ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v2 b/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v2
new file mode 100644
index 00000000..6d2578f6
--- /dev/null
+++ b/src/packages/fff/fff-network/ath79/network.tplink,archer-c60-v2
@@ -0,0 +1,9 @@
+PORTORDER="4 3 2 1"
+
+WANDEV=eth1
+SWITCHDEV=eth0
+CLIENT_PORTS="1 2 0t"
+BATMAN_PORTS="3 4 0t"
+
+ETHMESHMAC=$(cat /sys/class/net/eth1/address)
+ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.archer-c7-v2 b/src/packages/fff/fff-network/ath79/network.tplink,archer-c7-v2
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.archer-c7-v2
rename to src/packages/fff/fff-network/ath79/network.tplink,archer-c7-v2
diff --git a/src/packages/fff/fff-network/ar71xx/network.archer-c7-v5 b/src/packages/fff/fff-network/ath79/network.tplink,archer-c7-v5
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.archer-c7-v5
rename to src/packages/fff/fff-network/ath79/network.tplink,archer-c7-v5
diff --git a/src/packages/fff/fff-network/ar71xx/network.cpe210-v2 b/src/packages/fff/fff-network/ath79/network.tplink,cpe210-v2
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.cpe210-v2
rename to src/packages/fff/fff-network/ath79/network.tplink,cpe210-v2
diff --git a/src/packages/fff/fff-network/ar71xx/network.cpe210-v3 b/src/packages/fff/fff-network/ath79/network.tplink,cpe210-v3
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.cpe210-v3
rename to src/packages/fff/fff-network/ath79/network.tplink,cpe210-v3
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-mr3020-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-mr3020-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-mr3020-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-mr3020-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wa850re-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wa850re-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wa850re-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wa850re-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wa860re-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wa860re-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wa860re-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wa860re-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wa901nd-v2 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wa901nd-v2
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wa901nd-v2
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wa901nd-v2
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wdr3500-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wdr3500-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wdr3500-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wdr3500-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wdr3600-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wdr3600-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wdr3600-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wdr3600-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wdr4300-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wdr4300-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wdr4300-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wdr4300-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wdr4310-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wdr4310-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wdr4310-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wdr4310-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043n-v5
similarity index 83%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043n-v5
index ec6d6717..c52e74e6 100644
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043n-v5
@@ -12,5 +12,5 @@ BATMAN_PORTS="3 4 0t"
 # Load second MAC address from flash because we haven't any interface with this
 # address where we can copy it from
 
-ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1)
+ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary info 8) 1)
 ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v1 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v1
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v1
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v1
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v2 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v2
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v2
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v2
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v3 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v3
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v3
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v3
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v4
similarity index 83%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v4
index ec6d6717..c52e74e6 100644
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr1043nd-v4
@@ -12,5 +12,5 @@ BATMAN_PORTS="3 4 0t"
 # Load second MAC address from flash because we haven't any interface with this
 # address where we can copy it from
 
-ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1)
+ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary info 8) 1)
 ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr740n-v4 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr740n-v4
similarity index 92%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr740n-v4
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr740n-v4
index 334e498a..ed1a46d1 100644
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr740n-v4
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr740n-v4
@@ -1,5 +1,4 @@
 WANDEV=eth1
-# WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="1 4 0t"
 WAN_PORTS=
diff --git a/src/packages/fff/fff-network/ar71xx/network.archer-c60-v2 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr741-v1
similarity index 64%
rename from src/packages/fff/fff-network/ar71xx/network.archer-c60-v2
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr741-v1
index d47c93ef..346712bb 100644
--- a/src/packages/fff/fff-network/ar71xx/network.archer-c60-v2
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr741-v1
@@ -1,9 +1,8 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth0
 SWITCHDEV=eth1
 CLIENT_PORTS="1 2 0t"
+WAN_PORTS=
 BATMAN_PORTS="3 4 0t"
 
 ETHMESHMAC=$(cat /sys/class/net/eth0/address)
-ROUTERMAC=$(cat /sys/class/net/eth1/address)
+ROUTERMAC=$(cat /sys/class/ieee80211/phy0/macaddress)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v4 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr741nd-v4
similarity index 92%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v4
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr741nd-v4
index 334e498a..ed1a46d1 100644
--- a/src/packages/fff/fff-network/ar71xx/network.tl-wr741nd-v4
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr741nd-v4
@@ -1,5 +1,4 @@
 WANDEV=eth1
-# WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="1 4 0t"
 WAN_PORTS=
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v10 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v10
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr841-v10
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v10
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v11 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v11
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr841-v11
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v11
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v12 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v12
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr841-v12
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v12
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v7 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v7
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr841-v7
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v7
diff --git a/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v8 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v8
new file mode 100644
index 00000000..ace93630
--- /dev/null
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v8
@@ -0,0 +1,10 @@
+PORTORDER="2 3 4 1"
+
+WANDEV=eth1
+SWITCHDEV=eth0
+CLIENT_PORTS="1 4 0t"
+WAN_PORTS=
+BATMAN_PORTS="3 2 0t"
+
+ETHMESHMAC=$(cat /sys/class/net/eth1/address)
+ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr841-v9 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v9
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.tl-wr841-v9
rename to src/packages/fff/fff-network/ath79/network.tplink,tl-wr841-v9
diff --git a/src/packages/fff/fff-network/ath79/network.tplink,tl-wr842n-v2 b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr842n-v2
new file mode 100644
index 00000000..541fb3d3
--- /dev/null
+++ b/src/packages/fff/fff-network/ath79/network.tplink,tl-wr842n-v2
@@ -0,0 +1,8 @@
+WANDEV=eth1
+SWITCHDEV=eth0
+CLIENT_PORTS="1 4 0t"
+WAN_PORTS=
+BATMAN_PORTS="3 2 0t"
+
+ETHMESHMAC=$(cat /sys/class/net/eth1/address)
+ROUTERMAC=$(cat /sys/class/net/eth0/address)
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-bullet-m b/src/packages/fff/fff-network/ath79/network.ubnt,bullet-m
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-bullet-m
rename to src/packages/fff/fff-network/ath79/network.ubnt,bullet-m
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-loco-m b/src/packages/fff/fff-network/ath79/network.ubnt,nanostation-loco-m
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-loco-m
rename to src/packages/fff/fff-network/ath79/network.ubnt,nanostation-loco-m
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-loco-m-xw b/src/packages/fff/fff-network/ath79/network.ubnt,nanostation-loco-m-xw
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-loco-m-xw
rename to src/packages/fff/fff-network/ath79/network.ubnt,nanostation-loco-m-xw
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-nano-m b/src/packages/fff/fff-network/ath79/network.ubnt,nanostation-m
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-nano-m
rename to src/packages/fff/fff-network/ath79/network.ubnt,nanostation-m
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-pico-m b/src/packages/fff/fff-network/ath79/network.ubnt,picostation-m
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-pico-m
rename to src/packages/fff/fff-network/ath79/network.ubnt,picostation-m
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-unifi b/src/packages/fff/fff-network/ath79/network.ubnt,unifi
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-unifi
rename to src/packages/fff/fff-network/ath79/network.ubnt,unifi
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite b/src/packages/fff/fff-network/ath79/network.ubnt,unifiac-mesh
similarity index 100%
rename from src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite
rename to src/packages/fff/fff-network/ath79/network.ubnt,unifiac-mesh
diff --git a/src/packages/fff/fff-network/mpc85xx/network.tl-wdr4900-v1 b/src/packages/fff/fff-network/mpc85xx/network.tplink,tl-wdr4900-v1
similarity index 100%
rename from src/packages/fff/fff-network/mpc85xx/network.tl-wdr4900-v1
rename to src/packages/fff/fff-network/mpc85xx/network.tplink,tl-wdr4900-v1
diff --git a/src/packages/fff/fff-wireless/Makefile b/src/packages/fff/fff-wireless/Makefile
index 6b459757..9b83cd4a 100644
--- a/src/packages/fff/fff-wireless/Makefile
+++ b/src/packages/fff/fff-wireless/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-wireless
-PKG_RELEASE:=16
+PKG_RELEASE:=17
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/24b-config-wireless b/src/packages/fff/fff-wireless/files/etc/uci-defaults/24b-config-wireless
index f0257fb7..fb6eae5a 100644
--- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/24b-config-wireless
+++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/24b-config-wireless
@@ -6,31 +6,29 @@ BOARD="$(uci get board.model.name)"
 
 # antenna gain
 case "$BOARD" in
-	tl-wr1043nd-v1)
+	tplink,tl-wr1043nd-v1)
 		uci set wireless.radio0.antenna_gain=3
 		uci commit wireless
 		;;
-	ubnt-loco-m|\
-	ubnt-loco-m-xw)
+	ubnt,nanostation-loco-m|\
+	ubnt,nanostation-loco-m-xw)
 		uci set wireless.radio0.antenna_gain=9
 		uci commit wireless
 		;;
-	ubnt-nano-m)
+	ubnt,nanostation-m)
 		uci set wireless.radio0.antenna_gain=11
 		uci commit wireless
 		;;
-	ubnt-pico-m)
+	ubnt,picostation-m)
 		uci set wireless.radio0.antenna_gain=12
 		uci commit wireless
 		;;
-	ubnt-unifi)
+	ubnt,unifi)
 		# No support for Unifi AP Pro!
 		uci set wireless.radio0.antenna_gain=3
 		uci commit wireless
 		;;
-	ubnt-unifiac-lite)
-		# These are the values for the AC MESH.
-		# The actual AC Lite has different values
+	ubnt,unifiac-mesh)
 		uci set wireless.radio0.antenna_gain=4
 		uci set wireless.radio1.antenna_gain=3
 		uci commit wireless
-- 
2.20.1



Mehr Informationen über die Mailingliste franken-dev