Commit Graph

56442 Commits

Author SHA1 Message Date
Tony Butler
8bc72ea7be treewide: strip useless default n Kconfig lines
Kconfig docs say:
> The default value deliberately defaults to 'n' in order to avoid
> bloating the build.

Apply this rule everywhere, to avoid more cloning of bad examples

Signed-off-by: Tony Butler <spudz76@gmail.com>
2023-02-03 12:50:15 +01:00
Chen Minqiang
fcde517d35 wolfssl: fix build with make < 4.2
Inline the preinst.arm-ce script. Support for including was added in
make 4.2 and is not working with older make versions.

Fixes: https://github.com/openwrt/openwrt/issues/11866
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-02-03 12:18:19 +01:00
Mark Ceeha
d4c63c7786 ramips: add support for TP-Link Deco M4R v4
This commit adds support for the V4 hardware revision of the Deco M4R.
V4 is a complete overhaul of the hardware compared to V1 and V2,
and is much more similar to the Archer C6 V3 and C6U V1.

Specifications:

  SoC: MediaTek MT7621AT (2 cores at 880 MHz, 4 threads)
  RAM: Kingston D1216ECMDXGJD (256 MB)
  Wireless 2.4 GHz: MediaTek MT7603EN
  Wireless 5 GHz: MediaTek MT7613BEN
  Flash: 16 MB SPI NOR

Installation:

Flash the *-factory.bin image in the U-Boot recovery webserver.
You can trigger this webserver by holding the reset button until the LED
flashes yellow, or by hooking up to serial pads on the board (clearly
labeled GND, RX and TX) and pressing `x` early in boot.

Once the factory image has been flashed, you can use the regular upgrade
procedure with sysupgrade images for subsequent flashes.

Signed-off-by: Mark Ceeha <hi@shiz.me>
Tested-by: Mark Ceeha <hi@shiz.me>
2023-02-03 12:13:50 +01:00
Mark Ceeha
c97bcec15a firmware-utils: bump to git HEAD
Adds support for building TP-Link Deco M4R v4 factory images

    e7233d229c2c tplink-safeloader: Add support for Deco M4R V4

Signed-off-by: Mark Ceeha <hi@shiz.me>
2023-02-03 12:13:50 +01:00
Hauke Mehrtens
18e6df83bb bcm47xx: Refresh kernel 5.15
This makes the patches and the kernel configuration apply on top of
kernel 5.15.

The following patch was removed because the old IDE subsystem was
removed from upstream kernel:
target/linux/bcm47xx/patches-5.15/610-pci_ide_fix.patch

This was tested successfully on a ASUS WL-500g Premium V1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-02-03 11:59:07 +01:00
Hauke Mehrtens
30c0ffeccc bcm47xx: Copy kernel from 5.10 to 5.15
Copy patches and configuration from kernel 5.10 to kernel 5.15 files. No
changes were done.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-02-03 11:59:07 +01:00
Rosen Penev
822c554d57 mvebu/uDPU: add quotes to unmount file
This is the last relevant shellcheck warning thrown.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 11:34:20 +01:00
Rosen Penev
cb6df29cbd mvebu/uDPU: remove $? usage
shellcheck warns against it with SC2086. It also hides a bug that
shellcheck marks with SC2015. Fixed those with explicit if/else.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 11:34:20 +01:00
Rosen Penev
3b80b8e560 mvebu/uDPU: remove echo y
It's a bit of a hack. mkfs.ext4 has an -F parameter that does the same
thing.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 11:34:20 +01:00
Rosen Penev
7be11ee35e mvebu/uDPU: simplify grep usage
Instead of using the shell's evaluation, use grep's -q parameter.

Found with shellcheck's SC2143.

Also replaced a head call with grep's -m.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 11:34:20 +01:00
Glenn Strauss
2a691fc7f2 mbedtls: x509 crt verify SAN iPAddress
backport from
X509 crt verify SAN iPAddress
https://github.com/Mbed-TLS/mbedtls/pull/6475

addresses
curl built with mbedtls fails on https://1.1.1.1/ (IP address in SubjectAltName)
https://github.com/Mbed-TLS/mbedtls/issues/6473

