Robert Marko [Thu, 12 Oct 2023 10:25:32 +0000 (12:25 +0200)]
mac80211: ath11k: sync with ath-next
Synchronize the ath11k backports with the current ath-next tree.
All of the changes are various bugfixes, there is no new major feature.
Notable bugfixes are:
* WCN6855 board name fixes
* One MSI vector booting is working again
This is rather important for most of the older platforms.
* DFS CAC state in virtual interfaces was fixed
* TX power during CAC reporting
Michael Pratt [Thu, 12 Oct 2023 22:07:11 +0000 (18:07 -0400)]
tools/cmake: disable cmake script debugger
Upstream commit a9a592f96e6498da302f8e968be1db0ad3c32123
("cmake: Add debugger") added a huge amount of code
in order to create a debugging feature for CMakeLists.txt
of other projects. This was added to CMake since 3.27.x.
Unforunately, this new debugger will not build on ARM systems
like arm-linux-gnueabihf (Raspberry Pi 4), and takes up
extra build time for something Openwrt doesn't need,
yet it was enabled by default. (Thanks Microsoft....)
Specifically, it's a failure to link to functions like
__atomic_store_8, __atomic_load_8, __atomic_fetch_add_8, etc.
Let's just disable it.
Someone who really needs this for developing can have CMake
with the debugger on their host machine or manually re-enable it here.
So far every build of a single bcm53xx Target Profile (it means: when
NOT using CONFIG_TARGET_MULTI_PROFILE) resulted in all target devices
images being built. Now it only builds the one matching selected
profile.
Nick Hainke [Wed, 11 Oct 2023 23:05:38 +0000 (01:05 +0200)]
libnl: update to 3.8.0
Changes: 6b2533c0 libnl-3.8.0 release 1558bd62 build: replace old "NOTE" in configure output and add summary f66383a4 build: avoid aclocal warning about missing "m4" directory e4402a4c build: run `autoupdate` for AM_PROG_LIBTOOL 5761b6af build: add "-Wno-portability" to AC_INIT_AUTOMAKE() 661f10a1 license: fix/adjust license for "src/nl-cls-add.c" c8fcb412 license: fix/adjust license for "src/nl-addr-{add,delete,list}.c" e3e6fd6d tests: use thread-safe localtime_r() instead of localtime() f520471c lib/xfrm: use thread-safe gmtime_r() instead of gmtime() be5add72 tests: avoid srandom()/random() in favor of _nltst_rand_u32() 40578a62 lib: use getprotobyname_r(), getprotobynumber_r() if available 8ee8b05f lib: fix error handling in nl_str2ip_proto() 09f03f29 tests: check nl_str2ip_proto() 74bffbf6 route: fix documentation comment for nl_nh_group_info 59f8db0d clang-format: add "-l" alias for option in "tools/clang-format.sh" 935cc90a clang-format: ignore reformatting commit in ".git-blame-ignore-revs" 53da4712 clang-format: reformat files with new format 65c43bfe clang-format: update ".clang-format" from linux kernel 4c39a2ce include: use <linux/$file> instead of <linux-private/linux/$file> a1e9fb3d include/linux: add all linux headers that we use d37ffe15 include/linux: update all linux headers 1af767a8 include: add missing "extern "C"" specifier to public headers e0a5d12b all: drop "extern "C"" from internal code d9a1e0ce build: add "check-local-build-headers" test target to build public headers 02b87012 build: add a "check-local" build target f9413915 include: fix headers "include/netlink/route/{netconf.h,route/qdisc/red.h}" to be self-contained 680df173 idiag: "fix" license for "idiag-socket-details" tool 2f210d9a github: test build on alpine:latest for musl dcc4c0a5 Revert "gitignore: ignore patch files" 39106309 github: add test for linking with mold and fail on unknown versions f475c3b2 route/nh: drop not implemented "nh" API from headers 4c681e77 build: fix exporting symbol rtnl_link_info_ops_get 260c9575 include: don't explicitly include headers from "nl-default.h" 98c1e696 tests: cleanup include of netlink headers 42bec462 build: cleanup default include list in Makefile.am 4c1a119a include: include private linux headers with explicit path ca063725 python: add make target for python build 25c90193 python: drop unused "python/netlink/fixes.h" 3f3da7fd gitignore: ignore python build artifacts 61ef5609 gitignore: ignore generated doc files 298c5dc6 include: drop "netlink-private/netlink.h" and move declarations 862eed54 all: cleanup includes and use "nm-default.h" 2b3cd741 include: add "nl-default.h" header 8952ce6f build: move "lib/defs.h" to "include/config.h" 1010776d include: split and drop "netlink-private/types.h" d1d57846 include: rename "nl-shared-core" to "nl-priv-dynamic-core" fc91c4f8 include: rename "nl-hidden-route" to "nl-priv-dynamic-route" 9bb6f770 include: rename "nl-intern-route" to "nl-priv-static-route" b5195db9 genl: rename private header "nl-priv-genl.h" to "nl-genl.h" 0eacf658 include: make "netlink/route/link/{inet,inet6}.h" self-contained ad014ad1 route/tc: avoid unalinged access in rtnl_tc_msg_parse() 05bd6366 add support for TC action statistics 776fc5a6 lib: move "include/netlink-private/object-api" to include/nl-shared-core fad34560 lib: move "include/netlink-private/cache-api" to include/nl-shared-core ed2be537 route: move "include/netlink-private/route/link/sriov.h" to lib/route/link-sriov.h 97f61eda lib: move "include/netlink-private/socket.h" to lib/nl-core.h 96e1cc5b route: move "include/netlink-private/route/nexthop-encap.h" to lib/route 391e03d3 route: merge "include/netlink-private/tc.h" to lib/route/tc-api.h 7fc4f5b3 route: move rtnl_tc_build_rate_table() to "tc-api.h" cf41e14d route: move "include/netlink-private/route/tc-api.h" to lib/route db810cfb route: move hidden symbols from "include/netlink-private/route/tc-api.h" ff08e618 build: don't add lib/route to include directory for all libs eb8da16d include: move "include/netlink-private/route/link/api.h" to lib/route 8b2074aa include: move "include/netlink-private/route/utils.h" to nl-intern-route fd470c06 include: move "include/netlink-private/route/mpls.h" to "lib/mpls.h" 78056ad2 genl: add comment about wrongly exported symbol genl_resolve_id() befc4ab4 include: move "include/netlink-private/genl.h" to "lib/genl/nl-priv-genl.h" f6c26127 nl-aux: add "include/nl-aux-{core,route}" headers 2da8481b base: move "netlink-private/utils.h" to "base/nl-base-utils.h" d3e9b513 include/utils: move nl-auto base defines to "utils.h" 543b9f8f clang-format: reformat "include/netlink-private/nl-auto.h" aa565460 route: cleanup ATTR_DIFF() macros beba5a18 cli: add nl-nh-list utility 780d06ae route: add nh type 1b6433d9 neigh: add support of NHID attribute e0140c5f include: import kernel headers "linux/{neighbour,nexthop,rtnetlink}.h" eef06744 utils: add static-assert for signedness of arguments of _NL_CMP_DIRECT() macro 679c4c51 cli: use <netlink-private/utils.h> in cli and _nl_{init,exit} a9c5de52 lib: use _nl_{init,exit} instead of __{init,exit} 102f9bd2 include/private: add _nl_init/_nl_exit macros 6782678e include/private: drop unused __deprecated macro a0535a58 all: use "_nl_packed" macro instead of "__attribute__((packed))" 8c9f98cf all: rework ATTR_DIFF() macros to not generate attribute names ca34ad52 lib: handle negative and zero size in nla_memcpy() 859b89dc include: drop now unused min()/max()/min_t()/max_t() macros 2e0ae977 all: use _NL_{MIN,MAX}() macros 57c451fa utils: add various helpers to "include/netlink-private/utils.h" a9a9dcea style: format "include/netlink-private/utils.h" with clang-format 590e8a61 tools: improve failure message with "tools/clang-format.sh -n" 06dc5ae0 github: fix format checking with clang-format 7738f239 route/trivial: sort entries in "libnl-route-3.sym" asciibetically fc805c56 route/bond: Add support for link_info for bond 6af26981 lib: accept NULL argument in nla_nest_cancel() for robustness e9662091 macsec: Drop offload capability validation check 35a68109 github: update flake8 linter to not explicitly select checks 9a266405 python: add ".flake8" file for configuring "flake8" e6b934a5 python: fix flake8 warnings E712 2cea738b python: fix flake8 warnings E711 d561096c python: fix flake8 warnings E302 29b06d0f python: fix flake8 warnings E741 4dc1f498 python: fix flake8 warnings F841 f4875c69 python: fix flake8 warnings W605 9a3d91df python: fix flake8 warnings F401 6baf2339 clang-format: add "tools/clang-format-container.sh" script ee2876e3 github: add test for checking clang-format style 45c7aae3 clang-format: add "tools/clang-format.sh" script 02e0fd3f github: check python-black code formatting in github actions 2dd53895 build: add ".git-blame-ignore-revs" file for "blame.ignoreRevsFile" git config 3c753e3c python: reformat all Python files with python-black 298ee58e python add "pyproject.toml" for configuring black a0e4b7f9 github: skip Python flake8 test with clang build c4240c0b github: run "Build Release" test also with clang 143cee1d bridge: fix bridge info parsing 96bbe55c test-cache-mngr: Flush output after object dumps cf5dcbcd test-cache-mngr: Add option to print timestamps bd570952 test-cache-mngr: Add an option to iterate over all supported address families bf80da90 test-cache-mngr: Add dump interval options 80febeea test-cache-mngr: Add an option to control which oo_dump function is used 6519a917 route/link: prevent segfault in af_request_type() a68260f8 github: fix installing python dependencies via pip 39c04bc7 build: drop redundant "autogen.sh" call from "tools/build_release.sh" d411b88d build: change proper working directory in "doc/autogen.sh" 2fa73ce0 build: ensure "autogen.sh" scripts fail on error fc786296 gitignore: ignore "*~" files 4c4e614b docs: rtnl_link_put() 'releases' instead of 'returns' 336b15dc include/linux: update copy of kernel header "linux/ipv6.h" e2cacc26 route/link: improve handling of IFLA_INET6_CONF ec8c493c route/link: remove rtnl_link_inet6_set_conf() API e790f8ad route/link: various fixes for rtnl_link_inet6_get_conf() API d83c6d54 route/link: add accessor API for IPv6 DEVCONF 9167504d bridge: drop unnecessary goto in bridge_info_parse() 984d6e93 bridge: don't normalize the u8 argument in rtnl_link_bridge_set_vlan_filtering() to boolean 3662a5da bridge: expose rtnl_link_bridge_get_vlan_protocol() in host byte order 5a1ef219 bridge: fix parsing vlan-protocol in bridge_info_parse() ad1c2927 bridge: minor cleanups in "bridge_info.c" 1c74725a bridge: use SPDX license identifiers in bridge_info files 26ca549d bridge: reformat bridge_info file with clang-format 08dc5d9c bridge: extend libnl with options needed for VLAN aware forwarding 7391a38e bridge: Add support for link_info of a bridge 1f1e8385 route/vlan: drop unnecessary "else" in vlan_put_attrs() 2bc30e57 route/vlan: fix error handling in 'lib/route/link/vlan.c' 8273d6ce build: add comments to linker version scripts about the version tags 6ac7a812 doc: fix typo 07d274ab doc: fix typo 0461a425 attr: reject zero length addresses 8d40d9eb route: construct all-zero addresses for default route destination 25d42a4f addr: allow constructing all-zero addresses 0c0aee82 addr: create an all-zero addresses when parsing "any" or "default"
Nick Hainke [Wed, 11 Oct 2023 22:58:20 +0000 (00:58 +0200)]
libmd: update to 1.1.0
Changes: 16d68ab Release libmd 1.1.0 054bca1 build: Terminate lists in variables with «# EOL» 84d269e test: Add cases for SHA224 and SHA512-256 a677e68 test: Add a new test_eq() helper function 4c5931f Sync SHA2 changes from OpenBSD 9934d94 Sync SHA1 changes from OpenBSD 457e30a Sync RMD160 changes from OpenBSD b2e54bc Sync MD5 changes from OpenBSD ee56a52 Sync MD4 changes from OpenBSD b9496ac Sync MD2 changes from NetBSD 09d5824 Remove unused <assert.h> 08b2c5d build: Rename libmd_alias() to libmd_strong_alias() ed69599 On Darwin use assembler to support symbol aliases b74b777 build: Do not use strong aliases on macOS 94838ec build: Require automake 1.11 39cbc7b build: Fix configure.ac indentation 4620a04 build: Switch to debian:latest Docker image e408786 build: Fix version script linker support detection 0ef1e4d doc: Move mailing list reference to the end a3f1671 man: Add new libmd(7) man page
Nick Hainke [Wed, 11 Oct 2023 22:33:04 +0000 (00:33 +0200)]
tools/zlib: update to 1.3
Changes in 1.3 (18 Aug 2023)
- Remove K&R function definitions and zlib2ansi
- Fix bug in deflateBound() for level 0 and memLevel 9
- Fix bug when gzungetc() is used immediately after gzopen()
- Fix bug when using gzflush() with a very small buffer
- Fix crash when gzsetparams() attempted for transparent write
- Fix test/example.c to work with FORCE_STORED
- Rewrite of zran in examples (see zran.c version history)
- Fix minizip to allow it to open an empty zip file
- Fix reading disk number start on zip64 files in minizip
- Fix logic error in minizip argument processing
- Add minizip testing to Makefile
- Read multiple bytes instead of byte-by-byte in minizip unzip.c
- Add memory sanitizer to configure (--memory)
- Various portability improvements
- Various documentation improvements
- Various spelling and typo corrections
Hauke Mehrtens [Mon, 9 Oct 2023 00:06:55 +0000 (02:06 +0200)]
lantiq: Fix an sleeping function called from invalid context
The ifx_pcie_bus_enum_hack() function is called in
ifx_pcie_read_config() while holding the ifx_pcie_lock spinlock. The
ifx_pcie_bus_enum_hack() function calls pci_get_slot() which could
sleep. Add a new function for pci_get_slot() which does not use a
semaphore, the mutex should be sufficient. This fixes the sleep in
atomic context which could cause a hang of the system.
This fixes the following warning seen with
CONFIG_KERNEL_DEBUG_ATOMIC_SLEEP=y.
Hauke Mehrtens [Sat, 7 Oct 2023 19:07:20 +0000 (21:07 +0200)]
bsdiff: Add patches for CVEs
Add two patches from Debian fixing CVEs in the bsdiff application.
CVE-2014-9862: Heap vulnerability in bspatch
CVE-2020-14315: Memory Corruption Vulnerability in bspatch
Copied the patches from this location:
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/20-CVE-2014-9862.patch
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/33-CVE-2020-14315.patch
Kevin Jilissen [Sun, 8 Oct 2023 15:21:23 +0000 (17:21 +0200)]
realtek: add support for HPE 1920-8g-poe+ (65W)
Hardware information:
---------------------
- RTL8380 SoC
- 8 Gigabit RJ45 PoE ports (built-in RTL8218B)
- 2 SFP ports (built-in SerDes)
- RJ45 RS232 port on front panel
- 32 MiB NOR Flash
- 128 MiB DDR3 DRAM
- PT7A7514 watchdog
- PoE chip
- Fanless
Known issues:
---------------------
- PoE LEDs are uncontrolled.
(Manual taken from f2f09bc)
Booting initramfs image:
------------------------
- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
connect the server to a switch port.
- Connect to the console port of the device and enter the extended
boot menu by typing Ctrl+B when prompted.
- Choose the menu option "<3> Enter Ethernet SubMenu".
- Set network parameters via the option "<5> Modify Ethernet Parameter".
Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
can be left blank, it is not required for booting from RAM). Note that
the configuration is saved on flash, so it only needs to be done once.
- Select "<1> Download Application Program To SDRAM And Run".
Initial installation:
---------------------
- Boot an initramfs image as described above, then use sysupgrade to
install OpenWrt permanently. After initial installation, the
bootloader needs to be configured to load the correct image file
- Enter the extended boot menu again and choose "<4> File Control",
then select "<2> Set Application File type".
- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
use the option "<1> +Main" to select it as boot image.
- Choose "<0> Exit To Main Menu" and then "<1> Boot System".
NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).
Example PoE config file (/etc/config/poe):
---------------------
config global
option budget '65'
config port
option enable '1'
option id '1'
option name 'lan8'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '2'
option name 'lan7'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '3'
option name 'lan6'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '4'
option name 'lan5'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '5'
option name 'lan4'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '6'
option name 'lan3'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '7'
option name 'lan2'
option poe_plus '1'
option priority '2'
config port
option enable '1'
option id '8'
option name 'lan1'
option poe_plus '1'
option priority '2'
Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
Kevin Jilissen [Sun, 8 Oct 2023 14:56:40 +0000 (16:56 +0200)]
realtek: rename hpe,1920-8g-poe to match hardware
There are two hardware models of the HPE 1920-8g-poe switch. The version
currently in the repository is the model with a PoE budget of 180W. In
preparation of the addition of the 65W model, the existing model is
renamed to clarify the hardware version it targets.
As suggested by Pawel, the 'SUPPORTED_DEVICES' includes the old target
name to enable an upgrade path of builds with the old name.
Suggested-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
David Bauer [Mon, 9 Oct 2023 10:47:38 +0000 (12:47 +0200)]
ath79: add WWAN serial driver for GL.iNET GL-XE300
The driver for the cellular modems serial interface was missing from the
default device packages.
The driver is required to interact with the modem using AT commands.
Other devices with a 4G modem also ship with this package, thus let's
add it to the default packages for the board.
Fix broken onhub dtsi. The gmac node have a redundant phy-handle that
doesn't point to the swconfig phy node as they got dropped in the DSA
conversion. Drop these extra binding to restore correct compilation of
this subtarget.
Fixes: 337e36e0ef98 ("ipq806x: convert each device to DSA implementation") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Hauke Mehrtens [Sat, 7 Oct 2023 10:29:57 +0000 (12:29 +0200)]
toolchain: glibc: Update glibc 2.37 to recent HEAD
This adds the following changes: b4f76ecc9e Ignore MAP_VARIABLE in tst-mman-consts.py f5d377c896 __check_pf: Add a cancellation cleanup handler [BZ #20975] 0e3e9dbb0e Document BZ #20975 fix e2974d26ce io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477) 3593050c27 io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64 8dcb1a5181 hppa: xfail debug/tst-ssp-1 when have-ssp is yes (gcc-12 and later) 0930ff8eb3 realloc: Limit chunk reuse to only growing requests [BZ #30579] 3f4b4e2cdd elf: _dl_find_object may return 1 during early startup (bug 30515) 260d4b742b nptl: Fix tst-cancel30 on sparc64 58f7431fd7 sparc: Fix la_symbind for bind-now (BZ 23734) 1caf955269 x86: Increase `non_temporal_threshold` to roughly `sizeof_L3 / 4` 80a8c858a5 x86: Fix slight bug in `shared_per_thread` cache size calculation. cc8243fb0b x86: Use `3/4*sizeof(per-thread-L3)` as low bound for NT threshold. f94ff95e93 x86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745] 0d500bfdc0 hurd: Make exception subcode a long be26b29262 io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64 3d24d1903d elf: Do not run constructors for proxy objects a7e34a6675 elf: Always call destructors in reverse constructor order (bug 30785) bdb594afa5 elf: Remove unused l_text_end field from struct link_map 1a7cbe52c8 elf: Move l_init_called_next to old place of l_text_end in link map b752934602 CVE-2023-4527: Stack read overflow with large TCP responses in no-aaaa mode 6529a7466c (HEAD) getaddrinfo: Fix use after free in getcanonname (CVE-2023-4806) 79310b45af x86/dl-cacheinfo: remove unsused parameter from handle_amd 9d5c6e27ed x86: Fix for cache computation on AMD legacy cpus. 4473d1b87d Fix leak in getaddrinfo introduced by the fix for CVE-2023-4806 [BZ #30843] 94ef701365 Document CVE-2023-4806 and CVE-2023-5156 in NEWS 2dfd8c77b5 i686: Regenerate ulps b4e23c75ae tunables: Terminate if end of input is reached (CVE-2023-4911)
We exit 1 after saying that there are no patches because later in the
function quilt pop fails to execute.
Having no patches for a package and calling refresh should not be
a critical error and the function should just do nothing.
To handle this improve quilt.mk with the following addition.
- If we don't have any patch for the package, we print a warning and we
create an empty series. This is useful to trick quilt and make it do
nothing.
We also create a status file .quilt_no_patch to detect in the other
function that we don't have patches to handle.
- In refresh makefile target, we check if .quilt_no_patch exist and
we skip quilt cleanup if this exist.
- In RefreshDir function we change the logic and now we delete the
patches directory and not only the content. This is done as a cleanup
to clean case with empty patches directory.
- In RefreshDir we check if .quilt_no_patch exist and we skip creating
the patches directory and copying the refreshed patches.
- In RefreshDir we delete at the end any trace of .quilt_no_patch if
present.
This is needed to support run like package/refresh that will run the
refresh process on any package present in the buildroot.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
quilt.mk: use CURDIR instead of ./ for PATCH_DIR and FILES_DIR
To better reference them for diagnostic use, reference the PATCH_DIR and
FILES_DIR with the absolute path instead of using ./ and reference by
the relative location.
No behaviour change intended.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
generic: 6.1: backport qca8k fixes for big endian and MDIO
Backport qca8k fixes for big endian system (to make them working again)
and a patch fixing MDIO conflicts if other PHY are connected and mgmt
eth is used to control the switch.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
generic: rtl8366_smi: rename and drop conflicting vlan GPL symbols
Symbol rtl8366_enable_vlan and rtl8366_reset_vlan are also present in
the DSA driver upstream and conflicts as they are EXPORTED.
Rename them to rtl8366_smi_enable_vlan and rtl8366_smi_reset_vlan to fix
the conflict. While at it also make them static and drop the
EXPORT_SYMBOL_GPL as they are not actually used by any other driver and
exporting them is useless.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Daniel Golle [Thu, 5 Oct 2023 18:40:12 +0000 (20:40 +0200)]
mediatek: fix wrong variable name in patch for Linux 6.1
The name of the variable holding the pointer to the private struct has
changed between Linux 5.15 and Linux 6.1 and adding the identical patch
fixing PCIe #PERST de-assert broke the build on Linux 6.1.
Also change the name in the patch to fix the build.
Fixes: 6a2e17d5c1 ("mediatek: fix PCIe #PERST being de-asserted too early") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
ipq806x: fix wrong QCA8K LED definition for NEC Aterm WG2600HP3
Fix copy-paste error in migrating NEC Aterm WG2600HP3 to new LED
implementation for the QCA8K switch. Correct define the missing
additional LED pin used for each port and fix wrong color for LED 2 for
each port. Also add the required function-enumerator as all 3 LED have
the same color and function.
Fixes: c707cff6c94b ("ipq806x: add LEDs definition for non-standard qca8k LEDs") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Martin Schiller [Mon, 31 Jul 2023 06:10:23 +0000 (08:10 +0200)]
linux-atm: use target specific kernel headers
There are a few targets that mess with the atm kernel headers. To avoid
incompatibility between kernel and user space during compilation, the
correct headers should be used.
Consequently, the package must also be marked as nonshared.
MAC address for LAN1/LAN2/WLAN 2G/WLAN 5G in uboot env
* Installation via either RJ45 console or on-board 4 PIN header
Install Method
--------------
1) Setup TFTP server, and place
openwrt-ipq806x-generic-extreme_ap3935-initramfs-uImage image
in /srv/tftp or similar
2) Connect to console on router and connect ethernet port "LAN1" to
your LAN
3) Interupt the boot with any character
4) Login with admin/new2day for default password
(use reset/FactoryDefault if password needs to be reset)
5) Set serverip to TFTP IP: set serverip 192.168.1.2
6) Set ipaddr to another IP: set ipaddr 192.168.1.101
7) Make uboot ping something to activate eth0 on boot:
set bootcmd 'ping 192.168.1.1; run boot_flash'
saveenv
8) TFTP image to RAM:
tftpboot 0x42000000
openwrt-ipq806x-generic-extreme_ap3935i-initramfs-uImage
9) Boot image: bootm 0x42000000
In OpenWRT, "LAN1" is LAN, "LAN2" is WAN
10) SFTP openwrt-ipq806x-generic-extreme_ap3935-squashfs-nand-sysupgrade.bin
image to /tmp
11) sysupgrade /tmp/openwrt-*-nand-sysupgrade.bin
This script was used to modify the wrong machine type passed
from the boot loader to the kernel. The device tree kernels
does not use the machine type so this script is no longer
needed.
There is no point in keeping the v5.15 kernel around for Gemini,
we are maintaining the platform with a strong upstream focus and
newer is always better.
Now that OpenWrt can support pure v6.1 kernels, switch up to
v6.1 and drop v5.15 so we don't need to migrate configs and
patches for no reason.
The USB FOTG2 module handling can be simplified as a result.
Rudolf Vesely [Mon, 2 Oct 2023 06:51:19 +0000 (06:51 +0000)]
rtl83xx: fix STP by trapping BPDUs
Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently
makes switch to ignore Bridge Protocol Data Units (BPDUs).
Tested on Zyxel GS1900-8, 24 and 48.
Signed-off-by: Rudolf Vesely <i@rudolfvesely.com>
[ improve commit description and add new line in different sections ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
When cmake is invoked to build a package it usually reports a warning
about unused variables passed to it. This is caused by openwrt passing
all supported variables to cmake, even if they are not all required by
the package being compiled.
To reduce clutter when compiling such packages these warnings are now
suppressed.
Approved-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Tjalling Hattink <t.hattink@fugro.com>
realtek: 5.15: rtl93xx: support 2500baseT and 5000baseT on USXGMII links
The USXGMII implementation of Realtek switches can not only support
10GbE but also 2.5Gb and 5Gb on top of the usual data rates.
Mark those as supported to allow them to be negotiated.
This change has been tested on a ZyXEL XGS1250-12 with the following link
partners:
- NWA50AX Pro (2.5Gb)
- RTL8152 USB NIC (2.5Gb)
- AQC111 USB NIC (2.5Gb & 5Gb)
Gbit and 10GbE has also been tested to still work fine with a variety of
devices.
Peter Körner [Sun, 24 Sep 2023 18:58:13 +0000 (20:58 +0200)]
rtl93xx: fix condition intended to only select internal serdes ports
This condition was introduced in commit 51c8f7661244 ("realtek: Improve
MAC config handling for all SoCs") to correctly report the speed of the
internal serdes ports as 10G, but instead makes all ports read 10G
because the or-operator should have been an and-operator.
Fixes: #9953 Fixes: 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs") Signed-off-by: Peter Körner <git@mazdermind.de>
[ wrap comment to 72 column and improve commit ref ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Daniel Golle [Tue, 3 Oct 2023 01:32:35 +0000 (02:32 +0100)]
mediatek: fix PCIe #PERST being de-asserted too early
The driver for MediaTek gen3 PCIe hosts de-asserts all reset
signals at the same time using a single register write operation.
Delay the de-assertion of the #PERST signal by 100ms as some PCIe
devices fail to come up otherwise.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Uwe Niethammer [Sun, 1 Oct 2023 10:26:51 +0000 (12:26 +0200)]
uqmi: added timeout to fix hanging qmi.sh
Modems which are using qmi do not reply on the 1st sync but they do
on subsequent. So qmi.sh is hanging on the first call. Since 2020 uqmi
supports a timeout parameter. Unfortunately qmi.sh didn't make use of
this parameter. So qmi.sh is now invoking an early dummy access to
unlock the modem
Robert Marko [Sat, 30 Sep 2023 11:19:30 +0000 (13:19 +0200)]
ipq40xx: use upstreamed SDI disable support
Google WiFi board has what seems as debug version of TZ/QSEE and it is
always enabling SDI (Secure Debug Image) and in order to do a regular
reboot it must be disabled, as otherwise you are stuck in a debug state
where you are supposed to extract debug logs via QCA tooling which is not
helpfull at all for regular users.
So, instead of using our downstream version to disable SDI lets use the
version that was merged upstream and relies on a boolean property in the
SCM node instead of checking the compatible.
Signed-off-by: Robert Marko <robimarko@gmail.com> Tested-by: Brian Norris <computersforpeace@gmail.com>
Commit mt76: drop default eeprom file for mt7986-firmware
(e3aa645b267ca4f08773b5366583e9b0020fc3e9) breaks eeprom loading for
Mercusys MR90X v1. As a result WiFi is not working at all.
This commit adds Mercusus MR90x to the caldata script (it works after the
commit mentioned above). And we can safely drop "81_fix_eeprom" script
as it's no longer required.
ipq806x: enable and setup multi-CPU port for qca8k switch
Enable and setup multi-cpu for qca8k switch for ipq806x based devices.
Rework each DTS to enable the secondary CPU port on QCA8K switch and
apply the required values originally set by the OEM in the old swconfig
node.
In original firmware the first CPU port was always assigned to the WAN
port and the secondary CPU port was assigned to the rest of the LAN
port. Follow this original implementation using an init.d script.
To setup the CPU port ip tools is required. Add additional default
package ip-tiny to correctly setup the CPU port.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
generic: 6.1: backport patch for multi CPU port support on QCA8K
Backport pending patch for multi CPU port support on QCA8K. 6.1 already
supports all the requiredt code to change a DSA master port so only this
patch fixing the driver is required.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
ipq806x: move ASRock G10 fix mac preinit script to generic board.d script
Drop and move ASRock G10 preinit script to fix mac address to generic
board.d script and rework for consistency with other devices following a
similar implementation.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
ipq806x: convert each device to DSA implementation
Convert each ipq806x device to DSA implementation using the qca8k
driver. Rework 02_network to follow the new naming scheme.
Update 01_leds to use netdev trigger with correct DSA port and drop
now unused switch trigger.
Currently secondary CPU is disabled and will be reneabled later.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
If you want to use u-boot from OpenWrt, you can upgrade it safely.
* bl2: openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
* fip: openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
`openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-factory.bin` is used in OpenWrt's u-boot.
Chukun Pan [Thu, 4 May 2023 15:10:03 +0000 (23:10 +0800)]
mt76: drop default eeprom file for mt7986-firmware
The mt76 driver usually reads the eeprom on the mtd partition at dts.
For emmc device we need to use caldata_extract script to read the
eeprom. However, the default eeprom file breaks the caldata script
execution, so remove it.
Felix Fietkau [Thu, 28 Sep 2023 08:28:43 +0000 (10:28 +0200)]
hostapd: fix wpa_supplicant mac address allocation on ap+sta
If the full interface is restarted while bringing up an AP, it can trigger a
wpa_supplicant interface start before wpa_supplicant is notified of the
allocated mac addresses.
Fix this by moving the iface_update_supplicant_macaddr call to just after
the point where mac addresses are allocated.
Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
ramips: cf-ew72-v2: Add support for COMFAST CF-EW72 V2
Add support for COMFAST CF-EW72 V2
Hardware:
- SoC: Mediatek MT7621 (MT7621DAT or MT7621AT)
- Flash: 16 MiB NOR
- RAM: 128 MiB
- Ethernet: Built-in, 2 x 1GbE
- Power: only 802.3af PD on any port, injector supplied in the box
- PoE passthrough: No
- Wifi 2.4GHz: Mediatek MT7603BE 802.11b/g/b
- Wifi 5GHz: Mediatek MT7613BEN 802.11ac/n/a
- LEDs: 8x (only 1 is both visible and controllable, see below)
- Buttons: 1x (RESET)
Installing OpenWrt:
Flashing is done using Mediatek U-Boot System Recovery Mode
- make wired connection with 2 cables like this:
- - PC (LAN) <-> PoE Injector (LAN)
- - PoE Injector (POE) <-> CF-EW72 V2 (LAN). Leave unconnected to CF-EW72 V2 yet.
- configure 192.168.1.(2-254)/24 static ip address on your PC LAN
- press and keep pressed RESET button on device
- power the device by plugging PoE Injector (POE) <-> CF-EW72 V2 (LAN) cable
- wait for about 10 seconds until wifi led stops blinking and release RESET button
- navigate from your PC to http://192.168.1.1 and upload OpenWrt *-factory.bin firmware file
- proceed until router starts blinking with wifi led again (flashing) and stops (rebooting to OpenWrt)
MAC addresses as verified by OEM firmware:
vendor OpenWrt address
LAN lan\eth0 label
WAN wan label + 1
2g phy0 label + 2
5g phy1 label + 3
The label MAC address was found in 0xe000.
LEDs detailed:
The only both visible and controllable indicator is blue:wlan LED.
It is not bound by default to indicate activity of any wireless interfaces.
Place (WAN->ANT) | Num | GPIO | LED name (LuCI) | Note
-----------------|-----|-----------------------------------------------------------------------------------------
power | 1 | | | POWER LED. Not controlled with GPIO.
hidden_led_2 | 2 | 13 | blue:hidden_led_2 | This LED does not have proper hole in shell.
wan | 3 | | | WAN LED. Not controlled with GPIO.
hidden_led_4 | 4 | 16 | blue:hidden_led_4 | This LED does not have proper hole in shell.
lan | 5 | | | LAN LED. Not controlled with GPIO.
noconn_led_6 | 6 | | | Not controlled with GPIO, possibly not connected
wlan | 7 | 15 | blue:wlan | WLAN LED. Wireless indicator.
noconn_led_8 | 8 | | | Not controlled with GPIO, possibly not connected
mt76-phy0 and mt76-phy1 leds also exist in OpenWrt, but do not exist on board.
Signed-off-by: Alexey D. Filimonov <alexey@filimonic.net>
Glen Lee [Sat, 26 Aug 2023 01:46:59 +0000 (21:46 -0400)]
ipq40xx: add support for Extreme Networks WS-AP391x series APs
This in a single image to run many types of hardware in the AP391x
series (AP3912/AP3915/AP3916/AP3917/AP7662).
Hardware
--------
Qualcomm IPQ4029 WiSoC
2T2R 802.11 abgn
2T2R 802.11 nac
Macronix MX25L25635E SPI-NOR (32M)
512M DDR3 RAM
1-4x Gigabit Ethernet
Senao EXT1025 HD Camera (AP3916 only)
USB 2.0 Port (AP3915e only)
1x Cisco RJ-45 Console port
- except for AP3916 and AP3912 where there is no external serial
console and it is TDB how to solder one. Possibly J12 is UART with
pin1 = 3.3V, pin2 = GND, pin3 = TXD, pin4 = RXD.
- Settings: 115200 8N1
Installation With Serial Console
--------------------------------
1. Attach to the Console port. Power up the device and press the s key
to interrupt autoboot.
2. The default username / password to the bootloader is admin / new2day
3. Check uboot variables using printenv, and update if necessary:
$ setenv AP_MODE 0
$ setenv WATCHDOG_COUNT 0
$ setenv WATCHDOG_LIMIT 0
$ setenv AP_PERSONALITY identifi
$ setenv serverip <SERVER_IPADDR>
$ setenv ipaddr <UNIQUE_IPADDR>
$ setenv MOSTRECENTKERNEL 0; ## OpenWRT only uses the primary image
$ saveenv
$ saveenv ## 2nd time to write the secondary copy
4. On the TFTP server located at <SERVER_IPADDR>, download the OpenWrt
initramfs image. Rename and serve it as vmlinux.gz.uImage.3912
5. TFTP boot the OpenWrt initramfs image from the AP serial console:
$ run boot_net
6. Wait for OpenWrt to start. Internet port sw-eth5 is assiged to LAN
bridge and sw-eth4 (if available) is assigned to WAN. The LAN port
will use default IP address 192.168.1.1 and run a DHCP server.
If you already have a working DHCP server or already have 192.168.1.1
on your network you MUST DISCONNECT the LAN cable from your active
network immediately after the power/status LED turns green!
At this point, you need to temporarily reconfigure the AP to have
a way to transfer the OpenWRT sysupgrade image to it.
Reconfigure the newly converted OpenWRT AP using serial console or
plug in a PC to a sw-eth5 as a separate network. Note -- the LAN/WAN
port assignments were designed to make it possible to convert to
OpenWRT without serial console and using a common firmware
image for many AP models -- they may not make the most sense when
fully deployed.
7. Download and transfer the sysupgrade image to the device using e.g.
SCP.
8. Install OpenWrt to the device using "sysupgrade"
$ sysupgrade -n /path/to/openwrt.bin
9. After it boots up again, as in step 6, connect to AP and reconfigure
for final deployment.
This build supports APs in the AP391x series and similar such as WiNG
AP7662.
Ethernet devices within OpenWRT are named "sw-eth1" thru "sw-eth5".
Mapping from OpenWRT internal naming to external naming on the case is
as follows:
By default sw-eth4 is mapped to WAN. All others are assigned to the
LAN.
CAM* - On AP3916, sw-eth4 is the camera's interface. You should
reconfigure this to be on LAN after OpenWRT boots from flash.
Installation Without Serial Console
-----------------------------------
The main premise is to set u-boot environment variables using the
Extreme Networks firmware's rdwr_boot_cfg program.
$ rdwr_boot_cfg
Utility to manipulate the boot ROM config blocks
All errors are written to the sytem log file (/tmp/log/ap.log)
```
Usage: rdwr_boot_cfg <read_all|read_var|read_var_f|write_var|rm_var> ...
read_all read the entire active block
read_var <var> read a single variable from the active block
read_var_f <var> read a single variable from the active block
(formatted)
write_var <var=val> write a single variable/value pair to both
blocks
rm_var <var> delete a single variable from both blocks
```
WARNING: Be very sure you have set the u-boot environment correctly.
If not, it can only be fixed by attaching serial console!
Be aware that the Extreme Networks shell environment will automatically
reboot every 5 minutes if there is no controller present.
Read and understand these steps fully before attempting. It is easy
to make mistakes!
1. Place the OpenWRT initramfs on the TFTP server and name it as
vmlinux.gz.uImage.3912
2. Boot up to Extreme Networks WING-Campus mode OS. Port GE1/LAN1
will be a DHCP **client**. Find out the IP address from your DHCP
server and SSH in. Default user/passwd is admin/new2day or
admin/admin123.
If it is booting to WING-Distributed mode, use this command to
convert to Campus mode.
$ operational-mode centralized
3. Upon bootup you have about 5mins to changed these u-boot variables
if necessary using the rdwr_boot_cfg command in Linux shell:
5. Connect PC with ethernet to GE1/LAN1 port. You should get a
DHCP address in the 192.168.1.x range and should be able to
SSH to the new OpenWRT TFTP recovery/installation shell.
6. At this point, u-boot is still set to TFTP boot, so you have to
replace the TFTP image with the original Extreme Networks image so
that you can change the u-boot environment.
See the instructions for Extracting Extreme Networks firmware
image.
DON'T REBOOT YET!
7. Next you must follow steps 6 thru 8 from the Installation with serial
console. After which you should have OpenWRT installed to primary
flash firmware.
8. Now Reboot. This time it will boot using TFTP into Extreme Networks
image. You may need to reconnect cables at this point -- GE1/LAN1
will be a DHCP **client** and you can SSH in -- just like step 2.
Get the IP address from you own DHCP server.