1. 27 12月, 2017 8 次提交
  2. 14 12月, 2017 4 次提交
  3. 13 10月, 2017 2 次提交
  4. 31 8月, 2017 1 次提交
    • H
      ath10k: activate user space firmware loading again · c0cc00f2
      Hauke Mehrtens 提交于
      In commit 9f5bcfe9 ("ath10k: silence firmware file probing
      warnings") the firmware loading was changed from request_firmware() to
      request_firmware_direct() to silence some warnings in case it fails.
      request_firmware_direct() directly searches in the file system only and
      does not send a hotplug event to user space in case it could not find
      the firmware directly.
      In LEDE we use a user space script to extract the calibration data from
      the flash memory which gets triggered by the hotplug event. This way the
      firmware gets extracted from some vendor specific partition when the
      driver requests this firmware. This mechanism does not work any more
      after this change.
      
      Fixes: 9f5bcfe9 ("ath10k: silence firmware file probing warnings")
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Cc: Michal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      c0cc00f2
  5. 08 8月, 2017 1 次提交
    • R
      ath10k: fix memory leak in rx ring buffer allocation · f35a7f91
      Rakesh Pillai 提交于
      The rx ring buffers are added to a hash table if
      firmware support full rx reorder. If the full rx
      reorder support flag is not set before allocating
      the rx ring buffers, none of the buffers are added
      to the hash table.
      
      There is a race condition between rx ring refill and
      rx buffer replenish from napi poll. The interrupts are
      enabled in hif start, before the rx ring is refilled during init.
      We replenish buffers from napi poll due to the interrupts which
      get enabled after hif start. Hence before the entire rx ring is
      refilled during the init, the napi poll replenishes a few buffers
      in steps of 100 buffers per attempt. During this rx ring replenish
      from napi poll, the rx reorder flag has not been set due to which
      the replenished buffers are not added to the hash table
      
      Set the rx full reorder support flag before we allocate
      the rx ring buffer to avoid the memory leak.
      Signed-off-by: NRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f35a7f91
  6. 03 8月, 2017 2 次提交
  7. 06 7月, 2017 1 次提交
  8. 21 6月, 2017 2 次提交
  9. 16 6月, 2017 1 次提交
  10. 01 6月, 2017 1 次提交
    • A
      ath10k: add BMI parameters to fix calibration from DT/pre-cal · a9f5f287
      Anilkumar Kolli 提交于
      QCA99X0, QCA9888, QCA9984 supports calibration data in
      either OTP or DT/pre-cal file. Current ath10k supports
      Calibration data from OTP only.
      
      If caldata is loaded from DT/pre-cal file, fetching board id
      and applying calibration parameters like tx power gets failed.
      
      error log:
      [   15.733663] ath10k_pci 0000:01:00.0: failed to fetch board file: -2
      [   15.741474] ath10k_pci 0000:01:00.0: could not probe fw (-2)
      
      This patch adds calibration data support from DT/pre-cal
      file.  Below parameters are used to get board id and
      applying calibration parameters from cal data.
      
      		EEPROM[OTP]	FLASH[DT/pre-cal file]
      Cal param	0x700		0x10000
      Board id	0x10		0x8000
      
      Tested on QCA9888 with pre-cal file.
      Signed-off-by: NAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a9f5f287
  11. 04 5月, 2017 3 次提交
  12. 19 4月, 2017 1 次提交
    • M
      ath10k: fix spectral scan for QCA99X0 family of chipsets · a4aab099
      Mohammed Shafi Shajakhan 提交于
      spectral_bin length (number of bins per fft sample) is usually
      a value where (2^n = value), n is an integer.  All of the QCA99X0
      family of chipsets seems to report a spectral_bin length of
      2^n + 'm' bytes, where m = 4, 12 based on the chipset. This 'm'
      bytes seems to carry some radar related info which is currently
      discarded only for 'bin_len = 68' bytes. Extend this discarding of
      irrelevant 'bin_len' for QCA9984, QCA9888, IPQ4019 as well by
      introducing a hardware parameter 'spectral_bin_discard'. Also
      for QCA988X based family of chipsets which doesn't seem to have this
      issue and also for some of the hardware which I have not tested
      like QCA6174/QCA9377 the existing behaviour is retained as it is.
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a4aab099
  13. 05 4月, 2017 2 次提交
  14. 09 3月, 2017 2 次提交
    • R
      ath10k: improve the firmware download time for QCA9377 · 912b6e88
      Ryan Hsu 提交于
      QCA9377 is the family of QCA61x4 which shared the same procedure
      to enable the hardware clock that could improve the firmware download time.
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      912b6e88
    • R
      ath10k: improve the firmware download time for QCA6174 · 583a6629
      Ryan Hsu 提交于
      Len Brown reported the system resume time is taking more than 2 seconds in
      bug - https://bugzilla.kernel.org/show_bug.cgi?id=185621.
      
      The reason of the 2 seconds is due to the firmware download time.
      
      The chip is booted up in the default reference clock speed to handle the
      firmware download to chip memory and advanced to the support higher speed
      clock to run the firmware after all. The default reference clock in the
      hardware is slow so that the firmware download time is taking up to 2
      seconds for a 600KB firmware file.
      
      	[76796.349701] ath10k_pci : boot uploading firmware image len 688691
      	[76798.334612] ath10k_pci : htt tx max num pending tx 1056
      
      The resolution here is to enable the higher speed clock if the hardware
      supported before the firmware download at BMI stage, so that the hardware
      can handle the firmare download in a more efficient way. This can help to
      improve the firmware download time from 2 seconds to around 500ms for the
      same 600KB firmware file.
      
      	[322858.577919] ath10k_pci boot uploading firmware image len 688691
      	[322859.093094] ath10k_pci htt tx max num pending tx 1056
      
      The steps to advance to the higher speed clock is very hardware specific,
      so adding the hardware ops for the hardware that can support this.
      Reported-by: NLen Brown <lenb@kernel.org>
      Tested-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      583a6629
  15. 02 3月, 2017 1 次提交
    • W
      ath10k: search SMBIOS for OEM board file extension · 1657b8f8
      Waldemar Rymarkiewicz 提交于
      Board Data File (BDF) is loaded upon driver boot-up procedure. The right
      board data file is identified, among others, by device and sybsystem ids.
      
      The problem, however, can occur when the (default) board data file cannot
      fulfill with the vendor requirements and it is necessary to use a different
      board data file.
      
      To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name
      Extension to specify the extension/variant name. The driver will take the
      extension suffix into consideration and will load the right (non-default)
      board data file if necessary.
      
      If it is unnecessary to use extension board data file, please leave the
      SMBIOS field blank and default configuration will be used.
      
      Example:
      If a default board data file for a specific board is identified by a string
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310"
      then the OEM specific data file, if used, could be identified by variant
      suffix:
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310,variant=DE_1AB"
      
      If board data file name extension is set but board-2.bin does not contain
      board data file for the variant, the driver will fallback to the default
      board data file not to break backward compatibility.
      
      This was first applied in commit f2593cb1 ("ath10k: Search SMBIOS for OEM
      board file extension") but later reverted in commit 005c3490 ("Revert
      "ath10k: Search SMBIOS for OEM board file extension"". This patch is now
      otherwise the same as commit f2593cb1 except the regression fixed.
      Signed-off-by: NWaldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      1657b8f8
  16. 22 2月, 2017 1 次提交
  17. 15 2月, 2017 6 次提交
    • R
      ath10k: fix the garage chars in board file name creation · a532293f
      Ryan Hsu 提交于
      The variant[] string will be valid only if the bdf_ext is set.
      
      The string memory needs to be null-terminated to avoid the undefined garbage
      appended by the subsequent board file name creation.
      
      ath10k_pci 0000:04:00.0: failed to fetch board data for
      "bus=pci,vendor=168c,device=003e,subsystem-vendor=168c,subsystem-device=3363��P�����"
      from ath10k/QCA6174/hw3.0/board-2.bin
      
      Fixes: f2593cb1 ("ath10k: Search SMBIOS for OEM board file extension")
      Reported-by: NKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a532293f
    • K
      ath10k: convert warning about non-existent OTP board id to debug message · 7be52c03
      Kalle Valo 提交于
      Currently ath10k unncessarily warns about board id not available from OTP:
      
      ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
      ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
      ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
      ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.9-2 api 5 features no-p2p,raw-mode crc32 b8d50af5
      ath10k_pci 0000:02:00.0: board id is not exist in otp, ignore it
      ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
      ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
      
      But not all boards have the board id in OTP so this is not a problem and no
      need to confuse the user with that info. So this can be safely changed to a
      debug message.
      
      Also fix grammar in the debug message.
      
      Fixes: d2e202c0 ("ath10k: ignore configuring the incorrect board_id")
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7be52c03
    • M
      ath10k: silence firmware file probing warnings · 9f5bcfe9
      Michal Kazior 提交于
      Firmware files are versioned to prevent older
      driver instances to load unsupported firmware
      blobs. This is reflected with a fallback logic
      which attempts to load several firmware files.
      
      This however produced a lot of unnecessary
      warnings sometimes confusing users and leading
      them to rename firmware files making things even
      more confusing.
      
      Hence use request_firmware_direct() which does not
      produce extra warnings. This shouldn't really
      break anything because most modern systems don't
      rely on udev/hotplug helpers to load firmware
      files anymore. For example it was confirmed that
      LEDE does not user helper.
      
      This also fixes a 60 second delay per _each_
      unexistent firmware/calibration file with distros
      which have CONFIG_FW_LOADER_USER_HELPER_FALLBACK
      enabled, RHEL being a notable example. Using
      ath10k with firmware-2.bin this might end up
      into a five minute delay in boot.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      [kvalo@qca.qualcomm.com: add more info to the commit log]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9f5bcfe9
    • K
      ath10k: add directory to board data error message · 310c01af
      Kalle Valo 提交于
      This way user has a better idea what file exactly is missing.
      This is needed when we switch to using request_firmware_direct() which doesn't
      print any errors anymore.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      310c01af
    • E
      ath10k: fetch firmware images in a loop · 1c61bedc
      Erik Stromdahl 提交于
      To make it easier to handle minimum and maximum firmware API numbers convert
      the firmware fetch functionality to a loop. If no firmware image is found print
      an error with minimum and maximum API numbers and the name of firmware
      directory. This is needed when we switch to using request_firmware_direct()
      which doesn't print any errors anymore.
      
      Also add a new function for creating the fw file name dynamically which makes it
      easier to add new bus support, for example SDIO and USB, later.
      Signed-off-by: NErik Stromdahl <erik.stromdahl@gmail.com>
      [kvalo@qca.qualcomm.com: remove sdio/usb part, new error message, clarify commit log]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      1c61bedc
    • A
      ath10k: use size_t for len variables · 182f1e5a
      Amadeusz Sławiński 提交于
      cleanup to consolidate type used for len variables
      Signed-off-by: NAmadeusz Sławiński <amadeusz.slawinski@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      182f1e5a
  18. 07 2月, 2017 1 次提交
    • T
      ath10k: fix boot failure in UTF mode/testmode · cb428152
      Tamizh chelvam 提交于
      Rx filter reset and the dynamic tx switch mode (EXT_RESOURCE_CFG)
      configuration are causing the following errors when UTF firmware
      is loaded to the target.
      
      Error message 1:
      [ 598.015629] ath10k_pci 0001:01:00.0: failed to ping firmware: -110
      [ 598.020828] ath10k_pci 0001:01:00.0: failed to reset rx filter: -110
      [ 598.141556] ath10k_pci 0001:01:00.0: failed to start core (testmode): -110
      
      Error message 2:
      [ 668.615839] ath10k_ahb a000000.wifi: failed to send ext resource cfg command : -95
      [ 668.618902] ath10k_ahb a000000.wifi: failed to start core (testmode): -95
      
      Avoiding these configurations while bringing the target in
      testmode is solving the problem.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      cb428152