filed for
mbedTLS: BADCERT_CN_MISMATCH on https://1.1.1.1 with curl+mbedtls
https://github.com/openwrt/packages/issues/19677

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2023-02-03 11:27:58 +01:00
John Audia
50324b949b kernel: bump 5.10 to 5.10.166
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>
2023-02-03 09:38:11 +01:00
John Audia
59fe39f6fc kernel: bump 5.15 to 5.15.91
Manually rebased:
  pending-5.15/103-kbuild-export-SUBARCH.patch

All other patches automatically rebased.

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>
2023-02-03 09:34:32 +01:00
Felix Fietkau
acd8e94d20 mt76: update PKG_SOURCE_HASH
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-02 11:37:48 +01:00
Felix Fietkau
ff4c872c7c mt76: fix typo in PKG_SOURCE_DATE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-02 11:36:50 +01:00
Felix Fietkau
521efb62eb mt76: update to the latest version, import WED related mtk_eth_soc patches
6c256218e59e wifi: mt76: dma: use napi_build_skb
679254c50f27 mt7915: add CONFIG_MT76_LEDS to cflags
15b9dd6b1b6a wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work
8e5c21fe7c5c wifi: mt76: mt7915: rework mt7915_mcu_set_thermal_throttling
87cb74fe42d9 wifi: mt76: mt7915: rework mt7915_thermal_temp_store()
c6f24b83eba5 wifi: mt76: mt7915: add error message in mt7915_thermal_set_cur_throttle_state()
99e96b89ee4d wifi: mt76: mt7915: add chip id condition in mt7915_check_eeprom()
833cd420480f wifi: mt76: mt7921: fix channel switch fail in monitor mode
f1f8bae6092d wifi: mt76: mt7921: add ack signal support
f47087a6dd62 wifi: mt76: mt7996: fix chainmask calculation in mt7996_set_antenna()
2f3b0acc1588 wifi: mt76: mt7996: update register for CFEND_RATE
7e9540dcbd70 wifi: mt76: mt7996: do not hardcode vht beamform cap
a37e427d0959 wifi: mt76: connac: fix POWER_CTRL command name typo
98aa346042bd wifi: mt76: mt7915: remove BW160 and BW80+80 support
94fed6a43541 wifi: mt76: mt7921: fix invalid remain_on_channel duration
3c162384d80a wifi: mt76: introduce mt76_queue_is_wed_rx utility routine
a409a9454587 wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit
8b27ecd3a684 wifi: mt76: mt7996: fix memory leak in mt7996_mcu_exit
683760461dd0 wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup
0c750cf08f85 wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup
5de9ae29bea2 wifi: mt76: mt7915: avoid mcu_restart function pointer
dad96dd3e62d wifi: mt76: mt7603: avoid mcu_restart function pointer
19d36dd9c8ea wifi: mt76: mt7615: avoid mcu_restart function pointer
6fe2c2383d3d wifi: mt76: mt7921: avoid mcu_restart function pointer
9df89143bf71 wifi: mt76: mt7915: get rid of wed rx_buf_ring page_frag_cache
8d51d11760cb wifi: mt76: fix switch default case in mt7996_reverse_frag0_hdr_trans
0d8057dbd51c wifi: mt76: mt7921u: add support for Comfast CF-952AX
ddbf4e933d54 wifi: mt76: mt7915: set sku initial value to zero
06a8904e954e wifi: mt76: mt7915: wed: enable red per-band token drop
724a337caef9 wifi: mt76: mt7915: fix WED TxS reporting
747ca943a5bb wifi: mt76: add flexible polling wait-interval support
133d7859977a wifi: mt76: mt7921: reduce polling time in pmctrl
5fe319a0550e wifi: mt76: add memory barrier to SDIO queue kick
822f060b9d19 wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent
c6794954a723 wifi: mt76: mt7915: fix memory leak in mt7915_mmio_wed_init_rx_buf
9686cd7cc65c wifi: mt76: switch to page_pool allocator
04da4eaa8235 wifi: mt76: enable page_pool stats
1af4a911ebcb wifi: mt76: mt7915: release rxwi in mt7915_wed_release_rx_buf
e8c10835cf06 wifi: mt76: fix compile error without CONFIG_PAGE_POOL_STATS
0cf0ede7cc42 net: ethernet: mtk_wed: add reset to rx_ring_setup callback
715b3ed9708a net: ethernet: mtk_wed: add reset to tx_ring_setup callback
9107381d0ff3 wifi: mt76: mt7921: fix error code of return in mt7921_acpi_read
36d2a5bf7802 wifi: mt76: mt7996: rely on mt76_connac2_mac_tx_rate_val
c67f57d2cda2 wifi: mt76: dma: add reset to mt76_dma_wed_setup signature
3dace36e2941 wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset
4b229d2da562 wifi: mt76: mt7915: add mt7915 wed reset callbacks
f83958376085 wifi: mt76: mt7915: complete wed reset support
321edbb414dc wifi: mt76: mt7996: rely on mt76_connac_txp_common structure
bdb7dc38a6d1 wifi: mt76: mt7996: rely on mt76_connac_txp_skb_unmap
8688756305c6 wifi: mt76: mt7996: rely on mt76_connac_tx_complete_skb
fbf986dbd4c0 wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap
adc556cbce37 wifi: mt76: mt7996: avoid mcu_restart function pointer
5eb4e2303be4 wifi: mt76: remove __mt76_mcu_restart macro
e7a61c5f70f5 wifi: mt76: add EHT phy type
b375845abc10 wifi: mt76: connac: add CMD_CBW_320MHZ
68b17a243332 wifi: mt76: connac: add helpers for EHT capability
02ec1f61b3a2 wifi: mt76: connac: add cmd id related to EHT support
9209294cd81b wifi: mt76: increase wcid size to 1088
5e85136c9b2f wifi: mt76: add EHT rate stats for ethtool
a171f672fdeb wifi: mt76: mt7996: add variants support
eda8fd62c105 wifi: mt76: mt7996: add helpers for wtbl and interface limit
4a5a9f4cdc3b wifi: mt76: mt7996: rework capability init
06b73c155680 wifi: mt76: mt7996: add EHT capability init
ae71a1b8294f wifi: mt76: mt7996: add support for EHT rate report
65bdfae2991d wifi: mt76: mt7996: enable EHT support in firmware
b2360d59747c wifi: mt76: mt7996: add EHT beamforming support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-02 11:16:49 +01:00
Christian Marangi
6f89a0ca20
CI: use openwrt official tools container by default
Use openwrt official tools container by default.
Fork will use openwrt tools container by default.

