aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
Commit message (Collapse)AuthorAgeFilesLines
* kernel: bpf-headers: fix build error when testing kernel is usedAnsuel Smith2022-02-061-0/+3
| | | | | | | | | | | | Now that we have separate files for each kernel version, only the version/hash for the target kernel are available. This cause a missing hash error (and wrong kernel version) for bpf-headers when a testing kernel version is used for the current target. Fix this error by manually including the kernel version/hash file for the specific kernel version requested. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* kernel: usb: remove left-over LINUX_5_10 dependency symbolChristian Lamparter2022-02-041-1/+1
| | | | | | | | this should have been removed together with linux 5.4 APM821XX support. Currently, this didn't hurt or broke something. But it will in the next stable kernel release. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* bpf-headers: fix build error from within the SDKFelix Fietkau2022-02-041-0/+1
| | | | | | | | The SDK does not ship the generic platform files. Use relative path for GENERIC_PLATFORM_DIR to make it work. This points it at the files from the feed directory instead of the base SDK path Signed-off-by: Felix Fietkau <nbd@nbd.name>
* om-watchdog: Drop unused packageSven Eckelmann2022-02-033-87/+0
| | | | | | | All devices which used this package migrated to the kernel GPIO-line watchdog driver and configure it over their DT. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* mt76: update to the latest versionFelix Fietkau2022-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 833b9d7fcf7f mt76: allow drivers to drop rx packets early f703084f31cb mt76: mt7915: process txfree and txstatus without allocating skbs 047b9a9e78b3 mt76: mt7615: in debugfs queue stats, skip wmm index 3 on mt7663 fea36e02075c mt76: only kick tx queue if frames were queued 8381e54ebfb5 linux-firmware: update firmware for MT7921 WiFi device d57dadb8c861 Revert "mt76: only kick tx queue if frames were queued" 3a21d6e2153b mt76: mt7663: disable 4addr capability f1d66cf7a6c5 mt76: connac: fix possible NULL pointer dereference in mt76_connac_get_phy_mode_v2 c9a4146404d4 sync with upstream 4ed8c910b94e mt76: mt7921: fix possible resume failure bf105aa6cd2f mt76: mt7921: fix network buffer leak by txs missing e2b454b6fb30 mt76: connac: introduce MCU_EXT macros 5a87f5497c9b mt76: connac: align MCU_EXT definitions with 7915 driver 720ddc32507d mt76: connac: remove MCU_FW_PREFIX bit da5128a59eda mt76: connac: introduce MCU_UNI_CMD macro 116109bee7cb mt76: connac: introduce MCU_CE_CMD macro f96fbdf038d5 mt76: connac: rely on MCU_CMD macro 922f0d408413 mt76: mt7915: rely on mt76_connac definitions b4ae1da1d1e0 mt76: mt7921: reduce log severity levels for informative messages db105a722b87 mt76: mt7921s: make pm->suspended usage consistent e2cc063238c0 mt76: mt7921s: fix suspend error with enlarging mcu timeout value 812b73f2f1e0 mt76: mt7915: introduce mt76_vif in mt7915_vif b041a8a30055 mt76: mt7915: add mu-mimo and ofdma debugfs knobs b851a3e7839d mt76: mt7921: remove dead definitions 266c7a9f2994 mt76: connac: rely on le16_add_cpu in mt76_connac_mcu_add_nested_tlv 19cc7d83190c mt76: mt7921: clear pm->suspended in mt7921_mac_reset_work 928c4550e413 mt76: mt7921s: make pm->suspended usage consistent [update] 8d6c68a7d0d1 mt76: mt7921: fix possible resume failure [update] 26fb105e538c mt76: mt7921s: fix cmd timeout in throughput test 9db482264389 mt76: mt7921: fix build regression 3edb87cdf138 mt7915: formatting change to sync with upstream 5cad38ba247d mt76: mt7915: add mt7915_mmio_probe() as a common probing function 15f9f88b362a mt76: mt7915: refine register definition de49cf43ef34 mt76: add MT_RXQ_MAIN_WA for mt7916 6032c35f1306 mt76: mt7915: rework dma.c to adapt mt7916 changes 074d7c5381ed mt76: mt7915: add firmware support for mt7916 27b3253318e7 mt76: mt7915: rework eeprom.c to adapt mt7916 changes 030540246088 mt76: mt7915: enlarge wcid size to 544 400129c69f91 mt76: mt7915: add txfree event v3 cbbb3f65fcd0 mt76: mt7915: update rx rate reporting for mt7916 eb51c4deef0e mt76: mt7915: update mt7915_chan_mib_offs for mt7916 fb4709222028 mt76: mt7915: add mt7916 calibrated data support e758feeaf1d6 mt76: mt7915: add device id for mt7916 115ea27a5cab mt76: connac: fix sta_rec_wtbl tag len b3f922266685 mt76: mt7915: rely on mt76_connac_mcu_alloc_sta_req bac5eda1f5b2 mt76: mt7915: rely on mt76_connac_mcu_alloc_wtbl_req b44485d5c8ac mt76: mt7915: rely on mt76_connac_mcu_add_tlv routine 9cc58e254d53 mt76: connac: move mt76_connac_mcu_get_cipher in common code 60dcd9f09ff6 mt76: connac: move mt76_connac_chan_bw in common code a8d0b7d0cc60 mt76: mt7915: rely on mt76_connac_get_phy utilities 4441db30c1c1 mt76: connac: move mt76_connac_mcu_add_key in connac module 794b6f18d0fb mt76: mt7915: fix code defect 9d2a01b6cb60 mt76: set wlan_idx_hi on mt7916 2c89977b32c2 mt76: mt7915: fix kernel build warning 6c4874839830 mt76: make mt76_sar_capa static 215fdcc7ca6c mt76: mt7915: use proper aid value in mt7915_mcu_wtbl_generic_tlv in sta mode bc254718b40e mt76: mt7915: use proper aid value in mt7915_mcu_sta_basic_tlv 22fcff5ff21a mt76: sdio: lock sdio when it is needed 4669882aa595 mt76: mt7921s: clear MT76_STATE_MCU_RUNNING immediately after reset 944545855e0f mt76: mt7921s: update mt7921s_wfsys_reset sequence 854c8d076a34 mt76: mt7915: move pci specific code back to pci.c a77da27796f2 mt76: mt7915: fix warning: variable 'base' is used uninitialized 7b5e69961c71 mt76: mt7915: fix warning: variable 'flags' set but not used b5138e7b89f9 mt76: mt7921: fix a possible race enabling/disabling runtime-pm af218fbe2500 linux-firmware: update firmware for MT7921 WiFi device 31c19c467950 mt76: mt7915: remove duplicated defs in mcu.h 9198eca1b16f mt76: connac: move mt76_connac_mcu_bss_omac_tlv in connac module 829d87a93a51 mt76: connac: move mt76_connac_mcu_bss_ext_tlv in connac module 50956cf17901 mt76: connac: move mt76_connac_mcu_bss_basic_tlv in connac module bda40f4e1d5e mt76: mt7915: rely on mt76_connac_mcu_sta_ba_tlv 4728939c1d48 mt76: mt7915: rely on mt76_connac_mcu_wtbl_ba_tlv e3ae1828068b mt76: mt7915: rely on mt76_connac_mcu_sta_ba d9e9989eca07 mt76: mt7915: rely on mt76_connac_mcu_wtbl_generic_tlv 168713595fff mt76: mt7915: rely on mt76_connac_mcu_sta_basic_tlv 60394d3e3504 mt76: mt7915: rely on mt76_connac_mcu_sta_uapsd 3a79454d078d mt76: mt7915: rely on mt76_connac_mcu_wtbl_smps_tlv 9ae9aa6c1aea mt76: mt7915: rely on mt76_connac_mcu_wtbl_ht_tlv fd8cdfab91e4 mt76: mt7915: rely on mt76_connac_mcu_wtbl_hdr_trans_tlv a92024c5a5b5 mt76: connac: move mt76_connac_mcu_wtbl_update_hdr_trans in connac module 6dc585a3a274 mt76: connac: introduce is_connac_v1 utility routine 0f29d2aa5a72 mt76: connac: move mt76_connac_mcu_set_pm in connac module dcf408ff8a5e mt76: mt7921: get rid of mt7921_mcu_get_eeprom 77b2a8601fc1 mt76: mt7915: rely on mt76_connac_mcu_start_firmware 65f78dee243a mt76: connac: move mt76_connac_mcu_restart in common module 5adf5b14040b mt76: mt7915: rely on mt76_connac_mcu_patch_sem_ctrl/mt76_connac_mcu_start_patch 69bf1dabe78f mt76: mt7915: rely on mt76_connac_mcu_init_download 951b1ddd370e mt76: connac: move mt76_connac_mcu_gen_dl_mode in mt76-connac module 0826b3992238 mt76: mt7915: rely on mt76_connac_mcu_set_rts_thresh 058de6d36fa9 mt76: connac: move mt76_connac_mcu_rdd_cmd in mt76-connac module aafda86aed2b mt76: mt7921e: make dev->fw_assert usage consistent def12bef91a3 mt76: mt7921: forbid the doze mode when coredump is in progress 009414d27d37 mt76: mt76_connac: fix MCU_CE_CMD_SET_ROC definition error 3c5856eca223 mt76: mt7921: set EDCA parameters with the MCU CE command 01a3d73b452e mt76: mt7615: fix a possible race enabling/disabling runtime-pm 123ed864d1ae mt76: mt7921e: process txfree and txstatus without allocating skbs 018f98abba68 mt76: connac: add support for passing the cipher field in bss_info 288e7443e35c mt76: mt7615: update bss_info with cipher after setting the group key 36e1577cb3d3 mt76: mt7915: update bss_info with cipher after setting the group key d42590d8fcc8 mt76: make cipher in struct mt76_vif u8 instead of enum 11602b8505c6 mt76: mt7615e: process txfree and txstatus without allocating skbs 2ef775c10bd3 linux-firmware: add firmware for MT7916 976ea3879730 mt76: mt7915: add support for passing chip/firmware debug data to user space d11bd7bd83f4 tools: add support for sending firmware debug data via udp dc8e2e8dcd34 mt76: mt7921: do not always disable fw runtime-pm 7063127f852b mt76: mt7921: fix a leftover race in runtime-pm f78f4334b0b2 mt76: mt7615: fix a leftover race in runtime-pm f1f94d19c160 mt76: mt7915: fix ht mcs in mt7915_mac_add_txs_skb() c2ff2f0d6d19 mt76: mt7921: fix ht mcs in mt7921_mac_add_txs_skb() 3e7954a0b32e mt76: mt7921s: fix mt7921s_mcu_[fw|drv]_pmctrl 3c2cc9034376 mt76: mt7921e: fix possible probe failure after reboot f7f6c6dcc6eb mt76: mt7921: fix crash when startup fails. 8656198c925b mt76: sdio: disable interrupt in mt76s_sdio_irq 6204d61ab821 mt76: mt7921: fix endianness issues in mt7921_mcu_set_tx() 68c5aa56f5f2 mt76: mt7921: toggle runtime-pm adding a monitor vif 541e4e8d3c3e mt76: mt7915: set bssinfo/starec command when adding interface 78770f741af9 mt76: mt7915: introduce mt7915_set_radar_background routine 93c03778f92e mt76: mt7915: enable radar trigger on rdd2 4c76a6c3a1f2 mt76: mt7915: introduce rdd_monitor debugfs node 5b94045f927e mt76: mt7915: report radar pattern if detected by rdd2 22094b27ff6a mt76: mt7915: enable radar background detection 4282ca57a143 mt76: connac: move mt76_connac_lmac_mapping in mt76-connac module 0f16c67657a2 mt76: mt7915: add missing DATA4_TB_SPTL_REUSE1 to mt7915_mac_decode_he_radiotap 9a16d33311a7 mt76: mt7921: remove duplicated code in mt7921_mac_decode_he_radiotap 639b55fdc95e mt76: mt7615: add support for LG LGSBWAC02 (MT7663BUN) ebbd2717a16e mt76: mt7663s: flush runtime-pm queue after waking up the device 37c3bf2256de mt76: mt7603: check sta_rates pointer in mt7603_sta_rate_tbl_update 96959bd15eef mt76: mt7615: check sta_rates pointer in mt7615_sta_rate_tbl_update 4e42e55ce636 mt76: stop the radar detector after leaving dfs channel 8b32439d5a86 mt76: mt7915: fix possible memory leak in mt7915_mcu_add_sta b4e6f0d6f15a mt76: mt7921s: fix a possible memory leak in mt7921_load_patch 15398f1e8385 mt76: mt7915: fix mcs_map in mt7915_mcu_set_sta_he_mcs() 607eda6eb032 mt76: mt7915: update max_mpdu_size in mt7915_mcu_sta_amsdu_tlv() 69d20f2e6cb0 mt76: mt7915: fix the nss setting in bitrates c3ffa536249a mt76: sdio: honor the largest Tx buffer the hardware can support e3e3562f8fa0 mt76: mt7921s: run sleep mode by default 553200cf63fd firmware: update mt7662 firmware to version 2.3 20d1fed838b9 mt76x02: improve mac error check/reset reliability 9b2ac62d6f31 mt76: mt76x02: improve tx hang detection fae295af31eb mt76: mt7915: fix/rewrite the dfs state handling logic e0f9479bf893 mt76: mt7615: fix/rewrite the dfs state handling logic 822e1135e7e1 mt76: mt76x02: use mt76_phy_dfs_state to determine radar detector state f8c0ed1e6bdf mt76: do not always copy ethhdr in reverse_frag0_hdr_trans ab9b8078427a mt76: dma: initialize skip_unmap in mt76_dma_rx_fill Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: backport support for background radar detectionFelix Fietkau2022-02-039-12/+1627
| | | | | | Will be used in an upcoming mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: backport MBSSID/EMA support patchesFelix Fietkau2022-02-033-16/+771
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: reorganize patchesFelix Fietkau2022-02-0312-0/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: backport support for ndo_fill_forward_pathFelix Fietkau2022-02-031-0/+172
| | | | | | Will be used in an upcoming mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
* netfilter: add kmod-nft-compatEtienne Champetier2022-02-021-0/+11
| | | | | | This modules is required by iptables-nft Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* kernel: add kmod-vrfMarek BehĂșn2022-02-011-0/+17
| | | | | | | | | | | Add option to compile kmod-vrf, support for Virtual Routing and Forwarding (Lite). This module depends on NET_L3_MASTER_DEV, which is a boolean kernel option, so we need to create a configuration option also for this, and make kmod-vrf depend on it. Signed-off-by: Marek BehĂșn <kabel@kernel.org>
* kernel: Make kmod-usb-net-lan78xx depend on kmod-of-mdioHauke Mehrtens2022-02-011-1/+1
| | | | | | | kmod-usb-net-lan78xx depends on kmod-of-mdio when this package is activated. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* netfilter: correct some dependenciesTiago Gaspar2022-01-271-2/+2
| | | | | | | | | | | | nf-nathelper-extra and nf-conntrack-netlink had iptables related dependencies, yet, when looking for the respective kernel symbols and checking it's dependencies it was confirmed that iptables wasn't required and that these were either it's own moodule or tool independent (nftables or iptables). Correct these and make sure no unneeded extras are pulled in. Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
* ltq-vdsl-mei: Remove static linkingHauke Mehrtens2022-01-211-0/+47
| | | | | | | | | This removes -static compile option. The -static option tells GCC to link this statically with the libc, which we do not want in OpenWrt. We want to link everything dynamically to the libc. This fixes a compile problem with glibc. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: add missing kmod+regmap-i2c dependency for NCT7802Y moduleChristian Lamparter2022-01-151-1/+1
| | | | | | | | | | x86, mt7623 and others buildbot failed due to: |Package kmod-hwmon-nct7802 is missing dependencies for the following libraries: |regmap-core.ko |regmap-i2c.ko Fixes: 1ed50b92d157 ("package: kernel: add driver module for NCT7802Y") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mvebu: cortexa9: Add support for Ctera C200-V2Pawel Dembicki2022-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2-Bay NAS - maximum two 3.5" Harddisks Hardware: - SoC: Marvell 88F6707-A1 ARMv7 Processor 1,2GHz (ARMADA 370 SoC) - Ram: 1GB (2x Nanya NT5CC512M8DN-D1) - NAND Flash: 256MB (ESMT F59L2G81A-25T) - Lan: 1x GBE (Marvell 88E1318-NNB2) - Storage: 2x SATA HDD 3.5" Slot - USB: 2x USB 3.0 port (Renesas uPD720202) - Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND) - LEDs: 13x GPIO controlled - Buttons: 2x GPIO controlled Known issues: - Buzzer is unused due lack of proper driver - USB1/2 usbport ledtrigger won't work (through DT) - Renesas uPD720202 requires firmware file. It's possible to find non-free binary. Please look for 'UPDATE.mem' file and put in into '/lib/firmware/renesas_usb_fw.mem' file. Installation: - Apply factory initramfs image via stock web-gui. - Do sysupgrade to make installation complete. Back to stock: - OpenWrt rootfs partition use unused space after stock firmware. - Full revert is possible. - Login via ssh and run: ## ctera_c200-v2_back_to_factory start ## . /lib/functions.sh part=$(find_mtd_part "active_bank") active_bank=$(strings "$part" | grep bank) if [ "$active_bank" = "bank1" ]; then echo "bank2" > /tmp/change_bank else echo "bank1" > /tmp/change_bank fi mtd write /tmp/change_bank active_bank reboot ## ctera_c200-v2_back_to_factory end ## Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> (put back-to-stock script into commit message, removed dup. SUBPAGESIZE var, added 01_leds for non-working dt-usb-port trigger) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* package: kernel: add driver module for NCT7802YPawel Dembicki2022-01-151-0/+15
| | | | | | | | | | | | This commit add package with hwmon-nct7802 module. This driver implements support for the Nuvoton NCT7802Y hardware monitoring chip. NCT7802Y supports 6 temperature sensors, 5 voltage sensors, and 3 fan speed sensors. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> (fixed c&p'ed module description) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: add kmod-usb-net-lan78xxJosef Schlehofer2022-01-081-0/+17
| | | | | | | | | | | | | | | | | Add kernel module for Microchip LAN78XX based USB 2 & USB 3 10/100/1000 Ethernet adapters. [1] This kernel module is required for the Seeed Studio's Mini Router based on RPI CM4 [2]. [1] <https://cateee.net/lkddb/web-lkddb/USB_LAN78XX.html> [2] <https://www.seeedstudio.com/Dual-GbE-Carrier-Board-with-4GB-RAM-32GB-eMMC-RPi-CM4-Case-p-5029.html> Link: <https://github.com/openwrt/openwrt/pull/4893> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> (added kmod-phy-microchip and kmod-fixed-phy dependencies, rpi3 needs lan78xx but has it built-in) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: provide kmod-fixed-phy as separate kmodChristian Lamparter2022-01-081-2/+17
| | | | | | | | | | Almost all targets have the fixed-phy feature built into the kernel. One big exception is x86. This caused a problem with the upcoming LAN78xx usb driver. Hence this patch breaks out the fixed-phy from of_mdio (which didn't include the .ko) and puts into a separate module. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: add kmod-phy-microchipChristian Lamparter2022-01-081-0/+15
| | | | | | | | phy drivers for Microchip's LAN88xx PHYs. This is needed for the "LAN7801" variant of the upstream lan78xx usb ethernet driver. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* linux-firmware: add new package r8152-firmwareMarty Jones2022-01-081-0/+1
| | | | | | | | | | | | | | Linux upstream commit https://github.com/torvalds/linux/commit/9370f2d05a2a150b0aa719a3070b26d478180df3 add load firmware file through request_firmware,this affect the nanopi r2s and some USB adapters in kernel 5.10 with this error: 'r8152 4-1:1.0: unable to load firmware patch rtl_nic/rtl8153b-2.fw' This patch split the USB NIC firmware files from r8169 firmware, and adds r8152-firmware to r8152 driver. Add kmod-usb-net-cdc-ncm to support RTL8156A and RTL8156B 2.5G ethernet adapters supported since v5.13-rc1. https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 Signed-off-by: Marty Jones <mj8263788@gmail.com>
* ltq-ifxos: update to 1.7.1Jan Hoffmann2022-01-086-234/+34
| | | | | | Signed-off-by: Jan Hoffmann <jan@3e8.eu> [fix warnings, switch to tag tarball, update patches] Signed-off-by: Andre Heider <a.heider@gmail.com>
* ltq-vdsl: move to the default device name /dev/dsl_cpe_api/0Andre Heider2022-01-081-2/+2
| | | | | | | This makes patching it for ltq-vdsl-app unnecessary and paves the way for VRX518 support. Signed-off-by: Andre Heider <a.heider@gmail.com>
* ltq-deu: disable arc4 algorithmDaniel Kestrel2022-01-061-4/+4
| | | | | | | ARC4 was used for WEP, which is not secure anymore. Therefor it is disabled in the driver, but the code is not removed for now. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: add aes_gcm algorithmDaniel Kestrel2022-01-061-0/+313
| | | | | | | | | | | | The lantiq AES hardware does not support the gcm algorithm. But it can be implemented in the driver as a combination of the aes_ctr algorithm and the xor plus gfmul operations for the hashing. Due to the wrapping of the several algorithms and the inefficient 16 byte block by 16 byte block invokation in the kernel implementations, this driver is about 3 times faster for the larger block sizes. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: change PKG_RELEASE to AUTORELEASEDaniel Kestrel2022-01-061-1/+1
| | | | | | As per suggestion by adschm, PKG_RELEASE is set to AUTORELEASE. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: remove redundant code for setting the key in aesDaniel Kestrel2022-01-061-120/+4
| | | | | | | | | | After adding xts and cbcmac the aes algorithm source had three sections for setting the aes key to the hardware which are identical. Method aes_set_key_hw was created which is now called from within the spinlock secured control sections in methods ifx_deu_aes, ifx_deu_aes_xts and aes_cbcmac_final_impl and reduces the size of ifxmips_aes.c. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: add shash cbcmac-aes algorithm to the driverDaniel Kestrel2022-01-061-5/+362
| | | | | | | | | | | | | | | | | | | Since commit 53b6783 hostapd is using the kernel api which includes the cbcmac-aes shash algorithm. The kernels implementation is a wrapper around the aes encryption algorithm, which encrypts block (16 bytes) by block. When the ltq-deu driver is present, it uses hardware aes, but every 16 byte encrypt requires setting the key. This is very inefficient and is a huge overhead. Since the cbcmac-aes is simply a hash that uses the cbc aes algorithm starting with an iv set to x'00' with an optional ecb aes encryption of a possible last incomplete block that is padded with the positional bytes of the last cbc encrypted block, this algorithm is now added to the driver. Most of the code is derived from md5-hmac and tailored for aes. Tested with the kernels crypto testmgr including extra tests against the kernels generic ccm module implementation. This patch also fixes the overallocation in the aes_ctx that is caused by using u32 instead of u8 for the aes keys. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: remove driver disablement for kernel 5.4 and aboveDaniel Kestrel2022-01-061-1/+1
| | | | | | | | Remove the dependency on kernel 5.4 from the Makefile to allow the driver to compile with kernel 5.10 or kernel versions higher than 5.4. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: add aes_xts algorithmDaniel Kestrel2022-01-061-0/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lantiq AES hardware does not support the xts algorithm. Apart from the cipher text stealing (XTS), the AES XTS implementation is just an XOR with the IV, followed by AES ECB, followed by another XOR with the IV and as such can be also implemented by using the lantiq hardware's CBC AES implemention plus one additional XOR with the IV in the driver. The output IV by CBC AES is also not usable and the gfmul operation not supported by lantiq hardware. Both need to be done in the driver too in addition to the IV treatment which is the initial encryption by the other half of the input key and to set the IV to the IV registers for every block. In the generic kernel implementation, the block size for XTS is set to 16 bytes, although the algorithm is designed to process any size of input larger than 16 bytes. But since there is no way to indicate a minimum input length, the block size is used. This leads to certain issues when the skcipher walk functions are used, e.g. processing less than block size bytes is not supported by calling skcipher_walk_done. The walksize is 2 AES blocks because otherwise for splitted input or output data, less than blocksize is to be returned in some cases, which cannot be processed. Another issue was that depending on possible split of input/output data, just 16 bytes are returned while less than 16 bytes were remaining, while cipher text stealing requires 17 bytes or more for processing. For example, if the input is 60 bytes and the walk is 48, then processing 48 bytes leads to a return code of -EINVAL for skcipher_walk_done. Therefor the processed counter is used to figure out, when the actual cipher text stealing for the remaining bytes less than blocksize needs to be applied. Measured with cryptsetup benchmark, this XTS AES implementation is about 19% faster than the kernels XTS implementation that uses the hardware ECB AES (ca. 18.6 MiB/s vs. 15.8 MiB/s decryption 256b key). The implementation was tested with the kernels crypto testmgr against the kernels generic XTS AES implementation including extended tests. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: update initialisations for hmac algorithmsDaniel Kestrel2022-01-062-6/+4
| | | | | | | | | | | | The processing in the hmac algorithms depends on the status fields: count, dbn and started. Not all were initialised in the init method and after finishing the final method. Added missing fields to init method and call init method after finishing final. The memsets have the wrong size in the original driver and did not clear everything and are not necessary. Since no memset is done in the kernels generic implementation, memsets were removed. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: remove compiler warning and shorten locked sectionsDaniel Kestrel2022-01-067-43/+7
| | | | | | | | | | | | Removing hash pointer in _hmac_setkey since its not needed and causes a compiler warning. Make the spinlock control sections shorter and move initializations out of the control sections to free the spinlock faster for allowing other threads to use the hash engine. Minor improvements for indentation and removal of blanks and blank lines in some areas. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: fix temp size exceed in hmac algorithmsDaniel Kestrel2022-01-062-71/+146
| | | | | | | | | | | | | | | | | | | | | | | | | Exceeding the temp array size was not checked and instead storage not allocated by the driver was used/overwritten which in most cases resulted in reboots. This patch implements processing the input to the hash algorithm in tempsize chunks. The _hmac_final methods were changed to _hmac_final_impl adding a parameter that indicates intermediate or final processing. The started variable was added to the context to indicate, if there is an intermediate result in the context. For sha1_hmac the variable to store the intermediate hash was added to the context too. In order to avoid md5_hmac_final_impl being recursively called if the padding of the input and the resulting last transform during the hmac algorighms final processing causes the temp array to overflow and to make sure that there is at least one block in the temp array when the _hmac_final for final processing is called, the check for exceeding the temp array in _hmac_transform was moved before copying the block and incrementing dbn. dbn needs to be at least 1 at final processing time to let the hash engine apply the opad operation. To make the hash engine not apply the hmac algorithms final opad operation, for intermediate processing the dbn in the control register is set to a higher value than number of dbns are actually processed. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: fix setkey errors and static shared temp for hmac algosDaniel Kestrel2022-01-062-52/+137
| | | | | | | | | | | | | | | | | | | The hmac algorithms state, that keys larger than the key size should be hashed with the underlying hash algorithms and then those hashes are to be used as keys. This patch implements this. In order to avoid allocating a descriptor during setkey, a shash_desc pointer is added to the context. Another issue for multithreaded callers is the shared temp array. The temp array is static and as such would be shared among multithreaded callers, which obviously would neither work nor produce correct results. The temp array (4k size) is moved to the context and since the size of the context is limited, it can only be defined as pointer otherwise the initialisation of the hash algorithm fails. The allocations and freeing of both the temp and the desc pointer in the context are done by implementing cra_init and cra_exit functions for the hmac algorithms. Also improved indentation in some areas. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: fix ifxdeu-ctr-rfc3686(aes) not matching generic implDaniel Kestrel2022-01-061-1/+2
| | | | | | | | Error ifxdeu-ctr-rfc3686(aes) (16) doesn't match generic impl (20) occurs when running the cryptomgr extra tests that compare against the linux kernels generic implementation. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: changes for hash multithread callers and md5 endianessDaniel Kestrel2022-01-066-79/+45
| | | | | | | | | | | | | | | | | | | | | | | | | The algorithms sha1, sha1_hmac and md5_hmac all use ENDI=1. The md5 algorithm uses ENDI=0 and the endian_swap methods to reverse the endianess switch by using user CPU time, which is unnecessary overhead. Danube and AR9 devices do not set endianess for SHA1, so is done for MD5. Furthermore the patch replaces endian_swap with le32_to_cpu for md5 and md5 hmac algorithms and removes endian_swap for them. The init functions initialize the algorithm in the hardware. The lock is not used to write to the control register. If another thread calls another hash algo before update or final, the result will be wrong. Therefore move the algorithm init to the lock protected sections in the transform or final methods. Setting the hw key for the hmac algorithms is now done from within the lock protected sections in their final methods. The lock protecting is removed from the _hmac_setkey_hw functions. In final for md5 and sha1 the lock section is removed, because all the work was already done in transform (which is called from final). As such only copying the hash to the output is required. MD5 and MD5_HMAC produce 16 byte hashes (4 DWORDS) only, therefor writing register D5R to the hash output is removed for MD5_HMAC. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: make deu hash lock global and remove md5_hmac_ exportsDaniel Kestrel2022-01-066-48/+23
| | | | | | | | | | | All hash algorithms use the same base IFX_HASH_CON to access the hash unit. Parallel threads should not be able to call different hash algorithms and therefor a global lock is required. Fixed linker warning, that md5_hmac_init, md5_hmac_update and md5_hmac_final are static export symbols. The export symbols are not required, because the functions are exposed using shash_alg structure. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: add aes_ofb and aes_cfb algorithmsDaniel Kestrel2022-01-061-0/+194
| | | | | | | | | The functions ifx_deu_aes_cfg and ifx_deu_aes_ofb have been part of the driver ever since. But the functions and definitions to make the algorithms actually usable were missing. This patch adds the neccessary code for aes_ofb and aes_cfb algorithms. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: fix cryptomgr test errors for aesDaniel Kestrel2022-01-061-45/+44
| | | | | | | | | | | When running cryptomgr tests against the driver, there are several occurences of different errors for even and uneven splitted data in the underlying scatterlists for the ctr and ctr_rfc3686 algorithms which are now fixed. Fixed error in ctr_rfc3686_aes_decrypt function which was introduced with the previous commit by using CRYPTO_DIR_ENCRYPT in the decrypt function. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: fix cryptomgr test errors for desDaniel Kestrel2022-01-062-31/+58
| | | | | | | | | | | | | | | | | | | | | | When running cryptomgr tests against the driver, there are several occurences of different errors for setkey of des and des3-ede algorithms. Those key checks are already implemented in the kernels des implementation, so this is added as dependency and the kernel methods are called. It also required adding the kernels des/des3 context definitions to the des_ctx internal structure to be able to call the kernel methods. Fixed ifxdeu-des... setkey unexpectedly succeeded on test vector x; expected_error=-22. Fixed ifxdeu-des... setkey failed on test vector x; expected_error=0, actual_error=-22. Renamed des_ctx internal structure and des_encrypt/des_decrypt methods because they are already defined in the kernel module. Fixed wrong DES_xxx constant definitions in crypto_alg definition for ifxdeu_des3_ede_alg. Fixed method comment errors. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: convert SHA1 after library impl of SHA1 was removedDaniel Kestrel2022-01-062-9/+9
| | | | | | | | | The <linux/cryptohash.h> was removed with Linux 5.8, because it only contained the library implementation of SHA1, which was folded into <crypto/sha.h>. So switch this driver away from using <linux/cryptohash.h>. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: convert blkcipher to skcipherDaniel Kestrel2022-01-063-464/+413
| | | | | | | | | Convert blkcipher to skcipher for the synchronous versions of AES, DES and ARC4. The Block Cipher API was depracated for a while and was removed with Linux 5.5. So switch this driver to the skcipher API. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: set correct control register for AESDaniel Kestrel2022-01-061-1/+1
| | | | | | | | | | | | Some devices initialize AES during boot and AES works out of the box and the correct endianess is set. NDC means (No Danube Compatibility Mode) and the endianess setting has no effect if its set to 0. NDC 0: OFF ENDI bit cannot be written as in Danube To make it work for other devices, the NDC control register needs to be set to 1. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: make cipher/digest usable by opensslMathias Kresin2022-01-059-28/+28
| | | | | | | | | | OpenSSL with cryptdev support uses the data encryption unit (DEU) driver for hard accelerated processing of ciphers/digests, if the flag CRYPTO_ALG_KERN_DRIVER_ONLY is set. Signed-off-by: Mathias Kresin <dev@kresin.me> [fix commit title prefix] Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: aes-ctr: process all input dataMathias Kresin2022-01-051-31/+21
| | | | | | | | | | | | | | | | | | | | | | | Even if the minimum blocksize is set to 16 (AES_BLOCK_SIZE), the crypto manager tests pass 499 bytes of data to the aes-ctr encryption, from which only 496 bytes are actually encrypted. Reading the comment regarding the minimum blocksize, it only states that it's the "smallest possible unit which can be transformed with this algorithm". Which doesn't necessarily mean, the data have to be a multiple of the minimal blocksize. All kernel hardware crypto driver enforce a minimum blocksize of 1, which perfect fine works for the lantiq data encryption unit as well. Lower the blocksize limit to 1, to process not padded data as well. In AES for processing the remaining bytes, uninitialized pointers were used. This patch fixes using uninitialized pointers and wrong offsets. Signed-off-by: Mathias Kresin <dev@kresin.me> [fix commit title prefix] Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: aes: do not read/write behind bufferMathias Kresin2022-01-051-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling non-aligned remaining data (not padded to 16 byte [AES_BLOCK_SIZE]), a full 16 byte block is read from the input buffer and written to the output buffer after en-/decryption. While code already assumes that an input buffer could have less than 16 byte remaining, as it can be seen by the code zeroing the remaining bytes till AES_BLOCK_SIZE, the full AES_BLOCK_SIZE is read. An output buffer size of a multiple of AES_BLOCK_SIZE is expected but never validated. To get rid of the read/write behind buffer, use a temporary buffer when dealing with not padded data and only write as much bytes to the output as we read. Do not memcpy directly to the register, to make used of the endian swap macro and to trigger the crypto start operator via the ID0R to trigger the register. Since we might need an endian swap for the output in future, use a temporary buffer for the output as well. The issue could not be observed so far, since all caller of ifx_deu_aes will ignore the padded (remaining) data. Considering that the minimum blocksize for the algorithm is set to AES_BLOCK_SIZE, the behaviour could be called expected. Signed-off-by: Mathias Kresin <dev@kresin.me> [fix commit title prefix] Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* ltq-deu: init des/aes before registering crpyto algorithmsMathias Kresin2022-01-052-3/+2
| | | | | | | | | | | | | | The crypto algorithms are registered and available to the system before the chip is actually powered on and the generic parameter for the DEU behaviour set. The issue can mainly be observed if the crypto manager tests are enabled in the kernel config. The crypto manager test run directly after an algorithm is registered. Signed-off-by: Mathias Kresin <dev@kresin.me> [fix commit title prefix] Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
* packages: kernel: add i2c hwmon g762 kmod packagePawel Dembicki2021-12-291-0/+15
| | | | | | | This patch adds kernel module for Global Mixed-mode Technology Inc G762 and G763 fan speed PWM controller chips. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* kernel: mac80211: refresh patchsetNick Hainke2021-12-241-5/+5
| | | | | | | Refreshed: - 311-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* kernel: ath10k: provide a build variant for small RAM devicesNick Hainke2021-12-243-4/+82
| | | | | | | | | | | | | | | | | | | | | | | Based on: 1ac627024de9 ("kernel: ath10k-ct: provide a build variant for small RAM devices") Like described in the ath10k-ct-smallbuffers version, oom-killer gets triggered frequently by devices with small RAM. That change is necessary for many community mesh networks which use ath10k based devices with too little RAM. The -ct driver has been proven unstable if used with 11s meshing and only wave2 chipsets are supporting 11s. Freifunk Berlin is nowadays assembling its firmware-based completely of vanilla OpenWRT with some package additions which are made through the imagebuilder. Therefore we cannot take the approach other freifunk communities have taken to maintain that patch downstream [1]. Other communities consider these devices as broken and that change would pretty much give those devices a second life [2]. [1] - https://git.freifunk-franken.de/mirror/openwrt/commit/450b306e540bc0f2c8a8841bbe4d9612f2b8cdea [2] - https://github.com/freifunk-gluon/gluon/issues/1988#issuecomment-619532909 Signed-off-by: Simon Polack <spolack+git@mailbox.org> Signed-off-by: Nick Hainke <vincent@systemli.org>