openwrt/staging/jow.git
23 months agortl8812au-ct: Ignore address errors
Hauke Mehrtens [Mon, 19 Dec 2022 00:40:04 +0000 (01:40 +0100)]
rtl8812au-ct: Ignore address errors

GCC 12.2.0 shows these error messages:
````
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:210:24: error: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Werror=address]
  210 |         if(&psta->lock != NULL)
      |                        ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:109,
                 from rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:22:
rtl8812au-ct-2021-11-07-39df5596/include/sta_info.h:95:17: note: 'lock' declared here
   95 |         _lock   lock;
      |                 ^~~~
````

````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.o
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c: In function 'cfg80211_rtw_scan':
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:2176:32: warning: the comparison will always evaluate as 'true' for the address of 'ssid' will never be NULL [-Waddress]
 2176 |                 if(ssids->ssid != NULL
      |                                ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:88,
                 from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41,
                 from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32,
                 from rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:22:
/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211/net/cfg80211.h:2364:12: note: 'ssid' declared here
 2364 |         u8 ssid[IEEE80211_MAX_SSID_LEN];
      |            ^~~~
````

````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.o
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c: In function 'phydm_cmd_parser':
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:873:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
  873 |                         if(input[i+1]) {
      |                            ^~~~~
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:894:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
  894 |                         if(input[i+1]) {
      |                            ^~~~~
````

This one was only seen on the rockchip/armv8 target:
````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.o
In function '__nat25_add_pppoe_tag',
    inlined from 'nat25_db_handle' at rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:909:10:
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:118:9: error: 'memcpy' reading between 2052 and 9220 bytes from a region of size 40 [-Werror=stringop-overread]
  118 |         memcpy((unsigned char *)ph->tag, tag, data_len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c: In function 'nat25_db_handle':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:878:63: note: source object 'tag_buf' of size 40
  878 |                                                 unsigned char tag_buf[40];
      |                                                               ^~~~~~~
````

Most of them are looking like real errors to me, but some fixes need a
deeper understanding of the driver and probably bigger changes to the driver.

Ignore these error messages for now. It would be nice if someone would
fix them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agouqmi: Ignore wrong maybe-uninitialized and dangling-pointer error
Hauke Mehrtens [Mon, 19 Dec 2022 00:19:32 +0000 (01:19 +0100)]
uqmi: Ignore wrong maybe-uninitialized and dangling-pointer error

GCC 12.2.0 shows this false positive error message:
````
uqmi-2022-05-04-56cb2d40/dev.c: In function 'qmi_request_wait':
uqmi-2022-05-04-56cb2d40/dev.c:217:23: error: storing the address of local variable 'complete' in '*req.complete' [-Werror=dangling-pointer=]
  217 |         req->complete = &complete;
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'complete' declared here
  208 |         bool complete = false;
      |              ^~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'req' declared here
cc1: all warnings being treated as errors
````

and this one:
````
In file included from uqmi-2022-05-04-56cb2d40/commands.c:28:
In function 'blobmsg_close_table',
    inlined from 'cmd_nas_get_cell_location_info_cb' at /home/haukeuqmi-2022-05-04-56cb2d40/commands-nas.c:897:4:
/usr/include/libubox/blobmsg.h:256:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
  256 |         blob_nest_end(buf, cookie);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from uqmi-2022-05-04-56cb2d40/commands.c:169:
uqmi-2022-05-04-56cb2d40/commands-nas.c: In function 'cmd_nas_get_cell_location_info_cb':
uqmi-2022-05-04-56cb2d40/commands-nas.c:713:15: note: 'c' was declared here
  713 |         void *c, *t, *cell, *freq;
      |               ^
cc1: all warnings being treated as errors
````

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoelfutils: Ignore wrong use-after-free error
Hauke Mehrtens [Mon, 19 Dec 2022 00:07:38 +0000 (01:07 +0100)]
elfutils: Ignore wrong use-after-free error

GCC 12.2.0 shows this false positive error message:
````
In function 'bigger_buffer',
    inlined from '__libdw_gunzip' at gzip.c:374:12:
gzip.c:96:9: error: pointer may be used after 'realloc' [-Werror=use-after-free]
   96 |     b = realloc (state->buffer, more -= 1024);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gzip.c:94:13: note: call to 'realloc' here
   94 |   char *b = realloc (state->buffer, more);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
````

GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agolayerscape: Add CONFIG_NVMEM_LAYERSCAPE_SFP kernel configuration option
Hauke Mehrtens [Sun, 8 Jan 2023 17:51:27 +0000 (18:51 +0100)]
layerscape: Add CONFIG_NVMEM_LAYERSCAPE_SFP kernel configuration option

The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoat91: Add CONFIG_NVMEM_MICROCHIP_OTPC kernel configuration option
Hauke Mehrtens [Sun, 8 Jan 2023 15:09:04 +0000 (16:09 +0100)]
at91: Add CONFIG_NVMEM_MICROCHIP_OTPC kernel configuration option

The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agokernel: Refresh kernel patches
Hauke Mehrtens [Sun, 8 Jan 2023 13:55:44 +0000 (14:55 +0100)]
kernel: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agorealtek: dgs-1210-10mp: add full sfp description
Daniel Groth [Fri, 14 Oct 2022 14:23:33 +0000 (16:23 +0200)]
realtek: dgs-1210-10mp: add full sfp description

Added the full SFP description for both SFP ports (lan9, 10) on D-Link
DGS-1210-10MP, which enables hot-plug detection of SFP modules.
Added the patch to both kernel 5.10 and 5.15 dts files.

Signed-off-by: Daniel Groth <flygarn12@gmail.com>
23 months agoramips: do not use GPIO function on switch pins on certain devices
Arınç ÜNAL [Wed, 19 Oct 2022 11:43:00 +0000 (14:43 +0300)]
ramips: do not use GPIO function on switch pins on certain devices

The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has
got a function, by default, which does the same thing as the netdev
trigger. Because of bridge offloading on DSA, the netdev trigger won't see
the frames between the switch ports whilst the default function will.

Do not use the GPIO function on switch pins on devices that fall under this
category.

Keep it for:

mt7621_belkin_rt1800.dts: There's only one LED which is for the wan
interface and there's no bridge offloading between the "wan" interface and
other interfaces.

mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan"
and "lan" interfaces.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
23 months agoramips: add support for D-Link DAP-X1860 A1
Sebastian Schaper [Sat, 7 Jan 2023 12:45:44 +0000 (13:45 +0100)]
ramips: add support for D-Link DAP-X1860 A1

The DAP-X1860 is a wall-plug AX1800 repeater.

Specifications:
- MT7621, 256 MiB RAM, 128 MiB SPI NAND
- MT7915 + MT7975 2x2 802.11ax (DBDC)
- Ethernet: 1 port 10/100/1000
- LED RSSI bargraph (2x green, 1x red/orange), status
  and RSSI LEDs are incorrectly populated red/orange
  (should be red/green according to documentation)

Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
- Upload factory.bin, confirm flashing
  (seems to work best with Chromium-based browsers)

Revert to OEM firmware:
- tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
- openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 \
  -out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
- tar -xvf FWImage.st1
- flash kernel_DAP-X1860.bin via Recovery

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
23 months agokernel: backport of changes & helpers
Rafał Miłecki [Sat, 7 Jan 2023 15:59:14 +0000 (16:59 +0100)]
kernel: backport of changes & helpers

This code is required for upcoming NVMEM changes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agobusybox: update to 1.36.0
Hannu Nyman [Tue, 3 Jan 2023 21:48:51 +0000 (23:48 +0200)]
busybox: update to 1.36.0

Update busybox to version 1.36.0

* refresh patches (remove the backported upstream fix)
* refresh config

Config refresh:

Refresh commands, run after busybox is first built once:

cd package/utils/busybox/config/
../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0
cd ..
./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0/.config > Config-defaults.in

Manual edits needed after config refresh:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agoutil-linux: update to 2.38.1
Linhui Liu [Sat, 7 Jan 2023 03:28:00 +0000 (11:28 +0800)]
util-linux: update to 2.38.1

Release Notes:
    https://cdn.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes

Remove upstreamed:
- 010-meson-typo.patch
- 020-meson-fix-compilation-without-systemd.patch
- 110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agotools/mpfr: update to 4.2.0
Linhui Liu [Sat, 7 Jan 2023 01:55:28 +0000 (09:55 +0800)]
tools/mpfr: update to 4.2.0

Changes from versions 4.1.* to version 4.2.0:
- The "fondue savoyarde" release.
- Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes in
  the behavior of the formatted output functions may be visible, regarded
  as underspecified behavior or bug fixes (see below).
- New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
  mpfr_atanu and mpfr_atan2u.
- New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
  mpfr_atanpi and mpfr_atan2pi.
- New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
  mpfr_compound_si.
- New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
  and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
  mpfr_pow_sj).
- Bug fixes.
  In particular, for the formatted output functions (mpfr_printf, etc.),
  the case where the precision consists only of a period has been fixed
  to be like ".0" as specified in the ISO C standard, and the manual has
  been corrected and clarified.
  The macros of the custom interface have also been fixed: they now behave
  like functions (except a minor limitation for mpfr_custom_init_set).

Remove upstreamed:
- 002-Fix-mpfr_custom_get_kind-macro-bug.patch

Refresh patches:
- 001-only_src.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agotools/xz: update to 5.4.0
Linhui Liu [Sat, 7 Jan 2023 09:06:21 +0000 (17:06 +0800)]
tools/xz: update to 5.4.0

Release notes:
    https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=HEAD

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agomt76: add stand-alone MT7622 firmware package
Shiji Yang [Sat, 17 Dec 2022 12:50:55 +0000 (12:50 +0000)]
mt76: add stand-alone MT7622 firmware package

Add a separate firmware package to avoid installing the MT7615 firmware
on all MT7622 target devices by default. Now we only add MT7615 firmware
packages for devices that use MT7615E. This commit also removes the
explicit dependency on kmod-mt7615e to refine the package dependency.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agomt76: add stand-alone MT7915 firmware package
Shiji Yang [Sat, 17 Dec 2022 12:50:52 +0000 (12:50 +0000)]
mt76: add stand-alone MT7915 firmware package

The mt7915e driver supports MT7915, MT7916 and MT7986 chips. And Only
MT7915 series chips need the MT7915 firmware. To save storage, extract
them from the common code package and create a new package to provide
the firmware.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agomt76: remove unnecessary dependency from mt7915e
Shiji Yang [Sat, 17 Dec 2022 12:50:42 +0000 (12:50 +0000)]
mt76: remove unnecessary dependency from mt7915e

The kmod-mt7615-common package does not contain any code that
related to mt7915e Wi-Fi6 driver, so remove it.

Tested on ramips/mt7621: SIM SIMAX1800T

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agoramips: use default lzma dictionary size for better performance
Shiji Yang [Thu, 1 Dec 2022 10:49:45 +0000 (18:49 +0800)]
ramips: use default lzma dictionary size for better performance

limit dictionary size patch was introduced to solve the well known
"LZMA ERROR 1 - must RESET board to recover" error.
09b6755946409d8fd8 "ramips: limit dictionary size for lzma compression"

It seems that it has failed recently and we can use lzma loader to fix
this error by adding "$(Device/uimage-lzma-loader)". So just remove it
to use the default parameter -d24 for a higher compression ratio.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agokernel: Refresh kernel patches
Hauke Mehrtens [Sat, 7 Jan 2023 13:51:55 +0000 (14:51 +0100)]
kernel: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agokernel: fix bugs added with mac-address-ascii support
Rafał Miłecki [Thu, 5 Jan 2023 12:33:18 +0000 (13:33 +0100)]
kernel: fix bugs added with mac-address-ascii support

1. Check for -EPROBE_DEFER
If it occurs we have to return immediately. Trying other properties
could result in another error and ignoring -EPROBE_DEFER which has a
special meaning.

2. Check for read result
Assuming property->read() success can result in NULL pointer
dereference. It happens e.g. for "mac-address" with NVMEM cell
containing invalid MAC.

3. Simplify code
Don't move cell reading & nvmem_cell_put() into a loop. Simplify loop
code.

Fixes: ecd81de7a5ab ("ath79: add nvmem cell mac-address-ascii support")
Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agorealtek: don't relocate kernel on HPE 1920 series
Jan Hoffmann [Thu, 5 Jan 2023 21:36:24 +0000 (22:36 +0100)]
realtek: don't relocate kernel on HPE 1920 series

This is no longer needed now that the kernel is built with a load
address that matches the one hard-coded in the bootloader.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
23 months agoscripts: add Apache fastly mirror
David Bauer [Sat, 7 Jan 2023 00:22:23 +0000 (01:22 +0100)]
scripts: add Apache fastly mirror

Add the Apache fastly mirror as preferred download source.
This service is using a dual-stacked CDN.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agozyxel-bootconfig: clean up script
David Bauer [Mon, 26 Dec 2022 21:33:47 +0000 (22:33 +0100)]
zyxel-bootconfig: clean up script

Drop unused variable and fix identation.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agoath79: combine UniFi AC dual firmware-partitions
David Bauer [Thu, 17 Nov 2022 21:53:33 +0000 (22:53 +0100)]
ath79: combine UniFi AC dual firmware-partitions

In order to maximize the available space on UniFi AC boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agoramips: combine USW-Flex dual firmware-partitions
David Bauer [Thu, 17 Nov 2022 22:02:13 +0000 (23:02 +0100)]
ramips: combine USW-Flex dual firmware-partitions

In order to maximize the available space on USW-Flex boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agoath79: combine OCEDO dual firmware-partitions
David Bauer [Tue, 15 Nov 2022 14:25:40 +0000 (15:25 +0100)]
ath79: combine OCEDO dual firmware-partitions

In order to maximize the available space on OCEDO boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single OS
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agotreewide: update NVMEM symbols
Rafał Miłecki [Sat, 7 Jan 2023 00:28:19 +0000 (01:28 +0100)]
treewide: update NVMEM symbols

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agokernel: update nvmem subsystem to the latest upstream
Rafał Miłecki [Fri, 6 Jan 2023 18:37:37 +0000 (19:37 +0100)]
kernel: update nvmem subsystem to the latest upstream

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agomvebu: harmonize GL.iNet GL-MV1000 MTD partitions layout with vendor
Enrico Mioso [Sun, 20 Nov 2022 04:19:06 +0000 (05:19 +0100)]
mvebu: harmonize GL.iNet GL-MV1000 MTD partitions layout with vendor

The GL-MV1000 ships with a 16MB spi-nor flash, containing a copy of the stock GL.iNet firmware.
Add the corresponding flash areas, so our view matches the one of the in-flash stock firmware.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
23 months agoocteontx: add sqaushfs and ramdisk to features
Tim Harvey [Wed, 28 Dec 2022 21:38:15 +0000 (13:38 -0800)]
octeontx: add sqaushfs and ramdisk to features

Add squashfs and ramdisk to features as these are commonly used images
for the octeontx.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
23 months agoramips: add support for Cudy M1800
Leon M. Busch-George [Sat, 12 Nov 2022 18:31:41 +0000 (19:31 +0100)]
ramips: add support for Cudy M1800

Specifications

  SoC:       MT7621
  CPU:       880 MHz
  Flash:     32 MiB
  RAM:       256 MiB
  WLAN:      MT7915 WiFi 6 (2.4/5 GHz)
  Ethernet:  2x Gbit ports

                  MAC
LAN        b4:4b:d6:2e:c7:b0 (label)
WAN        b4:4b:d6:2e:c7:b1
WiFi 2.4   00:0c:43:26:46:08
WiFi 5     00:0c:43:26:59:97

Installation

There are two known options:
1) The Luci-based UI.
2) Press and hold the reset button during power up.
   The router will request 'recovery.bin' from a TFTP server at
   192.168.1.88.

Both options require a signed firmware binary.
The openwrt image supplied by cudy is signed and can be used to
install unsigned images.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
23 months agokernel: add patch to support en25qh256a
Leon M. Busch-George [Sat, 12 Nov 2022 18:31:32 +0000 (19:31 +0100)]
kernel: add patch to support en25qh256a

The EN25QH256A variant of the EN25QH256 doesn't initialize correctly from SFDP
alone and only accesses memory below 8m (addr_width is 4 but read_opcode takes
only 3 bytes).

Set SNOR_F_4B_OPCODES if the flash chip variant was detected using hwcaps.

The fix submitted upstream uses the PARSE_SFDP initializer that is not
available in the kernel used with Openwrt.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
23 months agoath79: tiny: Do not build TPLink WPA8630Pv2 by default
Joe Mullally [Mon, 28 Nov 2022 20:35:39 +0000 (20:35 +0000)]
ath79: tiny: Do not build TPLink WPA8630Pv2 by default

22.03.1+ and snapshot builds no longer fit the 6M flash space
available for these models.

This disables failing buildbot image builds for these devices.
Images can still be built manually with ImageBuilder.

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
23 months agotarget/imagebuilder: add help text and rename whatdepends to package_whatdepens
Florian Eckert [Thu, 19 Aug 2021 06:48:08 +0000 (08:48 +0200)]
target/imagebuilder: add help text and rename whatdepends to package_whatdepens

Add the command `package_whatdepends` to show all package that have a
dependency to this packages.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
23 months agotarget/imagebuilder: update help text for manifest target
Florian Eckert [Thu, 19 Aug 2021 06:42:50 +0000 (08:42 +0200)]
target/imagebuilder: update help text for manifest target

- Add a help text for the manifest command.
- Unify command detail help text to use `manifest`.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
23 months agotarget/imagebuilder: change help text for image build
Florian Eckert [Thu, 19 Aug 2021 06:39:42 +0000 (08:39 +0200)]
target/imagebuilder: change help text for image build

Using command `image` to unify help text.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
23 months agotarget/imagebuilder: add depends target to show all package that gets installed
Florian Eckert [Wed, 18 Aug 2021 15:19:15 +0000 (17:19 +0200)]
target/imagebuilder: add depends target to show all package that gets installed

This commits adds the makefile targets `depends` this wrapper is a call
to `opkg depends`. This command shows which runtime dependencies exist
if this package is installed into the image.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
23 months agoath79: convert UBNT Aircube AC WiFis to nvmem-cells
Stefan Kalscheuer [Sun, 18 Dec 2022 11:32:42 +0000 (12:32 +0100)]
ath79: convert UBNT Aircube AC WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
23 months agotools/llvm: update to 15.0.6
Linhui Liu [Fri, 16 Dec 2022 01:41:53 +0000 (09:41 +0800)]
tools/llvm: update to 15.0.6

Release Notes:
https://discourse.llvm.org/t/llvm-15-0-0-release/65099
https://discourse.llvm.org/t/llvm-15-0-1-released/65380
https://discourse.llvm.org/t/llvm-15-0-2-released/65695
https://discourse.llvm.org/t/llvm-15-0-3-released/66036
https://discourse.llvm.org/t/llvm-15-0-4-released/66337
https://discourse.llvm.org/t/llvm-15-0-5-release/66616
https://discourse.llvm.org/t/llvm-15-0-6-released/66899

Remove HOST_BUILD_PARALLEL as it's default now.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agoramips: add support for Keenetic KN-1613
Maxim Anisimov [Fri, 30 Dec 2022 12:30:52 +0000 (15:30 +0300)]
ramips: add support for Keenetic KN-1613

Keenetic KN-1613 is a 2.4/5 Ghz band 11ac (Wi-Fi 5) router, based on MT7628AN.

Specification:
- System-On-Chip: MT7628AN
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 4x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- Wireless No1 (2T2R): SoC Built-in 2.4 GHz 802.11bgn
- Wireless No2 (2T2R): MT7613BE 5 GHz 802.11ac
- 4x LED, 2x button, 1x mode switch

Notes:
- The device supports dual boot mode
- The firmware partitions were concatinated into one
- The FN button led indicator has been reassigned as the 2.4GHz
  wifi indicator.

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-keenetic_kn-1613-squashfs-factory.bin"
   to "KN-1613_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
23 months agoramips: enable mtd virtual concat support for mt76x8 subtarget
Maxim Anisimov [Fri, 30 Dec 2022 12:29:30 +0000 (15:29 +0300)]
ramips: enable mtd virtual concat support for mt76x8 subtarget

This is required for upcoming Keenetic KN-1613 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
23 months agotcpdump: update to 4.99.2
Nick Hainke [Thu, 5 Jan 2023 14:45:38 +0000 (15:45 +0100)]
tcpdump: update to 4.99.2

Update to latest version. For release information look into CHANGES
file [0].

Automatically refreshed:
- 001-remove_pcap_debug.patch

Manually refreshed:
- 100-tcpdump_mini.patch

old ipkg sizes:
316554 bin/packages/mips_24kc/base/tcpdump_4.99.1-1_mips_24kc.ipk
141457 bin/packages/mips_24kc/base/tcpdump-mini_4.99.1-1_mips_24kc.ipk

new ipkg sizes:
318089 bin/packages/mips_24kc/base/tcpdump_4.99.2-1_mips_24kc.ipk
141941 bin/packages/mips_24kc/base/tcpdump-mini_4.99.2-1_mips_24kc.ipk

[0] - https://github.com/the-tcpdump-group/tcpdump/blob/master/CHANGES

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agolibpcap: update to 1.20.2
Nick Hainke [Thu, 5 Jan 2023 10:08:27 +0000 (11:08 +0100)]
libpcap: update to 1.20.2

A huge rewrite in libpcap was introduced by dc14a7babca1 ("rpcap: have
the server tell the client its byte order.") [0]. The patch
"201-space_optimization.patch" does not apply at all anymore. So remove
it.

Refresh:
- 100-no-openssl.patch
- 102-skip-manpages.patch

Update the "300-Add-support-for-B.A.T.M.A.N.-Advanced.patch" with latest
PR [1].

old ipkg size:
90964 bin/packages/mips_24kc/base/libpcap1_1.10.1-5_mips_24kc.ipk

new ipkg size:
93340 bin/packages/mips_24kc/base/libpcap1_1.10.2-1_mips_24kc.ipk

[0] - https://github.com/the-tcpdump-group/libpcap/commit/dc14a7babca1471809bee6872539ff836937840e
[1] - https://github.com/the-tcpdump-group/libpcap/pull/980

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agonftables: update to 1.0.6
Nick Hainke [Thu, 22 Dec 2022 18:59:37 +0000 (19:59 +0100)]
nftables: update to 1.0.6

Remove upstreamed patches:
- 0001-fix-nft.patch

Upstream switched to "tar.xz" archives.

old ipkg size:
273678 bin/packages/mips_24kc/base/nftables-json_1.0.5-2_mips_24kc.ipk

new ipkg size:
271624 bin/packages/mips_24kc/base/nftables-json_1.0.6-1_mips_24kc.ipk

Release Information:
https://netfilter.org/projects/nftables/files/changes-nftables-1.0.6.txt

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agogeneric: fix silicon labs spidev bindings
Vincent Tremblay [Sun, 1 Jan 2023 19:16:08 +0000 (14:16 -0500)]
generic: fix silicon labs spidev bindings

Fix Silicon Labs bindings in the spidev driver

Some bindings for Silicon Labs chips already exists upstream.
These bindings can be found in trivial-devices.yaml.

The existing bindings are using "silabs" instead of "siliconlabs" to
identify the manufacturer.

This commit add two submitted patches for silabs chips and rename the
manufacturer in the different DTS for more coherence.

Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
23 months agoath79: add support for Fortinet FAP-221-B
Michael Pratt [Mon, 12 Dec 2022 09:55:34 +0000 (04:55 -0500)]
ath79: add support for Fortinet FAP-221-B

FCC ID: U2M-CAP4100AG

Fortinet FAP-221-B is an indoor access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+

Hardware and board design from Senao

**Specification:**

 - AR9344 SOC 2G 2x2, 5G 2x2, 25 MHz CLK
 - AR9382 WLAN 2G 2x2 PCIe, 40 MHz CLK
 - AR8035-A PHY RGMII, PoE+ IN, 25 MHz CLK
 - 16 MB FLASH MX25L12845EMI-10G
 - 2x 32 MB RAM W9725G6JB-25
 - UART at J11 populated, 9600 baud
 - 6 LEDs, 1 button power, ethernet, wlan, reset

  Note: ethernet LEDs are not enabled
because a new netifd hotplug is required
in order to operate like OEM.
Board has 1 amber and 1 green
for each of the 3 case viewports.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case
OEM firmware sets offsets 1 and 8 for wlan

  eth0 *:1e uboot 0x3ff80
  phy0 *:1f uboot 0x3ff80 +1
  phy1 *:26 uboot 0x3ff80 +8

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.
TFTP is not reliable due to bugged bootloader,
set MTU to 600 and try many times.
If your TFTP server supports setting block size,
higher block size is better.
Splitting the file into 1 MB parts may be necessary

example:

$ tftpboot 0x80100000 image1.bin
$ tftpboot 0x80200000 image2.bin
$ tftpboot 0x80300000 image3.bin
$ tftpboot 0x80400000 image4.bin
$ tftpboot 0x80500000 image5.bin
$ tftpboot 0x80600000 image6.bin
$ bootm 0x80100000

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

**OEM firmware image format:**

Images from Fortinet for this device
ending with the suffix .out
are actually a .gz file

The gzip metadata stores the original filename
before compression, which is a special string
used to verify the image during OEM upgrade.

After gzip decompression, the resulting file
is an exact copy of the MTD partitions
"rootfs" and "uimage" combined in the same order and size
that they appear in /proc/mtd and as they are on flash.

OEM upgrade is performed by a customized busybox
with the command "upgrade".
Another binary, "restore"
is a wrapper for busybox's "tftp" and "upgrade".

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agoimage: add gzip-filename build recipe
Michael Pratt [Thu, 22 Dec 2022 02:33:04 +0000 (21:33 -0500)]
image: add gzip-filename build recipe

Some vendors use basic gzip metadata (original filename and timestamp)
to verify valid images, along with the size of it's contents.

Also, add a new device profile variable FACTORY_IMG_NAME
which would be ideal to use with this new recipe.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agobase-files: rework mtd_get_mac_text()
Michael Pratt [Sat, 10 Dec 2022 11:34:54 +0000 (06:34 -0500)]
base-files: rework mtd_get_mac_text()

It's necessary to be able to specify the length
for MAC addresses that are stored in flash, for example,
in a case where it is stored without any delimiter.

Let both offset and length have default values.

Add a sanity check related to partition size.

Also, clean up syntax and unnecessary lines.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agoath79: allow skipping hash for Senao sysupgrade
Michael Pratt [Fri, 9 Dec 2022 22:47:11 +0000 (17:47 -0500)]
ath79: allow skipping hash for Senao sysupgrade

Some vendors of Senao boards have a similar flash layout
situation that causes the need to split the firmware partition
and use the lzma-loader, but do not store
checksums of the partitions or otherwise
do not even have a uboot environment partition.

This adds simple shell logic to skip that part.

Also, simplify some lines and variable usage.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agoath79: use lzma-loader for Senao initramfs images
Michael Pratt [Fri, 9 Dec 2022 20:45:04 +0000 (15:45 -0500)]
ath79: use lzma-loader for Senao initramfs images

Some vendors of Senao boards have put a bootloader
that cannot handle both large gzip or large lzma files.

There is no disadvantage by doing this for all of them.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agogithub: add command for device
Christian Schmidbauer [Mon, 2 Jan 2023 21:03:27 +0000 (22:03 +0100)]
github: add command for device

This adds a command to the issue template to simplify the "device" name reporting.

Signed-off-by: Christian Schmidbauer <github@grische.xyz>
23 months agokernel: 5.10: update nvmem subsystem to the 5.15 state
Rafał Miłecki [Fri, 6 Jan 2023 13:03:12 +0000 (14:03 +0100)]
kernel: 5.10: update nvmem subsystem to the 5.15 state

This allows cleanly backporting more recent stuff that's important for
OpenWrt.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agokernel: bump 5.10 to 5.10.162
John Audia [Thu, 5 Jan 2023 10:51:15 +0000 (05:51 -0500)]
kernel: bump 5.10 to 5.10.162

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agorealtek: 5.15: Improve error handling in rtl838x_pie_rule_write()
Pascal Ernster [Thu, 5 Jan 2023 05:56:38 +0000 (06:56 +0100)]
realtek: 5.15: Improve error handling in rtl838x_pie_rule_write()

In target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c,
make rtl838x_pie_rule_write() return non-zero value case of error.

Signed-off-by: Pascal Ernster <git@hardfalcon.net>
23 months agorealtek: 5.15: Improve rtl838x dsa driver error handling
Pascal Ernster [Thu, 5 Jan 2023 05:35:35 +0000 (06:35 +0100)]
realtek: 5.15: Improve rtl838x dsa driver error handling

Make sure functions calling rtl838x_smi_wait_op() return its return
value in target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c.
This brings the code style in line with the rtl839x implementation.

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
23 months agorealtek: return correct error value for phy ops
Pascal Ernster [Tue, 3 Jan 2023 22:01:11 +0000 (23:01 +0100)]
realtek: return correct error value for phy ops

A behavioural change was introduced with commit 758c88b96963 ("realtek:
Whitespace and codestyle cleanup") causing rtl838x_read_phy() and
rtl838x_write_phy() to unconditionally return -ETIMEDOUT. As a result,
probing the device during boot fails:

    Error setting up netdev, freeing it again.
    rtl838x-eth: probe of 1b00a300.ethernet failed with error -5

Fix the bootloop caused by this regression with kernel 5.15 on rtl838x
devices, by properly returning 0 on success.

Tested on a Netgear GS108T v3, a Netgear GS310TP v1, a Zyxel GS1900-8HP
v1 and an HPE 1920-8G.

Fixes: 758c88b969639d0e6b684669d2e54dd1be3102f4 ("realtek: Whitespace and codestyle cleanup")
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
23 months agorealtek: Migrate to upstream generic MIPS addresses
Olliver Schinagl [Wed, 4 Jan 2023 13:53:54 +0000 (14:53 +0100)]
realtek: Migrate to upstream generic MIPS addresses

Upstream generic MIPS uses 0x80100000 and 0x80100400 for the LOADADDR
and ENTRY addresses. As we do not want to diverge from upstream and
patch upstream when not needed, adjust our addresses as well to be
future proof.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Tested-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-8G, HPE 1920-48G
23 months agoncurses: update to 6.4
Linhui Liu [Tue, 3 Jan 2023 01:35:34 +0000 (09:35 +0800)]
ncurses: update to 6.4

Update to the latest released version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agoramips: add Unielec U7621-06 32M build target
Ignas Poklad [Sun, 18 Dec 2022 14:14:36 +0000 (15:14 +0100)]
ramips: add Unielec U7621-06 32M build target

Add 32M build target

Rest of the details as per commit 46ab81e405d2 ("ramips add support for
UniElec U7621-06")

Signed-off-by: Ignas Poklad <ignas2526@gmail.com>
23 months agoath79: convert Netgear WNDAP360 WiFis to nvmem-cells
Nick Hainke [Thu, 22 Dec 2022 22:51:16 +0000 (23:51 +0100)]
ath79: convert Netgear WNDAP360 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agolantiq-xrx200: fix wan LED on o2 box 6431
Florian Maurer [Mon, 26 Dec 2022 23:30:07 +0000 (00:30 +0100)]
lantiq-xrx200: fix wan LED on o2 box 6431

The WIFI LED already worked for me with the latest openwrt 22.03 version.
Wifi LED did not with an older 22.x version (in gluon - there phy0radio did nothing but phy0tpt did show activity

the WAN interface has the name "wan" and not "pppoe-wan" on this device

fixes #7757 (and FS#2987)

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
23 months agotoolchain/nasm: update to 2.16.01
Linhui Liu [Sun, 25 Dec 2022 03:57:35 +0000 (11:57 +0800)]
toolchain/nasm: update to 2.16.01

ChangeLog:

 Version 2.16.01

       _This is a documentation update release only._

       (*) Fix the creation of the table of contents in the HTML version of
           the documentation.

 Version 2.16

       (*) Support for the `rdf' format has been discontinued and all the
           RDOFF utilities has been removed.

       (*) The `--reproducible' option now leaves the filename field in the
           COFF object format blank. This was always rather useless since
           it is only 18 characters long; as such debug formats have to
           carry their own filename information anyway.

       (*) Fix handling of MASM-syntax reserved memory (e.g. `dw ?') when
           used in structure definitions.

       (*) The preprocessor now supports functions, which can be less
           verbose and more convenient than the equivalent code implemented
           using directives. See section 4.4.

       (*) Fix the handling of `%00' in the preprocessor.

       (*) Fix incorrect handling of path names affecting error messages,
           dependency generation, and debug format output.

       (*) Support for the RDOFF output format and the RDOFF tools have
           been removed. The RDOFF tools had already been broken since at
           least NASM 2.14. For flat code the ELF output format
           recommended; for segmented code the `obj' (OMF) output format.

       (*) New facility: preprocessor functions. Preprocessor functions,
           which are expanded similarly to single-line macros, can greatly
           simplify code that in the past would have required a lengthy
           list of directives and intermediate macros. See section 4.4.

       (*) Single-line macros can now declare parameters (using a `&&'
           prefix) that creates a quoted string, but does _not_ requote an
           already quoted string. See section 4.2.1.

       (*) Instruction table updated per public information available as of
           November 2022.

       (*) All warnings in the preprocessor have now been assigned warning
           classes. See appendix A.

       (*) Fix the invalid use of `RELA'-type relocations instead of `REL'-
           type relocations when generating DWARF debug information for the
           `elf32' output format.

       (*) Fix the handling `at' in `istruc' when the structure contains
           local labels. See section 5.9.2.

       (*) When assembling with `--reproducible', don't encode the filename
           in the COFF header for the `coff', `win32' or `win64' output
           formats. The COFF header only has space for an 18-character
           filename, which makes this field rather useless in the first
           place. Debug output data, if enabled, is not affected.

       (*) Fix incorrect size calculation when using MASM syntax for non-
           byte reservations (e.g. `dw ?'.)

       (*) Allow forcing an instruction in 64-bit mode to have a (possibly
           redundant) REX prefix, using the syntax `{rex}' as a prefix.

       (*) Add a `{vex}' prefix to enforce VEX (AVX) encoding of an
           instruction, either using the 2- or 3-byte VEX prefixes.

       (*) The `CPU' directive has been augmented to allow control of
           generation of VEX (AVX) versus EVEX (AVX-512) instruction
           formats, see section 7.11.

       (*) Some recent instructions that previously have been only
           available using EVEX encodings are now also encodable using VEX
           (AVX) encodings. For backwards compatibility these encodings are
           not enabled by default, but can be generated either via an
           explicit `{vex}' prefix or by specifying either `CPU LATEVEX' or
           `CPU NOEVEX'; see section 7.11.

       (*) Document the already existing `%unimacro' directive. See section
           4.5.12.

       (*) Fix a code range generation bug in the DWARF debug format
           (incorrect information in the `DW_AT_high_pc' field) for the ELF
           output formats. This bug happened to cancel out with a bug in
           older versions of the GNU binutils linker, but breaks with other
           linkers and updated or other linkers that expect the spec to be
           followed.

       (*) Fix segment symbols with addends, e.g. `jmp _TEXT+10h:0' in
           output formats that support segment relocations, e.g. the `obj'
           format.

       (*) Fix various crashes and hangs on invalid input.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
23 months agoramips: enable Wi-Fi LED support for Afoundry EW1200
Shiji Yang [Sat, 31 Dec 2022 12:51:16 +0000 (12:51 +0000)]
ramips: enable Wi-Fi LED support for Afoundry EW1200

Add LED properties to PCIe node to enable Wi-Fi LED support.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agoramips: enable Wi-Fi LED support for Zbtlink ZBT-WE1326
Shiji Yang [Sat, 31 Dec 2022 12:50:18 +0000 (12:50 +0000)]
ramips: enable Wi-Fi LED support for Zbtlink ZBT-WE1326

Add LED properties to PCIe node to enable Wi-Fi LED support.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agoramips: add basic support for tp-link er605-v2
Nikolay Martynov [Thu, 15 Dec 2022 01:26:38 +0000 (20:26 -0500)]
ramips: add basic support for tp-link er605-v2

This is a MT7621-based device with 128MB NAND flash, 256MB RAM, and a USB port.
The board has headers to attach console. In order for them to work two solder
bridges near those pads need to be made.

The defice has the following partition table:

```
0x000000000000-0x000000080000 : "u-boot"
0x000000080000-0x000000100000 : "u-boot-env"
0x000000100000-0x000000140000 : "factory"
0x000000140000-0x000007e00000 : "firmware"
0x000007e00000-0x000008000000 : "panic-ops"
```

`firmware` partition contains UBI volumes. Unfortunately I accidentally wiped
partition and I no longer have access to it.

`firmware` partition contains 'secondary' U-Boot which is run by 'first' u-boot.
It also contains various configuration partitions that include device info and
MAC address. There also seems to be 'primary' and 'backup' set of 'main' volumes.

U-boot has `mtkupgrade` command that just overrides data on firmware partitions.
Firmware file provided by TP-Link cannot be used with that command.

U-boot also has 'recovery' http server. Unfortunately I was not able to make it
work with manufacturer's firmware.

Manufacturer's firmware essentially contains multiple UBI volumes along with
'partition table'. Unfortunately I no longer can properly run manufacturer's
firmware so I cannot at the moment try to a support for building 'factory' images.

This patch adds support for initramfs image as well as sysupgrade image.

This seems to be pretty standard MT7621 board otherwise.

Things that work:
* network
* leds
* usb
* factory MAC detection

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
23 months agoramips: add missing LEDs to Asus RT-AX53U
Marian Sarcinschi [Thu, 22 Dec 2022 23:56:09 +0000 (01:56 +0200)]
ramips: add missing LEDs to Asus RT-AX53U

This patch adds the missing LEDs to Asus RT-AX53U.
Based on PR #10400 and patch provided in #11068
 - enable the two LEDs controlled by mt7915e for wireless;
 - add label to power LED so it works properly and fix formatting;
 - add the USB LED;
 - switch LEDs are best left to be controlled by hardware for now.

Co-Authored-By: Ivan Rozhuk <rozhuk.im@gmail.com>
Co-Authored-By: Shiji Yang <yangshiji66@qq.com>
Co-Authored-By: Hartmut Birr <e9hack@gmail.com>
Tested-by: Felix Baumann <felix.bau@gmx.de>
Tested-by: Marian Sarcinschi <znevna@gmail.com>
Signed-off-by: Marian Sarcinschi <znevna@gmail.com>
23 months agoCI: build: fix external toolchain use with release tag tests
Christian Marangi [Wed, 4 Jan 2023 18:26:16 +0000 (19:26 +0100)]
CI: build: fix external toolchain use with release tag tests

When a new tag for a release is created, the just checkout repo from
github actions will already have such tag locally created.

This will result in git fetch --tags failing with error rejecting the
remote tag with (would clobber existing tag).

Add -f option to overwrite any local tags and always fetch them from
remote.

Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoipq40xx: fix wlan mac address for Aruba AP-303H
Bjoern Dobe [Thu, 29 Dec 2022 17:19:37 +0000 (18:19 +0100)]
ipq40xx: fix wlan mac address for Aruba AP-303H

Assigns the correct mac address from nvmen to the wlan interfaces.
This Mac address corresponds to the label "Wireless MAC" on the device
and the stock firmware.
Removes duplicate entry of calibration variant for both radios.

Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>
23 months agogeneric: 5.15: backport qca8k fixup for mgmt and mdio read/write
Christian Marangi [Tue, 3 Jan 2023 21:42:45 +0000 (22:42 +0100)]
generic: 5.15: backport qca8k fixup for mgmt and mdio read/write

Backport qca8k fixup for mgmt and mdio read/write for kernel 5.15 fixup
port dropping and configuration issue.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
23 months agogeneric: 5.10: backport Treat IPv4 segment's lowest address as unicast
Seth David Schoen [Tue, 3 Jan 2023 04:42:50 +0000 (20:42 -0800)]
generic: 5.10: backport Treat IPv4 segment's lowest address as unicast

Backport patch from kernel 5.14.

Treat only the highest, not the lowest, IPv4 address within a local
subnet as a broadcast address, as subnets do not need two different
broadcast addresses and networking documentation consistently prefers
the highest address as broadcast.

This patch was merged in upstream net-next tree in May 2021 at

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=94c821c74bf5

This eventually frees up one address per subnet. It matches behavior
suggested in our Internet-Draft, and also the default behavior of OpenBSD
and FreeBSD.

Signed-off-by: Seth David Schoen <schoen@loyalty.org>
23 months agokernel: bump 5.15 to 5.15.86
John Audia [Sat, 31 Dec 2022 15:29:53 +0000 (10:29 -0500)]
kernel: bump 5.15 to 5.15.86

Removed upstreamed:
  pending-5.15/101-Use-stddefs.h-instead-of-compiler.h.patch[1]
  ipq806x/patches-5.15/122-01-clk-qcom-clk-krait-fix-wrong-div2-functions.patch[2]
  bcm27xx/patches-5.15/950-0198-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch[3]

Manually rebased:
  ramips/patches-5.15/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch[4]

Added patch/backported:
  ramips/patches-5.15/107-PCI-mt7621-Add-sentinel-to-quirks-table.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=c160505c9b574b346031fdf2c649d19e7939ca11
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=a051e10bfc6906d29dae7a31f0773f2702edfe1b
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=ec1727f89ecd6f2252c0c75e200058819f7ce47a
4. Quilt gave this output when I applied the patch to rebase it:
% quilt push -f
Applying patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch
patching file arch/mips/ralink/Kconfig
patching file drivers/pci/controller/Kconfig
patching file drivers/pci/controller/Makefile
patching file drivers/staging/Kconfig
patching file drivers/staging/Makefile
patching file drivers/staging/mt7621-pci/Kconfig
patching file drivers/staging/mt7621-pci/Makefile
patching file drivers/staging/mt7621-pci/TODO
patching file drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt
patching file drivers/staging/mt7621-pci/pci-mt7621.c
Hunk #1 FAILED at 1.
Not deleting file drivers/staging/mt7621-pci/pci-mt7621.c as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file drivers/staging/mt7621-pci/pci-mt7621.c.rej
patching file drivers/pci/controller/pcie-mt7621.c
Applied patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch (forced; needs refresh)

Upon inspecting drivers/staging/mt7621-pci/pci-mt7621.c.rej, it seems that
the original patch wants to delete drivers/staging/mt7621-pci/pci-mt7621.c
but upstream's version was not an exact match.  I opted to delete that
file.

5. Suggestion by hauke: https://github.com/torvalds/linux/commit/19098934f910b4d47cb30251dd39ffa57bef9523
"This patch is in upstream kernel, but it was backported to the old
staging driver in kernel 5.15."

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agooxnas: sata_oxnas: use ata_link_err
Robert Marko [Sun, 1 Jan 2023 13:24:06 +0000 (14:24 +0100)]
oxnas: sata_oxnas: use ata_link_err

Kernel 5.15.86 has backported ("ata: libata: move ata_{port,link,dev}_dbg
to standard pr_XXX() macros") and this is now causing compilation errors
for oxnas SATA driver due to usage of ata_link_printk().

Upstream has migrated to using the appropriate
ata_link_{err, warn, notice, info} calls a while ago so its not affected.

Lets do the same for oxnas SATA driver and use ata_link_err() instead of
ata_link_printk().

Signed-off-by: Robert Marko <robimarko@gmail.com>
23 months agoocteontx: add 5.15 testing kernel
Nick Hainke [Mon, 3 Oct 2022 15:00:19 +0000 (17:00 +0200)]
octeontx: add 5.15 testing kernel

Add 5.15 as testing.

Refreshed:
- 0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoocteontx: 5.15: copy config
Nick Hainke [Mon, 3 Oct 2022 11:31:09 +0000 (13:31 +0200)]
octeontx: 5.15: copy config

Copy config from kernel 5.10 to kernel 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agozynq: add 5.15 testing kernel
Nick Hainke [Mon, 3 Oct 2022 10:32:06 +0000 (12:32 +0200)]
zynq: add 5.15 testing kernel

Enable testing kernel.

Reviewed-by: Luis Araneda <luaraneda@gmail.com>
Tested-by: Luis Araneda <luaraneda@gmail.com> (Digilent Zybo Z7-20)
Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agozynq: 5.15: copy config
Nick Hainke [Mon, 3 Oct 2022 07:08:17 +0000 (09:08 +0200)]
zynq: 5.15: copy config

Copy config from kernel 5.10 to kernel 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoipq40xx: delete files used for building 5.10 kernel
Nick Hainke [Fri, 16 Sep 2022 12:21:31 +0000 (14:21 +0200)]
ipq40xx: delete files used for building 5.10 kernel

The kernel 5.15 now defaults. Remove unnecessary files.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agobridger: update to the latest version
Felix Fietkau [Tue, 3 Jan 2023 12:28:05 +0000 (13:28 +0100)]
bridger: update to the latest version

def7755c459d add missing copyright headers
f68307fd96d7 add hairpin mode support
9ee8f433ba4e nl: do not pass NDA_VLAN with vid=0
978c1f9eed07 add support for the bridge port isolated flag

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agorealtek: Migrate to libdeflate
Olliver Schinagl [Wed, 14 Dec 2022 14:16:33 +0000 (15:16 +0100)]
realtek: Migrate to libdeflate

Libdeflate is a more advanced gzip compressor, which allows for faster
decompression, higher compression speed (factor 3-4), while being fully
gzip compatible.

Some comparison
gzip    | libdeflate-gzip | delta  | image [openwrt-realtek-rtl839x-*]
--------+-----------------+--------+-----------------------------------------------
6589174 | 6298794         | 290380 | d-link_dgs-1210-52-initramfs-kernel.bin
6291632 | 6029488         | 262144 | d-link_dgs-1210-52-squashfs-factory_image1.bin
6292270 | 6030128         | 262142 | d-link_dgs-1210-52-squashfs-sysupgrade.bin
6589142 | 6298760         | 290382 | zyxel_gs1900-48-initramfs-kernel.bin
6292264 | 6030122         | 262142 | zyxel_gs1900-48-squashfs-sysupgrade.bin

and changing lzma to (libdeflate-)gzip on existing rtl930x target:
gzip    | libdeflate-gzip | delta  | image [openwrt-realtek-rtl930x-*]
--------+-----------------+--------+--------------------------------------
6816230 | 6510382         | 305848 | zyxel_xgs1250-12-initramfs-kernel.bin

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
23 months agotools: Add gzip-libdeflate advanced compressor
Markus Stockhausen [Tue, 26 Jul 2022 11:44:48 +0000 (13:44 +0200)]
tools: Add gzip-libdeflate advanced compressor

Several devices provide U-Boot versions with only gzip compressed kernel
support (e.g. Realtek switches). This compression method produces larger
images than lzma. To save space on flash and avoid going the hard way with
lzma-loader we can make use of enhanced gzip tool based on libdeflate
compression library from https://github.com/ebiggers/libdeflate. It
keeps 100% deflate/gzip compatibility while improving compression ratio.
The image can be unpacked by the default inflate routines inside U-Boot.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Switched to v1.15 and made it work with cmake]
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
23 months agorealtek: Disable boston clock
Olliver Schinagl [Tue, 13 Dec 2022 15:35:37 +0000 (16:35 +0100)]
realtek: Disable boston clock

We are not on the 'boston' platform so no point in having that clock
driver enabled.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
23 months agotreewide: Trigger reinstall of all wolfssl dependencies
Hauke Mehrtens [Sat, 31 Dec 2022 18:32:41 +0000 (19:32 +0100)]
treewide: Trigger reinstall of all wolfssl dependencies

The ABI of the wolfssl library changed a bit between version 5.5.3 and
5.5.4. This release update will trigger a rebuild of all packages which
are using wolfssl to make sure they are adapted to the new ABI.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agowolfssl: update to 5.5.4-stable
Nick Hainke [Thu, 29 Dec 2022 22:11:37 +0000 (23:11 +0100)]
wolfssl: update to 5.5.4-stable

Remove upstreamed:
- 001-Fix-enable-devcrypto-build-error.patch

Refresh patch:
- 100-disable-hardening-check.patch

Release notes:
https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.4-stable

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agotoolchain/binutils: switch to version 2.39 by default
Hauke Mehrtens [Sun, 18 Dec 2022 22:43:10 +0000 (23:43 +0100)]
toolchain/binutils: switch to version 2.39 by default

This was build tested with all core packages on all targets
successfully.

This was run tested on the following systems:
* lantiq/xrx200 musl
* sunxi/cortex53 musl
* x86/64 musl
* x86/64 glibc

Some trusted firmware arm builds needed some fixes to build with
binutils 2.39, this was merged before.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agotoolchain/binutils: backport stable patches
Hauke Mehrtens [Sat, 31 Dec 2022 20:11:35 +0000 (21:11 +0100)]
toolchain/binutils: backport stable patches

Add the patches with real changes from the binutils 2.39 stable branch.
I am not aware that we ran into any of these problems, but I think it is
better to take the existing stable patches.

They were exported like this:
git format-patch binutils-2_39...origin/binutils-2_39-branch
I removed the patches changing the version numbers only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agotfa-layerscape: Use trusted-firmware-a.mk
Hauke Mehrtens [Wed, 28 Dec 2022 00:11:45 +0000 (01:11 +0100)]
tfa-layerscape: Use trusted-firmware-a.mk

This converts the trusted firmware arm build Makefile to make use of
the common trusted-firmware-a.mk file. This also fixes the build with
binutils 2.39.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoarm-trusted-firmware-mvebu: Use host flags for cryptest compilation
Hauke Mehrtens [Mon, 26 Dec 2022 23:28:03 +0000 (00:28 +0100)]
arm-trusted-firmware-mvebu: Use host flags for cryptest compilation

Without these changes it used the system LDFLAGS for the compilation of
the cryptopp library. This does not always work when we add
"-no-warn-rwx-segments" which is done to support binutils 2.39 inside of
OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoarm-trusted-firmware-sunxi: Use common trusted-firmware-a.mk
Hauke Mehrtens [Mon, 26 Dec 2022 18:58:14 +0000 (19:58 +0100)]
arm-trusted-firmware-sunxi: Use common trusted-firmware-a.mk

Make use of the definitions from trusted-firmware-a.mk to build the
Trusted firmware arm. This fixes the build with binutils 2.39.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoipq40xx: sysupgrade: allow flashing Linksys factory firmware
Tony Ambardar [Fri, 2 Dec 2022 02:00:30 +0000 (18:00 -0800)]
ipq40xx: sysupgrade: allow flashing Linksys factory firmware

Allow forced flashing of a factory firmware image, after checking for the
correct FIT magic header and Linksys board-specific footer. Details of the
footer are already described in scripts/linksys-image.sh.

This is convenient as it avoids using a TFTP server or OEM GUI, and allows
restoring OEM firmware or installing a "breaking" OpenWrt update (e.g DSA
migration and kernel repartition) directly from the command line.

Devices supported at this time include EA6350v3, EA8300, MR8300 and WHW01.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Wyatt Martin <wawowl@gmail.com> # WHW01
Tested-by: Tony Ambardar <itugrok@yahoo.com> # EA6350v3
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
23 months agobase-files: stage2: add 'tail' to sysupgrade environment
Tony Ambardar [Sat, 3 Dec 2022 07:13:22 +0000 (23:13 -0800)]
base-files: stage2: add 'tail' to sysupgrade environment

This is used to access footer data in firmare files, and is simpler and
less error-prone than using 'dd' with calculated offsets.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
23 months agoipq40xx: migrate Linksys WHW01 to DSA and re-enable
Tony Ambardar [Tue, 6 Dec 2022 03:38:45 +0000 (19:38 -0800)]
ipq40xx: migrate Linksys WHW01 to DSA and re-enable

Convert Linksys WHW01 network configuration to DSA and re-enable builds.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
23 months agoipq40xx: fix up Linksys WHW01 board name, device definition
Tony Ambardar [Tue, 6 Dec 2022 03:44:32 +0000 (19:44 -0800)]
ipq40xx: fix up Linksys WHW01 board name, device definition

Update the board name defined in DTS to match online documentation and the
name encoded into factory firmware. This helps supports flashing firmware
factory images using 'sysupgrade'.

Original WHW01 device definition assumes the rootfs IMAGE_SIZE is 33 MB
instead of the correct 74 MB, and defines factory images which include
extra adjustments/padding that do not match OEM factory images and may
cause problems flashing. Update image size and build recipe to fix these.

Suggested-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
23 months agoipq40xx: re-enable EA6350v3, EA8300, MR8300 builds
Tony Ambardar [Thu, 1 Dec 2022 04:10:59 +0000 (20:10 -0800)]
ipq40xx: re-enable EA6350v3, EA8300, MR8300 builds

Raise the kernel size from 3 MB to 5 MB for EA6350v3, EA8300 and MR8300,
and correspondingly reduce the rootfs size by 2 MB:
  * modify partition definitions in related .dts files
  * modify device kernel/image sizes in generic.mk

Update to compat-version 2.0 to force factory image usage on sysupgrade,
noting the current version 1.1 is an unreleased update for DSA migration.

Also update the compat-version message, explaining the need to run one of
the following console commands to update U-Boot's kernel-size variable
before flashing the OpenWrt factory image.

    fw_setenv kernsize 500000          # (OpenWrt command line)

    setenv kernsize 500000 ; saveenv   # (U-Boot serial console)

Finally, re-enable the 3 devices.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Nicolas TORMO <badulesia.granieri@gmail.com> # MR8300
Tested-by: Tony Ambardar <itugrok@yahoo.com> # EA6350v3
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
23 months agombedtls: update to version 2.28.2
Hauke Mehrtens [Thu, 29 Dec 2022 20:26:28 +0000 (21:26 +0100)]
mbedtls: update to version 2.28.2

Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.2
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues.

Fixes the following CVEs:
* CVE-2022-46393: Fix potential heap buffer overread and overwrite in
DTLS if MBEDTLS_SSL_DTLS_CONNECTION_ID is enabled and
MBEDTLS_SSL_CID_IN_LEN_MAX > 2 * MBEDTLS_SSL_CID_OUT_LEN_MAX.

* CVE-2022-46392: An adversary with access to precise enough information
about memory accesses (typically, an untrusted operating system
attacking a secure enclave) could recover an RSA private key after
observing the victim performing a single private-key operation if the
window size used for the exponentiation was 3 or smaller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agomac80211: fix receiving multicast packets on multiple sta interfaces
Felix Fietkau [Fri, 30 Dec 2022 20:02:20 +0000 (21:02 +0100)]
mac80211: fix receiving multicast packets on multiple sta interfaces

Also fix MLO sta sdata link initialization

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agobcm47xx: replace "Devices-database-update-patch" with upstream patches
Nick Hainke [Tue, 27 Dec 2022 10:35:42 +0000 (11:35 +0100)]
bcm47xx: replace "Devices-database-update-patch" with upstream patches

Replace "320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch" with
upstream patches:
- 320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch
- 321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch
- 322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch
- 323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch
- 324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch
- 325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agobcm47xx: add tags to upstreamed patches
Nick Hainke [Tue, 27 Dec 2022 10:22:18 +0000 (11:22 +0100)]
bcm47xx: add tags to upstreamed patches

All of the mtd patches are upstreamed to 5.18. Add tags indicating this.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agonetifd: update to the latest version
Felix Fietkau [Fri, 30 Dec 2022 15:42:03 +0000 (16:42 +0100)]
netifd: update to the latest version

2cffe0c44e62 treewide: correctly apply IFNAMSIZ limit
96bcbb2e4eb6 wireless: allow set_retry ubus notify command to trigger a wdev restart
a2e8cd75dbf6 wireless: add support for disabling multicast-to-unicast per virtual interface
e9f44189ade7 system: move netdev types to system-linux.c where they are used
a3fab0119ef1 utils: include utils.h last
7ce73fc16765 vlandev: propagate topology changes
81c1fbcba2f2 device: fix vlan device issues with disappearing lower devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoCI: labeler: Add target label to target packages
Hauke Mehrtens [Thu, 29 Dec 2022 16:40:02 +0000 (17:40 +0100)]
CI: labeler: Add target label to target packages

This adds the target label also to changes in packages which are target
specific like the boot loader of a target or some drivers which are only
use on one target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoramips: enable BBT on NAND in I-O DATA devices
INAGAKI Hiroshi [Wed, 23 Nov 2022 08:12:29 +0000 (17:12 +0900)]
ramips: enable BBT on NAND in I-O DATA devices

This patch enables MediaTek NAND BBT on I-O DATA devices manufactured by
MSTC (MitraStar Technology Corp.).

[WN-AX2033GR]
Tested-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
[WN-AX1167GR2, WN-DX1167R, WN-DX1200GR, WN-DX2033GR]
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>