This can be disabled by setting the option use_openwrt_container to
false for the build.yml and check-kernel-patches.yml.

The push-containers workflow is disabled on forks. The workflow can be
reenabled by commenting the condition in push-containers.yml.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-31 16:36:57 +01:00
Hannu Nyman
91add68e50
ipq807x: Enable CPU frequency scaling stats
Enable the CPU frequency scaling statistics in kernel config.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-01-31 16:33:21 +01:00
INAGAKI Hiroshi
3cfa465387
realtek: use generic earlycon setup on 5.15
Use generic earlycon on Linux Kernel instead of initialization in platform
setup.
And also, drop bootargs with console= parameter from I-O DATA BSH-G24MB. It
uses 115200bps as baud-rate, the same as default in rtl838x.dtsi.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-01-30 14:30:41 +01:00
Zoltan HERPAI
d649a8dcef mxs: switch default kernel to 5.15
The testing kernel has been available since Mar/2022, let's switch
to it by default.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-01-30 11:13:14 +01:00
Robert Marko
c2903ebadc ath25: mark as source-only
ath25 seems to be a target with low number of users according to download
statistics, most of which are for older releases anyway.
Users that we managed to find are currently building images downstream as
due to low amount of RAM (32MB) default config will not work.

Target also suffers from inability for the 5.15 kernel bump to be tested
which is a requirment for the next release.

