Commit Graph

18716 Commits

Author SHA1 Message Date
Christian Lamparter d91318662d ath9k: nvmem for ath9k caldata
With "getting WIFI MAC from NVMEM" working on ath79 on 5.10,
the next logical step I think is to utilize nvmem subsystem
to also get the calibration data from there.

This will tremendously speed up the wifi bring-up, since
we no longer need the userspace helper for the simple
devices that can just load them from there.

included with this patch is a package/mac80211/refresh.

Tested on: WNDR3700v2, TP-Link Archer C7v2

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-06 16:40:48 +01:00
Daniel Golle 81832b38a0
uqmi: update to git HEAD and improve proto handler script
e303ba8 uqmi: update code generator
 7880de8 uqmi: sync data from libqmi project
 d647f8d uqmi: add more diagnostics commands
 6f95626 uim: add --uim-get-sim-state

Use newly introduce --uim-get-sim-state command to query PIN status
from modems which require using uim instead of dms command for that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-06 02:46:36 +00:00
Felix Fietkau 1cead21e8b procd: make rpcd dependency conditional
Avoids building rpcd when not needed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-04 16:54:31 +01:00
Stijn Tintel a05452e4d6 omcproxy: bump to git HEAD
bfba2aa groups: use uloop_timeout_remaining64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-04 15:04:45 +02:00
Stijn Tintel f5cdf9cb78 procd: bump to git HEAD
0ee8e73 trigger: use uloop_timeout_remaining64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-04 15:01:53 +02:00
Stijn Tintel 6a7388f673 rpcd: bump to git HEAD
20bf958 session: use uloop_timeout_remaining64
 d11ffe9 session: use blobmsg_get_u64 for RPC_DUMP_EXPIRES

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-04 14:58:31 +02:00
Stijn Tintel 36a621b1e7 libubox: bump to git HEAD
123e976 uloop: restore return type of uloop_timeout_remaining
 3344157 uloop: add uloop_timeout_remaining64
 c87d3e1 lua/uloop: use uloop_timeout_remaining64
 c86a894 uloop: deprecate uloop_timeout_remaining

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-04 13:18:13 +02:00
Felix Fietkau efff3520f4 hostapd: support qos_map_set without CONFIG_INTERWORKING
This feature is useful on its own even without full interworking support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-04 11:50:51 +01:00
Stijn Tintel 8802b21dff libubox: bump to git HEAD
be3dc72 uloop: avoid integer overflow in tv_diff

Fixes: FS#3943
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-04 01:56:53 +02:00
Hauke Mehrtens db3acbac11 toolchain: Allow sanitizer on mips and mipsel
Support for libsanitizer on MIPS 32 and MIPSEL 32 was added with GCC 9.
MIPS 64 and ARC are still not supported.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Hauke Mehrtens 7f1edbd412 binutils: Update to version 2.37
This matches the version used in the toolchain.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Hauke Mehrtens c4415993e1 strace: Update to version 5.14
Explicitly deactivate libselinux, otherwise we get a hard dependency to
libselinux.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Hauke Mehrtens 11ad15ed89 valgrind: Activate also on MIPS 64
This activates valgrind also on mips64 and mips64el.

This was working fine in a basic test in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Hauke Mehrtens e1db26085b valgrind: Update to version 3.18.1
This version has some improvements for musl.
This version works fine for me on MIPS 32 BE without MIPS16 even on musl.

