1. 14 Feb, 2017 9 commits
    • Ryan Hsu's avatar
      ath10k: fix the garage chars in board file name creation · a532293f
      Ryan Hsu authored
      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: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      a532293f
    • Kalle Valo's avatar
      ath10k: convert warning about non-existent OTP board id to debug message · 7be52c03
      Kalle Valo authored
      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: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7be52c03
    • Michal Kazior's avatar
      ath10k: silence firmware file probing warnings · 9f5bcfe9
      Michal Kazior authored
      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: default avatarMichal Kazior <michal.kazior@tieto.com>
      [kvalo@qca.qualcomm.com: add more info to the commit log]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      9f5bcfe9
    • Kalle Valo's avatar
      ath10k: add directory to board data error message · 310c01af
      Kalle Valo authored
      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: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      310c01af
    • Erik Stromdahl's avatar
      ath10k: fetch firmware images in a loop · 1c61bedc
      Erik Stromdahl authored
      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: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
      [kvalo@qca.qualcomm.com: remove sdio/usb part, new error message, clarify commit log]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      1c61bedc
    • Kalle Valo's avatar
      ath10k: fix napi crash during rmmod when probe firmware fails · 1427228d
      Kalle Valo authored
      This fixes the below crash when ath10k probe firmware fails, NAPI polling tries
      to access a rx ring resource which was never allocated. An easy way to
      reproduce this is easy to remove all the firmware files, load ath10k modules
      and ath10k will crash when calling 'rmmod ath10k_pci'. The fix is to call
      napi_enable() from ath10k_pci_hif_start() so that it matches with
      napi_disable() being called from ath10k_pci_hif_stop().
      
      Big thanks to Mohammed Shafi Shajakhan who debugged this and provided first
      version of the fix. In this patch I just fix the actual problem in pci.c
      instead of having a workaround in core.c.
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP:  __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]
      __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]
      
      Call Trace:
      
      [<ffffffffa113ec62>] ath10k_htt_rx_msdu_buff_replenish+0x42/0x90
      [ath10k_core]
      [<ffffffffa113f393>] ath10k_htt_txrx_compl_task+0x433/0x17d0
      [ath10k_core]
      [<ffffffff8114406d>] ? __wake_up_common+0x4d/0x80
      [<ffffffff811349ec>] ? cpu_load_update+0xdc/0x150
      [<ffffffffa119301d>] ? ath10k_pci_read32+0xd/0x10 [ath10k_pci]
      [<ffffffffa1195b17>] ath10k_pci_napi_poll+0x47/0x110 [ath10k_pci]
      [<ffffffff817863af>] net_rx_action+0x20f/0x370
      Reported-by: default avatarBen Greear <greearb@candelatech.com>
      Fixes: 3c97f5de ("ath10k: implement NAPI support")
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      1427228d
    • Amadeusz Sławiński's avatar
      ath10k: fix comment · 6d219113
      Amadeusz Sławiński authored
      I wanted to take a look and it's apparently in other header
      Signed-off-by: default avatarAmadeusz Sławiński <amadeusz.slawinski@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      6d219113
    • Amadeusz Sławiński's avatar
      ath10k: use size_t for len variables · 182f1e5a
      Amadeusz Sławiński authored
      cleanup to consolidate type used for len variables
      Signed-off-by: default avatarAmadeusz Sławiński <amadeusz.slawinski@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      182f1e5a
    • Amadeusz Sławiński's avatar
      ath10k: remove ath10k_vif_to_arvif() · 56ac13bf
      Amadeusz Sławiński authored
      it adds unnecessary level of indirection, while we just access structure
      field
      Signed-off-by: default avatarAmadeusz Sławiński <amadeusz.slawinski@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      56ac13bf
  2. 13 Feb, 2017 23 commits
  3. 12 Feb, 2017 8 commits