So, for those reasons, lets mark it as source-only so that Buildbots dont
use the resources for building the images for this target anymore.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-01-30 18:01:14 +08:00
Chuanhong Guo
0c64c5f520 zynq: remove kconfig for 5.10
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2023-01-30 18:01:14 +08:00
Nick Hainke
459d40811e zynq: switch default kernel to 5.15
The default kernel should be switched to 5.15 in order to enable testing
by a broader audience.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-30 18:01:14 +08:00
Petr Štetiar
3d7d93cf65 ubus: fix wrong package mirror hash
I've somehow managed to commit wrong package mirror hash in commit 36076b5a40
("ubus: update to version 2022-06-15"), so lets fix it by using a proper
one.

Fixes: 36076b5a40 ("ubus: update to version 2022-06-15")
Reported-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-30 10:58:00 +01:00
Sander Vanheule
a336b6c7cf realtek: remove KERNEL_PATCHVER overrides
On the realtek target, the subtarget makefiles include a KERNEL_PATCHVER
setting, shadowing KERNEL_PATCHVER from target/linux/realtek/Makefile.
This makes the realtek target an exception in this regard, and makes
switching kernel version a bit bothersome. Remove the overrides so all
subtargets use the same kernel version.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2023-01-29 16:29:42 +01:00
Felix Fietkau
d02d455678 kernel: make it possible for packages to select page pool support
Will be used by the next mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Felix Fietkau
83d3e255f1 bridger: update to the latest version
8be8bb9df789 nl: fix accessing hairpin mode and isolated from the right attribute set

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Felix Fietkau
2770cbe63f kernel: add fix for a page pool related crash on GRO
Needed for upcoming mt76 page pool support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Felix Fietkau
638283d481 kernel: backport page pool fragment support from v5.15
Required for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Felix Fietkau
908397f6d2 mac80211: backport napi_build_skb for 5.10
It is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Felix Fietkau
74e5e213da ucode: update to the latest version
1c8df08824ef style: add .editorconfig file
ec167d39b803 nl80211: refactor command bitmask handling
6704ec0d5b29 nl80211: add support for registering an uloop based listener
48a6eac1da15 fs: implement `fs.pipe()`
f1be0d725735 types: fix array unshift operations and add test coverage
941d14837faf Merge pull request #138 from nbd168/nl80211

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Daniel Golle
90dbdb4941 uboot-envtools: filogic: bpi-r3: fix env selection
Selecting the environment when booting from SD card has been broken by
a previous commit. Fix it.

Fixes: f46355b4d7 ("uboot-envtools: mediatek_filogic: fix BPi-R3 when no OS is installed")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-29 03:43:58 +00:00
Daniel Golle
e51a57e192 uboot-envtools: mt7622: bpi-r64: fix env selection
Selecting the environment when booting from SD card has been broken by
a previous commit. Fix it.

Fixes: 84b5b0f88c ("uboot-envtools: mediatek/mt7622: don't rely on mapped rootfs")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-29 03:43:58 +00:00
Chen Minqiang
016a7bd558 mediatek: fix wrong return code in platform_check_image()
Ensure that the platform_check_image() function returns an error code.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-01-29 01:02:45 +00:00
Chen Minqiang
781a3ae5dc base-files: fix nand_do_platform_check fail
This change ensures compatibility with both types of sysupgrade-tar files.

1. For some boards like xiaomi,redmi-router-ax6s, sysupgrade-tar
   is pack in directory `vendor,name/`

2. For some boards like xiaomi,mi-router-3g, sysupgrade-tar is pack
   in directory `vendor_name/`

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-01-29 01:02:45 +00:00
Andre Heider
b246385126 ucode: move to the lang submenu
Just as lua or the various languages from the package feed.
libucode is the exception, so move it to the libs menu instead.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-01-28 22:37:35 +01:00
Andre Heider
9902c8520b uhttpd: clean up Makefile
uhttpd's cmake options all default to ON. Either we set all of them or
none if the defaults need to be changed. Let's go with the latter.

Because support for all modules is always compiled in, remove two unused
and useless config toggles.