The additional patch is needed to make valgrind use the correct syscall
numbers for new syscalls like clock_gettime64. The MIPS architecture
uses special syscall ranges which are different from most other systems.
The patch is pending upstream: https://bugs.kde.org/show_bug.cgi?id=444781

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Hauke Mehrtens 90a2398a11 gdb: Update to version 11.1
GDB 11.1 now depends on gmp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Felix Fietkau a5e3def182 hostapd: add wmm qos map set by default
This implements the mapping recommendations from RFC8325, with an
update from RFC8622. This ensures that DSCP marked packets are properly
sorted into WMM classes.
The map can be disabled by setting iw_qos_map_set to something invalid
like 'none'

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-03 22:47:55 +01:00
Florian Eckert b14f062849 vti: squash vtiv4 and vtiv6 packages into vti
This change adds the same package behaviour as gre package.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-11-03 20:34:43 +01:00
Felix Fietkau 063d49b8a0 qosify: add missing config option for nat support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-03 19:41:49 +01:00
Felix Fietkau ff4fd56732 qosify: include nls.mk to avoid build error with full NLS support enabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-03 18:54:12 +01:00
Piotr Dymacz b6b09bf00c uboot-imx: set BUILD_SUBTARGET to 'cortexa9'
All currently supported devices belong to the imx/cortexa9 subtarget.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz ddfebaff9f uboot-envtools: move imx to imx_cortexa9
Subtarget-specific files under 'uboot-envtools' package are supported
since 6f3a05ebb0 ("uboot-envtools: support uci-default config also per
subtargets").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 53cdf9bf33 uboot-imx6: rename to 'uboot-imx'
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 346db2f3b0 uboot-envtools: rename 'imx6' to 'imx'
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 297f10d334 kobs-ng: update dependencies after 'imx6' -> 'imx' rename
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz b769bf553d kernel: update dependencies after 'imx6' -> 'imx' rename
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Rosen Penev 9a329c4d87 strace: remove code coverage makefile var
It relies on a custom ax_code_coverage.m4 file included with strace.
Unfortunately, this conflicts with the one included with
autoconf-macros. Instead of creating a huge patch to fix it, just remove
the variable as code coverage is not used here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-02 23:37:19 +01:00
Felix Fietkau 605192f46c qosify: add missing dependency
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-02 10:57:29 +01:00
Felix Fietkau da668eb03b bpf-headers: unset PKG_CONFIG_PATH
This fixes an issue where the kernel would pick up an incompatible target
libyaml for building host tools

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-02 10:36:15 +01:00
Eneas U de Queiroz 4ea0cfe810 iproute2: Avoid unnecessary package rebuilds
Build the tc-mod-iptables before the tc-tiny and tc-full packages.

This avoids unnecessary package rebuild when calling make back to back.
Before this change, tc-mod-iptables will be built after the main tc
binary packages.

Both tc-tiny and tc-full depend on tc-mod-ipables.  If make is called
after the packages are already built, it will check the timestamps of
both packages, and will rebuild the main binaries, since the module
package will be newer than the tc package.

Calling BuildPackage,mod-iptables first ensures that its variant gets
built before the other packages' variants.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-01 20:18:55 +01:00
Eneas U de Queiroz 93a42cf16e f2fstools: set each library package VARIANT
Set the different libf2fs packages's VARIANT, so that the right settings
will be used by each different variant, if they are both being built.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-01 20:18:55 +01:00
Eneas U de Queiroz 67f9245ee5 hostapd: avoid unnecessary package rebuilds
Package hostapd-common is a dependency of every other package defined in
hostpad Makefile.  It is currently built next to the bottom of that
Makefile's package list.

If you run make back to back, then check-compile will compare the
hostapd-common timestamp to the variant being compiled, to decide if the
varint needs to be rebuilt or not.  Since the hostapd-conf package is
built towards the end of the list, it will be newer than most of the
variants, causing unnecessary package rebuilds.

Move it to the top, so that its timestamp will be older than dependent
packages, avoiding unnecessary rebuild of every selected variant.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-01 20:18:55 +01:00
Felix Fietkau 9ae5f09dc8 qosify: fix package section/category
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 20:17:02 +01:00
Daniel Golle fab84bf18c
procd: update to git HEAD
1056fc4 jail: elf: Use 64 bit variables for elf offsets
 c1976e5 jail: elf: Remove MIPS 64 warning

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:20:24 +00:00
Daniel Golle d05eae9249
fstools: update to git HEAD
19fd7fc libfstools: make sure file is closed on error
 d390744 libfstools: use uevent instead of relying on custom kernel patch

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:01:08 +00:00
Daniel Golle 73657dfbdd
base-files: drop get_partition_by_name shell function
find_mmc_part provides a better alternative and all users of
get_partition_by_name have been removed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:01:02 +00:00
Daniel Golle cb5953635e
uboot-envtools: mt7622: make use of find_mmc_part
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:00:47 +00:00
Daniel Golle 9f223a20bd
base-files: allow specifiying rootdev for find_mmc_part
Some devices got more than one mmc device.
Allow specifying the root device as 2nd parameter of find_mmc_part so
scripts can avoid matching irrelevant partitions on wrong mmc device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:00:42 +00:00
Felix Fietkau 6738820bf6 build: fix bpf toolchain dependency for qosify
Add hidden symbols to fix defaults with CONFIG_DEVEL unset

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 18:41:20 +01:00
Felix Fietkau f3a28b6bcf qosify: add package for simple qos based on ebpf+cake
qosify is simple daemon for setting up and managing CAKE along with a custom
eBPF based classifier that sets DSCP fields of packets.

It is configured via UCI and it supports the following features:
- simple TCP/UDP port based mapping
- IP address based mapping
- priority boosting based on average packet size
- bulk flow detection based on number of packets per second
- dynamically add IP entries with timeout

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 16:39:52 +01:00
Felix Fietkau a537d06c72 bpf-headers: add a package with kernel headers for ebpf
In order to genererate suitable kernel headers, a 5.10 kernel tree is
prepared with a default config for mips. The arch is forced to mips in
order to avoid issues with inline asm on various architectures in a way
that doesn't involve relying on the host toolchain/headers.
It also has the advantage of supporting both endian types

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 16:39:09 +01:00
Daniel Golle a44e4aaef9
dnsmasq: fix jail mount in case of ignore_hosts_dir being set
Commit a2fcd3900c ("dnsmasq: improve init script") broke the existing
handling for hosts_dir. Remove the redundant mount again to fix it.

Reported-by: Hartmut Birr <e9hack@gmail.com>
Fixes: a2fcd3900c ("dnsmasq: improve init script")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 12:02:24 +00:00
Felix Fietkau d7843fd7ef ubus: update to the latest version
b743a331421d ubusd: log ACL init errors
2099bb3ad997 libubus: use list_empty/list_first_entry in ubus_process_pending_msg
ef038488edc3 libubus: process pending messages in data handler if stack depth is 0
a72457b61df0 libubus: increase stack depth for processing obj msgs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 12:00:21 +01:00
Davide Fioravanti 6e13794344 base-files: add minimal mmc support
Added minimal mmc support for helper functions:

 - find_mmc_part: Look for a given partition name. Returns the
	coresponding partition path
 - caldata_extract_mmc: Look for a given partition name and then
	extracts the calibration data
 - mmc_get_mac_binary: Returns the mac address from a given partition
	name and offset

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
[replace dd with caldata_dd, moved sysupgrade mmc to orbi]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-01 00:56:51 +01:00
Florian Eckert b69dfb0a99 kernel/modules: prevent bonding driver to create default bond0 interface
When loading the bonding driver, bonding interface are automatically
created on bonding module load.

> ip a s bond0
> 14: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
>    link/ether a6:f2:20:64:c1:b9 brd ff:ff:ff:ff:ff:ff

This is not necessary in openwrt as we do not use this created interface.
The netifd creates a bonding interface based on its network configuration
name and configures this over the netifd bonding proto handler.

In order to keep the overview of the interfaces clear, bonding
interfaces should not be created automatically when loading this module,
because they are not used anyway.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-11-01 00:56:51 +01:00
Lucian Cristian 8550086c24 elfutils: enable host build
frr 8.0 needs host libelf dev
add option for host build
tested on x86, ramips, kirkwood

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
[changed commit author's email]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-01 00:56:51 +01:00
Jihoon Han 84451173f0 ath79: add support for Dongwon T&I DW02-412H
Dongwon T&I DW02-412H is a 2.4/5GHz band 11ac (WiFi-5) router, based on
Qualcomm Atheros QCA9557.

Specifications
--------------

- SoC: Qualcomm Atheros QCA9557-AT4A
- RAM: DDR2 128MB
- Flash: SPI NOR 2MB (Winbond W25Q16DVSSIG / ESMT F25L16PA(2S)) +
         NAND 64/128MB
- WiFi:
  - 2.4GHz: QCA9557 WMAC
  - 5GHz: QCA9882-BR4A
- Ethernet: 5x 10/100/1000Mbps
  - Switch: QCA8337N-AL3C
- USB: 1x USB 2.0
- UART:
  - JP2: 3.3V, TX, RX, GND (3.3V is the square pad) / 115200 8N1

Installation
--------------

1.  Connect a serial interface to UART header and
    interrupt the autostart of kernel.
2.  Transfer the factory image via TFTP and write it to the NAND flash.
3.  Update U-Boot environment variable.
    > tftpboot 0x81000000 <your image>-factory.img
    > nand erase 0x1000000
    > nand write 0x81000000 0x1000000 ${filesize}
    > setenv bootpart 2
    > saveenv

Revert to stock firmware
--------------

1.  Revert to stock U-Boot environment variable.
    > setenv bootpart 1
    > saveenv

MAC addresses as verified by OEM firmware
--------------

   WAN: *:XX (label)
   LAN: *:XX + 1
  2.4G: *:XX + 3
    5G: *:XX + 4

The label MAC address was found in art 0x0.

Credits
--------------

Credit goes to the @manatails who first developed how to port OpenWRT
to this device and had a significant impact on this patch.

And thanks to @adschm and @mans0n for guiding me to revise the code
in many ways.

Signed-off-by: Jihoon Han <rapid_renard@renard.ga>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Sungbo Eo <mans0n@gorani.run>
2021-10-31 21:58:28 +01:00
Eduardo Santos 3c97fb4346 ramips: add support for Xiaomi MiWifi 3C
This commit adds support for Xiaomi MiWiFi 3C device.

Xiaomi MiWifi 3C has almost the same system architecture
as the Xiaomi Mi WiFi Nano, which is already officially
supported by OpenWrt.

The differences are:

 - Numbers of antennas (4 instead of 2). The antenna management
   is done via the µC. There is no configuration needed in the
   software code.
 - LAN port assignments are different. LAN1 and WAN are
   interchanged.

OpenWrt Wiki: https://openwrt.org/toh/xiaomi/mir3c

OpenWrt developers forum page:
https://forum.openwrt.org/t/support-for-xiaomi-mi-3c

Specifications:

 - CPU: MediaTek MT7628AN (575MHz)
 - Flash: 16MB
 - RAM: 64MB DDR2
 - 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA
 - Antennas: 4x external single band antennas
 - WAN: 1x 10/100M
 - LAN: 2x 10/100M
 - LED: 1x amber/blue/red. Programmable
 - Button: Reset

MAC addresses as verified by OEM firmware:

use address source
LAN *:92 factory 0x28
WAN *:92 factory 0x28
2g *:93 factory 0x4

OEM firmware uses VLAN's to create the network interface for WAN and LAN.

Bootloader info:
The stock bootloader uses a "Dual ROM Partition System".
OS1 is a deep copy of OS2.
The bootloader start OS2 by default.
To force start OS1 it is needed to set "flag_try_sys2_failed=1".

How to install:
1- Use OpenWRTInvasion to gain telnet, ssh and ftp access.
   https://github.com/acecilia/OpenWRTInvasion
   (IP: 192.168.31.1 - Username: root - Password: root)
2- Connect to router using telnet or ssh.
3- Backup all partitions. Use command  "dd if=/dev/mtd0 of=/tmp/mtd0".
   Copy /tmp/mtd0 to computer using ftp.
4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin
   to /tmp in router using ftp.
5- Enable UART access and change start image for OS1.
```
nvram set uart_en=1
nvram set flag_last_success=1
nvram set boot_wait=on
nvram set flag_try_sys2_failed=1
nvram commit
```
6- Installing Openwrt on OS1 and free OS2.
```
mtd erase OS1
mtd erase OS2
mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin OS1
```

Limitations: For the first install the image size needs to be less
than 7733248 bits.

Thanks for all community and especially for this device:
minax007, earth08, S.Farid

Signed-off-by: Eduardo Santos <edu.2000.kill@gmail.com>
[wrap lines, remove whitespace errors, add mediatek,mtd-eeprom to
 &wmac, convert to nvmem]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-31 21:24:47 +01:00
Daniel Golle a2fcd3900c
dnsmasq: improve init script
* fix restart in LuCI (inherited umask was to restrictive)
 * make directory of hosts-file (!= /tmp) accessible in ujail

Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-31 13:07:48 +00:00
Dominick Grift 61a36cefd6 secilc: update to version 3.3
Update VERSIONs to 3.3 for release.
Update VERSIONs to 3.3-rc3 for release.
Correct some typos
Update VERSIONs to 3.3-rc2 for release.
Update VERSIONs and Python bindings version to 3.3-rc1 for release
libsepol/secilc/docs: Update the CIL documentation
secilc: fix memory leaks in secilc2conf
secilc: fix memory leaks in secilc
libsepol/cil: Add support for using qualified names to secil2conf
libsepol/cil: Add support for using qualified names to secil2tree
secilc: Add support for using qualified names to secilc
secilc/test: Add test for anonymous args
secilc/docs: Relocate and reword macro call name resolution order
secilc/docs: Document the order that inherited rules are resolved in
secilc: Create the new program called secil2tree to write out CIL AST
secilc/docs: Update the CIL documentation for various blocks
secilc.c: Don't fail if input file is empty
cil_conditional_statements.md: fix expr definition
secilc/docs: Lists are now allowed in constraint expressions

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[re-apply now that libsepol is up-to-date as well]
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-31 13:02:49 +00:00
Dominick Grift 25e15f5951 libsepol: update to version 3.3
Update VERSIONs to 3.3 for release.
libsepol/cil: Fix potential undefined shifts
libsepol: Fix potential undefined shifts
Update VERSIONs to 3.3-rc3 for release.
libsepol/cil: Do not skip macros when resolving until later passes
libsepol/cil: Limit the amount of reporting for bounds failures
libsepol/cil: silence clang void-pointer-to-enum-cast warning
libsepol: resolve GCC warning about null-dereference
libsepol: use correct cast
libsepol: ebitmap: mark nodes of const ebitmaps const
Update VERSIONs to 3.3-rc2 for release.
libsepol/cil: Handle operations in a class mapping when verifying
libsepol/cil: Do not use original type and typeattribute datums
libsepol: free memory after policy validation
libsepol: avoid implicit conversions
libsepol: fix typo
libsepol/cil: Free duplicate datums in original calling function
libsepol/cil: Fix detected RESOURCE_LEAK (CWE-772)
Update VERSIONs and Python bindings version to 3.3-rc1 for release
libsepol/cil: Limit the number of active line marks
libsepol/cil: Add function to get number of items in a stack
libsepol: Fix detected RESOURCE_LEAKs
libsepol/cil: Fix syntax checking in __cil_verify_syntax()
libsepol/cil: Use size_t for len in __cil_verify_syntax()
libsepol/cil: Remove redundant syntax checking
libsepol/cil: Improve in-statement to allow use after inheritance
libsepol/cil: Simplify cil_tree_children_destroy()
libsepol/cil: Refactor the function __cil_build_ast_node_helper()
libsepol/cil: Don't destroy optionals whose parent will be destroyed
libsepol/cil: Properly check for parameter when inserting name
libsepol/cil: Reset expandtypeattribute rules when resetting AST
libsepol/cil: Properly check parse tree when printing error messages
libsepol/cil: Allow some duplicate macro and block declarations
libsepol/cil: When writing AST use line marks for src_info nodes
libsepol/cil: Report correct high-level language line numbers
libsepol/cil: Add line mark kind and line number to src info
libsepol/cil: Create common string-to-unsigned-integer functions
libsepol/cil: Push line mark state first when processing a line mark
libsepol/cil: Check for valid line mark type immediately
libsepol/cil: Check the token type after getting the next token
libsepol/cil: Check syntax of src_info statement
libsepol/cil: move the fuzz target and build script to the selinux repository
libsepol: replace strerror by %m
libsepol/cil: remove obsolete comment
libsepol/cil: do not allow \0 in quoted strings
libsepol/cil: Fix handling category sets in an expression
libsepol: assure string NUL-termination of ibdev_name
libsepol: avoid implicit conversions
libsepol: ignore UBSAN false-positives
libsepol: avoid unsigned integer overflow
libsepol/cil: Improve checking for bad inheritance patterns
libsepol: silence -Wextra-semi-stmt warning
libsepol/cil: do not override previous results of __cil_verify_classperms
libsepol/cil: Provide option to allow qualified names in declarations
libsepol/cil: make array cil_sym_sizes const
libsepol/cil: Only reset AST if optional has a declaration
libsepol/cil: Add function to determine if a subtree has a declaration
libsepol/cil: Improve degenerate inheritance check
libsepol/cil: Reduce the initial symtab sizes for blocks
libsepol/cil: Check for empty list when marking neverallow attributes
libsepol/cil: Fix syntax checking of defaultrange rule
libsepol/cil: Properly check for loops in sets
libsepol/cil: Allow duplicate optional blocks in most cases
libsepol: declare read-only arrays const
libsepol: declare file local variable static
libsepol: drop unnecessary casts
libsepol: drop repeated semicolons
libsepol/cil: avoid using maybe uninitialized variables
libsepol/cil: drop unnecessary casts
libsepol/cil: drop dead store
libsepol/cil: drop extra semicolon
libsepol/cil: silence cast warning
libsepol: remove dead stores
libsepol: do not allocate memory of size 0
libsepol: mark read-only parameters of type_set_ interfaces const
libsepol: mark read-only parameters of ebitmap interfaces const
libsepol: remove dead stores
libsepol/cil: follow declaration-after-statement
libsepol: follow declaration-after-statement
libsepol: avoid unsigned integer overflow
libsepol: remove unused functions
libsepol: resolve missing prototypes
libsepol: fix typos
libsepol: Quote paths when generating policy.conf from binary policy
libsepol/cil: Account for anonymous category sets in an expression
libsepol/cil: Fix anonymous IP address call arguments
libsepol: quote paths in CIL conversion
libsepol/cil: Resolve anonymous levels only once
libsepol/cil: Pointers to datums should be set to NULL when resetting
libsepol/cil: Resolve anonymous class permission sets only once
libsepol/cil: Limit the number of open parenthesis allowed
libsepol/cil: Destroy the permission nodes when exiting with an error
libsepol/cil: Handle disabled optional blocks in earlier passes
libsepol/cil: Do not resolve arguments to declarations in the call
libsepo/cil: Refactor macro call resolution
libsepol/cil: Do not add NULL node when inserting key into symtab
libsepol/cil: Make name resolution in macros work as documented
libsepol/cil: Fix name resolution involving inherited blocks
libsepol/cil: Check for self-referential loops in sets
libsepol/cil: Return an error if a call argument fails to resolve
libsepol/cil: Check datum in ordered list for expected flavor
libsepol/cil: Detect degenerate inheritance and exit with an error
libsepol/cil: Fix instances where an error returns SEPOL_OK
libsepol/cil: Properly reset an anonymous classperm set
libsepol: use checked arithmetic builtin to perform safe addition
libsepol/cil: Add functions to make use of cil_write_ast()
libsepol/cil: Create functions to write the CIL AST
libsepol/cil: Use CIL_ERR for error messages in cil_compile()
libsepol/cil: Make invalid statement error messages consistent
libsepol/cil: Do not allow tunable declarations in in-statements
libsepol/cil: Sync checks for invalid rules in macros
libsepol/cil: Check for statements not allowed in optional blocks
libsepol/cil: Sync checks for invalid rules in booleanifs
libsepol/cil: Reorder checks for invalid rules when resolving AST
libsepol/cil: Use AST to track blocks and optionals when resolving
libsepol/cil: Create new first child helper function for building AST
libsepol/cil: Cleanup build AST helper functions
libsepol/cil: Reorder checks for invalid rules when building AST
libsepol/cil: Move check for the shadowing of macro parameters
libsepol/cil: Create function cil_add_decl_to_symtab() and refactor
libsepol/cil: Refactor helper function for cil_gen_node()
libsepol/cil: Allow permission expressions when using map classes
libsepol/cil: Exit with an error if declaration name is a reserved word
libsepol/cil: More strict verification of constraint leaf expressions
libsepol/cil: Set class field to NULL when resetting struct cil_classperms
libsepol/cil: cil_reset_classperms_set() should not reset classpermission
libsepol/cil: Destroy classperm list when resetting map perms
libsepol/cil: Destroy classperms list when resetting classpermission
libsepol/cil: Fix out-of-bound read of file context pattern ending with "\"
libsepol/cil: Check for duplicate blocks, optionals, and macros
libsepol: Write "NO_IDENTIFIER" for empty CIL constraint expression
libsepol: Enclose identifier lists in CIL constraint expressions
libsepol/cil: Allow lists in constraint expressions
libsepol: Enclose identifier lists in constraint expressions
libsepol: Write "NO_IDENTIFIER" for empty constraint expression
libsepol: make num_* unsigned int in module_to_cil
libsepol/cil: do not leak avrulex_ioctl_table memory when an error occurs
libsepol/cil: fix NULL pointer dereference in __cil_insert_name
libsepol/cil: replace printf with proper cil_tree_log
libsepol/cil: remove stray printf
libsepol/cil: make cil_post_fc_fill_data static
libsepol: Check kernel to CIL and Conf functions for supported versions
libsepol: Remove unnecessary copying of declarations from link.c
libsepol: Properly handle types associated to role attributes
libsepol: Expand role attributes in constraint expressions

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[re-apply now that buildbot phase1 has caught up]
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-31 13:01:24 +00:00
Chukun Pan e43eb16efe uboot-sunxi: add support for FriendlyARM NanoPi R1S H5
Merged in https://github.com/u-boot/u-boot/commit/e7510d2,
adjust back to the current 2020.04 version.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-10-30 21:17:20 +02:00
Zhijun You e6a486fe79 ath10k: backport fix for module load regression with iram-recovery
Backport upstream fix for module load regression caused by IRAM recovery.
Without this patch devices using mainline ath10k driver could lost wireless
function because ath10k module failed to load.

Signed-off-by: Zhijun You <hujy652@gmail.com>
2021-10-30 21:17:20 +02:00
Hans Dedecker 2d2c7c4250 6in4: remove 6in4 tunnel delete workaround (FS#3690)
Remove 6in4 tunnel delete workaround as the real issue is
now solved in netifd
(https://git.openwrt.org/?p=project/netifd.git;a=commit;h=8f82742ca4f47f459284f3a07323d04da72ea5f6)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-30 21:15:18 +02:00
Hans Dedecker c4d292969f 6rd : remove 6rd tunnel delete workaround
Remove 6rd tunnel delete workaround in as the real issue
is now solved in netifd
(https://git.openwrt.org/?p=project/netifd.git;a=commit;h=8f82742ca4f47f459284f3a07323d04da72ea5f6)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-30 21:14:30 +02:00
Hans Dedecker 4eba313065 netifd: fix deletion of ip tunnels (FS#4058)
8f82742 system-linux: fix deletion of ip tunnels (FS#4058)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-30 21:14:01 +02:00
Christian Lamparter fd717f54be ipq40xx: detangle ath10k-board-qca4019 from ath10k-firmware-qca4019*
Back in the day, the board-2.bin came with ath10k-firmware-qca4019.
This changed with
commit c3b2efaf24 ("linux-firmware: ath10k: add board firmware packages")
which placed the board-2.bin into a separate package: ath10k-board-qca4019.
This was great, because it addressed one of the caveat of the original
ipq-wifi package:
commit fa03d441e9 ("firmware: add custom IPQ wifi board definitions")

|  2. updating ath10k-firmware-qca4019 will also replace
|      the board-2.bin. For this cases the user needs to
|      manually reinstall the wifi-board package once the
|      ath10k-firmware-qca4019 is updated.

This could be extended further so that ipq-wifi packages
no longer use "install-override" and the various QCA4019
variants list the ath10k-board-qca4019 as a CONFLICT
package.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 16:32:59 +02:00
Christian Lamparter 4c8dd973ef ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit
OpenWrt maintains two special out-of-tree DT properties:
"qca,disable-5ghz" and "qca,disable-2ghz". These are implemented
in a mac80211 ath9k patch "550-ath9k-disable-bands-via-dt.patch".

With the things being what they are, now might be a good
point to switch the devices to the generic and upstream
"ieee80211-freq-limit" property. This property is much
broader and works differently. Instead of disabling the
drivers logic which would add the affected band and
channels. It now disables all channels which are not
within the specified frequency range.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> # HH5A
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 16:32:59 +02:00
Sven Roederer 5287defa1f dropbear: add config options for agent-forwarding support
* SSH agent forwarding might cause security issues, locally and on the jump
  machine (https://defn.io/2019/04/12/ssh-forwarding/). So allow to
  completely disabling it.
* separate options for client and server
* keep it enabled by default

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-10-30 16:32:54 +02:00
Daniel Golle 19c5277206
Revert "secilc: update to version 3.3"
This reverts commit 2da891e735.
secilc 3.3 requires libsepol to be version 3.3 as well and doesn't
build otherwise. Revert for now.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 14:16:35 +01:00
Daniel Golle ae4069c577
Revert "libsepol: update to version 3.3"
This reverts commit de8a800ca9.
Host build uses host includes instead of staging/hostpkg.
This breaks the build in case of selinux host libs being older than
version 3.3. Revert for now until better fix is found.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 14:16:30 +01:00
Dominick Grift 04c5bcd074 selinux-policy: update to version 1.0
wifi: writes to terminal
hotplugcall and sqm read class sysfile symlinks
unbound and sqm related loose ends
support/example: policycoreutils host-compile is required
TODO: this was wrong and it is actually needed
linguist detectable does not work this way
linguist-detectable
updates README
adds workflows
adds a note about persistent /var option

project moved to https://github.com/DefenSec/selinux-policy

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift 2da891e735 secilc: update to version 3.3
Update VERSIONs to 3.3 for release.
Update VERSIONs to 3.3-rc3 for release.
Correct some typos
Update VERSIONs to 3.3-rc2 for release.
Update VERSIONs and Python bindings version to 3.3-rc1 for release
libsepol/secilc/docs: Update the CIL documentation
secilc: fix memory leaks in secilc2conf
secilc: fix memory leaks in secilc
libsepol/cil: Add support for using qualified names to secil2conf
libsepol/cil: Add support for using qualified names to secil2tree
secilc: Add support for using qualified names to secilc
secilc/test: Add test for anonymous args
secilc/docs: Relocate and reword macro call name resolution order
secilc/docs: Document the order that inherited rules are resolved in
secilc: Create the new program called secil2tree to write out CIL AST
secilc/docs: Update the CIL documentation for various blocks
secilc.c: Don't fail if input file is empty
cil_conditional_statements.md: fix expr definition
secilc/docs: Lists are now allowed in constraint expressions

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift a8c293ce8d policycoreutils: update to version 3.3
Update VERSIONs to 3.3 for release.
Update VERSIONs to 3.3-rc3 for release.
libselinux/semodule: Improve extracting message
Correct some typos
Update VERSIONs to 3.3-rc2 for release.
Update VERSIONs and Python bindings version to 3.3-rc1 for release
policycoreutils: free memory of allocated context in newrole
policycoreutils: free memory of allocated context in run_init
policycoreutils: free memory on lstat failure in sestatus
policycoreutils: silence -Wextra-semi-stmt warning
fixfiles: do not exclude /dev and /run in -C mode
policycoreutils/setfiles: do not create useless setfiles.8.man file

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift b97890d75e checkpolicy: update to version 3.3
Update VERSIONs to 3.3 for release.
checkpolicy: Fix potential undefined shifts
Update VERSIONs to 3.3-rc3 for release.
checkpolicy: delay down-cast to avoid align warning
checkpolicy: drop incorrect cast
checkpolicy: update documentation
checkpolicy: print reason of fopen failure
checkpolicy: policy_define: cleanup declarations
Update VERSIONs to 3.3-rc2 for release.
checkpolicy: free extended permission memory
checkpolicy: print warning on source line overflow
checkpolicy: error out on parsing too big integers
checkpolicy: avoid implicit conversion
checkpolicy: resolve dismod memory leaks
checkpolicy: add missing function declarations
checkpolicy: mark file local functions in policy_define static
checkpolicy: mark read-only parameters in module compiler const
checkpolicy: misc checkpolicy tweaks
checkpolicy: misc checkmodule tweaks
checkpolicy: enclose macro argument in parentheses
Update VERSIONs and Python bindings version to 3.3-rc1 for release
checkpolicy: mark read-only parameters in policy define const
checkpolicy/test: mark file local functions static
checkpolicy: parse_util drop unused declaration
checkpolicy: drop redundant cast to the same type
checkpolicy: avoid potential use of uninitialized variable
checkpolicy: check before potential NULL dereference
checkpolicy: remove dead assignments
checkpolicy: follow declaration-after-statement
checkpolicy: use correct format specifier for unsigned
checkpolicy: drop dead condition
checkpolicy: simplify assignment
checkpolicy: drop -pipe compile option
checkpolicy: pass CFLAGS at link stage
checkpolicy: silence -Wextra-semi-stmt warning
checkpolicy: Do not automatically upgrade when using "-b" flag
libsepol/checkpolicy: Set user roles using role value instead of dominance

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift c8d1f8fda7 libsemanage: update to version 3.3
Update VERSIONs to 3.3 for release.
Update VERSIONs to 3.3-rc3 for release.
Update VERSIONs to 3.3-rc2 for release.
Update VERSIONs and Python bindings version to 3.3-rc1 for release
libsemanage: Fix USE_AFTER_FREE (CWE-672) in semanage_direct_write_langext()
libsemanage: silence -Wextra-semi-stmt warning
libsemanage: fix use-after-free in parse_module_store()

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift 6925c7580d libselinux: update to version 3.3
Update VERSIONs to 3.3 for release.
libselinux: Fix potential undefined shifts
Update VERSIONs to 3.3-rc3 for release.
Update VERSIONs to 3.3-rc2 for release.
libselinux/utils: drop requirement to combine compiling and linking
Update VERSIONs and Python bindings version to 3.3-rc1 for release
Improve error message for label file validation
libselinux: replace strerror by %m
libselinux: silence -Wextra-semi-stmt warning
libselinux/utils/getseuser.c: fix build with gcc 4.8
selinux.8: document how mount flag nosuid affects SELinux
libselinux: fix typo
libselinux: improve getcon(3) man page
libselinux: selinux_status_open: return 1 in fallback mode
libselinux: do not use status page fallback mode internally
libselinux: make selinux_status_open(3) reentrant
libselinux: avc_destroy(3) closes status page
libselinux: label_file.c: fix indent
libselinux: regex: unify parameter names
libselinux: sidtab_sid_stats(): unify parameter name
libselinux: drop redundant casts to the same type
libselinux: label_db::db_init(): open file with CLOEXEC mode
libselinux: matchpathcon: free memory on realloc failure
libselinux: label_file::init(): do not pass NULL to strdup
libselinux: init_selinux_config(): free resources on error
libselinux: matchmediacon(): close file on error
libselinux: store_stem(): do not free possible non-heap object
libselinux: getdefaultcon: free memory on multiple same arguments
libselinux: setexecfilecon(): drop dead assignment
libselinux: label_media::init(): drop dead assignment
libselinux: label_x::init(): drop dead assignment
libselinux: context_new(): drop dead assignment
libselinux: exclude_non_seclabel_mounts(): drop unused variable
libselinux: getconlist: free memory on multiple level arguments
libselinux: selabel_get_digests_all_partial_matches: free memory after FTS_D block
libselinux: selinux_restorecon: mark local variable static
libselinux: avcstat: use standard length modifier for unsigned long long
libselinux: sefcontext_compile: mark local variable static
libselinux: Sha1Finalise(): do not discard const qualifier
libselinux: label_common(): do not discard const qualifier
libselinux: selinux_file_context_cmp(): do not discard const qualifier
libselinux: sidtab_hash(): do not discard const qualifier
libselinux: silence -Wstringop-overflow warning from gcc 10.3.1
libselinux: selinux_check_passwd_access_internal(): respect deny_unknown
libselinux: do not duplicate make target when going into subdirectory

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Dominick Grift de8a800ca9 libsepol: update to version 3.3
Update VERSIONs to 3.3 for release.
libsepol/cil: Fix potential undefined shifts
libsepol: Fix potential undefined shifts
Update VERSIONs to 3.3-rc3 for release.
libsepol/cil: Do not skip macros when resolving until later passes
libsepol/cil: Limit the amount of reporting for bounds failures
libsepol/cil: silence clang void-pointer-to-enum-cast warning
libsepol: resolve GCC warning about null-dereference
libsepol: use correct cast
libsepol: ebitmap: mark nodes of const ebitmaps const
Update VERSIONs to 3.3-rc2 for release.
libsepol/cil: Handle operations in a class mapping when verifying
libsepol/cil: Do not use original type and typeattribute datums
libsepol: free memory after policy validation
libsepol: avoid implicit conversions
libsepol: fix typo
libsepol/cil: Free duplicate datums in original calling function
libsepol/cil: Fix detected RESOURCE_LEAK (CWE-772)
Update VERSIONs and Python bindings version to 3.3-rc1 for release
libsepol/cil: Limit the number of active line marks
libsepol/cil: Add function to get number of items in a stack
libsepol: Fix detected RESOURCE_LEAKs
libsepol/cil: Fix syntax checking in __cil_verify_syntax()
libsepol/cil: Use size_t for len in __cil_verify_syntax()
libsepol/cil: Remove redundant syntax checking
libsepol/cil: Improve in-statement to allow use after inheritance
libsepol/cil: Simplify cil_tree_children_destroy()
libsepol/cil: Refactor the function __cil_build_ast_node_helper()
libsepol/cil: Don't destroy optionals whose parent will be destroyed
libsepol/cil: Properly check for parameter when inserting name
libsepol/cil: Reset expandtypeattribute rules when resetting AST
libsepol/cil: Properly check parse tree when printing error messages
libsepol/cil: Allow some duplicate macro and block declarations
libsepol/cil: When writing AST use line marks for src_info nodes
libsepol/cil: Report correct high-level language line numbers
libsepol/cil: Add line mark kind and line number to src info
libsepol/cil: Create common string-to-unsigned-integer functions
libsepol/cil: Push line mark state first when processing a line mark
libsepol/cil: Check for valid line mark type immediately
libsepol/cil: Check the token type after getting the next token
libsepol/cil: Check syntax of src_info statement
libsepol/cil: move the fuzz target and build script to the selinux repository
libsepol: replace strerror by %m
libsepol/cil: remove obsolete comment
libsepol/cil: do not allow \0 in quoted strings
libsepol/cil: Fix handling category sets in an expression
libsepol: assure string NUL-termination of ibdev_name
libsepol: avoid implicit conversions
libsepol: ignore UBSAN false-positives
libsepol: avoid unsigned integer overflow
libsepol/cil: Improve checking for bad inheritance patterns
libsepol: silence -Wextra-semi-stmt warning
libsepol/cil: do not override previous results of __cil_verify_classperms
libsepol/cil: Provide option to allow qualified names in declarations
libsepol/cil: make array cil_sym_sizes const
libsepol/cil: Only reset AST if optional has a declaration
libsepol/cil: Add function to determine if a subtree has a declaration
libsepol/cil: Improve degenerate inheritance check
libsepol/cil: Reduce the initial symtab sizes for blocks
libsepol/cil: Check for empty list when marking neverallow attributes
libsepol/cil: Fix syntax checking of defaultrange rule
libsepol/cil: Properly check for loops in sets
libsepol/cil: Allow duplicate optional blocks in most cases
libsepol: declare read-only arrays const
libsepol: declare file local variable static
libsepol: drop unnecessary casts
libsepol: drop repeated semicolons
libsepol/cil: avoid using maybe uninitialized variables
libsepol/cil: drop unnecessary casts
libsepol/cil: drop dead store
libsepol/cil: drop extra semicolon
libsepol/cil: silence cast warning
libsepol: remove dead stores
libsepol: do not allocate memory of size 0
libsepol: mark read-only parameters of type_set_ interfaces const
libsepol: mark read-only parameters of ebitmap interfaces const
libsepol: remove dead stores
libsepol/cil: follow declaration-after-statement
libsepol: follow declaration-after-statement
libsepol: avoid unsigned integer overflow
libsepol: remove unused functions
libsepol: resolve missing prototypes
libsepol: fix typos
libsepol: Quote paths when generating policy.conf from binary policy
libsepol/cil: Account for anonymous category sets in an expression
libsepol/cil: Fix anonymous IP address call arguments
libsepol: quote paths in CIL conversion
libsepol/cil: Resolve anonymous levels only once
libsepol/cil: Pointers to datums should be set to NULL when resetting
libsepol/cil: Resolve anonymous class permission sets only once
libsepol/cil: Limit the number of open parenthesis allowed
libsepol/cil: Destroy the permission nodes when exiting with an error
libsepol/cil: Handle disabled optional blocks in earlier passes
libsepol/cil: Do not resolve arguments to declarations in the call
libsepo/cil: Refactor macro call resolution
libsepol/cil: Do not add NULL node when inserting key into symtab
libsepol/cil: Make name resolution in macros work as documented
libsepol/cil: Fix name resolution involving inherited blocks
libsepol/cil: Check for self-referential loops in sets
libsepol/cil: Return an error if a call argument fails to resolve
libsepol/cil: Check datum in ordered list for expected flavor
libsepol/cil: Detect degenerate inheritance and exit with an error
libsepol/cil: Fix instances where an error returns SEPOL_OK
libsepol/cil: Properly reset an anonymous classperm set
libsepol: use checked arithmetic builtin to perform safe addition
libsepol/cil: Add functions to make use of cil_write_ast()
libsepol/cil: Create functions to write the CIL AST
libsepol/cil: Use CIL_ERR for error messages in cil_compile()
libsepol/cil: Make invalid statement error messages consistent
libsepol/cil: Do not allow tunable declarations in in-statements
libsepol/cil: Sync checks for invalid rules in macros
libsepol/cil: Check for statements not allowed in optional blocks
libsepol/cil: Sync checks for invalid rules in booleanifs
libsepol/cil: Reorder checks for invalid rules when resolving AST
libsepol/cil: Use AST to track blocks and optionals when resolving
libsepol/cil: Create new first child helper function for building AST
libsepol/cil: Cleanup build AST helper functions
libsepol/cil: Reorder checks for invalid rules when building AST
libsepol/cil: Move check for the shadowing of macro parameters
libsepol/cil: Create function cil_add_decl_to_symtab() and refactor
libsepol/cil: Refactor helper function for cil_gen_node()
libsepol/cil: Allow permission expressions when using map classes
libsepol/cil: Exit with an error if declaration name is a reserved word
libsepol/cil: More strict verification of constraint leaf expressions
libsepol/cil: Set class field to NULL when resetting struct cil_classperms
libsepol/cil: cil_reset_classperms_set() should not reset classpermission
libsepol/cil: Destroy classperm list when resetting map perms
libsepol/cil: Destroy classperms list when resetting classpermission
libsepol/cil: Fix out-of-bound read of file context pattern ending with "\"
libsepol/cil: Check for duplicate blocks, optionals, and macros
libsepol: Write "NO_IDENTIFIER" for empty CIL constraint expression
libsepol: Enclose identifier lists in CIL constraint expressions
libsepol/cil: Allow lists in constraint expressions
libsepol: Enclose identifier lists in constraint expressions
libsepol: Write "NO_IDENTIFIER" for empty constraint expression
libsepol: make num_* unsigned int in module_to_cil
libsepol/cil: do not leak avrulex_ioctl_table memory when an error occurs
libsepol/cil: fix NULL pointer dereference in __cil_insert_name
libsepol/cil: replace printf with proper cil_tree_log
libsepol/cil: remove stray printf
libsepol/cil: make cil_post_fc_fill_data static
libsepol: Check kernel to CIL and Conf functions for supported versions
libsepol: Remove unnecessary copying of declarations from link.c
libsepol: Properly handle types associated to role attributes
libsepol: Expand role attributes in constraint expressions

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2021-10-28 22:15:02 +01:00
Daniel Golle b2aca61360
base-files, metadata: support additional group membership
Some packages may require additional group membership for the system
user added by that package. Allow defining additional groups as third
member of the ':'-separated tuple, allowing to specify multiple
','-separated groups with optional GID.

Example:
USERID:=foouser=1000:foogroup=1000:addg1=1001,addg2=1002,addg3

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-28 16:27:21 +01:00
Michael Peleshenko db639238f2 umdns: add missing syscall to seccomp filter
The 'madvise', syscall is missing.
Found with 'utrace /usr/sbin/umdns' on an R7800 and RT3200.

Signed-off-by: Michael Peleshenko <mpeleshenko@gmail.com>
2021-10-27 19:25:59 +01:00
Jo-Philipp Wich 269bdf6eef ucode: update to latest Git HEAD
0f022aa lib: increase refcount when returning cached module instance
c9e68bb lib: introduce resolver library
9041e24 lib: fix uninitialized memory access on handling %J string formats
4ee06d8 syntax: introduce optional chaining operators
ce4a7d9 vm: reset callframes before invoking unhandled exception handler
218e822 vm: clear exception information before calling managed code functions
5b908bd ubus: properly handle signed 64bit values too
e43b751 ubus: fix handling signed 16bit and 32bit integers
137428f nl80211: fix issues spotted by static code analyzer
b9d4f61 nl80211: treat signal attr values as signed integers
9a7c355 nl80211: expose sta_info attributes
bb358d9 lib: introduce Linux 802.11 netlink binding
914f54c types: fix invalid memory access on setting non-contiguous array indexes
631f00d main: fix leaking module name when processing -m flag
e55188b compiler: properly handle jumps to offset 0
98c4147 tests: support specifying cmdline args in testcase files
64e4f68 types: fix formatting escape sequences for 8 bit chars
dd86e1d rtnl: automatically derive message family from certain address attrs
74fdb97 rtnl: expose IPv4 and IPv6 devconfig information
7fa1008 rtnl: allow reply nla payloads to be smaller than headsize
cbae3cb lib: introduce Linux route netlink binding
e6dd389 ci: adjust build prereqs for GitHub as well
07ae165 ci: add libnl-tiny to prereqs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-25 23:08:42 +02:00
Claudiu Beznea 8746ba3657 at91: add support for sam9x60-ek board
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
       USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
                    devices

Flashing:
- follow the procedure at [1]

[1] https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:29 +02:00
Claudiu Beznea 60f52f9b0d at91: add support for sama5d27-wlsom1-ek board
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
	 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
	   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
              interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
             connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:21 +02:00
Claudiu Beznea 8b7e577f76 at91: add support for sama5d2 icp board
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
       One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
	    One ETH switchport,
	    One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
	   Bluetooth module (Wi-Fi/BT), suitable for
	   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
                   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:17 +02:00
Stan Grishin 05a7af9ca0 wolfssl: enable ECC Curve 25519 by default
* fixes https://github.com/openwrt/packages/issues/16652
 see https://github.com/openwrt/packages/issues/16674#issuecomment-934983898

Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-10-24 18:46:24 +02:00
Rosen Penev 6b2ed6101e uclibc++: remove
No package here depends on it. Furthermore, uClibc++ is a fairly buggy
C++ library and seems to be relatively inactive upstream.

It also lacks proper support for modern C++11 features.

The main benefit of it is size: 66.6 KB	vs 287.3 KB on mips24kc. Static
linking and LTO can help bring the size down of packages that need it.

Added warning message to uclibc++.mk

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 18:20:50 +02:00
Andre Heider 09465d802b u-boot.mk: always link host libraries static
Host libraries are only build static, so let's pass --static to
pkg-config globally and remove the then unnecessary patches doing
exactly that individually.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-24 18:00:49 +02:00
Andre Heider f262d2aae1 u-boot.mk: fix pkg-config usage
Using Host/Exports doesn't work as intended, explicitly add the
required vars so that u-boot finds the required libraries when building
its tools.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-24 18:00:49 +02:00
Hauke Mehrtens 6a1284cfa8 mac80211: Add devm_platform_get_and_ioremap_resource()
This function is missing in kernel 5.4, but it is sued by ath10k.
This fixes the build of ath10k on some targets.

Fixes: cfe0eb7485 ("mac80211: Update to version 5.14.13-1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 15:03:20 +02:00
Hauke Mehrtens 0a274d67b8 mac80211: Update to version 5.15-rc6-1
The removed patches were applied upstream.
The Cisco Aironet 802.11b driver was removed from backports, remove
it also from OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 00:08:38 +02:00
Hauke Mehrtens cfe0eb7485 mac80211: Update to version 5.14.13-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 00:08:38 +02:00
Hauke Mehrtens 1c0d5ee8e6 mac80211: Update to version 5.13.19-1
The removed patches were applied upstream.

of_get_mac_address() was backported in our OpenWrt kernel, remove the
change from backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 00:08:03 +02:00
Hauke Mehrtens b96c2569ac mac80211: Update to version 5.12.19-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-23 23:17:28 +02:00
Hauke Mehrtens e185080c87 mac80211: Update to version 5.11.22-1
The removed patches were applied upstream.
This backports version 5.11.22 and later does not support kernel
versions < 4.4, this allows us to remove some patches too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-23 23:17:23 +02:00
Hans Dedecker a1d3796efe ethtool: update to v5.14
Update to newly released version 5.14

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-23 21:41:09 +02:00
Hans Dedecker abc7a97e9c Revert "ethtool: update to v5.14"
This reverts commit 7630001427

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-23 21:39:00 +02:00
Hans Dedecker 7630001427 ethtool: update to v5.14
Update to newly released version 5.14

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-10-23 21:35:38 +02:00
Michael Peleshenko 40c18e95dc umdns: add missing syscall to seccomp filter
The 'clock_gettime64', syscall is missing.
Found with 'utrace /usr/sbin/umdns' on an R7800.

Signed-off-by: Michael Peleshenko <mpeleshenko@gmail.com>
2021-10-23 19:31:32 +02:00
Christian Lamparter dbb4c47798 wireless-regdb: update to version 2021.08.28
e983a25 Update regulatory rules for Ecuador (EC)
a0bcb88 wireless-regdb: Update regulatory rules for Norway (NO) on 6 and 60 GHz
cdf854d wireless-regdb: Update regulatory rules for Germany (DE) on 6GHz
86cba52 wireless-regdb: reduce bandwidth for 5730-5850 and 5850-5895 MHz in US
6fa2384 wireless-regdb: remove PTMP-ONLY from 5850-5895 MHz for US
9839e1e wireless-regdb: recent FCC report and order allows 5850-5895 immediately
42dfaf4 wireless-regdb: update 5725-5850 MHz rule for GB

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-23 19:31:32 +02:00
Deomid Ryabkov 430f691943 base-files: chmod 1777 /var/lock
Per FHS 3.0, /var/lock is the location for lock files [1].
However its current permissions (755) are too restrictive
for use by unprivileged processes.
Debian and Ubuntu set them to 1777, and now so do we.

[1] <https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles>

Signed-off-by: Deomid Ryabkov <rojer@rojer.me>
[fixed typo in commit message, had to remove "rojer" due to git hooks]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-23 19:30:54 +02:00
Felix Fietkau 94c41ef2ef mt76: update to the latest version
f6bde7ba82ee mt76: connac: fix unresolved symbols when CONFIG_PM is unset

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-23 13:31:22 +02:00
Felix Fietkau 66cbf5fd4e mt76: update to the latest version
9d288d7c0c73 mt76: mt7615: apply cached RF data for DBDC
4d2e81d9ecab mt76: mt7915: remove mt7915_mcu_add_he()
2c8c3bcd766c mt76: mt7915: rework .set_bitrate_mask() to support more options
577d45f6e4a0 mt76: mt7915: rework debugfs fixed-rate knob
b68af355f707 mt76: mt7915: fix endiannes warning mt7915_mcu_beacon_check_caps
b52adf981561 mt76: mt7915: add WA firmware log support
ed3d8569c400 mt76: mt7915: add debugfs knobs for MCU utilization
0f49a22314a5 mt76: mt7921: disable 4addr capability
754d4a37ab71 mt76: mt7921: fix mt7921s Kconfig
f81f42fe875f mt76: Print error message when reading EEPROM from mtd failed
fd25a550965d mt76: Make use of the helper macro kthread_run()
1d01257662a6 wireless: mediatek: mt7921: fix Wformat build warning

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-23 07:31:46 +02:00
Hauke Mehrtens eeeb9b7496 uci: update to git HEAD
cmake: Allow override of install directories

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-22 23:51:51 +02:00
Hauke Mehrtens 0ca81ff047 procd: update to git HEAD
jail: Fix build with glibc

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-22 23:51:50 +02:00
David Bauer 9b880f09f3 hostapd: ubus: fix uninitialized pointer
This fixes passing a bogus non-null pointer to the ubus handler in case
the transition request is rejected.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-21 17:09:35 +02:00
Felix Fietkau 63c01ad025 hostapd: fix up patches after the last commit
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-21 12:37:23 +02:00
Felix Fietkau da4be02fcd hostapd: fix a race condition on adding AP mode wds sta interfaces
Both hostapd and netifd attempt to add a VLAN device to a bridge.
Depending on which one wins the race, bridge vlan settings might be incomplete,
or hostapd might run into an error and refuse to service the client.
Fix this by preventing hostapd from adding interfaces to the bridge and
instead rely entirely on netifd handling this properly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-21 11:31:53 +02:00
Felix Fietkau f448c26923 netifd: update to the latest version
c61a1d432b34 wireless: fix creating AP mode WDS station interfaces
f78bdec2ed5f wireless: fix handling vif attributes on reload with mode change

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-21 11:31:53 +02:00
Andre Heider 70729d3454 ltq-vdsl-app: add error vector counters to the ubus metrics
These are useful stats to debug vector related line deteriorations,
see [0].

Example output:
    "erb": {
	    "sent": 169925,
	    "discarded": 0
    }

[0] https://forum.openwrt.org/t/vectoring-on-lantiq-vrx200-vr9-missing-callback-for-sending-error-samples/104046

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-21 00:17:36 +02:00
Andre Heider 276c80bdc0 ltq-vdsl-app: prepare for multiple mei ioctls
Refactor so that the outer function opens and closes the mei fd and
passes it around, just as with the main fd.

That also allows us to use the IOCTL macro in get_vector_status() and
clean up accordingly.

Switch to AUTORELEASE while at it.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-21 00:17:36 +02:00
Andrew Robbins 1d2bc94f78 ath10k-ct: update to version from 2021-09-22
Add in a fix for 160Mhz dfs on 5.10 and higher.
Add support for 5.13 and 5.15 kernels.
Add of_get_mac_address support for 5.15 driver.

Signed-off-by: Andrew Robbins <andrew@robbinsa.me>
2021-10-21 00:17:36 +02:00
Ivan Pavlov be3e260f92 wolfssl: fix compile when enable-devcrypto is set
fixing linking error when --enable-devcrypto=yes
fixes: 7d92bb0509 wolfssl: update to 4.8.1-stable

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2021-10-21 00:17:36 +02:00
Hauke Mehrtens 36019ed589 iw: sync nl80211 with kernel backports
The nl80211 was out of sync with the version used in our backports. This
broke the configuration of the antenna gain.

Fixes: 2bfac61483 ("mac80211: backport support for BSS color changes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-21 00:17:36 +02:00
Felix Fietkau a889dcd3f2 mac80211: add missing patch chunk for mac80211_hwsim
Fixes build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20 14:04:40 +02:00
Felix Fietkau 192c41001a mt76: update to the latest version
ebf5b2336591 mt7615/mt7915: fix hwmon device name
8d12f9ed275d mt76: mt7615: mt7622: fix ibss and meshpoint
e7883cdc0b4e mt76: mt7915: improve code readability in mt7915_mcu_sta_bfer_ht
831d5967abb9 wireless: fix spelling of A-MSDU in HE capabilities
f09cb04be261 wireless: align some HE capabilities with the spec
0eeba8f2952d wireless: align HE capabilities A-MPDU Length Exponent Extension
655a6c65b8a7 mt76: mt7915: introduce mt7915_mcu_beacon_check_caps()
4440025d0ba9 mt76: mt7915: fix txbf starec TLV issues
87d2fb6fbff5 mt76: mt7915: improve starec readability of txbf
53c6a3cb7f6b mt76: mt7915: fix sta_rec_wtbl tag len
f517845e4f28 mt76: mt7915: rework starec TLV tags
1df017bc39a3 mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()
6724b0a9a748 mt76: mt7915: set VTA bit in tx descriptor
f1f505cbbb30 mt76: mt7915: set muru platform type
8c9d4b38d258 mt76: mt7915: remove dead code in mt7915_get_et_stats
d0ccc4297935 mt76: rely on phy pointer in mt76_register_debugfs_fops routine signature
0af0af82bb97 mt76: mt7915: introduce mt76 debugfs sub-dir for ext-phy
10e85d62f213 mt76: mt7915: improve code readability for xmit-queue handler
b6051f7713d2 mt76: sdio: export mt76s_alloc_rx_queue and mt76s_alloc_tx routines
9a97c38a309d mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
c02847c05884 mt76: mt7921: get rid of unused variable in mt7921_mac_tx_free
60dd47a0a62e mt76: mt7915: remove dead code in debugfs code
ce74fc020d81 mt76: mt7921: add MU EDCA cmd support
c062f6920356 mt76: mt7921: refactor mac.c to be bus independent
bfa909c833e8 mt76: mt7921: refactor dma.c to be pcie specific
6556bddf26d2 mt76: mt7921: refactor mcu.c to be bus independent
1c8418207c86 mt76: mt7921: refactor init.c to be bus independent
6cf8248c1a44 mt76: mt7921: add MT7921_COMMON module
77600b0c10ac mt76: connac: move mcu reg access utility routines in mt76_connac_lib module
65362a00d07d mt76: mt7663s: rely on mcu reg access utility
956206bb55c3 mt76: mt7921: make all event parser reusable between mt7921s and mt7921e
f0dedcf6aaf0 mt76: mt7921: use physical addr to unify register access
5079d5b0b13c mt76: sdio: move common code in mt76_sdio module
26257594398b mt76: sdio: introduce parse_irq callback
e353424f1b07 mt76: sdio: extend sdio module to support CONNAC2
ddab3dd25f94 mt76: connac: extend mcu_get_nic_capability
b2d9a1748a41 mt76: mt7921: rely on mcu_get_nic_capability
e6ce5d9cbda0 mt76: mt7921: refactor mt7921_mcu_send_message
ce3706a65ccd mt76: mt7921: introduce mt7921s support
3143118baf53 mt76: mt7921s: add reset support
645eac64bece mt76: mt76x0: correct VHT MCS 8/9 tx power eeprom offset
d54796787cb7 mt76: move mt76_sta_stats in mt76.h
094e085abf5a mt76: move mt76_ethtool_worker_info in mt76 module
f80ab6dde63d mt76: mt7915: run mt7915_get_et_stats holding mt76 mutex
4a11cb67dc27 mt76: mt7915: move tx amsdu stats in mib_stats
486da6fa2512 mt76: do not reset MIB counters in get_stats callback
d8837b7c8dcd mt76: mt7921: add some more MIB counters
5ffe086fcd1b mt76: mt7921: introduce stats reporting through ethtool
69154ae23f6b mt76: mt7921: add sta stats accounting in mt7921_mac_add_txs_skb
4b65fbc4e203 mt76: mt7921: move tx amsdu stats in mib_stats
35b8025f466b mt76: mt7921: add per-vif counters in ethtool
cfbbd861eb12 mt76: mt7915: enable HE UL MU-MIMO
a0b94987df80 mt76: mt7915: rework mt7915_mcu_sta_muru_tlv()
5fbb686e9c0c mt76: mt7915: fix missing HE phy cap
b649678c18ca mt76: mt7915: change max rx len limit of hw modules

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20 11:35:34 +02:00
Felix Fietkau e62c550470 mac80211: backport a few trivial patches
No functional changes, just some renames to make it easier to keep mt76 in
sync with upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20 11:35:34 +02:00
Jitao Lu 917126ff4c ncurses: add tmux terminfo
They're preferred terminal descriptions for tmux, with additional support to
some special characters and italic fonts. More info can be found at:
https://github.com/tmux/tmux/wiki/FAQ

Fixes: FS#3404

Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
2021-10-19 08:11:38 -10:00
David Bauer 43c64ffa74 hostapd: fix goto loop for ubus assoc handler
When a ubus event handler denies a association with a non-zero return
value, the code jumps to preceeding code, creating an endless loop until
the event handler accepts the assc request.

Move the ubus handler further up the code to avoid creating such a loop.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-19 17:27:05 +02:00
Stepan Henek c4e994011f wireguard-tools: add uci option to disable wireguard peers
Right now when I want to temporarily disable wg peer I need to delete
the entire peer section. This is not such a good solution because I
loose the previous configuration of the peer.

This patch adds `disabled` option to peer config which causes that
the config section is ignored.

Signed-off-by: Stepan Henek <stepan.henek@nic.cz>
[use $(AUTORELEASE)]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-18 12:14:36 -10:00
Stijn Tintel dbb0019cbe nftables: bump to 1.0.0
This introduces support for hardware flow offloading, which was added in
in nftables 0.9.9.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
2021-10-19 00:12:13 +02:00
Daniel Golle 333f93333e
procd: update to git HEAD
9b1e035 jail: netifd: code cosmetics
 d2a2ecc jail: netifd: fix error handling issue reported by coverity
 e1d7cee jail: netifd: check target netns fd before using it
 59f7699 uxc: add missing 'break' statement

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-17 21:58:47 +01:00
Andre Heider 7cb5af30f4 wolfssl: remove --enable-sha512 configure switch
It's the default anyway and this just looks confusing, as if it wasn't.

Switch to AUTORELEASE while at it.

The binary size is unchanged.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-17 16:30:12 +02:00
Andre Heider c76300707e wolfssl: always build with --enable-reproducible-build
This gates out anything that might introduce semantically frivolous jitter,
maximizing chance of identical object files.

The binary size shrinks by 8kb:
1244352 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f
1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-10-17 16:29:00 +02:00
Andre Heider 28d8e6a871 wolfssl: build with WOLFSSL_ALT_CERT_CHAINS
"Alternate certification chains, as oppossed to requiring full chain
validataion. Certificate validation behavior is relaxed, similar to
openssl and browsers. Only the peer certificate must validate to a trusted
certificate. Without this, all certificates sent by a peer must be
used in the trust chain or the connection will be rejected."

This fixes e.g. uclient-fetch and curl connecting to servers using a Let's
Encrypt certificate which are cross-signed by the now expired
DST Root CA X3, see [0].

This is the recommended solution from upstream [1].

The binary size increases by ~12.3kb:
1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f
1248704 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f

[0] https://github.com/openwrt/packages/issues/16674
[1] https://github.com/wolfSSL/wolfssl/issues/4443#issuecomment-934926793

Signed-off-by: Andre Heider <a.heider@gmail.com>
[bump PKG_RELEASE]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-17 16:25:10 +02:00
Florian Eckert b118efa0d2
buildsystem: add CONFIG_SECCOMP
Until now, this feature was switched on via the kernel configuration
option KERNEL_SECCOMP.

The follwing change a7f794cd2a now requires that
the package procd-seccomp must also enabled for buildinmg.

However, this is not the case we have no dependency and the imagebuilder
cannot build the image, because of the implicit package selection.

This change adds a new configuration option CONFIG_SECCOMP.
The new option  has the same behaviour as the configuration
option CONFIG_SELINUX.

If the CONFIG_SECCOMP is selected then the package procd-seccomp and
KERNEL_SECCOMP is enabled for this build.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-16 02:00:47 +01:00
David Bauer 0eed96ca5d hostapd: ubus: add BSS transtiton request method
The existing wnm_disassoc_imminent ubus method only supports issuing a
bss transition request with the disassoc imminent flag set.
For use-cases, where the client is requested to roam to another BSS
without a pending disassoc, this existing method is not suitable.

Add a new bss_transition_request ubus method, which provides a more
universal way to dispatch a transition request. It takes the following
arguments:

Required:
addr: String - MAC-address of the STA to send the request to (colon-seperated)

Optional:
abridged - Bool - Indicates if the abridged flag is set
disassociation_imminent: Bool - Whether or not the disassoc_imminent
                         flag is set
disassociation_timer: I32 - number of TBTTs after which the client will
                      be disassociated
validity_period: I32 - number of TBTTs after which the beacon
                 candidate list (if included) will be invalid
neighbors: blob-array - Array of strings containing neighbor reports as
           hex-string

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-13 22:55:45 +02:00
David Bauer a3de42e72c hostapd: ubus: add notification for BSS transition response
To allow steering daemons to be aware of the STA-decided transition
target, publish WNM transition responses to ubus. This way, steerings
daemons can learn about STA-chosen targets and send a better selection
of transition candidates.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-13 22:55:06 +02:00
Daniel Golle 213ce1d837
procd: update to git HEAD
97bcdcf uxc: fix segfault caused by use-after-free
 6398e05 uxc: don't free the stack
 324ebd0 jail: fs: add support for asymmetric mount bind
 c44ab7f jail: netifd: generate netifd uci config and mount it
 82dd390 jail: make use of per-container netifd via ubus

The new per-jail netifd is now configured by filtering the host
network configuration. As libuci is used for that, procd-ujail now
depends on libuci.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-13 00:40:29 +01:00
Daniel Golle c1685d92e4
netifd: update to git HEAD
be8cd8f interface: don't fork() to start jail interface
 7a048bd interface, ubus: rework netns up/down

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-13 00:40:23 +01:00
Felix Fietkau ade56b8d9e mt76: update to the latest version
83598c2e872f mt76: avoid possible infinite loop in mt76_tx_status_check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-12 14:45:09 +02:00
Felix Fietkau 9d994f35b4 mt76: update to the latest version
1af0242d1241 mt76: mt7915: replace a 64 bit divsion with a call to div_u64_rem

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-11 21:54:16 +02:00
Felix Fietkau af9d31aacc mac80211: remove kcov bits from TWT backport patch
Our backports version does not have support for kcov in mac80211
Fixes build errors on some platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-11 17:19:53 +02:00
Felix Fietkau 4f2fd0215b mt76: update to the latest version
74dedf9352c5 mt76: mt7615: fix skb use-after-free on mac reset
7201290eda43 mt76: mt7921: Fix out of order process by invalid event pkt
ca1b57e9971a mt76: mt7915: add a missing HT flag for GI parsing
4932c5d80153 of: net: pass the dst buffer to of_get_mac_address()
51d9eb3e6f52 mt76: mt7915: fix endianness warnings in mu radiotap
833ca13014ab mt76: mt7921: Add mt7922 support
8f8ed44d026e mt76: mt7915: add control knobs for thermal throttling
16f18bab6b11 mt76: mt7915: send EAPOL frames at lowest rate
affea639c586 mt76: mt7921: send EAPOL frames at lowest rate
ac00fed412d4 mt76: mt7915: fix potential overflow of eeprom page index [update]
e576ddb76dfa mt76: mt7915: switch proper tx arbiter mode in testmode
222847c3d5eb mt76: mt7915: fix bit fields for HT rate idx
d04814366c83 mt76: add support for setting mcast rate
4602acc9271a mt76: mt7921: fix dma hang in rmmod
ec2cf3bf96fd mt76: connac: fix GTK rekey offload failure on WPA mixed mode
2fdb9d621431 mt76: connac: add support for limiting to maximum regulatory Tx power
489ace63d42c mt76: mt7921: get rid of monitor_vif
22da8d28fcc8 mt76: mt7921: get rid of mt7921_mac_set_beacon_filter
c94130519786 mt76: mt7921: introduce mt7921_mcu_set_beacon_filter utility routine
51cff39d7ad3 mt76: overwrite default reg_ops if necessary
da11c1c6edef mt76: mt7615: move mt7615_mcu_set_p2p_oppps in mt76_connac module
47f50b0aa4b8 mt76: mt7921: report HE MU radiotap
4f48ba4b0254 mt76: mt7915: checkpatch cleanup
bc7ee7d7bdea mt76: mt7915: add HE-LTF into fixed rate command
6a19e40820aa mt76: mt7921: continue to probe driver when fw already downloaded
8b3d8e2de084 mt76: mt7921: fix firmware usage of RA info using legacy rates
17305a54b166 mt76: mt7921: fix kernel warning from cfg80211_calculate_bitrate
801c15577293 mt76: mt7921: fix endianness warnings in mt7921_mac_decode_he_mu_radiotap
0182a5b99a7a mt76: mt7915: update mac timing settings
e2ee9d0a33ed mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD
fa6504aceb4f Revert "mt76: mt7915: checkpatch cleanup"
56b842b72a72 mt76: mt7915: fix wmm index on DBDC cards
8044311f5de5 mt76: mt7915: fix potential NPE in TXS processing
28da4baec7c5 mt76: mt7915: fix he_mcs capabilities for 160mhz
f7088ebe7452 mt76: mt7915: add LED support
ee019046284d mt76: mt7915: introduce bss coloring support
9848094e4bb5 mt76: mt7921: Fix fall-through warning for Clang
5710d0643418 mt76: add a bound check in mt76_calculate_default_rate()
a509cf2b654e mt76: mt7921: move mt7921_queue_rx_skb to mac.c
5a0f2382fcfe mt76: mt7915: rework debugfs queue info
62ffc31f4d7b mt76: mt7915: rename debugfs tx-queues
4750b5c918e5 mt76: mt7921: always wake device if necessary in debugfs
ac6adf74b3f2 mt76: mt7921: update mib counters dumping phy stats
eb75b9266ce6 net🛜mt76: fix boolreturn.cocci warnings
d7c4698435b3 mt76: mt7921: fix the inconsistent state between bind and unbind
9dcfba3169c4 mt76: switch from 'pci_' to 'dma_' API
d8b5e42c9a73 mt76: fill boottime_ns in Rx path
8ee6446075f2 mt76: disable BH around napi_schedule() calls
e17d730bf2f6 mt76: mt7915: add LED support [update to v3]
80fe40c9457e mt76: mt7915: enable configured beacon tx rate
c8f0d1d81d05 mt76: mt7915: fix hwmon temp sensor mem use-after-free
3b9ba7e02076 mt76: mt7615: fix hwmon temp sensor mem use-after-free
5e82eceb45cb mt76: mt7921: start reworking tx rate reporting
eb66b5c9ff77 mt76: mt7921: add support for tx status reporting
c8010f170e76 mt76: mt7921: report tx rate directly from tx status
4dc7f3db572b mt76: mt7921: remove mcu rate reporting code
db89c6f86724 mt76: mt7921: remove mt7921_sta_stats
6bb8b4267dbe mt76: move spin_lock_bh to spin_lock in tasklet
0eacf41985da mt76: mt7915: honor all possible error conditions in mt7915_mcu_init()
4dfff296ee6e mt76: mt7915: fix possible infinite loop release semaphore
537ed88dd2d0 mt76: mt7921: robustify hardware initialization flow
e0b846159221 mt76: mt7921: fix retrying release semaphore without end
c55dedcea268 mt76: mt7915: add ethtool stats support
d1d5e8cd3a3e mt76: mt7915: add tx stats gathered from tx-status callbacks
1687189d68b7 mt76: mt7915: add some per-station tx stats to ethtool
f4dde5f765af mt76: mt7915: add tx mu/su counters to mib
9752bf0643c9 mt76: mt7915: add more MIB registers
4727415017c9 mt76: mt7915: add mib counters to ethtool stats
4ca80a749e7f mt76: connac: set 6G phymode in mt76_connac_get_phy_mode{,v2}
3f2a5d39631e mt76: connac: enable 6GHz band for hw scan
817a41826bd7 mt76: connac: add 6GHz support to mt76_connac_mcu_set_channel_domain
a6ab81c21080 mt76: connac: set 6G phymode in single-sku support
ca4f47028a44 mt76: connac: add 6GHz support to mt76_connac_mcu_sta_tlv
d2e192ea81e2 mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss
c3dd12b4c8ae mt76: connac: enable hw amsdu @ 6GHz
91ed2b256c20 mt76: add 6GHz support
de8c4f92621f mt76: mt7921: add 6GHz support
f143aedc1d57 mt76: introduce packet_id idr
bcc8d9e03a5d mt76: remove mt76_wcid pointer from mt76_tx_status_check signature
ccbd84763153 mt76: substitute sk_buff_head status_list with spinlock_t status_lock
69bb59df894c mt76: schedule status timeout at dma completion
03a992645310 mt76: support reading EEPROM data embedded in fdt
75615480b3fe mt76: introduce __mt76_mcu_send_firmware routine
e8e2eae41f94 mt76: drop MCU header size from buffer size in __mt76_mcu_send_firmware
4c455e8b1a20 mt76: mt7915: introduce __mt7915_get_tsf routine
9d49c611a2d7 mt76: mt7915: introduce mt7915_mcu_twt_agrt_update mcu command
f44ca79c9aed mt76: mt7915: introduce mt7915_mac_add_twt_setup routine
2f9555a2f18f mt76: mt7915: enable twt responder capability
440e2db8d541 mt76: mt7915: add twt_stats knob in debugfs
eb5f640f8afa mt76: debugfs: improve queue node readability
53d7eb3b4884 mt76: mt7615: fix monitor mode tear down crash
2aa3d4414826 mt76: mt7921: add delay config for sched scan
47e8e96e8e4d mt76: use a separate CCMP PN receive counter for management frames
5560b08f8e2d mt76: do not access 802.11 header in ccmp check for 802.3 rx skbs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-11 13:27:19 +02:00
Felix Fietkau 978e822db3 mac80211: backport AP mode TWT support
Required for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-11 13:27:19 +02:00
Christian Lamparter 80b7a8a7f5 Revert "gpio-cdev: add nu801 userspace driver"
This reverts commit f536f5ebdd.

As Hauke commented, this causes builder failures on 5.4 kernels.
This revert includes changes to the mx100 kernel modules
dependency as well as the uci led definitions.

Tested-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-10 23:15:05 +02:00
Chris Blake f536f5ebdd gpio-cdev: add nu801 userspace driver
This adds a userspace interpretation of the nu801 driver used by Meraki
hardware. Previously this was a driver that was added per target, but as
multiple targets now have this driver, we should move to something that
can be shared by all targets since no driver exists upstream.

Co-developed-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-10 16:47:41 +02:00
Adrian Schmutzler 91eed5d9fb rockchip: rename "Rock Pi 4" to "Rock Pi 4A"
Kernel has added the different variants of the Rock Pi 4 in commit
b5edb0467370 ("arm64: dts: rockchip: Mark rock-pi-4 as rock-pi-4a
dts"). The former Rock Pi 4 is now Rock Pi 4A.

For compatibility with kernel 5.4, this rename has been held back
so far. Having switched to kernel 5.10 now, we can finally apply
it in our tree as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-10 00:57:56 +02:00
Ronny Kotzschmar 72bfc35f8f umdns: add missing syscalls to seccomp filter
The 'mmap', 'mmap2', 'munmap' syscalls are missing.
Found with 'utrace /usr/sbin/umdns'.

Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
2021-10-07 23:21:59 -10:00
Stijn Tintel b4a3c20aa4 kernel: drop kmod-gpio-dev
The GPIO_DEVICE symbol belonged to a custom driver that was removed from
OpenWrt in 2012. The symbol never existed in the upstream kernel.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-10-05 23:30:48 +03:00
Hannu Nyman 9fb038ca64 busybox: update to 1.34.1
Update busybox to version 1.34.1, which is a minor
maintenance release. It contains just the two post-1.34.0
upstream patches that we earlier backported plus a few fixes
to awk.

* Remove the two backported upstream patches that are
  now unnecessary.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-05 20:59:32 +02:00
Daniel Golle b6da10f2d1
uboot-mediatek: update to 2021.10
U-Boot 2021.10 has been released.
Rebase mediatek patches on top of new release and remove some patches
which have been merged upstream.

Tested on Bananapi BPi-R2 (mt7623), Bananapi BPi-R64 (mt7622) and
Linksys E8450 (mt7622).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-04 20:46:30 +01:00
Paul Fertser ed7769aa40 dnsmasq: add explicit "set:" for client-matching options
Bring the usage in line with the dnsmasq man page and the other options
where set: is mandatory.

No functional change.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-10-03 21:48:16 +02:00
Adrian Schmutzler 53d19bb8cf treewide: use AUTORELEASE on all uboot-* packages
Nobody ever updates PKG_RELEASE when changing devices or setup in
the various uboot-* packages. Use $(AUTORELEASE) so we still have
proper versioning there.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-02 21:26:12 +02:00
Rafał Miłecki c4d5e60f61 bcm4908img: detect Linksys images
Linksys uses an extra 0x100 bytes long tail for BCM4908 images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-02 20:26:42 +02:00
Rafał Miłecki 063038bcef bcm4908img: store offset of tail data
This simplifies some operations as it doesn't have to be caculated over
and over. It will also allow adding support for more vendor formats.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-02 20:26:42 +02:00
Robert Marko 78cf3e53b1 mvebu: add Globalscale MOCHAbin
Globalscale MOCHAbin is a Armada 7040 based development board.

Specifications:
* Armada 7040 Quad core ARMv8 Cortex A-72 @ 1.4GHz
* 2 / 4 / 8 GB of DDR4 DRAM
* 16 GB eMMC
* 4MB SPI-NOR (Bootloader)
* 1x M.2-2280 B-key socket (for SSD expansion, SATA3 only)
* 1x M.2-2250 B-key socket (for modems, USB2.0 and I2C only)
* 1x Mini-PCIe 3.0 (x1, USB2.0 and I2C)
* 1x SATA 7+15 socket (SATA3)
* 1x 16-pin (2×8) MikroBus Connector
* 1x SIM card slot (Connected to the mini-PCIe and both M.2 slots)
* 2x USB3.0 Type-A ports via SMSC USB5434B hub
* Cortex 2x5 JTAG
* microUSB port for UART (PL2303GL/PL2303SA onboard)
* 1x 10G SFP+
* 1x 1G SFP (Connected to 88E1512 PHY)
* 1x 1G RJ45 with PoE PD (Connected to 88E1512 PHY)
* 4x 1G RJ45 ports via Topaz 88E6141 switch
* RTC with battery holder (SoC provided, requires CR2032 battery)
* 1x 12V DC IN
* 1x Power switch
* 1x 12V fan header (3-pin, power only)
* 1x mini-PCIe LED header (2x0.1" pins)
* 1x M.2-2280 LED header (2x0.1" pins)
* 6x Bootstrap jumpers
* 1x Power LED (Green)
* 3x Tri-color RGB LEDs (Controllable)
* 1x Microchip ATECC608B secure element

Note that 1G SFP and 1G WAN cannot be used at the same time as they are in
parallel connected to the same PHY.

Installation:

Copy dtb from build_dir to bin/ and run tftpserver there:
$ cp ./build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/image-armada-7040-mochabin.dtb bin/targets/mvebu/cortexa72/
$ in.tftpd -L -s bin/targets/mvebu/cortexa72/

Connect to the device UART via microUSB port and power on the device.

Power on the device and hit any key to stop the autoboot.

Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g:
$ setenv serverip 192.168.1.10 # Host
$ setenv ipaddr 192.168.1.15 # Device

Set the ethernet device (Example for the 1G WAN):
$ setenv ethact mvpp2-2

Ping server to confirm network is working:
$ ping $serverip
Using mvpp2-2 device
host 192.168.1.15 is alive

Tftpboot the firmware:
$ tftpboot $kernel_addr_r openwrt-mvebu-cortexa72-globalscale_mochabin-initramfs-kernel.bin
$ tftpboot $fdt_addr_r image-armada-7040-mochabin.dtb

Boot the image:
$ booti $kernel_addr_r - $fdt_addr_r

Once the initramfs is booted, transfer openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz
to /tmp dir on the device.

Gunzip and dd the image:
$ gunzip /tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz
$ dd if=/tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img of=/dev/mmcblk0 && sync

Reboot the device.

Hit any key to stop the autoboot.

Reset U-boot env and set the bootcmd:
$ env default -a
$ setenv bootcmd 'load mmc 0 ${loadaddr} boot.scr && source ${loadaddr}'

Optionally I would advise to edit the console env variable to remove earlycon as that
causes the kernel to never use the driver for the serial console.
Earlycon should be used only for debugging before the kernel can configure the console
and will otherwise cause various issues with the console.

$ setenv console 'console=ttyS0,115200'

Save and reset
$ saveenv
$ reset

OpenWrt should boot from eMMC now.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-02 16:45:35 +02:00
Alan Swanson 8db6410492 uboot-lantiq: fix sha1.h header clash when system libmd installed
Backport of u-boot commit "includes: move openssl headers to include/u-boot"
2b9912e6a7

Fixes: FS#3955
Signed-off-by: Alan Swanson <reiver@improbability.net>
2021-10-02 13:33:46 +02:00
Daniel Golle 454e411a77 uboot-mediatek: fix and make use of LEDs on BPi-R2
Fix BPi-R2 GPIO LEDs to indicate boot into production or recovery
firmware in DTS and define them in default environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-09-30 22:49:55 +01:00
Felix Fietkau fa13dd658f netifd: update to the latest version
186f6eaeba70 wireless: display log messages for setup/teardown/retry
fac471c4934a wireless: process and close script file descriptor when rerunning setup
62e2bb56f48e main: poll process log stream even if processes are killed
0e311d3f2d1a wireless: reset number of retries on config change
e467e0ff44c0 wireless: reset retry counter when setup succeeds
448ffc154fe7 wireless: fix index for stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-30 11:33:37 +02:00
Felix Fietkau 42dda0ed3e mac80211: allow retry of wifi setup if an iw interface add command fails
In some cases, spurious failures might be cleared by teardown and retry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-30 11:33:37 +02:00
Rosen Penev 585cef5f1a cryptodev-linux: update to 1.12
Remove upstream backport.

Use AUTORELEASE for simplicity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-29 22:56:59 +02:00
Stijn Tintel 0e30276632 kernel: add missing symbol to kmod-kvm
Even though TRACEPOINTS is not enabled in my kernel config, my build
fails due to KVM_MMU_AUDIT being missing. Add this symbol to kmod-kvm to
fix this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-09-29 19:17:55 +03:00
Stijn Tintel 73a2570fa0 kernel: order kmod-kvm symbols alphabetically
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-09-29 19:17:55 +03:00
Felix Fietkau 9c3b1d5563 netifd: update to the latest version
4d0c2ad3fd26 wireless: fix applying wireless devices attributes on hotplug events

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-28 14:27:34 +02:00
Felix Fietkau 6cd54254e4 netifd: update to the latest version
5a4ac30c7a15 netifd: rework/fix device free handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-27 19:00:28 +02:00
Felix Fietkau 2bfac61483 mac80211: backport support for BSS color changes
This is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-25 09:38:37 +02:00
Jesus Fernandez Manzano 5269c47e8d hostapd: fix segfault when deinit mesh ifaces
In hostapd_ubus_add_bss(), ubus objects are not registered for mesh
interfaces. This provokes a segfault when accessing the ubus object in
mesh deinit.

This commit adds the same condition to hostapd_ubus_free_bss() for
discarding those mesh interfaces.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
2021-09-24 12:32:19 +02:00
Paul Spooren 70543aafb2 base-files: reduce number of `mkdir` calls
The `mkdir` commands supports passing multiple arguments to batch create
multiple folders, instead of calling the tool every single time.

If the creation of one of the folders fails, all other folder are still
created and therefore doesn't change the error handling.

Also stop creating `/etc/` explicitly after subfolders of `/etc/` were
already created.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-23 21:40:52 -10:00
Paul Spooren 9c331a6a91 base-files: reduce `sed` calls
The `sed`-script shouldn't be called multiple times, especially not with
the same files.

This commit merges all files together in a single `sed`-script call.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-23 21:39:46 -10:00
Rosen Penev 67cd648fa2 restool: add back PKG_VERSION
For some reason, the build system chops off the last number from the version,
which is not correct. Add it back.

Update hash.

Fixes: 96c7164acd ("restool: update to LSDK-20.12")

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-23 23:20:42 +02:00
Sven Eckelmann 8b09070820 ipq-wifi: Work around Plasma Cloud PA1200 5GHz crash
It was noticed [1] that the ath10k firmware crashes on 5GHz since OpenWrt
21.02.0. The problem seems to be triggered by the the nonLinearTxFir field
in the 5GHz BDF. If baseEepHeader.nonLinearTxFir (offset 0xc2) is 1 then
the firmware just crashes when setting up the 5Ghz radio using `ifconfig
wlan1 up`:

  ath10k_ahb a800000.wifi: firmware crashed! (guid 9e36ee82-4d2c-4c63-b20b-609a1eaca30c)
  ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
  ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
  ath10k_ahb a800000.wifi: firmware ver 10.4-3.6-00140 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 ba79b746
  ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 5f400efc
  ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1
  ath10k_ahb a800000.wifi: firmware register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0000000B 0x000015B3 0x009C3C27 0x00975B31
  ath10k_ahb a800000.wifi: [04]: 0x009C3C27 0x00060530 0x00000018 0x004176B8
  ath10k_ahb a800000.wifi: [08]: 0x00405A50 0x00412A30 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [12]: 0x00000009 0x00000000 0x009B9742 0x009B974F
  ath10k_ahb a800000.wifi: [16]: 0x00971238 0x009B9742 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [20]: 0x409C3C27 0x004053DC 0x00000D2C 0x00405A60
  ath10k_ahb a800000.wifi: [24]: 0x809C3E13 0x0040543C 0x00000000 0xC09C3C27
  ath10k_ahb a800000.wifi: [28]: 0x809B9AC5 0x0040547C 0x00412A30 0x0040549C
  ath10k_ahb a800000.wifi: [32]: 0x809B8ECD 0x0040549C 0x00000001 0x00412A30
  ath10k_ahb a800000.wifi: [36]: 0x809B8FF3 0x004054CC 0x00412838 0x00000014
  ath10k_ahb a800000.wifi: [40]: 0x809BEF98 0x0040551C 0x0041627C 0x00000002
  ath10k_ahb a800000.wifi: [44]: 0x80986D47 0x0040553C 0x0041627C 0x00416A88
  ath10k_ahb a800000.wifi: [48]: 0x809CBB0A 0x0040559C 0x0041ACC0 0x00000000
  ath10k_ahb a800000.wifi: [52]: 0x809864EE 0x0040560C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: [56]: 0x809CA8A4 0x0040564C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: Copy Engine register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0004a000  14  14   3   3
  ath10k_ahb a800000.wifi: [01]: 0x0004a400  16  16  22  23
  ath10k_ahb a800000.wifi: [02]: 0x0004a800   3   3   2   3
  ath10k_ahb a800000.wifi: [03]: 0x0004ac00  15  15  15  15
  ath10k_ahb a800000.wifi: [04]: 0x0004b000   4   4  44   4
  ath10k_ahb a800000.wifi: [05]: 0x0004b400   3   3   2   3
  ath10k_ahb a800000.wifi: [06]: 0x0004b800   1   1   1   1
  ath10k_ahb a800000.wifi: [07]: 0x0004bc00   1   1   1   1
  ath10k_ahb a800000.wifi: [08]: 0x0004c000   0   0 127   0
  ath10k_ahb a800000.wifi: [09]: 0x0004c400   0   0   0   0
  ath10k_ahb a800000.wifi: [10]: 0x0004c800   0   0   0   0
  ath10k_ahb a800000.wifi: [11]: 0x0004cc00   0   0   0   0
  ath10k_ahb a800000.wifi: failed to update channel list: -108
  ath10k_ahb a800000.wifi: failed to set pdev regdomain: -108
  ath10k_ahb a800000.wifi: failed to create WMI vdev 0: -108
  ieee80211 phy1: Hardware restart was requested

Since no actual solution is known (besides downgrading the ath10k firmware)
it seems to be better to disable the nonLinearTxFir for now.

[1] https://lore.kernel.org/ath10k/3423718.UToCqzeSYe@ripper/

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-23 20:50:58 +02:00