Skip to content
Snippets Groups Projects
  1. Feb 12, 2022
  2. Feb 06, 2022
  3. Feb 04, 2022
  4. Feb 03, 2022
    • Sven Eckelmann's avatar
      om-watchdog: Drop unused package · 8a8b7b42
      Sven Eckelmann authored
      
      All devices which used this package migrated to the kernel GPIO-line
      watchdog driver and configure it over their DT.
      
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      8a8b7b42
    • Felix Fietkau's avatar
      mt76: update to the latest version · e045e406
      Felix Fietkau authored
      
      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: default avatarFelix Fietkau <nbd@nbd.name>
      e045e406
    • Felix Fietkau's avatar
      mac80211: backport support for background radar detection · 0b5a547e
      Felix Fietkau authored
      
      Will be used in an upcoming mt76 update
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      0b5a547e
    • Felix Fietkau's avatar
      03ea0405
    • Felix Fietkau's avatar
      mac80211: reorganize patches · 543ada64
      Felix Fietkau authored
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      543ada64
    • Felix Fietkau's avatar
      mac80211: backport support for ndo_fill_forward_path · 02b9b687
      Felix Fietkau authored
      
      Will be used in an upcoming mt76 update
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      02b9b687
  5. Feb 02, 2022
  6. Feb 01, 2022
  7. Jan 27, 2022
    • Tiago Gaspar's avatar
      netfilter: correct some dependencies · ef4c9757
      Tiago Gaspar authored
      
      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: default avatarTiago Gaspar <tiagogaspar8@gmail.com>
      ef4c9757
  8. Jan 21, 2022
  9. Jan 15, 2022
    • Christian Lamparter's avatar
      kernel: add missing kmod+regmap-i2c dependency for NCT7802Y module · 0a08d4fa
      Christian Lamparter authored
      
      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: 1ed50b92 ("package: kernel: add driver module for NCT7802Y")
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      0a08d4fa
    • Pawel Dembicki's avatar
      mvebu: cortexa9: Add support for Ctera C200-V2 · 9149ed4f
      Pawel Dembicki authored
      
      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: default avatarPawel 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: default avatarChristian Lamparter <chunkeey@gmail.com>
      9149ed4f
    • Pawel Dembicki's avatar
      package: kernel: add driver module for NCT7802Y · 1ed50b92
      Pawel Dembicki authored
      
      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: default avatarPawel Dembicki <paweldembicki@gmail.com>
      (fixed c&p'ed module description)
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      1ed50b92
  10. Jan 08, 2022
  11. Jan 07, 2022
  12. Jan 05, 2022
    • Daniel Kestrel's avatar
      ltq-deu: disable arc4 algorithm · b61d756b
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      b61d756b
    • Daniel Kestrel's avatar
      ltq-deu: add aes_gcm algorithm · fc4d88cf
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      fc4d88cf
    • Daniel Kestrel's avatar
      ltq-deu: change PKG_RELEASE to AUTORELEASE · 973e28f2
      Daniel Kestrel authored
      
      As per suggestion by adschm, PKG_RELEASE is set to AUTORELEASE.
      
      Signed-off-by: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      973e28f2
    • Daniel Kestrel's avatar
      ltq-deu: remove redundant code for setting the key in aes · a0d6b09c
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      a0d6b09c
    • Daniel Kestrel's avatar
      ltq-deu: add shash cbcmac-aes algorithm to the driver · 79efaa7f
      Daniel Kestrel authored
      
      Since commit 53b67839 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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      79efaa7f
    • Daniel Kestrel's avatar
      ltq-deu: remove driver disablement for kernel 5.4 and above · f8e5c608
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      f8e5c608
    • Daniel Kestrel's avatar
      ltq-deu: add aes_xts algorithm · 43422dee
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      43422dee
    • Daniel Kestrel's avatar
      ltq-deu: update initialisations for hmac algorithms · 006fee0d
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      006fee0d
    • Daniel Kestrel's avatar
      ltq-deu: remove compiler warning and shorten locked sections · 6ade9d1d
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      6ade9d1d
    • Daniel Kestrel's avatar
      ltq-deu: fix temp size exceed in hmac algorithms · 0470b05b
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      0470b05b
    • Daniel Kestrel's avatar
      ltq-deu: fix setkey errors and static shared temp for hmac algos · 85383b31
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      85383b31
    • Daniel Kestrel's avatar
      ltq-deu: fix ifxdeu-ctr-rfc3686(aes) not matching generic impl · 9cb1875d
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      9cb1875d
    • Daniel Kestrel's avatar
      ltq-deu: changes for hash multithread callers and md5 endianess · 34a3eaf0
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      34a3eaf0
    • Daniel Kestrel's avatar
      ltq-deu: make deu hash lock global and remove md5_hmac_ exports · 87a19c93
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      87a19c93
    • Daniel Kestrel's avatar
      ltq-deu: add aes_ofb and aes_cfb algorithms · 536dc6f1
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      536dc6f1
    • Daniel Kestrel's avatar
      ltq-deu: fix cryptomgr test errors for aes · cd01d41c
      Daniel Kestrel authored
      
      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: default avatarDaniel Kestrel <kestrel1974@t-online.de>
      cd01d41c
Loading