uhttpd detects and uses libcrypt itself, no need to add it here again.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-01-28 22:37:35 +01:00
Hauke Mehrtens
d1893f1c88 px5g-mbedtls: Use getrandom()
Instead of accessing /dev/urandom use the getrandom syscall. This way we
do not have to keep the file open all the time.
This also fixes a compile error with glibc:

--------
px5g-mbedtls.c: In function '_urandom':
px5g-mbedtls.c:48:9: error: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Werror=unused-result]
   48 |         read(urandom_fd, out, len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--------

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-01-28 22:26:06 +01:00
Dmitry Sokolov
39e4f03fd3 ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2
Device is the same as Xiaomi Mi Router 4A Gigabit, except of:
- 5G WiFi is MT7663
- addresses of leds, wifi and eth ports are slightly changed

Specs:
  SoC:  MT7621
  CPU:  2 x 880 MHz
  ROM:  16 MB
  RAM:  128 MB
  WLAN: MT7603, MT7663

MAC addresses:
  WAN     ****  factory 0xe006 (label)
  LAN     *:f7  factory 0xe000
  2.4 GHz *:f8  factory 0x0000+0x4 (mtd-eeprom+0x4)
  5 GHz   *:f9  factory 0x8000+0x4 (mtd-eeprom+0x4)

Installation:

Factory firmware is based on a custom OpenWrt 17.x.
Installation is the same as for Xiaomi Mi Router 4A Gigabit.

Probably the easiest way to install is to use the script from
this repository: https://github.com/acecilia/OpenWRTInvasion/pull/155

In a more advanced case, you can do everything yourself:
- gain access to the device through one of the exploits described
  in the link above
- upload sysupgrade image to /tmp
- overwrite stock firmware:
  # mtd -e OS1 -r write /tmp/sysupgrade.bin OS1

Recovery:

Recovery procedure is the same as for Xiaomi Mi Router 4A Gigabit.
Possible options can be found here:
https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition

One of the ways is to use another router with OpenWrt:
- connect both routers by their LAN ports
- download stock firmware from [1]
- place it inside /tmp/test.bin on the main router
- configure PXE/TFTP on the main router
- power off 4Av2, hold Reset button, power on
- as soon as image download via TFTP starts, Reset can be released
- blinking blue wan LED will indicate the end of the flashing process,
  now router can be rebooted
[1] http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/r4av2/miwifi_r4av2_firmware_release_2.30.28.bin

Signed-off-by: Dmitry Sokolov <e323w@proton.me>
2023-01-28 22:11:44 +01:00
Maxim Anisimov
3690c4a092 ramips: improve support for Zyxel Keenetic Extra II
- drop unneeded default-state for led_power
- concat firmware partitions to extend available free space
- increase spi flash frequency to 32 Mhz (value from stock firmware bootlog)
- drop broken-flash-reset because of onboard flash chip W25Q256FV has reset support
- add compatible for pcie wifi according to kernel documetation
- switch to wan mac address with offset 0x28 in rf-eeprom

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2023-01-28 21:45:34 +01:00
Maxim Anisimov
2fe29794b1 ramips: use hex value in zyimage command for Keenetic KN-3010
This is cosmetic change. The hex value is related to the device
model and more human friendly.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2023-01-28 21:40:37 +01:00
Tom Herbers
67f283be44 ath79: add LTE packages for GL-XE300
Add LTE packages required for operating the LTE modems shipped with
the GL-XE300.

Example configuration for an unauthenticated dual-stack APN:

network.wwan0=interface
network.wwan0.proto='qmi'
network.wwan0.device='/dev/cdc-wdm0'
network.wwan0.apn='internet'
network.wwan0.auth='none'
network.wwan0.delay='10'
network.wwan0.pdptype='IPV4V6'

Signed-off-by: Tom Herbers <mail@tomherbers.de>
2023-01-28 21:38:51 +01:00
Shiji Yang
c7059c56a8 ath79: improve support for Letv LBA-047-CH
1. Convert wireless calibration data to NVMEM.
2. Enable control green status LED and change default LED behaviors.
   The three LEDs of LBA-047-CH are in the same position, and the green
   LED will be completely covered by the other two LEDs. So don's use
   green LED as WAN indicator to ensure that only one LED is on at a time.
   LED     Factory          OpenWrt
   blue    internet fail    failsafe && upgrade
   green   internet okay    run
   red     boot             boot
3. Reduce the SPI clock to 30 MHz because the ath79 target does not
   support 50 MHz SPI operation well. Keep the fast-read support to
   ensure the spi-mem feature (b3f9842330) is enabled.
4. Remove unused package "uboot-envtools".
5. Split the factory image into two parts: rootfs and kernel.
   This change can reduce the factory image size and allow users to
   upgrade the OpenWrt kernel loader uImage (OKLI) independently.

   The new installation method: First, rename "squashfs-kernel.bin" to
   "openwrt-ar71xx-generic-ap147-16M-kernel.bin" and rename "rootfs.bin"
   to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". Then we
   can press reset button for about 5 seconds to enter tftp download mode.
   Finally, set IP address to 192.168.67.100 and upload the above two
   parts via tftp server.

Tested on Letv LBA-047-CH

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-01-28 21:37:14 +01:00
Edward Chow
2a20dc717a ath79: calibrate dlink dir-825 c1 and dir-835 a1 with nvmem
Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

Currently, "mac-address-ascii" cells only works for ethernet and wmac devices,
so PCI ath9k device uses the old method to calibrate.

Signed-off-by: Edward Chow <equu@openmail.cc>
2023-01-28 21:28:25 +01:00
Tony Butler
a7f3a51982 kernel: add kmod-lib-842
"842" is a compression scheme and this is the software implementation
which is too slow to really use beyond a proof of concept.  It can be
selected in ZRAM, ZSWAP, or `fs/pstore`, and is here for completeness.
In general you need a Power8 or better with 842-in-hardware for it to
be fast, but other 842-accelerators are emerging.

Signed-off-by: Tony Butler <spudz76@gmail.com>
2023-01-28 21:19:17 +01:00
Tom Herbers
f83f5f8452 ath79: add label-mac-device for GL-XE300
This adds an label-mac-device alias which refrences the mac which is
printed on the Label of the device.

Signed-off-by: Tom Herbers <mail@tomherbers.de>
2023-01-28 21:11:17 +01:00
Daniel Groth
a911f63df9 realtek: dgs-1210-10mp: update sfp phy-handle
Adjust the wrong phy-handle definitions for the sfp ports so that they
match the correct switch ports.

Fixes: 89eb8b50d1 ("realtek: dgs-1210-10mp: add full sfp description")
Signed-off-by: Daniel Groth <flygarn12@gmail.com>
2023-01-28 21:01:29 +01:00
Michael Pratt
52992efc34 ath79: add support for Senao Engenius EWS660AP
FCC ID: A8J-EWS660AP

Engenius EWS660AP is an outdoor wireless access point with
2 gigabit ethernet ports, dual-band wireless,
internal antenna plates, and 802.3at PoE+

**Specification:**

  - QCA9558 SOC		2.4 GHz, 3x3
  - QCA9880 WLAN	mini PCIe card, 5 GHz, 3x3, 26dBm
  - AR8035-A PHY	RGMII GbE with PoE+ IN
  - AR8033 PHY		SGMII GbE with PoE+ OUT
  - 40 MHz clock
  - 16 MB FLASH		MX25L12845EMI-10G
  - 2x 64 MB RAM
  - UART at J1		populated, RX grounded
  - 6 internal antenna plates (5 dbi, omni-directional)
  - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset)

