1. Apr 24, 2018
    • Wen Gong's avatar
      ath10k: convert wow pattern from 802.3 to 802.11 · fa3440fa
      Wen Gong authored
      
      
      When trying to set wow wakeup patterns it fails with this command:
      
      iw phyxx wowlan enable patterns offset xx+ IP address xx.xx.xx.xx
      
      The reason is that the wow pattern from upper layer is in 802.3 format
      for this case, it need to convert it to 802.11 format. The input
      offset parameter is used for 802.3, but the actual offset firmware
      need depends on rx_decap_mode, so that it needs to be recalculated.
      Pattern of 802.3 packet is not same with 802.11 packet. If the
      rx_decap_mode is ATH10K_HW_TXRX_NATIVE_WIFI, then firmware will
      receive data packet with 802.11 format from hardware.
      
      Tested with QCA6174 hw3.0 with firmware
      WLAN.RM.4.4.1-00099-QCARMSWPZ-1, but this will also affect QCA9377.
      This has always failed, so it's not a regression with new firmware
      releases.
      
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      fa3440fa
    • Carl Huang's avatar
      ath10k: support MAC address randomization in scan · 60e1d0fb
      Carl Huang authored
      
      
      The ath10k reports the random_mac_addr capability to upper layer
      based on the service bit firmware reported. Driver sets the
      spoofed flag in scan_ctrl_flag to firmware if upper layer has
      enabled this feature in scan request.
      
      Test with QCA6174 hw3.0 and firmware-6.bin_WLAN.RM.4.4.1-00102-QCARMSWP-1,
      but QCA9377 is also affected.
      
      Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      60e1d0fb
    • Carl Huang's avatar
      ath10k: add WMI_SERVICE_AVAILABLE_EVENT support · cea19a6c
      Carl Huang authored
      
      
      Add WMI_SERVICE_AVAILABLE_EVENT to extend WMI_SERVICE_READY_EVENT,
      the 128bit service map in WMI_SERVICE_READY_EVENT is not enough
      for firmware to notice new WLAN service to host driver. Hereby,
      for thoese new WLAN service, firmware will notice host driver by
      WMI_SERVICE_AVAILABLE_EVENT.
      
      Signed-off-by: default avatarAlan Liu <alanliu@codeaurora.org>
      Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      cea19a6c
  2. Apr 20, 2018
    • Daniel Mack's avatar
      wcn36xx: use READ_ONCE() to access desc->ctrl · 9ff6fde8
      Daniel Mack authored
      
      
      When accessing shared memory to check for the stat of submitted
      descriptors, make sure to use READ_ONCE(). This will guarantee the
      compiler treats these memory locations as volatile and doesn't apply
      any caching.
      
      While this doesn't fix any particular problem I ran into, it's best
      practice to do it this way.
      
      Note that this patch also removes the superflous extra condition check
      in the do-while loop in reap_tx_dxes(), as the loop will break
      instantly anyway in that case.
      
      Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      9ff6fde8
    • Govind Singh's avatar
      ath10k: fix fw path name for WCN3990 target · 6da2b2d4
      Govind Singh authored
      
      
      FW path is mapped incorrectly for the WCN3990
      hw version. Fix fw path with correct hw1.0 name.
      
      Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      6da2b2d4
    • Erik Stromdahl's avatar
      ath10k: add inlined wrappers for htt rx ops · 9a5511d5
      Erik Stromdahl authored
      
      
      Added for the same reason as the TX wrappers.
      
      Signed-off-by: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      9a5511d5
    • Erik Stromdahl's avatar
      ath10k: add inlined wrappers for htt tx ops · 5df6e131
      Erik Stromdahl authored
      
      
      These wrappers makes the HTT ops align better with the HIF ops
      (where similar wrappers are used).
      
      It also makes it easier for a target to have unsupported ops
      (by letting the corresponding function pointer be NULL).
      
      Signed-off-by: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      5df6e131
    • Thomas Hebb's avatar
      ath10k: search all IEs for variant before falling back · c8489668
      Thomas Hebb authored
      commit f2593cb1 ("ath10k: Search SMBIOS for OEM board file
      extension") added a feature to ath10k that allows Board Data File
      (BDF) conflicts between multiple devices that use the same device IDs
      but have different calibration requirements to be resolved by allowing
      a "variant" string to be stored in SMBIOS [and later device tree, added
      by commit d06f26c5 ("ath10k: search DT for qcom,ath10k-calibration-
      variant")] that gets appended to the ID stored in board-2.bin.
      
      This original patch had a regression, however. Namely that devices with
      a variant present in SMBIOS that didn't need custom BDFs could no longer
      find the default BDF, which has no variant appended. The patch was
      reverted and re-applied with a fix for this issue in commit 1657b8f8
      ("search SMBIOS for OEM board file extension").
      
      But the fix to fall back to a default BDF introduced another issue: the
      driver currently parses IEs in board-2.bin one by one, and for each one
      it first checks to see if it matches the ID with the variant appended.
      If it doesn't, it checks to see if it matches the "fallback" ID with no
      variant. If a matching BDF is found at any point during this search, the
      search is terminated and that BDF is used. The issue is that it's very
      possible (and is currently the case for board-2.bin files present in the
      ath10k-firmware repository) for the default BDF to occur in an earlier
      IE than the variant-specific BDF. In this case, the current code will
      happily choose the default BDF even though a better-matching BDF is
      present later in the file.
      
      This patch fixes the issue by first searching the entire file for the ID
      with variant, and searching for the fallback ID only if that search
      fails. It also includes some code cleanup in the area, as
      ath10k_core_fetch_board_data_api_n() no longer does its own string
      mangling to remove the variant from an ID, instead leaving that job to a
      new flag passed to ath10k_core_create_board_name().
      
      I've tested this patch on a QCA4019 and verified that the driver behaves
      correctly for 1) both fallback and variant BDFs present, 2) only fallback
      BDF present, and 3) no matching BDFs present.
      
      Fixes: 1657b8f8
      
       ("ath10k: search SMBIOS for OEM board file extension")
      Signed-off-by: default avatarThomas Hebb <tommyhebb@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      c8489668
  3. Apr 19, 2018
  4. Apr 10, 2018
  5. Mar 29, 2018