**MAC addresses:**

  Base MAC addressed labeled as "MAC"
  Only one Vendor MAC address in flash

  eth0 *:d4 MAC art 0x0
  eth1 *:d5 --- art 0x0 +1
  phy1 *:d6 --- art 0x0 +2
  phy0 *:d7 --- art 0x0 +3

**Serial Access:**

  the RX line on the board for UART is shorted to ground by resistor R176
  therefore it must be removed to use the console
  but it is not necessary to remove to view boot log

  optionally, R175 can be replaced with a solder bridge short

  the resistors R175 and R176 are next to the UART RX pin

**Installation:**

  2 ways to flash factory.bin from OEM:

  Method 1: Firmware upgrade page:

    OEM webpage at 192.168.1.1
    username and password "admin"
    Navigate to "Firmware Upgrade" page from left pane
    Click Browse and select the factory.bin image
    Upload and verify checksum
    Click Continue to confirm and wait 3 minutes

  Method 2: Serial to load Failsafe webpage:

    After connecting to serial console and rebooting...
    Interrupt uboot with any key pressed rapidly
    execute `run failsafe_boot` OR `bootm 0x9fd70000`
    wait a minute
    connect to ethernet and navigate to
    "192.168.1.1/index.htm"
    Select the factory.bin image and upload
    wait about 3 minutes

**Return to OEM:**

  If you have a serial cable, see Serial Failsafe instructions
  otherwise, uboot-env can be used to make uboot load the failsafe image

  ssh into openwrt and run
  `fw_setenv rootfs_checksum 0`
  reboot, wait 3 minutes
  connect to ethernet and navigate to 192.168.1.1/index.htm
  select OEM firmware image from Engenius and click upgrade

**TFTP recovery:**

  Requires serial console, reset button does nothing

  rename initramfs.bin to '0101A8C0.img'
  make available on TFTP server at 192.168.1.101
  power board, interrupt boot
  execute tftpboot and bootm 0x81000000

**Format of OEM firmware image:**

  The OEM software of EWS660AP is a heavily modified version
  of Openwrt Kamikaze. One of the many modifications
  is to the sysupgrade program. Image verification is performed
  simply by the successful ungzip and untar of the supplied file
  and name check and header verification of the resulting contents.
  To form a factory.bin that is accepted by OEM Openwrt build,
  the kernel and rootfs must have specific names...

    openwrt-ar71xx-generic-ews660ap-uImage-lzma.bin
    openwrt-ar71xx-generic-ews660ap-root.squashfs

  and begin with the respective headers (uImage, squashfs).
  Then the files must be tarballed and gzipped.
  The resulting binary is actually a tar.gz file in disguise.
  This can be verified by using binwalk on the OEM firmware images,
  ungzipping then untaring.

  Newer EnGenius software requires more checks but their script
  includes a way to skip them, otherwise the tar must include
  a text file with the version and md5sums in a deprecated format.

  The OEM upgrade script is at /etc/fwupgrade.sh.

  OKLI kernel loader is required because the OEM software
  expects the kernel to be no greater than 1536k
  and the factory.bin upgrade procedure would otherwise
  overwrite part of the kernel when writing rootfs.

Note on PLL-data cells:

  The default PLL register values will not work
  because of the external AR8035 switch between
  the SOC and the ethernet port.

  For QCA955x series, the PLL registers for eth0 and eth1
  can be see in the DTSI as 0x28 and 0x48 respectively.
  Therefore the PLL registers can be read from uboot
  for each link speed after attempting tftpboot
  or another network action using that link speed
  with `md 0x18050028 1` and `md 0x18050048 1`.

  The clock delay required for RGMII can be applied
  at the PHY side, using the at803x driver `phy-mode`.
  Therefore the PLL registers for GMAC0
  do not need the bits for delay on the MAC side.
  This is possible due to fixes in at803x driver
  since Linux 5.1 and 5.3

Tested-by: Niklas Arnitz <openwrt@arnitz.email>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
2023-01-28 20:34:00 +01:00
Michael Pratt
290a6527be ath79: add pcie1 wifi device to Senao qca955x AP DTSI
Each individual device DTS now enables either pcie0 or pcie1.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2023-01-28 20:34:00 +01:00
Nick Hainke
364a9be338 ethtool: update to 6.1
Release notes:
https://lore.kernel.org/netdev/20221219225600.r54vejiqapn266cm@lion.mk-sys.cz/T/

Add patches fixing compilation:
- 100-uapi-Bring-in-if-h.patch
- 101-netlink-Fix-maybe-uninitialized-meters-variable.patch
- 102-raw-marvell-c-Fix-build-with-musl-libc.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-28 20:26:22 +01:00